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="LayoutServiceUtil.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.LayoutService</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.LayoutServiceFactory</code> is responsible for
42   * the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.LayoutService
48   * @see com.liferay.portal.service.LayoutServiceFactory
49   *
50   */
51  public class LayoutServiceUtil {
52      public static com.liferay.portal.model.Layout addLayout(long groupId,
53          boolean privateLayout, long parentLayoutId, java.lang.String name,
54          java.lang.String title, java.lang.String description,
55          java.lang.String type, boolean hidden, java.lang.String friendlyURL)
56          throws com.liferay.portal.PortalException, 
57              com.liferay.portal.SystemException, java.rmi.RemoteException {
58          LayoutService layoutService = LayoutServiceFactory.getService();
59  
60          return layoutService.addLayout(groupId, privateLayout, parentLayoutId,
61              name, title, description, type, hidden, friendlyURL);
62      }
63  
64      public static void deleteLayout(long plid)
65          throws com.liferay.portal.PortalException, 
66              com.liferay.portal.SystemException, java.rmi.RemoteException {
67          LayoutService layoutService = LayoutServiceFactory.getService();
68          layoutService.deleteLayout(plid);
69      }
70  
71      public static void deleteLayout(long groupId, boolean privateLayout,
72          long layoutId)
73          throws com.liferay.portal.PortalException, 
74              com.liferay.portal.SystemException, java.rmi.RemoteException {
75          LayoutService layoutService = LayoutServiceFactory.getService();
76          layoutService.deleteLayout(groupId, privateLayout, layoutId);
77      }
78  
79      public static java.lang.String getLayoutName(long groupId,
80          boolean privateLayout, long layoutId, java.lang.String languageId)
81          throws com.liferay.portal.PortalException, 
82              com.liferay.portal.SystemException, java.rmi.RemoteException {
83          LayoutService layoutService = LayoutServiceFactory.getService();
84  
85          return layoutService.getLayoutName(groupId, privateLayout, layoutId,
86              languageId);
87      }
88  
89      public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
90          long companyId, java.lang.String portletId, java.lang.String prefsKey,
91          java.lang.String prefsValue)
92          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
93          LayoutService layoutService = LayoutServiceFactory.getService();
94  
95          return layoutService.getLayoutReferences(companyId, portletId,
96              prefsKey, prefsValue);
97      }
98  
99      public static byte[] exportLayouts(long groupId, boolean privateLayout,
100         java.util.Map parameterMap)
101         throws com.liferay.portal.PortalException, 
102             com.liferay.portal.SystemException, java.rmi.RemoteException {
103         LayoutService layoutService = LayoutServiceFactory.getService();
104 
105         return layoutService.exportLayouts(groupId, privateLayout, parameterMap);
106     }
107 
108     public static void importLayouts(long groupId, boolean privateLayout,
109         java.util.Map parameterMap, java.io.File file)
110         throws com.liferay.portal.PortalException, 
111             com.liferay.portal.SystemException, java.rmi.RemoteException {
112         LayoutService layoutService = LayoutServiceFactory.getService();
113         layoutService.importLayouts(groupId, privateLayout, parameterMap, file);
114     }
115 
116     public static void setLayouts(long groupId, boolean privateLayout,
117         long parentLayoutId, long[] layoutIds)
118         throws com.liferay.portal.PortalException, 
119             com.liferay.portal.SystemException, java.rmi.RemoteException {
120         LayoutService layoutService = LayoutServiceFactory.getService();
121         layoutService.setLayouts(groupId, privateLayout, parentLayoutId,
122             layoutIds);
123     }
124 
125     public static com.liferay.portal.model.Layout updateLayout(long groupId,
126         boolean privateLayout, long layoutId, long parentLayoutId,
127         java.lang.String name, java.lang.String title,
128         java.lang.String languageId, java.lang.String description,
129         java.lang.String type, boolean hidden, java.lang.String friendlyURL)
130         throws com.liferay.portal.PortalException, 
131             com.liferay.portal.SystemException, java.rmi.RemoteException {
132         LayoutService layoutService = LayoutServiceFactory.getService();
133 
134         return layoutService.updateLayout(groupId, privateLayout, layoutId,
135             parentLayoutId, name, title, languageId, description, type, hidden,
136             friendlyURL);
137     }
138 
139     public static com.liferay.portal.model.Layout updateLayout(long groupId,
140         boolean privateLayout, long layoutId, long parentLayoutId,
141         java.lang.String name, java.lang.String title,
142         java.lang.String languageId, java.lang.String description,
143         java.lang.String type, boolean hidden, java.lang.String friendlyURL,
144         java.lang.Boolean iconImage, byte[] iconBytes)
145         throws com.liferay.portal.PortalException, 
146             com.liferay.portal.SystemException, java.rmi.RemoteException {
147         LayoutService layoutService = LayoutServiceFactory.getService();
148 
149         return layoutService.updateLayout(groupId, privateLayout, layoutId,
150             parentLayoutId, name, title, languageId, description, type, hidden,
151             friendlyURL, iconImage, iconBytes);
152     }
153 
154     public static com.liferay.portal.model.Layout updateLayout(long groupId,
155         boolean privateLayout, long layoutId, java.lang.String typeSettings)
156         throws com.liferay.portal.PortalException, 
157             com.liferay.portal.SystemException, java.rmi.RemoteException {
158         LayoutService layoutService = LayoutServiceFactory.getService();
159 
160         return layoutService.updateLayout(groupId, privateLayout, layoutId,
161             typeSettings);
162     }
163 
164     public static com.liferay.portal.model.Layout updateLookAndFeel(
165         long groupId, boolean privateLayout, long layoutId,
166         java.lang.String themeId, java.lang.String colorSchemeId,
167         java.lang.String css, boolean wapTheme)
168         throws com.liferay.portal.PortalException, 
169             com.liferay.portal.SystemException, java.rmi.RemoteException {
170         LayoutService layoutService = LayoutServiceFactory.getService();
171 
172         return layoutService.updateLookAndFeel(groupId, privateLayout,
173             layoutId, themeId, colorSchemeId, css, wapTheme);
174     }
175 
176     public static com.liferay.portal.model.Layout updateName(long plid,
177         java.lang.String name, java.lang.String languageId)
178         throws com.liferay.portal.PortalException, 
179             com.liferay.portal.SystemException, java.rmi.RemoteException {
180         LayoutService layoutService = LayoutServiceFactory.getService();
181 
182         return layoutService.updateName(plid, name, languageId);
183     }
184 
185     public static com.liferay.portal.model.Layout updateName(long groupId,
186         boolean privateLayout, long layoutId, java.lang.String name,
187         java.lang.String languageId)
188         throws com.liferay.portal.PortalException, 
189             com.liferay.portal.SystemException, java.rmi.RemoteException {
190         LayoutService layoutService = LayoutServiceFactory.getService();
191 
192         return layoutService.updateName(groupId, privateLayout, layoutId, name,
193             languageId);
194     }
195 
196     public static com.liferay.portal.model.Layout updateParentLayoutId(
197         long plid, long parentPlid)
198         throws com.liferay.portal.PortalException, 
199             com.liferay.portal.SystemException, java.rmi.RemoteException {
200         LayoutService layoutService = LayoutServiceFactory.getService();
201 
202         return layoutService.updateParentLayoutId(plid, parentPlid);
203     }
204 
205     public static com.liferay.portal.model.Layout updateParentLayoutId(
206         long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
207         throws com.liferay.portal.PortalException, 
208             com.liferay.portal.SystemException, java.rmi.RemoteException {
209         LayoutService layoutService = LayoutServiceFactory.getService();
210 
211         return layoutService.updateParentLayoutId(groupId, privateLayout,
212             layoutId, parentLayoutId);
213     }
214 
215     public static com.liferay.portal.model.Layout updatePriority(long plid,
216         int priority)
217         throws com.liferay.portal.PortalException, 
218             com.liferay.portal.SystemException, java.rmi.RemoteException {
219         LayoutService layoutService = LayoutServiceFactory.getService();
220 
221         return layoutService.updatePriority(plid, priority);
222     }
223 
224     public static com.liferay.portal.model.Layout updatePriority(long groupId,
225         boolean privateLayout, long layoutId, int priority)
226         throws com.liferay.portal.PortalException, 
227             com.liferay.portal.SystemException, java.rmi.RemoteException {
228         LayoutService layoutService = LayoutServiceFactory.getService();
229 
230         return layoutService.updatePriority(groupId, privateLayout, layoutId,
231             priority);
232     }
233 }