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