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="LayoutServiceUtil.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.LayoutService</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.LayoutService
42   *
43   */
44  public class LayoutServiceUtil {
45      public static com.liferay.portal.model.Layout addLayout(long groupId,
46          boolean privateLayout, long parentLayoutId, java.lang.String name,
47          java.lang.String title, java.lang.String description,
48          java.lang.String type, boolean hidden, java.lang.String friendlyURL)
49          throws com.liferay.portal.PortalException,
50              com.liferay.portal.SystemException, java.rmi.RemoteException {
51          return getService()
52                     .addLayout(groupId, privateLayout, parentLayoutId, name,
53              title, description, type, hidden, friendlyURL);
54      }
55  
56      public static com.liferay.portal.model.Layout addLayout(long groupId,
57          boolean privateLayout, long parentLayoutId,
58          java.util.Map<java.util.Locale, String> localeNamesMap,
59          java.util.Map<java.util.Locale, String> localeTitlesMap,
60          java.lang.String description, java.lang.String type, boolean hidden,
61          java.lang.String friendlyURL)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException, java.rmi.RemoteException {
64          return getService()
65                     .addLayout(groupId, privateLayout, parentLayoutId,
66              localeNamesMap, localeTitlesMap, description, type, hidden,
67              friendlyURL);
68      }
69  
70      public static void deleteLayout(long plid)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          getService().deleteLayout(plid);
74      }
75  
76      public static void deleteLayout(long groupId, boolean privateLayout,
77          long layoutId)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException, java.rmi.RemoteException {
80          getService().deleteLayout(groupId, privateLayout, layoutId);
81      }
82  
83      public static java.lang.String getLayoutName(long groupId,
84          boolean privateLayout, long layoutId, java.lang.String languageId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException, java.rmi.RemoteException {
87          return getService()
88                     .getLayoutName(groupId, privateLayout, layoutId, languageId);
89      }
90  
91      public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
92          long companyId, java.lang.String portletId, java.lang.String prefsKey,
93          java.lang.String prefsValue)
94          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
95          return getService()
96                     .getLayoutReferences(companyId, portletId, prefsKey,
97              prefsValue);
98      }
99  
100     public static byte[] exportLayouts(long groupId, boolean privateLayout,
101         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
102         java.util.Date endDate)
103         throws com.liferay.portal.PortalException,
104             com.liferay.portal.SystemException, java.rmi.RemoteException {
105         return getService()
106                    .exportLayouts(groupId, privateLayout, parameterMap,
107             startDate, endDate);
108     }
109 
110     public static byte[] exportLayouts(long groupId, boolean privateLayout,
111         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
112         java.util.Date startDate, java.util.Date endDate)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException, java.rmi.RemoteException {
115         return getService()
116                    .exportLayouts(groupId, privateLayout, layoutIds,
117             parameterMap, startDate, endDate);
118     }
119 
120     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
121         long groupId, boolean privateLayout, long[] layoutIds,
122         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
123         java.util.Date endDate)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         return getService()
127                    .exportLayoutsAsStream(groupId, privateLayout, layoutIds,
128             parameterMap, startDate, endDate);
129     }
130 
131     public static byte[] exportPortletInfo(long plid,
132         java.lang.String portletId,
133         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
134         java.util.Date endDate)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException, java.rmi.RemoteException {
137         return getService()
138                    .exportPortletInfo(plid, portletId, parameterMap, startDate,
139             endDate);
140     }
141 
142     public static com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
143         long plid, java.lang.String portletId,
144         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
145         java.util.Date endDate)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException, java.rmi.RemoteException {
148         return getService()
149                    .exportPortletInfoAsStream(plid, portletId, parameterMap,
150             startDate, endDate);
151     }
152 
153     public static void importLayouts(long groupId, boolean privateLayout,
154         java.util.Map<String, String[]> parameterMap, java.io.File file)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException, java.rmi.RemoteException {
157         getService().importLayouts(groupId, privateLayout, parameterMap, file);
158     }
159 
160     public static void importLayouts(long groupId, boolean privateLayout,
161         java.util.Map<String, String[]> parameterMap, byte[] bytes)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException, java.rmi.RemoteException {
164         getService().importLayouts(groupId, privateLayout, parameterMap, bytes);
165     }
166 
167     public static void importLayouts(long groupId, boolean privateLayout,
168         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException, java.rmi.RemoteException {
171         getService().importLayouts(groupId, privateLayout, parameterMap, is);
172     }
173 
174     public static void importPortletInfo(long plid, java.lang.String portletId,
175         java.util.Map<String, String[]> parameterMap, java.io.File file)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException, java.rmi.RemoteException {
178         getService().importPortletInfo(plid, portletId, parameterMap, file);
179     }
180 
181     public static void importPortletInfo(long plid, java.lang.String portletId,
182         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException, java.rmi.RemoteException {
185         getService().importPortletInfo(plid, portletId, parameterMap, is);
186     }
187 
188     public static void schedulePublishToLive(long sourceGroupId,
189         long targetGroupId, boolean privateLayout,
190         java.util.Map<Long, Boolean> layoutIdMap,
191         java.util.Map<String, String[]> parameterMap, java.lang.String scope,
192         java.util.Date startDate, java.util.Date endDate,
193         java.lang.String groupName, java.lang.String cronText,
194         java.util.Date schedulerStartDate, java.util.Date schedulerEndDate,
195         java.lang.String description)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException, java.rmi.RemoteException {
198         getService()
199             .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
200             layoutIdMap, parameterMap, scope, startDate, endDate, groupName,
201             cronText, schedulerStartDate, schedulerEndDate, description);
202     }
203 
204     public static void schedulePublishToRemote(long sourceGroupId,
205         boolean privateLayout, java.util.Map<Long, Boolean> layoutIdMap,
206         java.util.Map<String, String[]> parameterMap,
207         java.lang.String remoteAddress, int remotePort,
208         boolean secureConnection, long remoteGroupId,
209         boolean remotePrivateLayout, java.util.Date startDate,
210         java.util.Date endDate, java.lang.String groupName,
211         java.lang.String cronText, java.util.Date schedulerStartDate,
212         java.util.Date schedulerEndDate, java.lang.String description)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException, java.rmi.RemoteException {
215         getService()
216             .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap,
217             parameterMap, remoteAddress, remotePort, secureConnection,
218             remoteGroupId, remotePrivateLayout, startDate, endDate, groupName,
219             cronText, schedulerStartDate, schedulerEndDate, description);
220     }
221 
222     public static void setLayouts(long groupId, boolean privateLayout,
223         long parentLayoutId, long[] layoutIds)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException, java.rmi.RemoteException {
226         getService()
227             .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
228     }
229 
230     public static void unschedulePublishToLive(long groupId,
231         java.lang.String jobName, java.lang.String groupName)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException, java.rmi.RemoteException {
234         getService().unschedulePublishToLive(groupId, jobName, groupName);
235     }
236 
237     public static void unschedulePublishToRemote(long groupId,
238         java.lang.String jobName, java.lang.String groupName)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException, java.rmi.RemoteException {
241         getService().unschedulePublishToRemote(groupId, jobName, groupName);
242     }
243 
244     public static com.liferay.portal.model.Layout updateLayout(long groupId,
245         boolean privateLayout, long layoutId, long parentLayoutId,
246         java.util.Map<java.util.Locale, String> localeNamesMap,
247         java.util.Map<java.util.Locale, String> localeTitlesMap,
248         java.lang.String description, java.lang.String type, boolean hidden,
249         java.lang.String friendlyURL)
250         throws com.liferay.portal.PortalException,
251             com.liferay.portal.SystemException, java.rmi.RemoteException {
252         return getService()
253                    .updateLayout(groupId, privateLayout, layoutId,
254             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
255             hidden, friendlyURL);
256     }
257 
258     public static com.liferay.portal.model.Layout updateLayout(long groupId,
259         boolean privateLayout, long layoutId, long parentLayoutId,
260         java.util.Map<java.util.Locale, String> localeNamesMap,
261         java.util.Map<java.util.Locale, String> localeTitlesMap,
262         java.lang.String description, java.lang.String type, boolean hidden,
263         java.lang.String friendlyURL, java.lang.Boolean iconImage,
264         byte[] iconBytes)
265         throws com.liferay.portal.PortalException,
266             com.liferay.portal.SystemException, java.rmi.RemoteException {
267         return getService()
268                    .updateLayout(groupId, privateLayout, layoutId,
269             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
270             hidden, friendlyURL, iconImage, iconBytes);
271     }
272 
273     public static com.liferay.portal.model.Layout updateLayout(long groupId,
274         boolean privateLayout, long layoutId, java.lang.String typeSettings)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException, java.rmi.RemoteException {
277         return getService()
278                    .updateLayout(groupId, privateLayout, layoutId, typeSettings);
279     }
280 
281     public static com.liferay.portal.model.Layout updateLookAndFeel(
282         long groupId, boolean privateLayout, long layoutId,
283         java.lang.String themeId, java.lang.String colorSchemeId,
284         java.lang.String css, boolean wapTheme)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException, java.rmi.RemoteException {
287         return getService()
288                    .updateLookAndFeel(groupId, privateLayout, layoutId,
289             themeId, colorSchemeId, css, wapTheme);
290     }
291 
292     public static com.liferay.portal.model.Layout updateName(long plid,
293         java.lang.String name, java.lang.String languageId)
294         throws com.liferay.portal.PortalException,
295             com.liferay.portal.SystemException, java.rmi.RemoteException {
296         return getService().updateName(plid, name, languageId);
297     }
298 
299     public static com.liferay.portal.model.Layout updateName(long groupId,
300         boolean privateLayout, long layoutId, java.lang.String name,
301         java.lang.String languageId)
302         throws com.liferay.portal.PortalException,
303             com.liferay.portal.SystemException, java.rmi.RemoteException {
304         return getService()
305                    .updateName(groupId, privateLayout, layoutId, name,
306             languageId);
307     }
308 
309     public static com.liferay.portal.model.Layout updateParentLayoutId(
310         long plid, long parentPlid)
311         throws com.liferay.portal.PortalException,
312             com.liferay.portal.SystemException, java.rmi.RemoteException {
313         return getService().updateParentLayoutId(plid, parentPlid);
314     }
315 
316     public static com.liferay.portal.model.Layout updateParentLayoutId(
317         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
318         throws com.liferay.portal.PortalException,
319             com.liferay.portal.SystemException, java.rmi.RemoteException {
320         return getService()
321                    .updateParentLayoutId(groupId, privateLayout, layoutId,
322             parentLayoutId);
323     }
324 
325     public static com.liferay.portal.model.Layout updatePriority(long plid,
326         int priority)
327         throws com.liferay.portal.PortalException,
328             com.liferay.portal.SystemException, java.rmi.RemoteException {
329         return getService().updatePriority(plid, priority);
330     }
331 
332     public static com.liferay.portal.model.Layout updatePriority(long groupId,
333         boolean privateLayout, long layoutId, int priority)
334         throws com.liferay.portal.PortalException,
335             com.liferay.portal.SystemException, java.rmi.RemoteException {
336         return getService()
337                    .updatePriority(groupId, privateLayout, layoutId, priority);
338     }
339 
340     public static LayoutService getService() {
341         if (_service == null) {
342             throw new RuntimeException("LayoutService is not set");
343         }
344 
345         return _service;
346     }
347 
348     public void setService(LayoutService service) {
349         _service = service;
350     }
351 
352     private static LayoutService _service;
353 }