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