1   /**
2    * Copyright (c) 2000-2007 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   * <a href="LayoutLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portal.service.LayoutLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portal.service.LayoutLocalServiceFactory</code> is responsible
42   * for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.LayoutLocalService
48   * @see com.liferay.portal.service.LayoutLocalServiceFactory
49   *
50   */
51  public class LayoutLocalServiceUtil {
52      public static com.liferay.portal.model.Layout addLayout(
53          com.liferay.portal.model.Layout model)
54          throws com.liferay.portal.SystemException {
55          LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
56  
57          return layoutLocalService.addLayout(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
64  
65          return layoutLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
72  
73          return layoutLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portal.model.Layout updateLayout(
77          com.liferay.portal.model.Layout model)
78          throws com.liferay.portal.SystemException {
79          LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
80  
81          return layoutLocalService.updateLayout(model);
82      }
83  
84      public static com.liferay.portal.model.Layout addLayout(long userId,
85          long groupId, boolean privateLayout, long parentLayoutId,
86          java.lang.String name, java.lang.String title,
87          java.lang.String description, java.lang.String type, boolean hidden,
88          java.lang.String friendlyURL)
89          throws com.liferay.portal.PortalException, 
90              com.liferay.portal.SystemException {
91          LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
92  
93          return layoutLocalService.addLayout(userId, groupId, privateLayout,
94              parentLayoutId, name, title, description, type, hidden, friendlyURL);
95      }
96  
97      public static com.liferay.portal.model.Layout addLayout(long userId,
98          long groupId, boolean privateLayout, long parentLayoutId,
99          java.lang.String name, java.lang.String title,
100         java.lang.String description, java.lang.String type, boolean hidden,
101         java.lang.String friendlyURL, long dlFolderId)
102         throws com.liferay.portal.PortalException, 
103             com.liferay.portal.SystemException {
104         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
105 
106         return layoutLocalService.addLayout(userId, groupId, privateLayout,
107             parentLayoutId, name, title, description, type, hidden,
108             friendlyURL, dlFolderId);
109     }
110 
111     public static void deleteLayout(long plid)
112         throws com.liferay.portal.PortalException, 
113             com.liferay.portal.SystemException {
114         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
115         layoutLocalService.deleteLayout(plid);
116     }
117 
118     public static void deleteLayout(long groupId, boolean privateLayout,
119         long layoutId)
120         throws com.liferay.portal.PortalException, 
121             com.liferay.portal.SystemException {
122         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
123         layoutLocalService.deleteLayout(groupId, privateLayout, layoutId);
124     }
125 
126     public static void deleteLayout(com.liferay.portal.model.Layout layout,
127         boolean updateLayoutSet)
128         throws com.liferay.portal.PortalException, 
129             com.liferay.portal.SystemException {
130         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
131         layoutLocalService.deleteLayout(layout, updateLayoutSet);
132     }
133 
134     public static void deleteLayouts(long groupId, boolean privateLayout)
135         throws com.liferay.portal.PortalException, 
136             com.liferay.portal.SystemException {
137         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
138         layoutLocalService.deleteLayouts(groupId, privateLayout);
139     }
140 
141     public static byte[] exportLayouts(long groupId, boolean privateLayout,
142         java.util.Map parameterMap)
143         throws com.liferay.portal.PortalException, 
144             com.liferay.portal.SystemException {
145         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
146 
147         return layoutLocalService.exportLayouts(groupId, privateLayout,
148             parameterMap);
149     }
150 
151     public static long getDefaultPlid(long groupId, boolean privateLayout)
152         throws com.liferay.portal.SystemException {
153         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
154 
155         return layoutLocalService.getDefaultPlid(groupId, privateLayout);
156     }
157 
158     public static com.liferay.portal.model.Layout getDLFolderLayout(
159         long dlFolderId)
160         throws com.liferay.portal.PortalException, 
161             com.liferay.portal.SystemException {
162         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
163 
164         return layoutLocalService.getDLFolderLayout(dlFolderId);
165     }
166 
167     public static com.liferay.portal.model.Layout getFriendlyURLLayout(
168         long groupId, boolean privateLayout, java.lang.String friendlyURL)
169         throws com.liferay.portal.PortalException, 
170             com.liferay.portal.SystemException {
171         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
172 
173         return layoutLocalService.getFriendlyURLLayout(groupId, privateLayout,
174             friendlyURL);
175     }
176 
177     public static com.liferay.portal.model.Layout getLayout(long plid)
178         throws com.liferay.portal.PortalException, 
179             com.liferay.portal.SystemException {
180         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
181 
182         return layoutLocalService.getLayout(plid);
183     }
184 
185     public static com.liferay.portal.model.Layout getLayout(long groupId,
186         boolean privateLayout, long layoutId)
187         throws com.liferay.portal.PortalException, 
188             com.liferay.portal.SystemException {
189         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
190 
191         return layoutLocalService.getLayout(groupId, privateLayout, layoutId);
192     }
193 
194     public static java.util.List getLayouts(long groupId, boolean privateLayout)
195         throws com.liferay.portal.SystemException {
196         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
197 
198         return layoutLocalService.getLayouts(groupId, privateLayout);
199     }
200 
201     public static java.util.List getLayouts(long groupId,
202         boolean privateLayout, long parentLayoutId)
203         throws com.liferay.portal.SystemException {
204         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
205 
206         return layoutLocalService.getLayouts(groupId, privateLayout,
207             parentLayoutId);
208     }
209 
210     public static java.util.List getLayouts(long groupId,
211         boolean privateLayout, long parentLayoutId, int begin, int end)
212         throws com.liferay.portal.SystemException {
213         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
214 
215         return layoutLocalService.getLayouts(groupId, privateLayout,
216             parentLayoutId, begin, end);
217     }
218 
219     public static com.liferay.portal.model.LayoutReference[] getLayouts(
220         long companyId, java.lang.String portletId, java.lang.String prefsKey,
221         java.lang.String prefsValue) throws com.liferay.portal.SystemException {
222         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
223 
224         return layoutLocalService.getLayouts(companyId, portletId, prefsKey,
225             prefsValue);
226     }
227 
228     public static void importLayouts(long userId, long groupId,
229         boolean privateLayout, java.util.Map parameterMap, java.io.File file)
230         throws com.liferay.portal.PortalException, 
231             com.liferay.portal.SystemException {
232         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
233         layoutLocalService.importLayouts(userId, groupId, privateLayout,
234             parameterMap, file);
235     }
236 
237     public static void importLayouts(long userId, long groupId,
238         boolean privateLayout, java.util.Map parameterMap,
239         java.io.InputStream is)
240         throws com.liferay.portal.PortalException, 
241             com.liferay.portal.SystemException {
242         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
243         layoutLocalService.importLayouts(userId, groupId, privateLayout,
244             parameterMap, is);
245     }
246 
247     public static void setLayouts(long groupId, boolean privateLayout,
248         long parentLayoutId, long[] layoutIds)
249         throws com.liferay.portal.PortalException, 
250             com.liferay.portal.SystemException {
251         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
252         layoutLocalService.setLayouts(groupId, privateLayout, parentLayoutId,
253             layoutIds);
254     }
255 
256     public static com.liferay.portal.model.Layout updateLayout(long groupId,
257         boolean privateLayout, long layoutId, long parentLayoutId,
258         java.lang.String name, java.lang.String title,
259         java.lang.String languageId, java.lang.String description,
260         java.lang.String type, boolean hidden, java.lang.String friendlyURL)
261         throws com.liferay.portal.PortalException, 
262             com.liferay.portal.SystemException {
263         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
264 
265         return layoutLocalService.updateLayout(groupId, privateLayout,
266             layoutId, parentLayoutId, name, title, languageId, description,
267             type, hidden, friendlyURL);
268     }
269 
270     public static com.liferay.portal.model.Layout updateLayout(long groupId,
271         boolean privateLayout, long layoutId, long parentLayoutId,
272         java.lang.String name, java.lang.String title,
273         java.lang.String languageId, java.lang.String description,
274         java.lang.String type, boolean hidden, java.lang.String friendlyURL,
275         java.lang.Boolean iconImage, byte[] iconBytes)
276         throws com.liferay.portal.PortalException, 
277             com.liferay.portal.SystemException {
278         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
279 
280         return layoutLocalService.updateLayout(groupId, privateLayout,
281             layoutId, parentLayoutId, name, title, languageId, description,
282             type, hidden, friendlyURL, iconImage, iconBytes);
283     }
284 
285     public static com.liferay.portal.model.Layout updateLayout(long groupId,
286         boolean privateLayout, long layoutId, java.lang.String typeSettings)
287         throws com.liferay.portal.PortalException, 
288             com.liferay.portal.SystemException {
289         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
290 
291         return layoutLocalService.updateLayout(groupId, privateLayout,
292             layoutId, typeSettings);
293     }
294 
295     public static com.liferay.portal.model.Layout updateLookAndFeel(
296         long groupId, boolean privateLayout, long layoutId,
297         java.lang.String themeId, java.lang.String colorSchemeId,
298         java.lang.String css, boolean wapTheme)
299         throws com.liferay.portal.PortalException, 
300             com.liferay.portal.SystemException {
301         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
302 
303         return layoutLocalService.updateLookAndFeel(groupId, privateLayout,
304             layoutId, themeId, colorSchemeId, css, wapTheme);
305     }
306 
307     public static com.liferay.portal.model.Layout updateName(long plid,
308         java.lang.String name, java.lang.String languageId)
309         throws com.liferay.portal.PortalException, 
310             com.liferay.portal.SystemException {
311         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
312 
313         return layoutLocalService.updateName(plid, name, languageId);
314     }
315 
316     public static com.liferay.portal.model.Layout updateName(long groupId,
317         boolean privateLayout, long layoutId, java.lang.String name,
318         java.lang.String languageId)
319         throws com.liferay.portal.PortalException, 
320             com.liferay.portal.SystemException {
321         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
322 
323         return layoutLocalService.updateName(groupId, privateLayout, layoutId,
324             name, languageId);
325     }
326 
327     public static com.liferay.portal.model.Layout updateName(
328         com.liferay.portal.model.Layout layout, java.lang.String name,
329         java.lang.String languageId)
330         throws com.liferay.portal.PortalException, 
331             com.liferay.portal.SystemException {
332         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
333 
334         return layoutLocalService.updateName(layout, name, languageId);
335     }
336 
337     public static com.liferay.portal.model.Layout updateParentLayoutId(
338         long plid, long parentPlid)
339         throws com.liferay.portal.PortalException, 
340             com.liferay.portal.SystemException {
341         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
342 
343         return layoutLocalService.updateParentLayoutId(plid, parentPlid);
344     }
345 
346     public static com.liferay.portal.model.Layout updateParentLayoutId(
347         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
348         throws com.liferay.portal.PortalException, 
349             com.liferay.portal.SystemException {
350         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
351 
352         return layoutLocalService.updateParentLayoutId(groupId, privateLayout,
353             layoutId, parentLayoutId);
354     }
355 
356     public static com.liferay.portal.model.Layout updatePriority(long plid,
357         int priority)
358         throws com.liferay.portal.PortalException, 
359             com.liferay.portal.SystemException {
360         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
361 
362         return layoutLocalService.updatePriority(plid, priority);
363     }
364 
365     public static com.liferay.portal.model.Layout updatePriority(long groupId,
366         boolean privateLayout, long layoutId, int priority)
367         throws com.liferay.portal.PortalException, 
368             com.liferay.portal.SystemException {
369         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
370 
371         return layoutLocalService.updatePriority(groupId, privateLayout,
372             layoutId, priority);
373     }
374 
375     public static com.liferay.portal.model.Layout updatePriority(
376         com.liferay.portal.model.Layout layout, int priority)
377         throws com.liferay.portal.PortalException, 
378             com.liferay.portal.SystemException {
379         LayoutLocalService layoutLocalService = LayoutLocalServiceFactory.getService();
380 
381         return layoutLocalService.updatePriority(layout, priority);
382     }
383 }