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 localeNamesMap, java.util.Map localeTitlesMap,
69          java.lang.String description, java.lang.String type, boolean hidden,
70          java.lang.String friendlyURL)
71          throws com.liferay.portal.PortalException, 
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          LayoutService layoutService = LayoutServiceFactory.getService();
74  
75          return layoutService.addLayout(groupId, privateLayout, parentLayoutId,
76              localeNamesMap, localeTitlesMap, description, type, hidden,
77              friendlyURL);
78      }
79  
80      public static void deleteLayout(long plid)
81          throws com.liferay.portal.PortalException, 
82              com.liferay.portal.SystemException, java.rmi.RemoteException {
83          LayoutService layoutService = LayoutServiceFactory.getService();
84  
85          layoutService.deleteLayout(plid);
86      }
87  
88      public static void deleteLayout(long groupId, boolean privateLayout,
89          long layoutId)
90          throws com.liferay.portal.PortalException, 
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          LayoutService layoutService = LayoutServiceFactory.getService();
93  
94          layoutService.deleteLayout(groupId, privateLayout, layoutId);
95      }
96  
97      public static java.lang.String getLayoutName(long groupId,
98          boolean privateLayout, long layoutId, java.lang.String languageId)
99          throws com.liferay.portal.PortalException, 
100             com.liferay.portal.SystemException, java.rmi.RemoteException {
101         LayoutService layoutService = LayoutServiceFactory.getService();
102 
103         return layoutService.getLayoutName(groupId, privateLayout, layoutId,
104             languageId);
105     }
106 
107     public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
108         long companyId, java.lang.String portletId, java.lang.String prefsKey,
109         java.lang.String prefsValue)
110         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
111         LayoutService layoutService = LayoutServiceFactory.getService();
112 
113         return layoutService.getLayoutReferences(companyId, portletId,
114             prefsKey, prefsValue);
115     }
116 
117     public static byte[] exportLayouts(long groupId, boolean privateLayout,
118         java.util.Map parameterMap)
119         throws com.liferay.portal.PortalException, 
120             com.liferay.portal.SystemException, java.rmi.RemoteException {
121         LayoutService layoutService = LayoutServiceFactory.getService();
122 
123         return layoutService.exportLayouts(groupId, privateLayout, parameterMap);
124     }
125 
126     public static byte[] exportLayouts(long groupId, boolean privateLayout,
127         long[] layoutIds, java.util.Map parameterMap)
128         throws com.liferay.portal.PortalException, 
129             com.liferay.portal.SystemException, java.rmi.RemoteException {
130         LayoutService layoutService = LayoutServiceFactory.getService();
131 
132         return layoutService.exportLayouts(groupId, privateLayout, layoutIds,
133             parameterMap);
134     }
135 
136     public static byte[] exportPortletInfo(long plid,
137         java.lang.String portletId, java.util.Map parameterMap)
138         throws com.liferay.portal.PortalException, 
139             com.liferay.portal.SystemException, java.rmi.RemoteException {
140         LayoutService layoutService = LayoutServiceFactory.getService();
141 
142         return layoutService.exportPortletInfo(plid, portletId, parameterMap);
143     }
144 
145     public static void importLayouts(long groupId, boolean privateLayout,
146         java.util.Map parameterMap, java.io.File file)
147         throws com.liferay.portal.PortalException, 
148             com.liferay.portal.SystemException, java.rmi.RemoteException {
149         LayoutService layoutService = LayoutServiceFactory.getService();
150 
151         layoutService.importLayouts(groupId, privateLayout, parameterMap, file);
152     }
153 
154     public static void importLayouts(long groupId, boolean privateLayout,
155         java.util.Map parameterMap, java.io.InputStream is)
156         throws com.liferay.portal.PortalException, 
157             com.liferay.portal.SystemException, java.rmi.RemoteException {
158         LayoutService layoutService = LayoutServiceFactory.getService();
159 
160         layoutService.importLayouts(groupId, privateLayout, parameterMap, is);
161     }
162 
163     public static void importPortletInfo(long plid, java.lang.String portletId,
164         java.util.Map parameterMap, java.io.File file)
165         throws com.liferay.portal.PortalException, 
166             com.liferay.portal.SystemException, java.rmi.RemoteException {
167         LayoutService layoutService = LayoutServiceFactory.getService();
168 
169         layoutService.importPortletInfo(plid, portletId, parameterMap, file);
170     }
171 
172     public static void importPortletInfo(long plid, java.lang.String portletId,
173         java.util.Map parameterMap, java.io.InputStream is)
174         throws com.liferay.portal.PortalException, 
175             com.liferay.portal.SystemException, java.rmi.RemoteException {
176         LayoutService layoutService = LayoutServiceFactory.getService();
177 
178         layoutService.importPortletInfo(plid, portletId, parameterMap, is);
179     }
180 
181     public static void setLayouts(long groupId, boolean privateLayout,
182         long parentLayoutId, long[] layoutIds)
183         throws com.liferay.portal.PortalException, 
184             com.liferay.portal.SystemException, java.rmi.RemoteException {
185         LayoutService layoutService = LayoutServiceFactory.getService();
186 
187         layoutService.setLayouts(groupId, privateLayout, parentLayoutId,
188             layoutIds);
189     }
190 
191     public static com.liferay.portal.model.Layout updateLayout(long groupId,
192         boolean privateLayout, long layoutId, long parentLayoutId,
193         java.util.Map localeNamesMap, java.util.Map localeTitlesMap,
194         java.lang.String description, java.lang.String type, boolean hidden,
195         java.lang.String friendlyURL)
196         throws com.liferay.portal.PortalException, 
197             com.liferay.portal.SystemException, java.rmi.RemoteException {
198         LayoutService layoutService = LayoutServiceFactory.getService();
199 
200         return layoutService.updateLayout(groupId, privateLayout, layoutId,
201             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
202             hidden, friendlyURL);
203     }
204 
205     public static com.liferay.portal.model.Layout updateLayout(long groupId,
206         boolean privateLayout, long layoutId, long parentLayoutId,
207         java.util.Map localeNamesMap, java.util.Map localeTitlesMap,
208         java.lang.String description, java.lang.String type, boolean hidden,
209         java.lang.String friendlyURL, java.lang.Boolean iconImage,
210         byte[] iconBytes)
211         throws com.liferay.portal.PortalException, 
212             com.liferay.portal.SystemException, java.rmi.RemoteException {
213         LayoutService layoutService = LayoutServiceFactory.getService();
214 
215         return layoutService.updateLayout(groupId, privateLayout, layoutId,
216             parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
217             hidden, friendlyURL, iconImage, iconBytes);
218     }
219 
220     public static com.liferay.portal.model.Layout updateLayout(long groupId,
221         boolean privateLayout, long layoutId, java.lang.String typeSettings)
222         throws com.liferay.portal.PortalException, 
223             com.liferay.portal.SystemException, java.rmi.RemoteException {
224         LayoutService layoutService = LayoutServiceFactory.getService();
225 
226         return layoutService.updateLayout(groupId, privateLayout, layoutId,
227             typeSettings);
228     }
229 
230     public static com.liferay.portal.model.Layout updateLookAndFeel(
231         long groupId, boolean privateLayout, long layoutId,
232         java.lang.String themeId, java.lang.String colorSchemeId,
233         java.lang.String css, boolean wapTheme)
234         throws com.liferay.portal.PortalException, 
235             com.liferay.portal.SystemException, java.rmi.RemoteException {
236         LayoutService layoutService = LayoutServiceFactory.getService();
237 
238         return layoutService.updateLookAndFeel(groupId, privateLayout,
239             layoutId, themeId, colorSchemeId, css, wapTheme);
240     }
241 
242     public static com.liferay.portal.model.Layout updateName(long plid,
243         java.lang.String name, java.lang.String languageId)
244         throws com.liferay.portal.PortalException, 
245             com.liferay.portal.SystemException, java.rmi.RemoteException {
246         LayoutService layoutService = LayoutServiceFactory.getService();
247 
248         return layoutService.updateName(plid, name, languageId);
249     }
250 
251     public static com.liferay.portal.model.Layout updateName(long groupId,
252         boolean privateLayout, long layoutId, java.lang.String name,
253         java.lang.String languageId)
254         throws com.liferay.portal.PortalException, 
255             com.liferay.portal.SystemException, java.rmi.RemoteException {
256         LayoutService layoutService = LayoutServiceFactory.getService();
257 
258         return layoutService.updateName(groupId, privateLayout, layoutId, name,
259             languageId);
260     }
261 
262     public static com.liferay.portal.model.Layout updateParentLayoutId(
263         long plid, long parentPlid)
264         throws com.liferay.portal.PortalException, 
265             com.liferay.portal.SystemException, java.rmi.RemoteException {
266         LayoutService layoutService = LayoutServiceFactory.getService();
267 
268         return layoutService.updateParentLayoutId(plid, parentPlid);
269     }
270 
271     public static com.liferay.portal.model.Layout updateParentLayoutId(
272         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
273         throws com.liferay.portal.PortalException, 
274             com.liferay.portal.SystemException, java.rmi.RemoteException {
275         LayoutService layoutService = LayoutServiceFactory.getService();
276 
277         return layoutService.updateParentLayoutId(groupId, privateLayout,
278             layoutId, parentLayoutId);
279     }
280 
281     public static com.liferay.portal.model.Layout updatePriority(long plid,
282         int priority)
283         throws com.liferay.portal.PortalException, 
284             com.liferay.portal.SystemException, java.rmi.RemoteException {
285         LayoutService layoutService = LayoutServiceFactory.getService();
286 
287         return layoutService.updatePriority(plid, priority);
288     }
289 
290     public static com.liferay.portal.model.Layout updatePriority(long groupId,
291         boolean privateLayout, long layoutId, int priority)
292         throws com.liferay.portal.PortalException, 
293             com.liferay.portal.SystemException, java.rmi.RemoteException {
294         LayoutService layoutService = LayoutServiceFactory.getService();
295 
296         return layoutService.updatePriority(groupId, privateLayout, layoutId,
297             priority);
298     }
299 }