1   /**
2    * Copyright (c) 2000-2008 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  /**
27   * <a href="LayoutServiceUtil.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   * <code>com.liferay.portal.service.LayoutService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portal.service.LayoutServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portal.service.LayoutService
50   * @see com.liferay.portal.service.LayoutServiceFactory
51   *
52   */
53  public class LayoutServiceUtil {
54      public static com.liferay.portal.model.Layout addLayout(long groupId,
55          boolean privateLayout, long parentLayoutId, java.lang.String name,
56          java.lang.String title, java.lang.String description,
57          java.lang.String type, boolean hidden, java.lang.String friendlyURL)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException, java.rmi.RemoteException {
60          LayoutService layoutService = LayoutServiceFactory.getService();
61  
62          return layoutService.addLayout(groupId, privateLayout, parentLayoutId,
63              name, title, description, type, hidden, friendlyURL);
64      }
65  
66      public static com.liferay.portal.model.Layout addLayout(long groupId,
67          boolean privateLayout, long parentLayoutId,
68          java.util.Map<java.util.Locale, String> localeNamesMap,
69          java.util.Map<java.util.Locale, String> localeTitlesMap,
70          java.lang.String description, java.lang.String type, boolean hidden,
71          java.lang.String friendlyURL)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          LayoutService layoutService = LayoutServiceFactory.getService();
75  
76          return layoutService.addLayout(groupId, privateLayout, parentLayoutId,
77              localeNamesMap, localeTitlesMap, description, type, hidden,
78              friendlyURL);
79      }
80  
81      public static void deleteLayout(long plid)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException, java.rmi.RemoteException {
84          LayoutService layoutService = LayoutServiceFactory.getService();
85  
86          layoutService.deleteLayout(plid);
87      }
88  
89      public static void deleteLayout(long groupId, boolean privateLayout,
90          long layoutId)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException, java.rmi.RemoteException {
93          LayoutService layoutService = LayoutServiceFactory.getService();
94  
95          layoutService.deleteLayout(groupId, privateLayout, layoutId);
96      }
97  
98      public static java.lang.String getLayoutName(long groupId,
99          boolean privateLayout, long layoutId, java.lang.String languageId)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException, java.rmi.RemoteException {
102         LayoutService layoutService = LayoutServiceFactory.getService();
103 
104         return layoutService.getLayoutName(groupId, privateLayout, layoutId,
105             languageId);
106     }
107 
108     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
109         long companyId, java.lang.String portletId, java.lang.String prefsKey,
110         java.lang.String prefsValue)
111         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
112         LayoutService layoutService = LayoutServiceFactory.getService();
113 
114         return layoutService.getLayoutReferences(companyId, portletId,
115             prefsKey, prefsValue);
116     }
117 
118     public static byte[] exportLayouts(long groupId, boolean privateLayout,
119         java.util.Map<String, String[]> parameterMap)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException, java.rmi.RemoteException {
122         LayoutService layoutService = LayoutServiceFactory.getService();
123 
124         return layoutService.exportLayouts(groupId, privateLayout, parameterMap);
125     }
126 
127     public static byte[] exportLayouts(long groupId, boolean privateLayout,
128         long[] layoutIds, java.util.Map<String, String[]> parameterMap)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException, java.rmi.RemoteException {
131         LayoutService layoutService = LayoutServiceFactory.getService();
132 
133         return layoutService.exportLayouts(groupId, privateLayout, layoutIds,
134             parameterMap);
135     }
136 
137     public static byte[] exportPortletInfo(long plid,
138         java.lang.String portletId, java.util.Map<String, String[]> parameterMap)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException, java.rmi.RemoteException {
141         LayoutService layoutService = LayoutServiceFactory.getService();
142 
143         return layoutService.exportPortletInfo(plid, portletId, parameterMap);
144     }
145 
146     public static void importLayouts(long groupId, boolean privateLayout,
147         java.util.Map<String, String[]> parameterMap, java.io.File file)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException, java.rmi.RemoteException {
150         LayoutService layoutService = LayoutServiceFactory.getService();
151 
152         layoutService.importLayouts(groupId, privateLayout, parameterMap, file);
153     }
154 
155     public static void importLayouts(long groupId, boolean privateLayout,
156         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException, java.rmi.RemoteException {
159         LayoutService layoutService = LayoutServiceFactory.getService();
160 
161         layoutService.importLayouts(groupId, privateLayout, parameterMap, is);
162     }
163 
164     public static void importPortletInfo(long plid, java.lang.String portletId,
165         java.util.Map<String, String[]> parameterMap, java.io.File file)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException, java.rmi.RemoteException {
168         LayoutService layoutService = LayoutServiceFactory.getService();
169 
170         layoutService.importPortletInfo(plid, portletId, parameterMap, file);
171     }
172 
173     public static void importPortletInfo(long plid, java.lang.String portletId,
174         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException, java.rmi.RemoteException {
177         LayoutService layoutService = LayoutServiceFactory.getService();
178 
179         layoutService.importPortletInfo(plid, portletId, parameterMap, is);
180     }
181 
182     public static void setLayouts(long groupId, boolean privateLayout,
183         long parentLayoutId, long[] layoutIds)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException, java.rmi.RemoteException {
186         LayoutService layoutService = LayoutServiceFactory.getService();
187 
188         layoutService.setLayouts(groupId, privateLayout, parentLayoutId,
189             layoutIds);
190     }
191 
192     public static com.liferay.portal.model.Layout updateLayout(long groupId,
193         boolean privateLayout, long layoutId, long parentLayoutId,
194         java.util.Map<java.util.Locale, String> localeNamesMap,
195         java.util.Map<java.util.Locale, String> localeTitlesMap,
196         java.lang.String description, java.lang.String type, boolean hidden,
197         java.lang.String friendlyURL)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException, java.rmi.RemoteException {
200         LayoutService layoutService = LayoutServiceFactory.getService();
201 
202         return layoutService.updateLayout(groupId, privateLayout, layoutId,
203             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
204             hidden, friendlyURL);
205     }
206 
207     public static com.liferay.portal.model.Layout updateLayout(long groupId,
208         boolean privateLayout, long layoutId, long parentLayoutId,
209         java.util.Map<java.util.Locale, String> localeNamesMap,
210         java.util.Map<java.util.Locale, String> localeTitlesMap,
211         java.lang.String description, java.lang.String type, boolean hidden,
212         java.lang.String friendlyURL, java.lang.Boolean iconImage,
213         byte[] iconBytes)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException, java.rmi.RemoteException {
216         LayoutService layoutService = LayoutServiceFactory.getService();
217 
218         return layoutService.updateLayout(groupId, privateLayout, layoutId,
219             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
220             hidden, friendlyURL, iconImage, iconBytes);
221     }
222 
223     public static com.liferay.portal.model.Layout updateLayout(long groupId,
224         boolean privateLayout, long layoutId, java.lang.String typeSettings)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException, java.rmi.RemoteException {
227         LayoutService layoutService = LayoutServiceFactory.getService();
228 
229         return layoutService.updateLayout(groupId, privateLayout, layoutId,
230             typeSettings);
231     }
232 
233     public static com.liferay.portal.model.Layout updateLookAndFeel(
234         long groupId, boolean privateLayout, long layoutId,
235         java.lang.String themeId, java.lang.String colorSchemeId,
236         java.lang.String css, boolean wapTheme)
237         throws com.liferay.portal.PortalException,
238             com.liferay.portal.SystemException, java.rmi.RemoteException {
239         LayoutService layoutService = LayoutServiceFactory.getService();
240 
241         return layoutService.updateLookAndFeel(groupId, privateLayout,
242             layoutId, themeId, colorSchemeId, css, wapTheme);
243     }
244 
245     public static com.liferay.portal.model.Layout updateName(long plid,
246         java.lang.String name, java.lang.String languageId)
247         throws com.liferay.portal.PortalException,
248             com.liferay.portal.SystemException, java.rmi.RemoteException {
249         LayoutService layoutService = LayoutServiceFactory.getService();
250 
251         return layoutService.updateName(plid, name, languageId);
252     }
253 
254     public static com.liferay.portal.model.Layout updateName(long groupId,
255         boolean privateLayout, long layoutId, java.lang.String name,
256         java.lang.String languageId)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException, java.rmi.RemoteException {
259         LayoutService layoutService = LayoutServiceFactory.getService();
260 
261         return layoutService.updateName(groupId, privateLayout, layoutId, name,
262             languageId);
263     }
264 
265     public static com.liferay.portal.model.Layout updateParentLayoutId(
266         long plid, long parentPlid)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException, java.rmi.RemoteException {
269         LayoutService layoutService = LayoutServiceFactory.getService();
270 
271         return layoutService.updateParentLayoutId(plid, parentPlid);
272     }
273 
274     public static com.liferay.portal.model.Layout updateParentLayoutId(
275         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
276         throws com.liferay.portal.PortalException,
277             com.liferay.portal.SystemException, java.rmi.RemoteException {
278         LayoutService layoutService = LayoutServiceFactory.getService();
279 
280         return layoutService.updateParentLayoutId(groupId, privateLayout,
281             layoutId, parentLayoutId);
282     }
283 
284     public static com.liferay.portal.model.Layout updatePriority(long plid,
285         int priority)
286         throws com.liferay.portal.PortalException,
287             com.liferay.portal.SystemException, java.rmi.RemoteException {
288         LayoutService layoutService = LayoutServiceFactory.getService();
289 
290         return layoutService.updatePriority(plid, priority);
291     }
292 
293     public static com.liferay.portal.model.Layout updatePriority(long groupId,
294         boolean privateLayout, long layoutId, int priority)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException, java.rmi.RemoteException {
297         LayoutService layoutService = LayoutServiceFactory.getService();
298 
299         return layoutService.updatePriority(groupId, privateLayout, layoutId,
300             priority);
301     }
302 }