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  
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   * {@link LayoutLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       LayoutLocalService
44   * @generated
45   */
46  public class LayoutLocalServiceUtil {
47      public static com.liferay.portal.model.Layout addLayout(
48          com.liferay.portal.model.Layout layout)
49          throws com.liferay.portal.SystemException {
50          return getService().addLayout(layout);
51      }
52  
53      public static com.liferay.portal.model.Layout createLayout(long plid) {
54          return getService().createLayout(plid);
55      }
56  
57      public static void deleteLayout(long plid)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException {
60          getService().deleteLayout(plid);
61      }
62  
63      public static void deleteLayout(com.liferay.portal.model.Layout layout)
64          throws com.liferay.portal.SystemException {
65          getService().deleteLayout(layout);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portal.model.Layout getLayout(long plid)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException {
83          return getService().getLayout(plid);
84      }
85  
86      public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
87          int start, int end) throws com.liferay.portal.SystemException {
88          return getService().getLayouts(start, end);
89      }
90  
91      public static int getLayoutsCount()
92          throws com.liferay.portal.SystemException {
93          return getService().getLayoutsCount();
94      }
95  
96      public static com.liferay.portal.model.Layout updateLayout(
97          com.liferay.portal.model.Layout layout)
98          throws com.liferay.portal.SystemException {
99          return getService().updateLayout(layout);
100     }
101 
102     public static com.liferay.portal.model.Layout updateLayout(
103         com.liferay.portal.model.Layout layout, boolean merge)
104         throws com.liferay.portal.SystemException {
105         return getService().updateLayout(layout, merge);
106     }
107 
108     public static com.liferay.portal.model.Layout addLayout(long userId,
109         long groupId, boolean privateLayout, long parentLayoutId,
110         java.lang.String name, java.lang.String title,
111         java.lang.String description, java.lang.String type, boolean hidden,
112         java.lang.String friendlyURL)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService()
116                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
117             name, title, description, type, hidden, friendlyURL);
118     }
119 
120     public static com.liferay.portal.model.Layout addLayout(long userId,
121         long groupId, boolean privateLayout, long parentLayoutId,
122         java.util.Map<java.util.Locale, String> localeNamesMap,
123         java.util.Map<java.util.Locale, String> localeTitlesMap,
124         java.lang.String description, java.lang.String type, boolean hidden,
125         java.lang.String friendlyURL)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
130             localeNamesMap, localeTitlesMap, description, type, hidden,
131             friendlyURL);
132     }
133 
134     public static com.liferay.portal.model.Layout addLayout(long userId,
135         long groupId, boolean privateLayout, long parentLayoutId,
136         java.lang.String name, java.lang.String title,
137         java.lang.String description, java.lang.String type, boolean hidden,
138         java.lang.String friendlyURL, long dlFolderId)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         return getService()
142                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
143             name, title, description, type, hidden, friendlyURL, dlFolderId);
144     }
145 
146     public static com.liferay.portal.model.Layout addLayout(long userId,
147         long groupId, boolean privateLayout, long parentLayoutId,
148         java.util.Map<java.util.Locale, String> localeNamesMap,
149         java.util.Map<java.util.Locale, String> localeTitlesMap,
150         java.lang.String description, java.lang.String type, boolean hidden,
151         java.lang.String friendlyURL, long dlFolderId)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         return getService()
155                    .addLayout(userId, groupId, privateLayout, parentLayoutId,
156             localeNamesMap, localeTitlesMap, description, type, hidden,
157             friendlyURL, dlFolderId);
158     }
159 
160     public static void deleteLayout(long groupId, boolean privateLayout,
161         long layoutId)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         getService().deleteLayout(groupId, privateLayout, layoutId);
165     }
166 
167     public static void deleteLayout(com.liferay.portal.model.Layout layout,
168         boolean updateLayoutSet)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         getService().deleteLayout(layout, updateLayoutSet);
172     }
173 
174     public static void deleteLayouts(long groupId, boolean privateLayout)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         getService().deleteLayouts(groupId, privateLayout);
178     }
179 
180     public static byte[] exportLayouts(long groupId, boolean privateLayout,
181         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
182         java.util.Date endDate)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         return getService()
186                    .exportLayouts(groupId, privateLayout, parameterMap,
187             startDate, endDate);
188     }
189 
190     public static byte[] exportLayouts(long groupId, boolean privateLayout,
191         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
192         java.util.Date startDate, java.util.Date endDate)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         return getService()
196                    .exportLayouts(groupId, privateLayout, layoutIds,
197             parameterMap, startDate, endDate);
198     }
199 
200     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
201         long groupId, boolean privateLayout, long[] layoutIds,
202         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
203         java.util.Date endDate)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         return getService()
207                    .exportLayoutsAsStream(groupId, privateLayout, layoutIds,
208             parameterMap, startDate, endDate);
209     }
210 
211     public static byte[] exportPortletInfo(long plid, long groupId,
212         java.lang.String portletId,
213         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
214         java.util.Date endDate)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException {
217         return getService()
218                    .exportPortletInfo(plid, groupId, portletId, parameterMap,
219             startDate, endDate);
220     }
221 
222     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
223         long plid, long groupId, java.lang.String portletId,
224         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
225         java.util.Date endDate)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         return getService()
229                    .exportPortletInfoAsStream(plid, groupId, portletId,
230             parameterMap, startDate, endDate);
231     }
232 
233     public static long getDefaultPlid(long groupId)
234         throws com.liferay.portal.SystemException {
235         return getService().getDefaultPlid(groupId);
236     }
237 
238     public static long getDefaultPlid(long groupId, boolean privateLayout)
239         throws com.liferay.portal.SystemException {
240         return getService().getDefaultPlid(groupId, privateLayout);
241     }
242 
243     public static long getDefaultPlid(long groupId, boolean privateLayout,
244         java.lang.String portletId) throws com.liferay.portal.SystemException {
245         return getService().getDefaultPlid(groupId, privateLayout, portletId);
246     }
247 
248     public static com.liferay.portal.model.Layout getDLFolderLayout(
249         long dlFolderId)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException {
252         return getService().getDLFolderLayout(dlFolderId);
253     }
254 
255     public static com.liferay.portal.model.Layout getFriendlyURLLayout(
256         long groupId, boolean privateLayout, java.lang.String friendlyURL)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException {
259         return getService()
260                    .getFriendlyURLLayout(groupId, privateLayout, friendlyURL);
261     }
262 
263     public static com.liferay.portal.model.Layout getLayout(long groupId,
264         boolean privateLayout, long layoutId)
265         throws com.liferay.portal.PortalException,
266             com.liferay.portal.SystemException {
267         return getService().getLayout(groupId, privateLayout, layoutId);
268     }
269 
270     public static com.liferay.portal.model.Layout getLayoutByIconImageId(
271         long iconImageId)
272         throws com.liferay.portal.PortalException,
273             com.liferay.portal.SystemException {
274         return getService().getLayoutByIconImageId(iconImageId);
275     }
276 
277     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
278         long groupId, boolean privateLayout)
279         throws com.liferay.portal.SystemException {
280         return getService().getLayouts(groupId, privateLayout);
281     }
282 
283     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
284         long groupId, boolean privateLayout, long parentLayoutId)
285         throws com.liferay.portal.SystemException {
286         return getService().getLayouts(groupId, privateLayout, parentLayoutId);
287     }
288 
289     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
290         long groupId, boolean privateLayout, java.lang.String type)
291         throws com.liferay.portal.SystemException {
292         return getService().getLayouts(groupId, privateLayout, type);
293     }
294 
295     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
296         long groupId, boolean privateLayout, long parentLayoutId, int start,
297         int end) throws com.liferay.portal.SystemException {
298         return getService()
299                    .getLayouts(groupId, privateLayout, parentLayoutId, start,
300             end);
301     }
302 
303     public static java.util.List<com.liferay.portal.model.Layout> getLayouts(
304         long groupId, boolean privateLayout, long[] layoutIds)
305         throws com.liferay.portal.PortalException,
306             com.liferay.portal.SystemException {
307         return getService().getLayouts(groupId, privateLayout, layoutIds);
308     }
309 
310     public static com.liferay.portal.model.LayoutReference[] getLayouts(
311         long companyId, java.lang.String portletId,
312         java.lang.String preferencesKey, java.lang.String preferencesValue)
313         throws com.liferay.portal.SystemException {
314         return getService()
315                    .getLayouts(companyId, portletId, preferencesKey,
316             preferencesValue);
317     }
318 
319     public static long getNextLayoutId(long groupId, boolean privateLayout)
320         throws com.liferay.portal.SystemException {
321         return getService().getNextLayoutId(groupId, privateLayout);
322     }
323 
324     public static java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
325         throws com.liferay.portal.SystemException {
326         return getService().getNullFriendlyURLLayouts();
327     }
328 
329     public static void importLayouts(long userId, long groupId,
330         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
331         java.io.File file)
332         throws com.liferay.portal.PortalException,
333             com.liferay.portal.SystemException {
334         getService()
335             .importLayouts(userId, groupId, privateLayout, parameterMap, file);
336     }
337 
338     public static void importLayouts(long userId, long groupId,
339         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
340         byte[] bytes)
341         throws com.liferay.portal.PortalException,
342             com.liferay.portal.SystemException {
343         getService()
344             .importLayouts(userId, groupId, privateLayout, parameterMap, bytes);
345     }
346 
347     public static void importLayouts(long userId, long groupId,
348         boolean privateLayout, java.util.Map<String, String[]> parameterMap,
349         java.io.InputStream is)
350         throws com.liferay.portal.PortalException,
351             com.liferay.portal.SystemException {
352         getService()
353             .importLayouts(userId, groupId, privateLayout, parameterMap, is);
354     }
355 
356     public static void importPortletInfo(long userId, long plid, long groupId,
357         java.lang.String portletId,
358         java.util.Map<String, String[]> parameterMap, java.io.File file)
359         throws com.liferay.portal.PortalException,
360             com.liferay.portal.SystemException {
361         getService()
362             .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
363             file);
364     }
365 
366     public static void importPortletInfo(long userId, long plid, long groupId,
367         java.lang.String portletId,
368         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
369         throws com.liferay.portal.PortalException,
370             com.liferay.portal.SystemException {
371         getService()
372             .importPortletInfo(userId, plid, groupId, portletId, parameterMap,
373             is);
374     }
375 
376     public static void setLayouts(long groupId, boolean privateLayout,
377         long parentLayoutId, long[] layoutIds)
378         throws com.liferay.portal.PortalException,
379             com.liferay.portal.SystemException {
380         getService()
381             .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
382     }
383 
384     public static com.liferay.portal.model.Layout updateFriendlyURL(long plid,
385         java.lang.String friendlyURL)
386         throws com.liferay.portal.PortalException,
387             com.liferay.portal.SystemException {
388         return getService().updateFriendlyURL(plid, friendlyURL);
389     }
390 
391     public static com.liferay.portal.model.Layout updateLayout(long groupId,
392         boolean privateLayout, long layoutId, long parentLayoutId,
393         java.util.Map<java.util.Locale, String> localeNamesMap,
394         java.util.Map<java.util.Locale, String> localeTitlesMap,
395         java.lang.String description, java.lang.String type, boolean hidden,
396         java.lang.String friendlyURL)
397         throws com.liferay.portal.PortalException,
398             com.liferay.portal.SystemException {
399         return getService()
400                    .updateLayout(groupId, privateLayout, layoutId,
401             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
402             hidden, friendlyURL);
403     }
404 
405     public static com.liferay.portal.model.Layout updateLayout(long groupId,
406         boolean privateLayout, long layoutId, long parentLayoutId,
407         java.util.Map<java.util.Locale, String> localeNamesMap,
408         java.util.Map<java.util.Locale, String> localeTitlesMap,
409         java.lang.String description, java.lang.String type, boolean hidden,
410         java.lang.String friendlyURL, java.lang.Boolean iconImage,
411         byte[] iconBytes)
412         throws com.liferay.portal.PortalException,
413             com.liferay.portal.SystemException {
414         return getService()
415                    .updateLayout(groupId, privateLayout, layoutId,
416             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
417             hidden, friendlyURL, iconImage, iconBytes);
418     }
419 
420     public static com.liferay.portal.model.Layout updateLayout(long groupId,
421         boolean privateLayout, long layoutId, java.lang.String typeSettings)
422         throws com.liferay.portal.PortalException,
423             com.liferay.portal.SystemException {
424         return getService()
425                    .updateLayout(groupId, privateLayout, layoutId, typeSettings);
426     }
427 
428     public static com.liferay.portal.model.Layout updateLookAndFeel(
429         long groupId, boolean privateLayout, long layoutId,
430         java.lang.String themeId, java.lang.String colorSchemeId,
431         java.lang.String css, boolean wapTheme)
432         throws com.liferay.portal.PortalException,
433             com.liferay.portal.SystemException {
434         return getService()
435                    .updateLookAndFeel(groupId, privateLayout, layoutId,
436             themeId, colorSchemeId, css, wapTheme);
437     }
438 
439     public static com.liferay.portal.model.Layout updateName(long plid,
440         java.lang.String name, java.lang.String languageId)
441         throws com.liferay.portal.PortalException,
442             com.liferay.portal.SystemException {
443         return getService().updateName(plid, name, languageId);
444     }
445 
446     public static com.liferay.portal.model.Layout updateName(long groupId,
447         boolean privateLayout, long layoutId, java.lang.String name,
448         java.lang.String languageId)
449         throws com.liferay.portal.PortalException,
450             com.liferay.portal.SystemException {
451         return getService()
452                    .updateName(groupId, privateLayout, layoutId, name,
453             languageId);
454     }
455 
456     public static com.liferay.portal.model.Layout updateName(
457         com.liferay.portal.model.Layout layout, java.lang.String name,
458         java.lang.String languageId)
459         throws com.liferay.portal.PortalException,
460             com.liferay.portal.SystemException {
461         return getService().updateName(layout, name, languageId);
462     }
463 
464     public static com.liferay.portal.model.Layout updateParentLayoutId(
465         long plid, long parentPlid)
466         throws com.liferay.portal.PortalException,
467             com.liferay.portal.SystemException {
468         return getService().updateParentLayoutId(plid, parentPlid);
469     }
470 
471     public static com.liferay.portal.model.Layout updateParentLayoutId(
472         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
473         throws com.liferay.portal.PortalException,
474             com.liferay.portal.SystemException {
475         return getService()
476                    .updateParentLayoutId(groupId, privateLayout, layoutId,
477             parentLayoutId);
478     }
479 
480     public static com.liferay.portal.model.Layout updatePriority(long plid,
481         int priority)
482         throws com.liferay.portal.PortalException,
483             com.liferay.portal.SystemException {
484         return getService().updatePriority(plid, 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(
496         com.liferay.portal.model.Layout layout, int priority)
497         throws com.liferay.portal.SystemException {
498         return getService().updatePriority(layout, priority);
499     }
500 
501     public static LayoutLocalService getService() {
502         if (_service == null) {
503             throw new RuntimeException("LayoutLocalService is not set");
504         }
505 
506         return _service;
507     }
508 
509     public void setService(LayoutLocalService service) {
510         _service = service;
511     }
512 
513     private static LayoutLocalService _service;
514 }