1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  
26  /**
27   * <a href="LayoutLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portal.service.LayoutLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portal.service.LayoutLocalService
45   *
46   */
47  public class LayoutLocalServiceUtil {
48      public static com.liferay.portal.model.Layout addLayout(
49          com.liferay.portal.model.Layout layout)
50          throws com.liferay.portal.SystemException {
51          return getService().addLayout(layout);
52      }
53  
54      public static com.liferay.portal.model.Layout createLayout(long plid) {
55          return getService().createLayout(plid);
56      }
57  
58      public static void deleteLayout(long plid)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteLayout(plid);
62      }
63  
64      public static void deleteLayout(com.liferay.portal.model.Layout layout)
65          throws com.liferay.portal.SystemException {
66          getService().deleteLayout(layout);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
71          throws com.liferay.portal.SystemException {
72          return getService().dynamicQuery(dynamicQuery);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end) throws com.liferay.portal.SystemException {
78          return getService().dynamicQuery(dynamicQuery, start, end);
79      }
80  
81      public static com.liferay.portal.model.Layout getLayout(long plid)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getLayout(plid);
85      }
86  
87      public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getLayouts(start, end);
90      }
91  
92      public static int getLayoutsCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getLayoutsCount();
95      }
96  
97      public static com.liferay.portal.model.Layout updateLayout(
98          com.liferay.portal.model.Layout layout)
99          throws com.liferay.portal.SystemException {
100         return getService().updateLayout(layout);
101     }
102 
103     public static com.liferay.portal.model.Layout updateLayout(
104         com.liferay.portal.model.Layout layout, boolean merge)
105         throws com.liferay.portal.SystemException {
106         return getService().updateLayout(layout, merge);
107     }
108 
109     public static com.liferay.portal.model.Layout addLayout(long userId,
110         long groupId, boolean privateLayout, long parentLayoutId,
111         java.lang.String name, java.lang.String title,
112         java.lang.String description, java.lang.String type, boolean hidden,
113         java.lang.String friendlyURL)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         return getService()
117                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
118             name, title, description, type, hidden, friendlyURL);
119     }
120 
121     public static com.liferay.portal.model.Layout addLayout(long userId,
122         long groupId, boolean privateLayout, long parentLayoutId,
123         java.util.Map<java.util.Locale, String> localeNamesMap,
124         java.util.Map<java.util.Locale, String> localeTitlesMap,
125         java.lang.String description, java.lang.String type, boolean hidden,
126         java.lang.String friendlyURL)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService()
130                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
131             localeNamesMap, localeTitlesMap, description, type, hidden,
132             friendlyURL);
133     }
134 
135     public static com.liferay.portal.model.Layout addLayout(long userId,
136         long groupId, boolean privateLayout, long parentLayoutId,
137         java.lang.String name, java.lang.String title,
138         java.lang.String description, java.lang.String type, boolean hidden,
139         java.lang.String friendlyURL, long dlFolderId)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService()
143                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
144             name, title, description, type, hidden, friendlyURL, dlFolderId);
145     }
146 
147     public static com.liferay.portal.model.Layout addLayout(long userId,
148         long groupId, boolean privateLayout, long parentLayoutId,
149         java.util.Map<java.util.Locale, String> localeNamesMap,
150         java.util.Map<java.util.Locale, String> localeTitlesMap,
151         java.lang.String description, java.lang.String type, boolean hidden,
152         java.lang.String friendlyURL, long dlFolderId)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         return getService()
156                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
157             localeNamesMap, localeTitlesMap, description, type, hidden,
158             friendlyURL, dlFolderId);
159     }
160 
161     public static void deleteLayout(long groupId, boolean privateLayout,
162         long layoutId)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         getService().deleteLayout(groupId, privateLayout, layoutId);
166     }
167 
168     public static void deleteLayout(com.liferay.portal.model.Layout layout,
169         boolean updateLayoutSet)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException {
172         getService().deleteLayout(layout, updateLayoutSet);
173     }
174 
175     public static void deleteLayouts(long groupId, boolean privateLayout)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         getService().deleteLayouts(groupId, privateLayout);
179     }
180 
181     public static byte[] exportLayouts(long groupId, boolean privateLayout,
182         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
183         java.util.Date endDate)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         return getService()
187                    .exportLayouts(groupId, privateLayout, parameterMap,
188             startDate, endDate);
189     }
190 
191     public static byte[] exportLayouts(long groupId, boolean privateLayout,
192         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
193         java.util.Date startDate, java.util.Date endDate)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService()
197                    .exportLayouts(groupId, privateLayout, layoutIds,
198             parameterMap, startDate, endDate);
199     }
200 
201     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
202         long groupId, boolean privateLayout, long[] layoutIds,
203         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
204         java.util.Date endDate)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         return getService()
208                    .exportLayoutsAsStream(groupId, privateLayout, layoutIds,
209             parameterMap, startDate, endDate);
210     }
211 
212     public static byte[] exportPortletInfo(long plid, long groupId,
213         java.lang.String portletId,
214         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
215         java.util.Date endDate)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         return getService()
219                    .exportPortletInfo(plid, groupId, portletId, parameterMap,
220             startDate, endDate);
221     }
222 
223     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
224         long plid, long groupId, java.lang.String portletId,
225         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
226         java.util.Date endDate)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         return getService()
230                    .exportPortletInfoAsStream(plid, groupId, portletId,
231             parameterMap, startDate, endDate);
232     }
233 
234     public static long getDefaultPlid(long groupId)
235         throws com.liferay.portal.SystemException {
236         return getService().getDefaultPlid(groupId);
237     }
238 
239     public static long getDefaultPlid(long groupId, boolean privateLayout)
240         throws com.liferay.portal.SystemException {
241         return getService().getDefaultPlid(groupId, privateLayout);
242     }
243 
244     public static long getDefaultPlid(long groupId, boolean privateLayout,
245         java.lang.String portletId) throws com.liferay.portal.SystemException {
246         return getService().getDefaultPlid(groupId, privateLayout, portletId);
247     }
248 
249     public static com.liferay.portal.model.Layout getDLFolderLayout(
250         long dlFolderId)
251         throws com.liferay.portal.PortalException,
252             com.liferay.portal.SystemException {
253         return getService().getDLFolderLayout(dlFolderId);
254     }
255 
256     public static com.liferay.portal.model.Layout getFriendlyURLLayout(
257         long groupId, boolean privateLayout, java.lang.String friendlyURL)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException {
260         return getService()
261                    .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
262     }
263 
264     public static com.liferay.portal.model.Layout getLayout(long groupId,
265         boolean privateLayout, long layoutId)
266         throws com.liferay.portal.PortalException,
267             com.liferay.portal.SystemException {
268         return getService().getLayout(groupId, privateLayout, layoutId);
269     }
270 
271     public static com.liferay.portal.model.Layout getLayoutByIconImageId(
272         long iconImageId)
273         throws com.liferay.portal.PortalException,
274             com.liferay.portal.SystemException {
275         return getService().getLayoutByIconImageId(iconImageId);
276     }
277 
278     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
279         long groupId, boolean privateLayout)
280         throws com.liferay.portal.SystemException {
281         return getService().getLayouts(groupId, privateLayout);
282     }
283 
284     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
285         long groupId, boolean privateLayout, long parentLayoutId)
286         throws com.liferay.portal.SystemException {
287         return getService().getLayouts(groupId, privateLayout, parentLayoutId);
288     }
289 
290     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
291         long groupId, boolean privateLayout, java.lang.String type)
292         throws com.liferay.portal.SystemException {
293         return getService().getLayouts(groupId, privateLayout, type);
294     }
295 
296     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
297         long groupId, boolean privateLayout, long parentLayoutId, int start,
298         int end) throws com.liferay.portal.SystemException {
299         return getService()
300                    .getLayouts(groupId, privateLayout, parentLayoutId, start,
301             end);
302     }
303 
304     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
305         long groupId, boolean privateLayout, long[] layoutIds)
306         throws com.liferay.portal.PortalException,
307             com.liferay.portal.SystemException {
308         return getService().getLayouts(groupId, privateLayout, layoutIds);
309     }
310 
311     public static com.liferay.portal.model.LayoutReference[] getLayouts(
312         long companyId, java.lang.String portletId,
313         java.lang.String preferencesKey, java.lang.String preferencesValue)
314         throws com.liferay.portal.SystemException {
315         return getService()
316                    .getLayouts(companyId, portletId, preferencesKey,
317             preferencesValue);
318     }
319 
320     public static long getNextLayoutId(long groupId, boolean privateLayout)
321         throws com.liferay.portal.SystemException {
322         return getService().getNextLayoutId(groupId, privateLayout);
323     }
324 
325     public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
326         throws com.liferay.portal.SystemException {
327         return getService().getNullFriendlyURLLayouts();
328     }
329 
330     public static void importLayouts(long userId, long groupId,
331         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
332         java.io.File file)
333         throws com.liferay.portal.PortalException,
334             com.liferay.portal.SystemException {
335         getService()
336             .importLayouts(userId, groupId, privateLayout, parameterMap, file);
337     }
338 
339     public static void importLayouts(long userId, long groupId,
340         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
341         byte[] bytes)
342         throws com.liferay.portal.PortalException,
343             com.liferay.portal.SystemException {
344         getService()
345             .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
346     }
347 
348     public static void importLayouts(long userId, long groupId,
349         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
350         java.io.InputStream is)
351         throws com.liferay.portal.PortalException,
352             com.liferay.portal.SystemException {
353         getService()
354             .importLayouts(userId, groupId, privateLayout, parameterMap, is);
355     }
356 
357     public static void importPortletInfo(long userId, long plid, long groupId,
358         java.lang.String portletId,
359         java.util.Map<String, String[]> parameterMap, java.io.File file)
360         throws com.liferay.portal.PortalException,
361             com.liferay.portal.SystemException {
362         getService()
363             .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
364             file);
365     }
366 
367     public static void importPortletInfo(long userId, long plid, long groupId,
368         java.lang.String portletId,
369         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
370         throws com.liferay.portal.PortalException,
371             com.liferay.portal.SystemException {
372         getService()
373             .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
374             is);
375     }
376 
377     public static void setLayouts(long groupId, boolean privateLayout,
378         long parentLayoutId, long[] layoutIds)
379         throws com.liferay.portal.PortalException,
380             com.liferay.portal.SystemException {
381         getService()
382             .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
383     }
384 
385     public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
386         java.lang.String friendlyURL)
387         throws com.liferay.portal.PortalException,
388             com.liferay.portal.SystemException {
389         return getService().updateFriendlyURL(plid, friendlyURL);
390     }
391 
392     public static com.liferay.portal.model.Layout updateLayout(long groupId,
393         boolean privateLayout, long layoutId, long parentLayoutId,
394         java.util.Map<java.util.Locale, String> localeNamesMap,
395         java.util.Map<java.util.Locale, String> localeTitlesMap,
396         java.lang.String description, java.lang.String type, boolean hidden,
397         java.lang.String friendlyURL)
398         throws com.liferay.portal.PortalException,
399             com.liferay.portal.SystemException {
400         return getService()
401                    .updateLayout(groupId, privateLayout, layoutId,
402             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
403             hidden, friendlyURL);
404     }
405 
406     public static com.liferay.portal.model.Layout updateLayout(long groupId,
407         boolean privateLayout, long layoutId, long parentLayoutId,
408         java.util.Map<java.util.Locale, String> localeNamesMap,
409         java.util.Map<java.util.Locale, String> localeTitlesMap,
410         java.lang.String description, java.lang.String type, boolean hidden,
411         java.lang.String friendlyURL, java.lang.Boolean iconImage,
412         byte[] iconBytes)
413         throws com.liferay.portal.PortalException,
414             com.liferay.portal.SystemException {
415         return getService()
416                    .updateLayout(groupId, privateLayout, layoutId,
417             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
418             hidden, friendlyURL, iconImage, iconBytes);
419     }
420 
421     public static com.liferay.portal.model.Layout updateLayout(long groupId,
422         boolean privateLayout, long layoutId, java.lang.String typeSettings)
423         throws com.liferay.portal.PortalException,
424             com.liferay.portal.SystemException {
425         return getService()
426                    .updateLayout(groupId, privateLayout, layoutId, typeSettings);
427     }
428 
429     public static com.liferay.portal.model.Layout updateLookAndFeel(
430         long groupId, boolean privateLayout, long layoutId,
431         java.lang.String themeId, java.lang.String colorSchemeId,
432         java.lang.String css, boolean wapTheme)
433         throws com.liferay.portal.PortalException,
434             com.liferay.portal.SystemException {
435         return getService()
436                    .updateLookAndFeel(groupId, privateLayout, layoutId,
437             themeId, colorSchemeId, css, wapTheme);
438     }
439 
440     public static com.liferay.portal.model.Layout updateName(long plid,
441         java.lang.String name, java.lang.String languageId)
442         throws com.liferay.portal.PortalException,
443             com.liferay.portal.SystemException {
444         return getService().updateName(plid, name, languageId);
445     }
446 
447     public static com.liferay.portal.model.Layout updateName(long groupId,
448         boolean privateLayout, long layoutId, java.lang.String name,
449         java.lang.String languageId)
450         throws com.liferay.portal.PortalException,
451             com.liferay.portal.SystemException {
452         return getService()
453                    .updateName(groupId, privateLayout, layoutId, name,
454             languageId);
455     }
456 
457     public static com.liferay.portal.model.Layout updateName(
458         com.liferay.portal.model.Layout layout, java.lang.String name,
459         java.lang.String languageId)
460         throws com.liferay.portal.PortalException,
461             com.liferay.portal.SystemException {
462         return getService().updateName(layout, name, languageId);
463     }
464 
465     public static com.liferay.portal.model.Layout updateParentLayoutId(
466         long plid, long parentPlid)
467         throws com.liferay.portal.PortalException,
468             com.liferay.portal.SystemException {
469         return getService().updateParentLayoutId(plid, parentPlid);
470     }
471 
472     public static com.liferay.portal.model.Layout updateParentLayoutId(
473         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
474         throws com.liferay.portal.PortalException,
475             com.liferay.portal.SystemException {
476         return getService()
477                    .updateParentLayoutId(groupId, privateLayout, layoutId,
478             parentLayoutId);
479     }
480 
481     public static com.liferay.portal.model.Layout updatePriority(long plid,
482         int priority)
483         throws com.liferay.portal.PortalException,
484             com.liferay.portal.SystemException {
485         return getService().updatePriority(plid, priority);
486     }
487 
488     public static com.liferay.portal.model.Layout updatePriority(long groupId,
489         boolean privateLayout, long layoutId, int priority)
490         throws com.liferay.portal.PortalException,
491             com.liferay.portal.SystemException {
492         return getService()
493                    .updatePriority(groupId, privateLayout, layoutId, priority);
494     }
495 
496     public static com.liferay.portal.model.Layout updatePriority(
497         com.liferay.portal.model.Layout layout, int priority)
498         throws com.liferay.portal.SystemException {
499         return getService().updatePriority(layout, priority);
500     }
501 
502     public static LayoutLocalService getService() {
503         if (_service == null) {
504             throw new RuntimeException("LayoutLocalService is not set");
505         }
506 
507         return _service;
508     }
509 
510     public void setService(LayoutLocalService service) {
511         _service = service;
512     }
513 
514     private static LayoutLocalService _service;
515 }