001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the layout remote service. This utility wraps {@link com.liferay.portal.service.impl.LayoutServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see LayoutService
030     * @see com.liferay.portal.service.base.LayoutServiceBaseImpl
031     * @see com.liferay.portal.service.impl.LayoutServiceImpl
032     * @generated
033     */
034    public class LayoutServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portal.model.Layout addLayout(long groupId,
041                    boolean privateLayout, long parentLayoutId,
042                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
043                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
044                    java.lang.String description, java.lang.String type, boolean hidden,
045                    java.lang.String friendlyURL,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException,
048                            com.liferay.portal.kernel.exception.SystemException {
049                    return getService()
050                                       .addLayout(groupId, privateLayout, parentLayoutId,
051                            localeNamesMap, localeTitlesMap, description, type, hidden,
052                            friendlyURL, serviceContext);
053            }
054    
055            public static com.liferay.portal.model.Layout addLayout(long groupId,
056                    boolean privateLayout, long parentLayoutId, java.lang.String name,
057                    java.lang.String title, java.lang.String description,
058                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
059                    com.liferay.portal.service.ServiceContext serviceContext)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService()
063                                       .addLayout(groupId, privateLayout, parentLayoutId, name,
064                            title, description, type, hidden, friendlyURL, serviceContext);
065            }
066    
067            public static void deleteLayout(long plid)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    getService().deleteLayout(plid);
071            }
072    
073            public static void deleteLayout(long groupId, boolean privateLayout,
074                    long layoutId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    getService().deleteLayout(groupId, privateLayout, layoutId);
078            }
079    
080            public static byte[] exportLayouts(long groupId, boolean privateLayout,
081                    long[] layoutIds,
082                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
083                    java.util.Date startDate, java.util.Date endDate)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    return getService()
087                                       .exportLayouts(groupId, privateLayout, layoutIds,
088                            parameterMap, startDate, endDate);
089            }
090    
091            public static byte[] exportLayouts(long groupId, boolean privateLayout,
092                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
093                    java.util.Date startDate, java.util.Date endDate)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException {
096                    return getService()
097                                       .exportLayouts(groupId, privateLayout, parameterMap,
098                            startDate, endDate);
099            }
100    
101            public static java.io.File exportLayoutsAsFile(long groupId,
102                    boolean privateLayout, long[] layoutIds,
103                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
104                    java.util.Date startDate, java.util.Date endDate)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    return getService()
108                                       .exportLayoutsAsFile(groupId, privateLayout, layoutIds,
109                            parameterMap, startDate, endDate);
110            }
111    
112            public static byte[] exportPortletInfo(long plid, long groupId,
113                    java.lang.String portletId,
114                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
115                    java.util.Date startDate, java.util.Date endDate)
116                    throws com.liferay.portal.kernel.exception.PortalException,
117                            com.liferay.portal.kernel.exception.SystemException {
118                    return getService()
119                                       .exportPortletInfo(plid, groupId, portletId, parameterMap,
120                            startDate, endDate);
121            }
122    
123            public static java.io.File exportPortletInfoAsFile(long plid, long groupId,
124                    java.lang.String portletId,
125                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
126                    java.util.Date startDate, java.util.Date endDate)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .exportPortletInfoAsFile(plid, groupId, portletId,
131                            parameterMap, startDate, endDate);
132            }
133    
134            public static long getDefaultPlid(long groupId, long scopeGroupId,
135                    boolean privateLayout, java.lang.String portletId)
136                    throws com.liferay.portal.kernel.exception.PortalException,
137                            com.liferay.portal.kernel.exception.SystemException {
138                    return getService()
139                                       .getDefaultPlid(groupId, scopeGroupId, privateLayout,
140                            portletId);
141            }
142    
143            public static java.lang.String getLayoutName(long groupId,
144                    boolean privateLayout, long layoutId, java.lang.String languageId)
145                    throws com.liferay.portal.kernel.exception.PortalException,
146                            com.liferay.portal.kernel.exception.SystemException {
147                    return getService()
148                                       .getLayoutName(groupId, privateLayout, layoutId, languageId);
149            }
150    
151            public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
152                    long companyId, java.lang.String portletId,
153                    java.lang.String preferencesKey, java.lang.String preferencesValue)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return getService()
156                                       .getLayoutReferences(companyId, portletId, preferencesKey,
157                            preferencesValue);
158            }
159    
160            public static void importLayouts(long groupId, boolean privateLayout,
161                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
162                    byte[] bytes)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    getService().importLayouts(groupId, privateLayout, parameterMap, bytes);
166            }
167    
168            public static void importLayouts(long groupId, boolean privateLayout,
169                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
170                    java.io.File file)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    getService().importLayouts(groupId, privateLayout, parameterMap, file);
174            }
175    
176            public static void importLayouts(long groupId, boolean privateLayout,
177                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
178                    java.io.InputStream is)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    getService().importLayouts(groupId, privateLayout, parameterMap, is);
182            }
183    
184            public static void importPortletInfo(long plid, long groupId,
185                    java.lang.String portletId,
186                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
187                    java.io.File file)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException {
190                    getService()
191                            .importPortletInfo(plid, groupId, portletId, parameterMap, file);
192            }
193    
194            public static void importPortletInfo(long plid, long groupId,
195                    java.lang.String portletId,
196                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
197                    java.io.InputStream is)
198                    throws com.liferay.portal.kernel.exception.PortalException,
199                            com.liferay.portal.kernel.exception.SystemException {
200                    getService()
201                            .importPortletInfo(plid, groupId, portletId, parameterMap, is);
202            }
203    
204            public static void schedulePublishToLive(long sourceGroupId,
205                    long targetGroupId, boolean privateLayout,
206                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
207                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
208                    java.lang.String scope, java.util.Date startDate,
209                    java.util.Date endDate, java.lang.String groupName,
210                    java.lang.String cronText, java.util.Date schedulerStartDate,
211                    java.util.Date schedulerEndDate, java.lang.String description)
212                    throws com.liferay.portal.kernel.exception.PortalException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    getService()
215                            .schedulePublishToLive(sourceGroupId, targetGroupId, privateLayout,
216                            layoutIdMap, parameterMap, scope, startDate, endDate, groupName,
217                            cronText, schedulerStartDate, schedulerEndDate, description);
218            }
219    
220            public static void schedulePublishToRemote(long sourceGroupId,
221                    boolean privateLayout,
222                    java.util.Map<java.lang.Long, java.lang.Boolean> layoutIdMap,
223                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
224                    java.lang.String remoteAddress, int remotePort,
225                    boolean secureConnection, long remoteGroupId,
226                    boolean remotePrivateLayout, java.util.Date startDate,
227                    java.util.Date endDate, java.lang.String groupName,
228                    java.lang.String cronText, java.util.Date schedulerStartDate,
229                    java.util.Date schedulerEndDate, java.lang.String description)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    getService()
233                            .schedulePublishToRemote(sourceGroupId, privateLayout, layoutIdMap,
234                            parameterMap, remoteAddress, remotePort, secureConnection,
235                            remoteGroupId, remotePrivateLayout, startDate, endDate, groupName,
236                            cronText, schedulerStartDate, schedulerEndDate, description);
237            }
238    
239            public static void setLayouts(long groupId, boolean privateLayout,
240                    long parentLayoutId, long[] layoutIds)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    getService()
244                            .setLayouts(groupId, privateLayout, parentLayoutId, layoutIds);
245            }
246    
247            public static void unschedulePublishToLive(long groupId,
248                    java.lang.String jobName, java.lang.String groupName)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    getService().unschedulePublishToLive(groupId, jobName, groupName);
252            }
253    
254            public static void unschedulePublishToRemote(long groupId,
255                    java.lang.String jobName, java.lang.String groupName)
256                    throws com.liferay.portal.kernel.exception.PortalException,
257                            com.liferay.portal.kernel.exception.SystemException {
258                    getService().unschedulePublishToRemote(groupId, jobName, groupName);
259            }
260    
261            public static com.liferay.portal.model.Layout updateLayout(long groupId,
262                    boolean privateLayout, long layoutId, long parentLayoutId,
263                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
264                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
265                    java.lang.String description, java.lang.String type, boolean hidden,
266                    java.lang.String friendlyURL, java.lang.Boolean iconImage,
267                    byte[] iconBytes,
268                    com.liferay.portal.service.ServiceContext serviceContext)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return getService()
272                                       .updateLayout(groupId, privateLayout, layoutId,
273                            parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
274                            hidden, friendlyURL, iconImage, iconBytes, serviceContext);
275            }
276    
277            public static com.liferay.portal.model.Layout updateLayout(long groupId,
278                    boolean privateLayout, long layoutId, long parentLayoutId,
279                    java.util.Map<java.util.Locale, java.lang.String> localeNamesMap,
280                    java.util.Map<java.util.Locale, java.lang.String> localeTitlesMap,
281                    java.lang.String description, java.lang.String type, boolean hidden,
282                    java.lang.String friendlyURL,
283                    com.liferay.portal.service.ServiceContext serviceContext)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getService()
287                                       .updateLayout(groupId, privateLayout, layoutId,
288                            parentLayoutId, localeNamesMap, localeTitlesMap, description, type,
289                            hidden, friendlyURL, serviceContext);
290            }
291    
292            public static com.liferay.portal.model.Layout updateLayout(long groupId,
293                    boolean privateLayout, long layoutId, java.lang.String typeSettings)
294                    throws com.liferay.portal.kernel.exception.PortalException,
295                            com.liferay.portal.kernel.exception.SystemException {
296                    return getService()
297                                       .updateLayout(groupId, privateLayout, layoutId, typeSettings);
298            }
299    
300            public static com.liferay.portal.model.Layout updateLookAndFeel(
301                    long groupId, boolean privateLayout, long layoutId,
302                    java.lang.String themeId, java.lang.String colorSchemeId,
303                    java.lang.String css, boolean wapTheme)
304                    throws com.liferay.portal.kernel.exception.PortalException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    return getService()
307                                       .updateLookAndFeel(groupId, privateLayout, layoutId,
308                            themeId, colorSchemeId, css, wapTheme);
309            }
310    
311            public static com.liferay.portal.model.Layout updateName(long groupId,
312                    boolean privateLayout, long layoutId, java.lang.String name,
313                    java.lang.String languageId)
314                    throws com.liferay.portal.kernel.exception.PortalException,
315                            com.liferay.portal.kernel.exception.SystemException {
316                    return getService()
317                                       .updateName(groupId, privateLayout, layoutId, name,
318                            languageId);
319            }
320    
321            public static com.liferay.portal.model.Layout updateName(long plid,
322                    java.lang.String name, java.lang.String languageId)
323                    throws com.liferay.portal.kernel.exception.PortalException,
324                            com.liferay.portal.kernel.exception.SystemException {
325                    return getService().updateName(plid, name, languageId);
326            }
327    
328            public static com.liferay.portal.model.Layout updateParentLayoutId(
329                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
330                    throws com.liferay.portal.kernel.exception.PortalException,
331                            com.liferay.portal.kernel.exception.SystemException {
332                    return getService()
333                                       .updateParentLayoutId(groupId, privateLayout, layoutId,
334                            parentLayoutId);
335            }
336    
337            public static com.liferay.portal.model.Layout updateParentLayoutId(
338                    long plid, long parentPlid)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException {
341                    return getService().updateParentLayoutId(plid, parentPlid);
342            }
343    
344            public static com.liferay.portal.model.Layout updatePriority(long groupId,
345                    boolean privateLayout, long layoutId, int priority)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException {
348                    return getService()
349                                       .updatePriority(groupId, privateLayout, layoutId, priority);
350            }
351    
352            public static com.liferay.portal.model.Layout updatePriority(long plid,
353                    int priority)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    return getService().updatePriority(plid, priority);
357            }
358    
359            public static LayoutService getService() {
360                    if (_service == null) {
361                            _service = (LayoutService)PortalBeanLocatorUtil.locate(LayoutService.class.getName());
362    
363                            ReferenceRegistry.registerReference(LayoutServiceUtil.class,
364                                    "_service");
365                            MethodCache.remove(LayoutService.class);
366                    }
367    
368                    return _service;
369            }
370    
371            public void setService(LayoutService service) {
372                    MethodCache.remove(LayoutService.class);
373    
374                    _service = service;
375    
376                    ReferenceRegistry.registerReference(LayoutServiceUtil.class, "_service");
377                    MethodCache.remove(LayoutService.class);
378            }
379    
380            private static LayoutService _service;
381    }