1   /**
2    * Copyright (c) 2000-2008 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 byte[] exportPortletInfo(long plid,
196         java.lang.String portletId,
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                    .exportPortletInfo(plid, portletId, parameterMap, startDate,
203             endDate);
204     }
205 
206     public static long getDefaultPlid(long groupId)
207         throws com.liferay.portal.SystemException {
208         return getService().getDefaultPlid(groupId);
209     }
210 
211     public static long getDefaultPlid(long groupId, boolean privateLayout)
212         throws com.liferay.portal.SystemException {
213         return getService().getDefaultPlid(groupId, privateLayout);
214     }
215 
216     public static long getDefaultPlid(long groupId, boolean privateLayout,
217         java.lang.String portletId) throws com.liferay.portal.SystemException {
218         return getService().getDefaultPlid(groupId, privateLayout, portletId);
219     }
220 
221     public static com.liferay.portal.model.Layout getDLFolderLayout(
222         long dlFolderId)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException {
225         return getService().getDLFolderLayout(dlFolderId);
226     }
227 
228     public static com.liferay.portal.model.Layout getFriendlyURLLayout(
229         long groupId, boolean privateLayout, java.lang.String friendlyURL)
230         throws com.liferay.portal.PortalException,
231             com.liferay.portal.SystemException {
232         return getService()
233                    .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
234     }
235 
236     public static com.liferay.portal.model.Layout getLayout(long groupId,
237         boolean privateLayout, long layoutId)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         return getService().getLayout(groupId, privateLayout, layoutId);
241     }
242 
243     public static com.liferay.portal.model.Layout getLayoutByIconImageId(
244         long iconImageId)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         return getService().getLayoutByIconImageId(iconImageId);
248     }
249 
250     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
251         long groupId, boolean privateLayout)
252         throws com.liferay.portal.SystemException {
253         return getService().getLayouts(groupId, privateLayout);
254     }
255 
256     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
257         long groupId, boolean privateLayout, long parentLayoutId)
258         throws com.liferay.portal.SystemException {
259         return getService().getLayouts(groupId, privateLayout, parentLayoutId);
260     }
261 
262     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
263         long groupId, boolean privateLayout, java.lang.String type)
264         throws com.liferay.portal.SystemException {
265         return getService().getLayouts(groupId, privateLayout, type);
266     }
267 
268     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
269         long groupId, boolean privateLayout, long parentLayoutId, int start,
270         int end) throws com.liferay.portal.SystemException {
271         return getService()
272                    .getLayouts(groupId, privateLayout, parentLayoutId, start,
273             end);
274     }
275 
276     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
277         long groupId, boolean privateLayout, long[] layoutIds)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException {
280         return getService().getLayouts(groupId, privateLayout, layoutIds);
281     }
282 
283     public static com.liferay.portal.model.LayoutReference[] getLayouts(
284         long companyId, java.lang.String portletId, java.lang.String prefsKey,
285         java.lang.String prefsValue) throws com.liferay.portal.SystemException {
286         return getService()
287                    .getLayouts(companyId, portletId, prefsKey, prefsValue);
288     }
289 
290     public static long getNextLayoutId(long groupId, boolean privateLayout)
291         throws com.liferay.portal.SystemException {
292         return getService().getNextLayoutId(groupId, privateLayout);
293     }
294 
295     public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
296         throws com.liferay.portal.SystemException {
297         return getService().getNullFriendlyURLLayouts();
298     }
299 
300     public static void importLayouts(long userId, long groupId,
301         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
302         java.io.File file)
303         throws com.liferay.portal.PortalException,
304             com.liferay.portal.SystemException {
305         getService()
306             .importLayouts(userId, groupId, privateLayout, parameterMap, file);
307     }
308 
309     public static void importLayouts(long userId, long groupId,
310         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
311         byte[] bytes)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException {
314         getService()
315             .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
316     }
317 
318     public static void importLayouts(long userId, long groupId,
319         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
320         java.io.InputStream is)
321         throws com.liferay.portal.PortalException,
322             com.liferay.portal.SystemException {
323         getService()
324             .importLayouts(userId, groupId, privateLayout, parameterMap, is);
325     }
326 
327     public static void importPortletInfo(long userId, long plid,
328         java.lang.String portletId,
329         java.util.Map<String, String[]> parameterMap, java.io.File file)
330         throws com.liferay.portal.PortalException,
331             com.liferay.portal.SystemException {
332         getService()
333             .importPortletInfo(userId, plid, portletId, parameterMap, file);
334     }
335 
336     public static void importPortletInfo(long userId, long plid,
337         java.lang.String portletId,
338         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
339         throws com.liferay.portal.PortalException,
340             com.liferay.portal.SystemException {
341         getService().importPortletInfo(userId, plid, portletId, parameterMap, is);
342     }
343 
344     public static void setLayouts(long groupId, boolean privateLayout,
345         long parentLayoutId, long[] layoutIds)
346         throws com.liferay.portal.PortalException,
347             com.liferay.portal.SystemException {
348         getService()
349             .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
350     }
351 
352     public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
353         java.lang.String friendlyURL)
354         throws com.liferay.portal.PortalException,
355             com.liferay.portal.SystemException {
356         return getService().updateFriendlyURL(plid, friendlyURL);
357     }
358 
359     public static com.liferay.portal.model.Layout updateLayout(long groupId,
360         boolean privateLayout, long layoutId, long parentLayoutId,
361         java.util.Map<java.util.Locale, String> localeNamesMap,
362         java.util.Map<java.util.Locale, String> localeTitlesMap,
363         java.lang.String description, java.lang.String type, boolean hidden,
364         java.lang.String friendlyURL)
365         throws com.liferay.portal.PortalException,
366             com.liferay.portal.SystemException {
367         return getService()
368                    .updateLayout(groupId, privateLayout, layoutId,
369             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
370             hidden, friendlyURL);
371     }
372 
373     public static com.liferay.portal.model.Layout updateLayout(long groupId,
374         boolean privateLayout, long layoutId, long parentLayoutId,
375         java.util.Map<java.util.Locale, String> localeNamesMap,
376         java.util.Map<java.util.Locale, String> localeTitlesMap,
377         java.lang.String description, java.lang.String type, boolean hidden,
378         java.lang.String friendlyURL, java.lang.Boolean iconImage,
379         byte[] iconBytes)
380         throws com.liferay.portal.PortalException,
381             com.liferay.portal.SystemException {
382         return getService()
383                    .updateLayout(groupId, privateLayout, layoutId,
384             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
385             hidden, friendlyURL, iconImage, iconBytes);
386     }
387 
388     public static com.liferay.portal.model.Layout updateLayout(long groupId,
389         boolean privateLayout, long layoutId, java.lang.String typeSettings)
390         throws com.liferay.portal.PortalException,
391             com.liferay.portal.SystemException {
392         return getService()
393                    .updateLayout(groupId, privateLayout, layoutId, typeSettings);
394     }
395 
396     public static com.liferay.portal.model.Layout updateLookAndFeel(
397         long groupId, boolean privateLayout, long layoutId,
398         java.lang.String themeId, java.lang.String colorSchemeId,
399         java.lang.String css, boolean wapTheme)
400         throws com.liferay.portal.PortalException,
401             com.liferay.portal.SystemException {
402         return getService()
403                    .updateLookAndFeel(groupId, privateLayout, layoutId,
404             themeId, colorSchemeId, css, wapTheme);
405     }
406 
407     public static com.liferay.portal.model.Layout updateName(long plid,
408         java.lang.String name, java.lang.String languageId)
409         throws com.liferay.portal.PortalException,
410             com.liferay.portal.SystemException {
411         return getService().updateName(plid, name, languageId);
412     }
413 
414     public static com.liferay.portal.model.Layout updateName(long groupId,
415         boolean privateLayout, long layoutId, java.lang.String name,
416         java.lang.String languageId)
417         throws com.liferay.portal.PortalException,
418             com.liferay.portal.SystemException {
419         return getService()
420                    .updateName(groupId, privateLayout, layoutId, name,
421             languageId);
422     }
423 
424     public static com.liferay.portal.model.Layout updateName(
425         com.liferay.portal.model.Layout layout, java.lang.String name,
426         java.lang.String languageId)
427         throws com.liferay.portal.PortalException,
428             com.liferay.portal.SystemException {
429         return getService().updateName(layout, name, languageId);
430     }
431 
432     public static com.liferay.portal.model.Layout updateParentLayoutId(
433         long plid, long parentPlid)
434         throws com.liferay.portal.PortalException,
435             com.liferay.portal.SystemException {
436         return getService().updateParentLayoutId(plid, parentPlid);
437     }
438 
439     public static com.liferay.portal.model.Layout updateParentLayoutId(
440         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
441         throws com.liferay.portal.PortalException,
442             com.liferay.portal.SystemException {
443         return getService()
444                    .updateParentLayoutId(groupId, privateLayout, layoutId,
445             parentLayoutId);
446     }
447 
448     public static com.liferay.portal.model.Layout updatePriority(long plid,
449         int priority)
450         throws com.liferay.portal.PortalException,
451             com.liferay.portal.SystemException {
452         return getService().updatePriority(plid, priority);
453     }
454 
455     public static com.liferay.portal.model.Layout updatePriority(long groupId,
456         boolean privateLayout, long layoutId, int priority)
457         throws com.liferay.portal.PortalException,
458             com.liferay.portal.SystemException {
459         return getService()
460                    .updatePriority(groupId, privateLayout, layoutId, priority);
461     }
462 
463     public static com.liferay.portal.model.Layout updatePriority(
464         com.liferay.portal.model.Layout layout, int priority)
465         throws com.liferay.portal.SystemException {
466         return getService().updatePriority(layout, priority);
467     }
468 
469     public static LayoutLocalService getService() {
470         if (_service == null) {
471             throw new RuntimeException("LayoutLocalService is not set");
472         }
473 
474         return _service;
475     }
476 
477     public void setService(LayoutLocalService service) {
478         _service = service;
479     }
480 
481     private static LayoutLocalService _service;
482 }