001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.LocalizationUtil;
020    import com.liferay.portal.service.LayoutServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    import java.util.Locale;
025    import java.util.Map;
026    
027    /**
028     * Provides the SOAP utility for the
029     * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it is difficult for SOAP to
032     * support certain types.
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portal.model.LayoutSoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portal.model.Layout}, that is translated to a
040     * {@link com.liferay.portal.model.LayoutSoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at http://localhost:8080/api/axis. Set the
053     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author Brian Wing Shun Chan
062     * @see LayoutServiceHttp
063     * @see com.liferay.portal.model.LayoutSoap
064     * @see com.liferay.portal.service.LayoutServiceUtil
065     * @generated
066     */
067    public class LayoutServiceSoap {
068            /**
069            * Adds a layout with additional parameters.
070            *
071            * <p>
072            * This method handles the creation of the layout including its resources,
073            * metadata, and internal data structures. It is not necessary to make
074            * subsequent calls to any methods to setup default groups, resources, ...
075            * etc.
076            * </p>
077            *
078            * @param groupId the primary key of the group
079            * @param privateLayout whether the layout is private to the group
080            * @param parentLayoutId the primary key of the parent layout
081            (optionally {@link
082            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
083            * @param localeNamesMap the layout's locales and localized names
084            * @param localeTitlesMap the layout's locales and localized titles
085            * @param descriptionMap the layout's locales and localized
086            descriptions
087            * @param keywordsMap the layout's locales and localized keywords
088            * @param robotsMap the layout's locales and localized robots
089            * @param type the layout's type (optionally {@link
090            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
091            possible types can be found in {@link
092            com.liferay.portal.model.LayoutConstants}.
093            * @param hidden whether the layout is hidden
094            * @param friendlyURL the layout's locales and localized friendly URLs.
095            To see how the URL is normalized when accessed, see {@link
096            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
097            String)}.
098            * @param serviceContext the service context to be applied. Must set
099            the UUID for the layout. Can set the creation date,
100            modification date, and expando bridge attributes for the
101            layout. For layouts that belong to a layout set prototype, an
102            attribute named <code>layoutUpdateable</code> can be used to
103            specify whether site administrators can modify this page
104            within their site.
105            * @return the layout
106            * @throws PortalException if a group with the primary key could not be
107            found, if the group did not have permission to manage the
108            layouts involved, if layout values were invalid, or if a
109            portal exception occurred
110            * @throws SystemException if a system exception occurred
111            * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, boolean,
112            long, Map, Map, Map, Map, Map, String, String, boolean, Map,
113            ServiceContext)}
114            */
115            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
116                    boolean privateLayout, long parentLayoutId,
117                    java.lang.String[] localeNamesMapLanguageIds,
118                    java.lang.String[] localeNamesMapValues,
119                    java.lang.String[] localeTitlesMapLanguageIds,
120                    java.lang.String[] localeTitlesMapValues,
121                    java.lang.String[] descriptionMapLanguageIds,
122                    java.lang.String[] descriptionMapValues,
123                    java.lang.String[] keywordsMapLanguageIds,
124                    java.lang.String[] keywordsMapValues,
125                    java.lang.String[] robotsMapLanguageIds,
126                    java.lang.String[] robotsMapValues, java.lang.String type,
127                    boolean hidden, java.lang.String friendlyURL,
128                    com.liferay.portal.service.ServiceContext serviceContext)
129                    throws RemoteException {
130                    try {
131                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
132                                            localeNamesMapValues);
133                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
134                                            localeTitlesMapValues);
135                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
136                                            descriptionMapValues);
137                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
138                                            keywordsMapValues);
139                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
140                                            robotsMapValues);
141    
142                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
143                                            privateLayout, parentLayoutId, localeNamesMap,
144                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
145                                            type, hidden, friendlyURL, serviceContext);
146    
147                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
148                    }
149                    catch (Exception e) {
150                            _log.error(e, e);
151    
152                            throw new RemoteException(e.getMessage());
153                    }
154            }
155    
156            /**
157            * Adds a layout with additional parameters.
158            *
159            * <p>
160            * This method handles the creation of the layout including its resources,
161            * metadata, and internal data structures. It is not necessary to make
162            * subsequent calls to any methods to setup default groups, resources, ...
163            * etc.
164            * </p>
165            *
166            * @param groupId the primary key of the group
167            * @param privateLayout whether the layout is private to the group
168            * @param parentLayoutId the primary key of the parent layout (optionally
169            {@link
170            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
171            * @param localeNamesMap the layout's locales and localized names
172            * @param localeTitlesMap the layout's locales and localized titles
173            * @param descriptionMap the layout's locales and localized descriptions
174            * @param keywordsMap the layout's locales and localized keywords
175            * @param robotsMap the layout's locales and localized robots
176            * @param type the layout's type (optionally {@link
177            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
178            possible types can be found in {@link
179            com.liferay.portal.model.LayoutConstants}.
180            * @param typeSettings the settings to load the unicode properties object.
181            See {@link com.liferay.portal.kernel.util.UnicodeProperties
182            #fastLoad(String)}.
183            * @param hidden whether the layout is hidden
184            * @param friendlyURLMap the layout's locales and localized friendly URLs.
185            To see how the URL is normalized when accessed, see {@link
186            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
187            String)}.
188            * @param serviceContext the service context to be applied. Must set the
189            UUID for the layout. Can set the creation date, modification
190            date, and expando bridge attributes for the layout. For layouts
191            that belong to a layout set prototype, an attribute named
192            <code>layoutUpdateable</code> can be used to specify whether site
193            administrators can modify this page within their site.
194            * @return the layout
195            * @throws PortalException if a group with the primary key could not be
196            found, if the group did not have permission to manage the layouts
197            involved, if layout values were invalid, or if a portal exception
198            occurred
199            * @throws SystemException if a system exception occurred
200            */
201            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
202                    boolean privateLayout, long parentLayoutId,
203                    java.lang.String[] localeNamesMapLanguageIds,
204                    java.lang.String[] localeNamesMapValues,
205                    java.lang.String[] localeTitlesMapLanguageIds,
206                    java.lang.String[] localeTitlesMapValues,
207                    java.lang.String[] descriptionMapLanguageIds,
208                    java.lang.String[] descriptionMapValues,
209                    java.lang.String[] keywordsMapLanguageIds,
210                    java.lang.String[] keywordsMapValues,
211                    java.lang.String[] robotsMapLanguageIds,
212                    java.lang.String[] robotsMapValues, java.lang.String type,
213                    java.lang.String typeSettings, boolean hidden,
214                    java.lang.String[] friendlyURLMapLanguageIds,
215                    java.lang.String[] friendlyURLMapValues,
216                    com.liferay.portal.service.ServiceContext serviceContext)
217                    throws RemoteException {
218                    try {
219                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
220                                            localeNamesMapValues);
221                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
222                                            localeTitlesMapValues);
223                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
224                                            descriptionMapValues);
225                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
226                                            keywordsMapValues);
227                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
228                                            robotsMapValues);
229                            Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds,
230                                            friendlyURLMapValues);
231    
232                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
233                                            privateLayout, parentLayoutId, localeNamesMap,
234                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
235                                            type, typeSettings, hidden, friendlyURLMap, serviceContext);
236    
237                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
238                    }
239                    catch (Exception e) {
240                            _log.error(e, e);
241    
242                            throw new RemoteException(e.getMessage());
243                    }
244            }
245    
246            /**
247            * Adds a layout with single entry maps for name, title, and description to
248            * the default locale.
249            *
250            * <p>
251            * This method handles the creation of the layout including its resources,
252            * metadata, and internal data structures. It is not necessary to make
253            * subsequent calls to any methods to setup default groups, resources, ...
254            * etc.
255            * </p>
256            *
257            * @param groupId the primary key of the group
258            * @param privateLayout whether the layout is private to the group
259            * @param parentLayoutId the primary key of the parent layout (optionally
260            {@link
261            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
262            * @param name Map the layout's locales and localized names
263            * @param title Map the layout's locales and localized titles
264            * @param description Map the layout's locales and localized descriptions
265            * @param type the layout's type (optionally {@link
266            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
267            possible types can be found in {@link
268            com.liferay.portal.model.LayoutConstants}.
269            * @param hidden whether the layout is hidden
270            * @param friendlyURL the layout's locales and localized friendly URLs. To
271            see how the URL is normalized when accessed, see {@link
272            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
273            String)}.
274            * @param serviceContext the service context to be applied. Must set the
275            UUID for the layout. Can specify the creation date, modification
276            date, and expando bridge attributes for the layout. For layouts
277            that belong to a layout set prototype, an attribute named
278            <code>layoutUpdateable</code> can be used to specify whether site
279            administrators can modify this page within their site.
280            * @return the layout
281            * @throws PortalException if a group with the primary key could not be
282            found, if the group did not have permission to manage the layouts
283            involved, if layout values were invalid, or if a portal exception
284            occurred
285            * @throws SystemException if a system exception occurred
286            */
287            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
288                    boolean privateLayout, long parentLayoutId, java.lang.String name,
289                    java.lang.String title, java.lang.String description,
290                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
291                    com.liferay.portal.service.ServiceContext serviceContext)
292                    throws RemoteException {
293                    try {
294                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
295                                            privateLayout, parentLayoutId, name, title, description,
296                                            type, hidden, friendlyURL, serviceContext);
297    
298                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
299                    }
300                    catch (Exception e) {
301                            _log.error(e, e);
302    
303                            throw new RemoteException(e.getMessage());
304                    }
305            }
306    
307            /**
308            * Deletes the layout with the primary key, also deleting the layout's child
309            * layouts, and associated resources.
310            *
311            * @param groupId the primary key of the group
312            * @param privateLayout whether the layout is private to the group
313            * @param layoutId the primary key of the layout
314            * @param serviceContext the service context to be applied
315            * @throws PortalException if the user did not have permission to delete the
316            layout, if a matching layout could not be found , or if some
317            other portal exception occurred
318            * @throws SystemException if a system exception occurred
319            */
320            public static void deleteLayout(long groupId, boolean privateLayout,
321                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
322                    throws RemoteException {
323                    try {
324                            LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId,
325                                    serviceContext);
326                    }
327                    catch (Exception e) {
328                            _log.error(e, e);
329    
330                            throw new RemoteException(e.getMessage());
331                    }
332            }
333    
334            /**
335            * Deletes the layout with the plid, also deleting the layout's child
336            * layouts, and associated resources.
337            *
338            * @param plid the primary key of the layout
339            * @param serviceContext the service context to be applied
340            * @throws PortalException if the user did not have permission to delete the
341            layout, if a layout with the primary key could not be found , or
342            if some other portal exception occurred
343            * @throws SystemException if a system exception occurred
344            */
345            public static void deleteLayout(long plid,
346                    com.liferay.portal.service.ServiceContext serviceContext)
347                    throws RemoteException {
348                    try {
349                            LayoutServiceUtil.deleteLayout(plid, serviceContext);
350                    }
351                    catch (Exception e) {
352                            _log.error(e, e);
353    
354                            throw new RemoteException(e.getMessage());
355                    }
356            }
357    
358            public static void deleteTempFileEntry(long groupId,
359                    java.lang.String fileName, java.lang.String tempFolderName)
360                    throws RemoteException {
361                    try {
362                            LayoutServiceUtil.deleteTempFileEntry(groupId, fileName,
363                                    tempFolderName);
364                    }
365                    catch (Exception e) {
366                            _log.error(e, e);
367    
368                            throw new RemoteException(e.getMessage());
369                    }
370            }
371    
372            /**
373            * Returns all the ancestor layouts of the layout.
374            *
375            * @param plid the primary key of the layout
376            * @return the ancestor layouts of the layout
377            * @throws PortalException if a matching layout could not be found or if a
378            portal exception occurred
379            * @throws SystemException if a system exception occurred
380            */
381            public static com.liferay.portal.model.LayoutSoap[] getAncestorLayouts(
382                    long plid) throws RemoteException {
383                    try {
384                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getAncestorLayouts(plid);
385    
386                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
387                    }
388                    catch (Exception e) {
389                            _log.error(e, e);
390    
391                            throw new RemoteException(e.getMessage());
392                    }
393            }
394    
395            /**
396            * Returns the primary key of the default layout for the group.
397            *
398            * @param groupId the primary key of the group
399            * @param scopeGroupId the primary key of the scope group. See {@link
400            com.liferay.portal.service.ServiceContext#getScopeGroupId()}.
401            * @param privateLayout whether the layout is private to the group
402            * @param portletId the primary key of the portlet
403            * @return Returns the primary key of the default layout group; {@link
404            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise
405            * @throws PortalException if a group, layout, or portlet with the primary
406            key could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public static long getDefaultPlid(long groupId, long scopeGroupId,
410                    boolean privateLayout, java.lang.String portletId)
411                    throws RemoteException {
412                    try {
413                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
414                                            scopeGroupId, privateLayout, portletId);
415    
416                            return returnValue;
417                    }
418                    catch (Exception e) {
419                            _log.error(e, e);
420    
421                            throw new RemoteException(e.getMessage());
422                    }
423            }
424    
425            public static long getDefaultPlid(long groupId, long scopeGroupId,
426                    java.lang.String portletId) throws RemoteException {
427                    try {
428                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
429                                            scopeGroupId, portletId);
430    
431                            return returnValue;
432                    }
433                    catch (Exception e) {
434                            _log.error(e, e);
435    
436                            throw new RemoteException(e.getMessage());
437                    }
438            }
439    
440            /**
441            * Returns the layout matching the UUID, group, and privacy.
442            *
443            * @param uuid the layout's UUID
444            * @param groupId the primary key of the group
445            * @param privateLayout whether the layout is private to the group
446            * @return the matching layout
447            * @throws PortalException if a matching layout could not be found, if the
448            user did not have permission to view the layout, or if some other
449            portal exception occurred
450            * @throws SystemException if a system exception occurred
451            */
452            public static com.liferay.portal.model.LayoutSoap getLayoutByUuidAndGroupId(
453                    java.lang.String uuid, long groupId, boolean privateLayout)
454                    throws RemoteException {
455                    try {
456                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.getLayoutByUuidAndGroupId(uuid,
457                                            groupId, privateLayout);
458    
459                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
460                    }
461                    catch (Exception e) {
462                            _log.error(e, e);
463    
464                            throw new RemoteException(e.getMessage());
465                    }
466            }
467    
468            /**
469            * Returns the name of the layout.
470            *
471            * @param groupId the primary key of the group
472            * @param privateLayout whether the layout is private to the group
473            * @param layoutId the primary key of the layout
474            * @param languageId the primary key of the language. For more information
475            See {@link java.util.Locale}.
476            * @return the layout's name
477            * @throws PortalException if a matching layout could not be found
478            * @throws SystemException if a system exception occurred
479            */
480            public static java.lang.String getLayoutName(long groupId,
481                    boolean privateLayout, long layoutId, java.lang.String languageId)
482                    throws RemoteException {
483                    try {
484                            java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
485                                            privateLayout, layoutId, languageId);
486    
487                            return returnValue;
488                    }
489                    catch (Exception e) {
490                            _log.error(e, e);
491    
492                            throw new RemoteException(e.getMessage());
493                    }
494            }
495    
496            /**
497            * Returns the layout references for all the layouts that belong to the
498            * company and belong to the portlet that matches the preferences.
499            *
500            * @param companyId the primary key of the company
501            * @param portletId the primary key of the portlet
502            * @param preferencesKey the portlet's preference key
503            * @param preferencesValue the portlet's preference value
504            * @return the layout references of the matching layouts
505            * @throws SystemException if a system exception occurred
506            */
507            public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
508                    long companyId, java.lang.String portletId,
509                    java.lang.String preferencesKey, java.lang.String preferencesValue)
510                    throws RemoteException {
511                    try {
512                            com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
513                                            portletId, preferencesKey, preferencesValue);
514    
515                            return returnValue;
516                    }
517                    catch (Exception e) {
518                            _log.error(e, e);
519    
520                            throw new RemoteException(e.getMessage());
521                    }
522            }
523    
524            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
525                    long groupId, boolean privateLayout) throws RemoteException {
526                    try {
527                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
528                                            privateLayout);
529    
530                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
531                    }
532                    catch (Exception e) {
533                            _log.error(e, e);
534    
535                            throw new RemoteException(e.getMessage());
536                    }
537            }
538    
539            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
540                    long groupId, boolean privateLayout, long parentLayoutId)
541                    throws RemoteException {
542                    try {
543                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
544                                            privateLayout, parentLayoutId);
545    
546                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
547                    }
548                    catch (Exception e) {
549                            _log.error(e, e);
550    
551                            throw new RemoteException(e.getMessage());
552                    }
553            }
554    
555            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
556                    long groupId, boolean privateLayout, long parentLayoutId,
557                    boolean incomplete, int start, int end) throws RemoteException {
558                    try {
559                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
560                                            privateLayout, parentLayoutId, incomplete, start, end);
561    
562                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
563                    }
564                    catch (Exception e) {
565                            _log.error(e, e);
566    
567                            throw new RemoteException(e.getMessage());
568                    }
569            }
570    
571            public static java.lang.String[] getTempFileEntryNames(long groupId,
572                    java.lang.String tempFolderName) throws RemoteException {
573                    try {
574                            java.lang.String[] returnValue = LayoutServiceUtil.getTempFileEntryNames(groupId,
575                                            tempFolderName);
576    
577                            return returnValue;
578                    }
579                    catch (Exception e) {
580                            _log.error(e, e);
581    
582                            throw new RemoteException(e.getMessage());
583                    }
584            }
585    
586            /**
587            * Sets the layouts for the group, replacing and prioritizing all layouts of
588            * the parent layout.
589            *
590            * @param groupId the primary key of the group
591            * @param privateLayout whether the layout is private to the group
592            * @param parentLayoutId the primary key of the parent layout
593            * @param layoutIds the primary keys of the layouts
594            * @param serviceContext the service context to be applied
595            * @throws PortalException if a group or layout with the primary key could
596            not be found, if the group did not have permission to manage the
597            layouts, if no layouts were specified, if the first layout was
598            not page-able, if the first layout was hidden, or if some other
599            portal exception occurred
600            * @throws SystemException if a system exception occurred
601            */
602            public static void setLayouts(long groupId, boolean privateLayout,
603                    long parentLayoutId, long[] layoutIds,
604                    com.liferay.portal.service.ServiceContext serviceContext)
605                    throws RemoteException {
606                    try {
607                            LayoutServiceUtil.setLayouts(groupId, privateLayout,
608                                    parentLayoutId, layoutIds, serviceContext);
609                    }
610                    catch (Exception e) {
611                            _log.error(e, e);
612    
613                            throw new RemoteException(e.getMessage());
614                    }
615            }
616    
617            /**
618            * Deletes the job from the scheduler's queue.
619            *
620            * @param groupId the primary key of the group
621            * @param jobName the job name
622            * @param groupName the group name (optionally {@link
623            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
624            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
625            * @throws PortalException if the group did not permission to manage staging
626            and publish
627            * @throws SystemException if a system exception occurred
628            */
629            public static void unschedulePublishToLive(long groupId,
630                    java.lang.String jobName, java.lang.String groupName)
631                    throws RemoteException {
632                    try {
633                            LayoutServiceUtil.unschedulePublishToLive(groupId, jobName,
634                                    groupName);
635                    }
636                    catch (Exception e) {
637                            _log.error(e, e);
638    
639                            throw new RemoteException(e.getMessage());
640                    }
641            }
642    
643            /**
644            * Deletes the job from the scheduler's persistent queue.
645            *
646            * @param groupId the primary key of the group
647            * @param jobName the job name
648            * @param groupName the group name (optionally {@link
649            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
650            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
651            * @throws PortalException if a group with the primary key could not be
652            found or if the group did not have permission to publish
653            * @throws SystemException if a system exception occurred
654            */
655            public static void unschedulePublishToRemote(long groupId,
656                    java.lang.String jobName, java.lang.String groupName)
657                    throws RemoteException {
658                    try {
659                            LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName,
660                                    groupName);
661                    }
662                    catch (Exception e) {
663                            _log.error(e, e);
664    
665                            throw new RemoteException(e.getMessage());
666                    }
667            }
668    
669            /**
670            * Updates the layout with additional parameters.
671            *
672            * @param groupId the primary key of the group
673            * @param privateLayout whether the layout is private to the group
674            * @param layoutId the primary key of the layout
675            * @param parentLayoutId the primary key of the layout's new parent layout
676            * @param localeNamesMap the layout's locales and localized names
677            * @param localeTitlesMap the layout's locales and localized titles
678            * @param descriptionMap the locales and localized descriptions to merge
679            (optionally <code>null</code>)
680            * @param keywordsMap the locales and localized keywords to merge
681            (optionally <code>null</code>)
682            * @param robotsMap the locales and localized robots to merge (optionally
683            <code>null</code>)
684            * @param type the layout's new type (optionally {@link
685            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
686            * @param hidden whether the layout is hidden
687            * @param friendlyURLMap the layout's locales and localized friendly URLs.
688            To see how the URL is normalized when accessed see {@link
689            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
690            String)}.
691            * @param iconImage whether the icon image will be updated
692            * @param iconBytes the byte array of the layout's new icon image
693            * @param serviceContext the service context to be applied. Can set the
694            modification date and expando bridge attributes for the layout.
695            * @return the updated layout
696            * @throws PortalException if a group or layout with the primary key could
697            not be found, if the user did not have permission to update the
698            layout, if a unique friendly URL could not be generated, if a
699            valid parent layout ID to use could not be found, or if the
700            layout parameters were invalid
701            * @throws SystemException if a system exception occurred
702            */
703            public static com.liferay.portal.model.LayoutSoap updateLayout(
704                    long groupId, boolean privateLayout, long layoutId,
705                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
706                    java.lang.String[] localeNamesMapValues,
707                    java.lang.String[] localeTitlesMapLanguageIds,
708                    java.lang.String[] localeTitlesMapValues,
709                    java.lang.String[] descriptionMapLanguageIds,
710                    java.lang.String[] descriptionMapValues,
711                    java.lang.String[] keywordsMapLanguageIds,
712                    java.lang.String[] keywordsMapValues,
713                    java.lang.String[] robotsMapLanguageIds,
714                    java.lang.String[] robotsMapValues, java.lang.String type,
715                    boolean hidden, java.lang.String[] friendlyURLMapLanguageIds,
716                    java.lang.String[] friendlyURLMapValues, java.lang.Boolean iconImage,
717                    byte[] iconBytes,
718                    com.liferay.portal.service.ServiceContext serviceContext)
719                    throws RemoteException {
720                    try {
721                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
722                                            localeNamesMapValues);
723                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
724                                            localeTitlesMapValues);
725                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
726                                            descriptionMapValues);
727                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
728                                            keywordsMapValues);
729                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
730                                            robotsMapValues);
731                            Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds,
732                                            friendlyURLMapValues);
733    
734                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
735                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
736                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
737                                            type, hidden, friendlyURLMap, iconImage, iconBytes,
738                                            serviceContext);
739    
740                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
741                    }
742                    catch (Exception e) {
743                            _log.error(e, e);
744    
745                            throw new RemoteException(e.getMessage());
746                    }
747            }
748    
749            /**
750            * Updates the layout with additional parameters.
751            *
752            * @param groupId the primary key of the group
753            * @param privateLayout whether the layout is private to the group
754            * @param layoutId the primary key of the layout
755            * @param parentLayoutId the primary key of the layout's new parent
756            layout
757            * @param localeNamesMap the layout's locales and localized names
758            * @param localeTitlesMap the layout's locales and localized titles
759            * @param descriptionMap the locales and localized descriptions to
760            merge (optionally <code>null</code>)
761            * @param keywordsMap the locales and localized keywords to merge
762            (optionally <code>null</code>)
763            * @param robotsMap the locales and localized robots to merge
764            (optionally <code>null</code>)
765            * @param type the layout's new type (optionally {@link
766            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
767            * @param hidden whether the layout is hidden
768            * @param friendlyURL the layout's locales and new friendly URLs. To
769            see how the URL is normalized when accessed, see {@link
770            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
771            String)}.
772            * @param iconImage whether the icon image will be updated
773            * @param iconBytes the byte array of the layout's new icon image
774            * @param serviceContext the service context to be applied. Can set the
775            modification date and expando bridge attributes for the
776            layout.
777            * @return the updated layout
778            * @throws PortalException if a group or layout with the primary key
779            could not be found, if the user did not have permission to
780            update the layout, if a unique friendly URL could not be
781            generated, if a valid parent layout ID to use could not be
782            found, or if the layout parameters were invalid
783            * @throws SystemException if a system exception occurred
784            * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean,
785            long, long, Map, Map, Map, Map, Map, String, boolean, Map,
786            Boolean, byte[], ServiceContext)}
787            */
788            public static com.liferay.portal.model.LayoutSoap updateLayout(
789                    long groupId, boolean privateLayout, long layoutId,
790                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
791                    java.lang.String[] localeNamesMapValues,
792                    java.lang.String[] localeTitlesMapLanguageIds,
793                    java.lang.String[] localeTitlesMapValues,
794                    java.lang.String[] descriptionMapLanguageIds,
795                    java.lang.String[] descriptionMapValues,
796                    java.lang.String[] keywordsMapLanguageIds,
797                    java.lang.String[] keywordsMapValues,
798                    java.lang.String[] robotsMapLanguageIds,
799                    java.lang.String[] robotsMapValues, java.lang.String type,
800                    boolean hidden, java.lang.String friendlyURL,
801                    java.lang.Boolean iconImage, byte[] iconBytes,
802                    com.liferay.portal.service.ServiceContext serviceContext)
803                    throws RemoteException {
804                    try {
805                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
806                                            localeNamesMapValues);
807                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
808                                            localeTitlesMapValues);
809                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
810                                            descriptionMapValues);
811                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
812                                            keywordsMapValues);
813                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
814                                            robotsMapValues);
815    
816                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
817                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
818                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
819                                            type, hidden, friendlyURL, iconImage, iconBytes,
820                                            serviceContext);
821    
822                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
823                    }
824                    catch (Exception e) {
825                            _log.error(e, e);
826    
827                            throw new RemoteException(e.getMessage());
828                    }
829            }
830    
831            /**
832            * Updates the layout replacing its type settings.
833            *
834            * @param groupId the primary key of the group
835            * @param privateLayout whether the layout is private to the group
836            * @param layoutId the primary key of the layout
837            * @param typeSettings the settings to load the unicode properties object.
838            See {@link com.liferay.portal.kernel.util.UnicodeProperties
839            #fastLoad(String)}.
840            * @return the updated layout
841            * @throws PortalException if a matching layout could not be found or if the
842            user did not have permission to update the layout
843            * @throws SystemException if a system exception occurred
844            */
845            public static com.liferay.portal.model.LayoutSoap updateLayout(
846                    long groupId, boolean privateLayout, long layoutId,
847                    java.lang.String typeSettings) throws RemoteException {
848                    try {
849                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
850                                            privateLayout, layoutId, typeSettings);
851    
852                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
853                    }
854                    catch (Exception e) {
855                            _log.error(e, e);
856    
857                            throw new RemoteException(e.getMessage());
858                    }
859            }
860    
861            /**
862            * Updates the look and feel of the layout.
863            *
864            * @param groupId the primary key of the group
865            * @param privateLayout whether the layout is private to the group
866            * @param layoutId the primary key of the layout
867            * @param themeId the primary key of the layout's new theme
868            * @param colorSchemeId the primary key of the layout's new color scheme
869            * @param css the layout's new CSS
870            * @param wapTheme whether the theme is for WAP browsers
871            * @return the updated layout
872            * @throws PortalException if a matching layout could not be found, or if
873            the user did not have permission to update the layout and
874            permission to apply the theme
875            * @throws SystemException if a system exception occurred
876            */
877            public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
878                    long groupId, boolean privateLayout, long layoutId,
879                    java.lang.String themeId, java.lang.String colorSchemeId,
880                    java.lang.String css, boolean wapTheme) throws RemoteException {
881                    try {
882                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
883                                            privateLayout, layoutId, themeId, colorSchemeId, css,
884                                            wapTheme);
885    
886                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
887                    }
888                    catch (Exception e) {
889                            _log.error(e, e);
890    
891                            throw new RemoteException(e.getMessage());
892                    }
893            }
894    
895            /**
896            * Updates the name of the layout matching the group, layout ID, and
897            * privacy.
898            *
899            * @param groupId the primary key of the group
900            * @param privateLayout whether the layout is private to the group
901            * @param layoutId the primary key of the layout
902            * @param name the layout's new name
903            * @param languageId the primary key of the language. For more information
904            see {@link java.util.Locale}.
905            * @return the updated layout
906            * @throws PortalException if a matching layout could not be found, if the
907            user did not have permission to update the layout, or if the new
908            name was <code>null</code>
909            * @throws SystemException if a system exception occurred
910            */
911            public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
912                    boolean privateLayout, long layoutId, java.lang.String name,
913                    java.lang.String languageId) throws RemoteException {
914                    try {
915                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
916                                            privateLayout, layoutId, name, languageId);
917    
918                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
919                    }
920                    catch (Exception e) {
921                            _log.error(e, e);
922    
923                            throw new RemoteException(e.getMessage());
924                    }
925            }
926    
927            /**
928            * Updates the name of the layout matching the primary key.
929            *
930            * @param plid the primary key of the layout
931            * @param name the name to be assigned
932            * @param languageId the primary key of the language. For more information
933            see {@link java.util.Locale}.
934            * @return the updated layout
935            * @throws PortalException if a layout with the primary key could not be
936            found, or if the user did not have permission to update the
937            layout, or if the name was <code>null</code>
938            * @throws SystemException if a system exception occurred
939            */
940            public static com.liferay.portal.model.LayoutSoap updateName(long plid,
941                    java.lang.String name, java.lang.String languageId)
942                    throws RemoteException {
943                    try {
944                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
945                                            name, languageId);
946    
947                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
948                    }
949                    catch (Exception e) {
950                            _log.error(e, e);
951    
952                            throw new RemoteException(e.getMessage());
953                    }
954            }
955    
956            /**
957            * Updates the parent layout ID of the layout matching the group, layout ID,
958            * and privacy.
959            *
960            * @param groupId the primary key of the group
961            * @param privateLayout whether the layout is private to the group
962            * @param layoutId the primary key of the layout
963            * @param parentLayoutId the primary key to be assigned to the parent
964            layout
965            * @return the matching layout
966            * @throws PortalException if a valid parent layout ID to use could not be
967            found, if a matching layout could not be found, or if the user
968            did not have permission to update the layout
969            * @throws SystemException if a system exception occurred
970            */
971            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
972                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
973                    throws RemoteException {
974                    try {
975                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
976                                            privateLayout, layoutId, parentLayoutId);
977    
978                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
979                    }
980                    catch (Exception e) {
981                            _log.error(e, e);
982    
983                            throw new RemoteException(e.getMessage());
984                    }
985            }
986    
987            /**
988            * Updates the parent layout ID of the layout matching the primary key. If a
989            * layout matching the parent primary key is found, the layout ID of that
990            * layout is assigned, otherwise {@link
991            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
992            * assigned.
993            *
994            * @param plid the primary key of the layout
995            * @param parentPlid the primary key of the parent layout
996            * @return the layout matching the primary key
997            * @throws PortalException if a layout with the primary key could not be
998            found, if the user did not have permission to update the layout,
999            or if a valid parent layout ID to use could not be found
1000            * @throws SystemException if a system exception occurred
1001            */
1002            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
1003                    long plid, long parentPlid) throws RemoteException {
1004                    try {
1005                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
1006                                            parentPlid);
1007    
1008                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1009                    }
1010                    catch (Exception e) {
1011                            _log.error(e, e);
1012    
1013                            throw new RemoteException(e.getMessage());
1014                    }
1015            }
1016    
1017            /**
1018            * Updates the priority of the layout matching the group, layout ID, and
1019            * privacy.
1020            *
1021            * @param groupId the primary key of the group
1022            * @param privateLayout whether the layout is private to the group
1023            * @param layoutId the primary key of the layout
1024            * @param priority the layout's new priority
1025            * @return the updated layout
1026            * @throws PortalException if a matching layout could not be found or if the
1027            user did not have permission to update the layout
1028            * @throws SystemException if a system exception occurred
1029            */
1030            public static com.liferay.portal.model.LayoutSoap updatePriority(
1031                    long groupId, boolean privateLayout, long layoutId, int priority)
1032                    throws RemoteException {
1033                    try {
1034                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
1035                                            privateLayout, layoutId, priority);
1036    
1037                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1038                    }
1039                    catch (Exception e) {
1040                            _log.error(e, e);
1041    
1042                            throw new RemoteException(e.getMessage());
1043                    }
1044            }
1045    
1046            /**
1047            * Updates the priority of the layout matching the primary key.
1048            *
1049            * @param plid the primary key of the layout
1050            * @param priority the layout's new priority
1051            * @return the updated layout
1052            * @throws PortalException if a layout with the primary key could not be
1053            found
1054            * @throws SystemException if a system exception occurred
1055            */
1056            public static com.liferay.portal.model.LayoutSoap updatePriority(
1057                    long plid, int priority) throws RemoteException {
1058                    try {
1059                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
1060                                            priority);
1061    
1062                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1063                    }
1064                    catch (Exception e) {
1065                            _log.error(e, e);
1066    
1067                            throw new RemoteException(e.getMessage());
1068                    }
1069            }
1070    
1071            private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
1072    }