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 addLayout(long userId,
104         long groupId, boolean privateLayout, long parentLayoutId,
105         java.lang.String name, java.lang.String title,
106         java.lang.String description, java.lang.String type, boolean hidden,
107         java.lang.String friendlyURL)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException {
110         return getService()
111                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
112             name, title, description, type, hidden, friendlyURL);
113     }
114 
115     public static com.liferay.portal.model.Layout addLayout(long userId,
116         long groupId, boolean privateLayout, long parentLayoutId,
117         java.util.Map<java.util.Locale, String> localeNamesMap,
118         java.util.Map<java.util.Locale, String> localeTitlesMap,
119         java.lang.String description, java.lang.String type, boolean hidden,
120         java.lang.String friendlyURL)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService()
124                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
125             localeNamesMap, localeTitlesMap, description, type, hidden,
126             friendlyURL);
127     }
128 
129     public static com.liferay.portal.model.Layout addLayout(long userId,
130         long groupId, boolean privateLayout, long parentLayoutId,
131         java.lang.String name, java.lang.String title,
132         java.lang.String description, java.lang.String type, boolean hidden,
133         java.lang.String friendlyURL, long dlFolderId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         return getService()
137                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
138             name, title, description, type, hidden, friendlyURL, dlFolderId);
139     }
140 
141     public static com.liferay.portal.model.Layout addLayout(long userId,
142         long groupId, boolean privateLayout, long parentLayoutId,
143         java.util.Map<java.util.Locale, String> localeNamesMap,
144         java.util.Map<java.util.Locale, String> localeTitlesMap,
145         java.lang.String description, java.lang.String type, boolean hidden,
146         java.lang.String friendlyURL, long dlFolderId)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         return getService()
150                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
151             localeNamesMap, localeTitlesMap, description, type, hidden,
152             friendlyURL, dlFolderId);
153     }
154 
155     public static void deleteLayout(long groupId, boolean privateLayout,
156         long layoutId)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         getService().deleteLayout(groupId, privateLayout, layoutId);
160     }
161 
162     public static void deleteLayout(com.liferay.portal.model.Layout layout,
163         boolean updateLayoutSet)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         getService().deleteLayout(layout, updateLayoutSet);
167     }
168 
169     public static void deleteLayouts(long groupId, boolean privateLayout)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException {
172         getService().deleteLayouts(groupId, privateLayout);
173     }
174 
175     public static byte[] exportLayouts(long groupId, boolean privateLayout,
176         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
177         java.util.Date endDate)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         return getService()
181                    .exportLayouts(groupId, privateLayout, parameterMap,
182             startDate, endDate);
183     }
184 
185     public static byte[] exportLayouts(long groupId, boolean privateLayout,
186         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
187         java.util.Date startDate, java.util.Date endDate)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         return getService()
191                    .exportLayouts(groupId, privateLayout, layoutIds,
192             parameterMap, startDate, endDate);
193     }
194 
195     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
196         long groupId, boolean privateLayout, long[] layoutIds,
197         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
198         java.util.Date endDate)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         return getService()
202                    .exportLayoutsAsStream(groupId, privateLayout, layoutIds,
203             parameterMap, startDate, endDate);
204     }
205 
206     public static byte[] exportPortletInfo(long plid, long groupId,
207         java.lang.String portletId,
208         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
209         java.util.Date endDate)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException {
212         return getService()
213                    .exportPortletInfo(plid, groupId, portletId, parameterMap,
214             startDate, endDate);
215     }
216 
217     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
218         long plid, long groupId, java.lang.String portletId,
219         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
220         java.util.Date endDate)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException {
223         return getService()
224                    .exportPortletInfoAsStream(plid, groupId, portletId,
225             parameterMap, startDate, endDate);
226     }
227 
228     public static long getDefaultPlid(long groupId)
229         throws com.liferay.portal.SystemException {
230         return getService().getDefaultPlid(groupId);
231     }
232 
233     public static long getDefaultPlid(long groupId, boolean privateLayout)
234         throws com.liferay.portal.SystemException {
235         return getService().getDefaultPlid(groupId, privateLayout);
236     }
237 
238     public static long getDefaultPlid(long groupId, boolean privateLayout,
239         java.lang.String portletId) throws com.liferay.portal.SystemException {
240         return getService().getDefaultPlid(groupId, privateLayout, portletId);
241     }
242 
243     public static com.liferay.portal.model.Layout getDLFolderLayout(
244         long dlFolderId)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         return getService().getDLFolderLayout(dlFolderId);
248     }
249 
250     public static com.liferay.portal.model.Layout getFriendlyURLLayout(
251         long groupId, boolean privateLayout, java.lang.String friendlyURL)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         return getService()
255                    .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
256     }
257 
258     public static com.liferay.portal.model.Layout getLayout(long groupId,
259         boolean privateLayout, long layoutId)
260         throws com.liferay.portal.PortalException,
261             com.liferay.portal.SystemException {
262         return getService().getLayout(groupId, privateLayout, layoutId);
263     }
264 
265     public static com.liferay.portal.model.Layout getLayoutByIconImageId(
266         long iconImageId)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException {
269         return getService().getLayoutByIconImageId(iconImageId);
270     }
271 
272     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
273         long groupId, boolean privateLayout)
274         throws com.liferay.portal.SystemException {
275         return getService().getLayouts(groupId, privateLayout);
276     }
277 
278     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
279         long groupId, boolean privateLayout, long parentLayoutId)
280         throws com.liferay.portal.SystemException {
281         return getService().getLayouts(groupId, privateLayout, parentLayoutId);
282     }
283 
284     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
285         long groupId, boolean privateLayout, java.lang.String type)
286         throws com.liferay.portal.SystemException {
287         return getService().getLayouts(groupId, privateLayout, type);
288     }
289 
290     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
291         long groupId, boolean privateLayout, long parentLayoutId, int start,
292         int end) throws com.liferay.portal.SystemException {
293         return getService()
294                    .getLayouts(groupId, privateLayout, parentLayoutId, start,
295             end);
296     }
297 
298     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
299         long groupId, boolean privateLayout, long[] layoutIds)
300         throws com.liferay.portal.PortalException,
301             com.liferay.portal.SystemException {
302         return getService().getLayouts(groupId, privateLayout, layoutIds);
303     }
304 
305     public static com.liferay.portal.model.LayoutReference[] getLayouts(
306         long companyId, java.lang.String portletId,
307         java.lang.String preferencesKey, java.lang.String preferencesValue)
308         throws com.liferay.portal.SystemException {
309         return getService()
310                    .getLayouts(companyId, portletId, preferencesKey,
311             preferencesValue);
312     }
313 
314     public static long getNextLayoutId(long groupId, boolean privateLayout)
315         throws com.liferay.portal.SystemException {
316         return getService().getNextLayoutId(groupId, privateLayout);
317     }
318 
319     public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
320         throws com.liferay.portal.SystemException {
321         return getService().getNullFriendlyURLLayouts();
322     }
323 
324     public static void importLayouts(long userId, long groupId,
325         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
326         java.io.File file)
327         throws com.liferay.portal.PortalException,
328             com.liferay.portal.SystemException {
329         getService()
330             .importLayouts(userId, groupId, privateLayout, parameterMap, file);
331     }
332 
333     public static void importLayouts(long userId, long groupId,
334         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
335         byte[] bytes)
336         throws com.liferay.portal.PortalException,
337             com.liferay.portal.SystemException {
338         getService()
339             .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
340     }
341 
342     public static void importLayouts(long userId, long groupId,
343         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
344         java.io.InputStream is)
345         throws com.liferay.portal.PortalException,
346             com.liferay.portal.SystemException {
347         getService()
348             .importLayouts(userId, groupId, privateLayout, parameterMap, is);
349     }
350 
351     public static void importPortletInfo(long userId, long plid, long groupId,
352         java.lang.String portletId,
353         java.util.Map<String, String[]> parameterMap, java.io.File file)
354         throws com.liferay.portal.PortalException,
355             com.liferay.portal.SystemException {
356         getService()
357             .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
358             file);
359     }
360 
361     public static void importPortletInfo(long userId, long plid, long groupId,
362         java.lang.String portletId,
363         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
364         throws com.liferay.portal.PortalException,
365             com.liferay.portal.SystemException {
366         getService()
367             .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
368             is);
369     }
370 
371     public static void setLayouts(long groupId, boolean privateLayout,
372         long parentLayoutId, long[] layoutIds)
373         throws com.liferay.portal.PortalException,
374             com.liferay.portal.SystemException {
375         getService()
376             .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
377     }
378 
379     public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
380         java.lang.String friendlyURL)
381         throws com.liferay.portal.PortalException,
382             com.liferay.portal.SystemException {
383         return getService().updateFriendlyURL(plid, friendlyURL);
384     }
385 
386     public static com.liferay.portal.model.Layout updateLayout(long groupId,
387         boolean privateLayout, long layoutId, long parentLayoutId,
388         java.util.Map<java.util.Locale, String> localeNamesMap,
389         java.util.Map<java.util.Locale, String> localeTitlesMap,
390         java.lang.String description, java.lang.String type, boolean hidden,
391         java.lang.String friendlyURL)
392         throws com.liferay.portal.PortalException,
393             com.liferay.portal.SystemException {
394         return getService()
395                    .updateLayout(groupId, privateLayout, layoutId,
396             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
397             hidden, friendlyURL);
398     }
399 
400     public static com.liferay.portal.model.Layout updateLayout(long groupId,
401         boolean privateLayout, long layoutId, long parentLayoutId,
402         java.util.Map<java.util.Locale, String> localeNamesMap,
403         java.util.Map<java.util.Locale, String> localeTitlesMap,
404         java.lang.String description, java.lang.String type, boolean hidden,
405         java.lang.String friendlyURL, java.lang.Boolean iconImage,
406         byte[] iconBytes)
407         throws com.liferay.portal.PortalException,
408             com.liferay.portal.SystemException {
409         return getService()
410                    .updateLayout(groupId, privateLayout, layoutId,
411             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
412             hidden, friendlyURL, iconImage, iconBytes);
413     }
414 
415     public static com.liferay.portal.model.Layout updateLayout(long groupId,
416         boolean privateLayout, long layoutId, java.lang.String typeSettings)
417         throws com.liferay.portal.PortalException,
418             com.liferay.portal.SystemException {
419         return getService()
420                    .updateLayout(groupId, privateLayout, layoutId, typeSettings);
421     }
422 
423     public static com.liferay.portal.model.Layout updateLookAndFeel(
424         long groupId, boolean privateLayout, long layoutId,
425         java.lang.String themeId, java.lang.String colorSchemeId,
426         java.lang.String css, boolean wapTheme)
427         throws com.liferay.portal.PortalException,
428             com.liferay.portal.SystemException {
429         return getService()
430                    .updateLookAndFeel(groupId, privateLayout, layoutId,
431             themeId, colorSchemeId, css, wapTheme);
432     }
433 
434     public static com.liferay.portal.model.Layout updateName(long plid,
435         java.lang.String name, java.lang.String languageId)
436         throws com.liferay.portal.PortalException,
437             com.liferay.portal.SystemException {
438         return getService().updateName(plid, name, languageId);
439     }
440 
441     public static com.liferay.portal.model.Layout updateName(long groupId,
442         boolean privateLayout, long layoutId, java.lang.String name,
443         java.lang.String languageId)
444         throws com.liferay.portal.PortalException,
445             com.liferay.portal.SystemException {
446         return getService()
447                    .updateName(groupId, privateLayout, layoutId, name,
448             languageId);
449     }
450 
451     public static com.liferay.portal.model.Layout updateName(
452         com.liferay.portal.model.Layout layout, java.lang.String name,
453         java.lang.String languageId)
454         throws com.liferay.portal.PortalException,
455             com.liferay.portal.SystemException {
456         return getService().updateName(layout, name, languageId);
457     }
458 
459     public static com.liferay.portal.model.Layout updateParentLayoutId(
460         long plid, long parentPlid)
461         throws com.liferay.portal.PortalException,
462             com.liferay.portal.SystemException {
463         return getService().updateParentLayoutId(plid, parentPlid);
464     }
465 
466     public static com.liferay.portal.model.Layout updateParentLayoutId(
467         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
468         throws com.liferay.portal.PortalException,
469             com.liferay.portal.SystemException {
470         return getService()
471                    .updateParentLayoutId(groupId, privateLayout, layoutId,
472             parentLayoutId);
473     }
474 
475     public static com.liferay.portal.model.Layout updatePriority(long plid,
476         int priority)
477         throws com.liferay.portal.PortalException,
478             com.liferay.portal.SystemException {
479         return getService().updatePriority(plid, priority);
480     }
481 
482     public static com.liferay.portal.model.Layout updatePriority(long groupId,
483         boolean privateLayout, long layoutId, int priority)
484         throws com.liferay.portal.PortalException,
485             com.liferay.portal.SystemException {
486         return getService()
487                    .updatePriority(groupId, privateLayout, layoutId, priority);
488     }
489 
490     public static com.liferay.portal.model.Layout updatePriority(
491         com.liferay.portal.model.Layout layout, int priority)
492         throws com.liferay.portal.SystemException {
493         return getService().updatePriority(layout, priority);
494     }
495 
496     public static LayoutLocalService getService() {
497         if (_service == null) {
498             throw new RuntimeException("LayoutLocalService is not set");
499         }
500 
501         return _service;
502     }
503 
504     public void setService(LayoutLocalService service) {
505         _service = service;
506     }
507 
508     private static LayoutLocalService _service;
509 }