1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="LayoutLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link LayoutLocalService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       LayoutLocalService
45   * @generated
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.util.Map<java.util.Locale, String> localeNamesMap,
112         java.util.Map<java.util.Locale, String> localeTitlesMap,
113         java.lang.String description, java.lang.String type, boolean hidden,
114         java.lang.String friendlyURL)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         return getService()
118                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
119             localeNamesMap, localeTitlesMap, description, type, hidden,
120             friendlyURL);
121     }
122 
123     public static com.liferay.portal.model.Layout addLayout(long userId,
124         long groupId, boolean privateLayout, long parentLayoutId,
125         java.util.Map<java.util.Locale, String> localeNamesMap,
126         java.util.Map<java.util.Locale, String> localeTitlesMap,
127         java.lang.String description, java.lang.String type, boolean hidden,
128         java.lang.String friendlyURL, long dlFolderId)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService()
132                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
133             localeNamesMap, localeTitlesMap, description, type, hidden,
134             friendlyURL, dlFolderId);
135     }
136 
137     public static com.liferay.portal.model.Layout addLayout(long userId,
138         long groupId, boolean privateLayout, long parentLayoutId,
139         java.lang.String name, java.lang.String title,
140         java.lang.String description, java.lang.String type, boolean hidden,
141         java.lang.String friendlyURL)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         return getService()
145                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
146             name, title, description, type, hidden, friendlyURL);
147     }
148 
149     public static com.liferay.portal.model.Layout addLayout(long userId,
150         long groupId, boolean privateLayout, long parentLayoutId,
151         java.lang.String name, java.lang.String title,
152         java.lang.String description, java.lang.String type, boolean hidden,
153         java.lang.String friendlyURL, long dlFolderId)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException {
156         return getService()
157                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
158             name, title, description, type, hidden, friendlyURL, dlFolderId);
159     }
160 
161     public static void deleteLayout(com.liferay.portal.model.Layout layout,
162         boolean updateLayoutSet)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         getService().deleteLayout(layout, updateLayoutSet);
166     }
167 
168     public static void deleteLayout(long groupId, boolean privateLayout,
169         long layoutId)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException {
172         getService().deleteLayout(groupId, privateLayout, layoutId);
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         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
183         java.util.Date startDate, java.util.Date endDate)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         return getService()
187                    .exportLayouts(groupId, privateLayout, layoutIds,
188             parameterMap, startDate, endDate);
189     }
190 
191     public static byte[] exportLayouts(long groupId, boolean privateLayout,
192         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
193         java.util.Date endDate)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService()
197                    .exportLayouts(groupId, privateLayout, parameterMap,
198             startDate, endDate);
199     }
200 
201     public static java.io.File exportLayoutsAsFile(long groupId,
202         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                    .exportLayoutsAsFile(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 java.io.File exportPortletInfoAsFile(long plid, long groupId,
224         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                    .exportPortletInfoAsFile(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, 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 java.util.List<com.liferay.portal.model.Layout> getLayouts(
306         long groupId, boolean privateLayout, java.lang.String type)
307         throws com.liferay.portal.SystemException {
308         return getService().getLayouts(groupId, privateLayout, type);
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         byte[] bytes)
333         throws com.liferay.portal.PortalException,
334             com.liferay.portal.SystemException {
335         getService()
336             .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
337     }
338 
339     public static void importLayouts(long userId, long groupId,
340         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
341         java.io.File file)
342         throws com.liferay.portal.PortalException,
343             com.liferay.portal.SystemException {
344         getService()
345             .importLayouts(userId, groupId, privateLayout, parameterMap, file);
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(
441         com.liferay.portal.model.Layout layout, java.lang.String name,
442         java.lang.String languageId)
443         throws com.liferay.portal.PortalException,
444             com.liferay.portal.SystemException {
445         return getService().updateName(layout, name, languageId);
446     }
447 
448     public static com.liferay.portal.model.Layout updateName(long groupId,
449         boolean privateLayout, long layoutId, java.lang.String name,
450         java.lang.String languageId)
451         throws com.liferay.portal.PortalException,
452             com.liferay.portal.SystemException {
453         return getService()
454                    .updateName(groupId, privateLayout, layoutId, name,
455             languageId);
456     }
457 
458     public static com.liferay.portal.model.Layout updateName(long plid,
459         java.lang.String name, java.lang.String languageId)
460         throws com.liferay.portal.PortalException,
461             com.liferay.portal.SystemException {
462         return getService().updateName(plid, name, languageId);
463     }
464 
465     public static com.liferay.portal.model.Layout updateParentLayoutId(
466         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
467         throws com.liferay.portal.PortalException,
468             com.liferay.portal.SystemException {
469         return getService()
470                    .updateParentLayoutId(groupId, privateLayout, layoutId,
471             parentLayoutId);
472     }
473 
474     public static com.liferay.portal.model.Layout updateParentLayoutId(
475         long plid, long parentPlid)
476         throws com.liferay.portal.PortalException,
477             com.liferay.portal.SystemException {
478         return getService().updateParentLayoutId(plid, parentPlid);
479     }
480 
481     public static com.liferay.portal.model.Layout updatePriority(
482         com.liferay.portal.model.Layout layout, int priority)
483         throws com.liferay.portal.SystemException {
484         return getService().updatePriority(layout, priority);
485     }
486 
487     public static com.liferay.portal.model.Layout updatePriority(long groupId,
488         boolean privateLayout, long layoutId, int priority)
489         throws com.liferay.portal.PortalException,
490             com.liferay.portal.SystemException {
491         return getService()
492                    .updatePriority(groupId, privateLayout, layoutId, priority);
493     }
494 
495     public static com.liferay.portal.model.Layout updatePriority(long plid,
496         int priority)
497         throws com.liferay.portal.PortalException,
498             com.liferay.portal.SystemException {
499         return getService().updatePriority(plid, priority);
500     }
501 
502     public static LayoutLocalService getService() {
503         if (_service == null) {
504             _service = (LayoutLocalService)PortalBeanLocatorUtil.locate(LayoutLocalService.class.getName());
505         }
506 
507         return _service;
508     }
509 
510     public void setService(LayoutLocalService service) {
511         _service = service;
512     }
513 
514     private static LayoutLocalService _service;
515 }