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