1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="LayoutServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link LayoutService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       LayoutService
37   * @generated
38   */
39  public class LayoutServiceUtil {
40      public static com.liferay.portal.model.Layout addLayout(long groupId,
41          boolean privateLayout, long parentLayoutId,
42          java.util.Map<java.util.Locale, String> localeNamesMap,
43          java.util.Map<java.util.Locale, String> localeTitlesMap,
44          java.lang.String description, java.lang.String type, boolean hidden,
45          java.lang.String friendlyURL,
46          com.liferay.portal.service.ServiceContext serviceContext)
47          throws com.liferay.portal.kernel.exception.PortalException,
48              com.liferay.portal.kernel.exception.SystemException {
49          return getService()
50                     .addLayout(groupId, privateLayout, parentLayoutId,
51              localeNamesMap, localeTitlesMap, description, type, hidden,
52              friendlyURL, serviceContext);
53      }
54  
55      public static com.liferay.portal.model.Layout addLayout(long groupId,
56          boolean privateLayout, long parentLayoutId, java.lang.String name,
57          java.lang.String title, java.lang.String description,
58          java.lang.String type, boolean hidden, java.lang.String friendlyURL,
59          com.liferay.portal.service.ServiceContext serviceContext)
60          throws com.liferay.portal.kernel.exception.PortalException,
61              com.liferay.portal.kernel.exception.SystemException {
62          return getService()
63                     .addLayout(groupId, privateLayout, parentLayoutId, name,
64              title, description, type, hidden, friendlyURL, serviceContext);
65      }
66  
67      public static void deleteLayout(long plid)
68          throws com.liferay.portal.kernel.exception.PortalException,
69              com.liferay.portal.kernel.exception.SystemException {
70          getService().deleteLayout(plid);
71      }
72  
73      public static void deleteLayout(long groupId, boolean privateLayout,
74          long layoutId)
75          throws com.liferay.portal.kernel.exception.PortalException,
76              com.liferay.portal.kernel.exception.SystemException {
77          getService().deleteLayout(groupId, privateLayout, layoutId);
78      }
79  
80      public static byte[] exportLayouts(long groupId, boolean privateLayout,
81          long[] layoutIds, java.util.Map<String, String[]> parameterMap,
82          java.util.Date startDate, java.util.Date endDate)
83          throws com.liferay.portal.kernel.exception.PortalException,
84              com.liferay.portal.kernel.exception.SystemException {
85          return getService()
86                     .exportLayouts(groupId, privateLayout, layoutIds,
87              parameterMap, startDate, endDate);
88      }
89  
90      public static byte[] exportLayouts(long groupId, boolean privateLayout,
91          java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
92          java.util.Date endDate)
93          throws com.liferay.portal.kernel.exception.PortalException,
94              com.liferay.portal.kernel.exception.SystemException {
95          return getService()
96                     .exportLayouts(groupId, privateLayout, parameterMap,
97              startDate, endDate);
98      }
99  
100     public static java.io.File exportLayoutsAsFile(long groupId,
101         boolean privateLayout, long[] layoutIds,
102         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
103         java.util.Date endDate)
104         throws com.liferay.portal.kernel.exception.PortalException,
105             com.liferay.portal.kernel.exception.SystemException {
106         return getService()
107                    .exportLayoutsAsFile(groupId, privateLayout, layoutIds,
108             parameterMap, startDate, endDate);
109     }
110 
111     public static byte[] exportPortletInfo(long plid, long groupId,
112         java.lang.String portletId,
113         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
114         java.util.Date endDate)
115         throws com.liferay.portal.kernel.exception.PortalException,
116             com.liferay.portal.kernel.exception.SystemException {
117         return getService()
118                    .exportPortletInfo(plid, groupId, portletId, parameterMap,
119             startDate, endDate);
120     }
121 
122     public static java.io.File exportPortletInfoAsFile(long plid, long groupId,
123         java.lang.String portletId,
124         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
125         java.util.Date endDate)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         return getService()
129                    .exportPortletInfoAsFile(plid, groupId, portletId,
130             parameterMap, startDate, endDate);
131     }
132 
133     public static java.lang.String getLayoutName(long groupId,
134         boolean privateLayout, long layoutId, java.lang.String languageId)
135         throws com.liferay.portal.kernel.exception.PortalException,
136             com.liferay.portal.kernel.exception.SystemException {
137         return getService()
138                    .getLayoutName(groupId, privateLayout, layoutId, languageId);
139     }
140 
141     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
142         long companyId, java.lang.String portletId,
143         java.lang.String preferencesKey, java.lang.String preferencesValue)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getService()
146                    .getLayoutReferences(companyId, portletId, preferencesKey,
147             preferencesValue);
148     }
149 
150     public static void importLayouts(long groupId, boolean privateLayout,
151         java.util.Map<String, String[]> parameterMap, byte[] bytes)
152         throws com.liferay.portal.kernel.exception.PortalException,
153             com.liferay.portal.kernel.exception.SystemException {
154         getService().importLayouts(groupId, privateLayout, parameterMap, bytes);
155     }
156 
157     public static void importLayouts(long groupId, boolean privateLayout,
158         java.util.Map<String, String[]> parameterMap, java.io.File file)
159         throws com.liferay.portal.kernel.exception.PortalException,
160             com.liferay.portal.kernel.exception.SystemException {
161         getService().importLayouts(groupId, privateLayout, parameterMap, file);
162     }
163 
164     public static void importLayouts(long groupId, boolean privateLayout,
165         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
166         throws com.liferay.portal.kernel.exception.PortalException,
167             com.liferay.portal.kernel.exception.SystemException {
168         getService().importLayouts(groupId, privateLayout, parameterMap, is);
169     }
170 
171     public static void importPortletInfo(long plid, long groupId,
172         java.lang.String portletId,
173         java.util.Map<String, String[]> parameterMap, java.io.File file)
174         throws com.liferay.portal.kernel.exception.PortalException,
175             com.liferay.portal.kernel.exception.SystemException {
176         getService()
177             .importPortletInfo(plid, groupId, portletId, parameterMap, file);
178     }
179 
180     public static void importPortletInfo(long plid, long groupId,
181         java.lang.String portletId,
182         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
183         throws com.liferay.portal.kernel.exception.PortalException,
184             com.liferay.portal.kernel.exception.SystemException {
185         getService()
186             .importPortletInfo(plid, groupId, portletId, parameterMap, is);
187     }
188 
189     public static void schedulePublishToLive(long sourceGroupId,
190         long targetGroupId, boolean privateLayout,
191         java.util.Map<Long, Boolean> layoutIdMap,
192         java.util.Map<String, String[]> parameterMap, java.lang.String scope,
193         java.util.Date startDate, java.util.Date endDate,
194         java.lang.String groupName, java.lang.String cronText,
195         java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
196         java.lang.String description)
197         throws com.liferay.portal.kernel.exception.PortalException,
198             com.liferay.portal.kernel.exception.SystemException {
199         getService()
200             .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
201             layoutIdMap, parameterMap, scope, startDate, endDate, groupName,
202             cronText, schedulerStartDate, schedulerEndDate, description);
203     }
204 
205     public static void schedulePublishToRemote(long sourceGroupId,
206         boolean privateLayout, java.util.Map<Long, Boolean> layoutIdMap,
207         java.util.Map<String, String[]> parameterMap,
208         java.lang.String remoteAddress, int remotePort,
209         boolean secureConnection, long remoteGroupId,
210         boolean remotePrivateLayout, java.util.Date startDate,
211         java.util.Date endDate, java.lang.String groupName,
212         java.lang.String cronText, java.util.Date schedulerStartDate,
213         java.util.Date schedulerEndDate, java.lang.String description)
214         throws com.liferay.portal.kernel.exception.PortalException,
215             com.liferay.portal.kernel.exception.SystemException {
216         getService()
217             .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap,
218             parameterMap, remoteAddress, remotePort, secureConnection,
219             remoteGroupId, remotePrivateLayout, startDate, endDate, groupName,
220             cronText, schedulerStartDate, schedulerEndDate, description);
221     }
222 
223     public static void setLayouts(long groupId, boolean privateLayout,
224         long parentLayoutId, long[] layoutIds)
225         throws com.liferay.portal.kernel.exception.PortalException,
226             com.liferay.portal.kernel.exception.SystemException {
227         getService()
228             .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
229     }
230 
231     public static void unschedulePublishToLive(long groupId,
232         java.lang.String jobName, java.lang.String groupName)
233         throws com.liferay.portal.kernel.exception.PortalException,
234             com.liferay.portal.kernel.exception.SystemException {
235         getService().unschedulePublishToLive(groupId, jobName, groupName);
236     }
237 
238     public static void unschedulePublishToRemote(long groupId,
239         java.lang.String jobName, java.lang.String groupName)
240         throws com.liferay.portal.kernel.exception.PortalException,
241             com.liferay.portal.kernel.exception.SystemException {
242         getService().unschedulePublishToRemote(groupId, jobName, groupName);
243     }
244 
245     public static com.liferay.portal.model.Layout updateLayout(long groupId,
246         boolean privateLayout, long layoutId, long parentLayoutId,
247         java.util.Map<java.util.Locale, String> localeNamesMap,
248         java.util.Map<java.util.Locale, String> localeTitlesMap,
249         java.lang.String description, java.lang.String type, boolean hidden,
250         java.lang.String friendlyURL, java.lang.Boolean iconImage,
251         byte[] iconBytes,
252         com.liferay.portal.service.ServiceContext serviceContext)
253         throws com.liferay.portal.kernel.exception.PortalException,
254             com.liferay.portal.kernel.exception.SystemException {
255         return getService()
256                    .updateLayout(groupId, privateLayout, layoutId,
257             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
258             hidden, friendlyURL, iconImage, iconBytes, serviceContext);
259     }
260 
261     public static com.liferay.portal.model.Layout updateLayout(long groupId,
262         boolean privateLayout, long layoutId, long parentLayoutId,
263         java.util.Map<java.util.Locale, String> localeNamesMap,
264         java.util.Map<java.util.Locale, String> localeTitlesMap,
265         java.lang.String description, java.lang.String type, boolean hidden,
266         java.lang.String friendlyURL,
267         com.liferay.portal.service.ServiceContext serviceContext)
268         throws com.liferay.portal.kernel.exception.PortalException,
269             com.liferay.portal.kernel.exception.SystemException {
270         return getService()
271                    .updateLayout(groupId, privateLayout, layoutId,
272             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
273             hidden, friendlyURL, serviceContext);
274     }
275 
276     public static com.liferay.portal.model.Layout updateLayout(long groupId,
277         boolean privateLayout, long layoutId, java.lang.String typeSettings)
278         throws com.liferay.portal.kernel.exception.PortalException,
279             com.liferay.portal.kernel.exception.SystemException {
280         return getService()
281                    .updateLayout(groupId, privateLayout, layoutId, typeSettings);
282     }
283 
284     public static com.liferay.portal.model.Layout updateLookAndFeel(
285         long groupId, boolean privateLayout, long layoutId,
286         java.lang.String themeId, java.lang.String colorSchemeId,
287         java.lang.String css, boolean wapTheme)
288         throws com.liferay.portal.kernel.exception.PortalException,
289             com.liferay.portal.kernel.exception.SystemException {
290         return getService()
291                    .updateLookAndFeel(groupId, privateLayout, layoutId,
292             themeId, colorSchemeId, css, wapTheme);
293     }
294 
295     public static com.liferay.portal.model.Layout updateName(long groupId,
296         boolean privateLayout, long layoutId, java.lang.String name,
297         java.lang.String languageId)
298         throws com.liferay.portal.kernel.exception.PortalException,
299             com.liferay.portal.kernel.exception.SystemException {
300         return getService()
301                    .updateName(groupId, privateLayout, layoutId, name,
302             languageId);
303     }
304 
305     public static com.liferay.portal.model.Layout updateName(long plid,
306         java.lang.String name, java.lang.String languageId)
307         throws com.liferay.portal.kernel.exception.PortalException,
308             com.liferay.portal.kernel.exception.SystemException {
309         return getService().updateName(plid, name, languageId);
310     }
311 
312     public static com.liferay.portal.model.Layout updateParentLayoutId(
313         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
314         throws com.liferay.portal.kernel.exception.PortalException,
315             com.liferay.portal.kernel.exception.SystemException {
316         return getService()
317                    .updateParentLayoutId(groupId, privateLayout, layoutId,
318             parentLayoutId);
319     }
320 
321     public static com.liferay.portal.model.Layout updateParentLayoutId(
322         long plid, long parentPlid)
323         throws com.liferay.portal.kernel.exception.PortalException,
324             com.liferay.portal.kernel.exception.SystemException {
325         return getService().updateParentLayoutId(plid, parentPlid);
326     }
327 
328     public static com.liferay.portal.model.Layout updatePriority(long groupId,
329         boolean privateLayout, long layoutId, int priority)
330         throws com.liferay.portal.kernel.exception.PortalException,
331             com.liferay.portal.kernel.exception.SystemException {
332         return getService()
333                    .updatePriority(groupId, privateLayout, layoutId, priority);
334     }
335 
336     public static com.liferay.portal.model.Layout updatePriority(long plid,
337         int priority)
338         throws com.liferay.portal.kernel.exception.PortalException,
339             com.liferay.portal.kernel.exception.SystemException {
340         return getService().updatePriority(plid, priority);
341     }
342 
343     public static LayoutService getService() {
344         if (_service == null) {
345             _service = (LayoutService)PortalBeanLocatorUtil.locate(LayoutService.class.getName());
346         }
347 
348         return _service;
349     }
350 
351     public void setService(LayoutService service) {
352         _service = service;
353     }
354 
355     private static LayoutService _service;
356 }