001    /**
002     * Copyright (c) 2000-present 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 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 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 LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
085            * @param localeNamesMap the layout's locales and localized names
086            * @param localeTitlesMap the layout's locales and localized titles
087            * @param descriptionMap the layout's locales and localized
088            descriptions
089            * @param keywordsMap the layout's locales and localized keywords
090            * @param robotsMap the layout's locales and localized robots
091            * @param type the layout's type (optionally {@link
092            LayoutConstants#TYPE_PORTLET}). The possible types can be
093            found in {@link LayoutConstants}.
094            * @param hidden whether the layout is hidden
095            * @param friendlyURL the layout's locales and localized friendly URLs.
096            To see how the URL is normalized when accessed, see {@link
097            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
098            String)}.
099            * @param serviceContext the service context to be applied. Must set
100            the UUID for the layout. Can set the creation date,
101            modification date, and expando bridge attributes for the
102            layout. For layouts that belong to a layout set prototype, an
103            attribute named <code>layoutUpdateable</code> can be used to
104            specify whether site administrators can modify this page
105            within their site.
106            * @return the layout
107            * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, boolean,
108            long, Map, Map, Map, Map, Map, String, String, boolean, Map,
109            ServiceContext)}
110            */
111            @Deprecated
112            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
113                    boolean privateLayout, long parentLayoutId,
114                    java.lang.String[] localeNamesMapLanguageIds,
115                    java.lang.String[] localeNamesMapValues,
116                    java.lang.String[] localeTitlesMapLanguageIds,
117                    java.lang.String[] localeTitlesMapValues,
118                    java.lang.String[] descriptionMapLanguageIds,
119                    java.lang.String[] descriptionMapValues,
120                    java.lang.String[] keywordsMapLanguageIds,
121                    java.lang.String[] keywordsMapValues,
122                    java.lang.String[] robotsMapLanguageIds,
123                    java.lang.String[] robotsMapValues, java.lang.String type,
124                    boolean hidden, java.lang.String friendlyURL,
125                    com.liferay.portal.service.ServiceContext serviceContext)
126                    throws RemoteException {
127                    try {
128                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
129                                            localeNamesMapValues);
130                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
131                                            localeTitlesMapValues);
132                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
133                                            descriptionMapValues);
134                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
135                                            keywordsMapValues);
136                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
137                                            robotsMapValues);
138    
139                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
140                                            privateLayout, parentLayoutId, localeNamesMap,
141                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
142                                            type, hidden, friendlyURL, serviceContext);
143    
144                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
145                    }
146                    catch (Exception e) {
147                            _log.error(e, e);
148    
149                            throw new RemoteException(e.getMessage());
150                    }
151            }
152    
153            /**
154            * Adds a layout with additional parameters.
155            *
156            * <p>
157            * This method handles the creation of the layout including its resources,
158            * metadata, and internal data structures. It is not necessary to make
159            * subsequent calls to any methods to setup default groups, resources, ...
160            * etc.
161            * </p>
162            *
163            * @param groupId the primary key of the group
164            * @param privateLayout whether the layout is private to the group
165            * @param parentLayoutId the primary key of the parent layout (optionally
166            {@link LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
167            * @param localeNamesMap the layout's locales and localized names
168            * @param localeTitlesMap the layout's locales and localized titles
169            * @param descriptionMap the layout's locales and localized descriptions
170            * @param keywordsMap the layout's locales and localized keywords
171            * @param robotsMap the layout's locales and localized robots
172            * @param type the layout's type (optionally {@link
173            LayoutConstants#TYPE_PORTLET}). The possible types can be found
174            in {@link LayoutConstants}.
175            * @param typeSettings the settings to load the unicode properties object.
176            See {@link com.liferay.portal.kernel.util.UnicodeProperties
177            #fastLoad(String)}.
178            * @param hidden whether the layout is hidden
179            * @param friendlyURLMap the layout's locales and localized friendly URLs.
180            To see how the URL is normalized when accessed, see {@link
181            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
182            String)}.
183            * @param serviceContext the service context to be applied. Must set the
184            UUID for the layout. Can set the creation date, modification
185            date, and expando bridge attributes for the layout. For layouts
186            that belong to a layout set prototype, an attribute named
187            <code>layoutUpdateable</code> can be used to specify whether site
188            administrators can modify this page within their site.
189            * @return the layout
190            */
191            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
192                    boolean privateLayout, long parentLayoutId,
193                    java.lang.String[] localeNamesMapLanguageIds,
194                    java.lang.String[] localeNamesMapValues,
195                    java.lang.String[] localeTitlesMapLanguageIds,
196                    java.lang.String[] localeTitlesMapValues,
197                    java.lang.String[] descriptionMapLanguageIds,
198                    java.lang.String[] descriptionMapValues,
199                    java.lang.String[] keywordsMapLanguageIds,
200                    java.lang.String[] keywordsMapValues,
201                    java.lang.String[] robotsMapLanguageIds,
202                    java.lang.String[] robotsMapValues, java.lang.String type,
203                    java.lang.String typeSettings, boolean hidden,
204                    java.lang.String[] friendlyURLMapLanguageIds,
205                    java.lang.String[] friendlyURLMapValues,
206                    com.liferay.portal.service.ServiceContext serviceContext)
207                    throws RemoteException {
208                    try {
209                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
210                                            localeNamesMapValues);
211                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
212                                            localeTitlesMapValues);
213                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
214                                            descriptionMapValues);
215                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
216                                            keywordsMapValues);
217                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
218                                            robotsMapValues);
219                            Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds,
220                                            friendlyURLMapValues);
221    
222                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
223                                            privateLayout, parentLayoutId, localeNamesMap,
224                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
225                                            type, typeSettings, hidden, friendlyURLMap, serviceContext);
226    
227                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
228                    }
229                    catch (Exception e) {
230                            _log.error(e, e);
231    
232                            throw new RemoteException(e.getMessage());
233                    }
234            }
235    
236            /**
237            * Adds a layout with single entry maps for name, title, and description to
238            * the default locale.
239            *
240            * <p>
241            * This method handles the creation of the layout including its resources,
242            * metadata, and internal data structures. It is not necessary to make
243            * subsequent calls to any methods to setup default groups, resources, ...
244            * etc.
245            * </p>
246            *
247            * @param groupId the primary key of the group
248            * @param privateLayout whether the layout is private to the group
249            * @param parentLayoutId the primary key of the parent layout (optionally
250            {@link LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
251            * @param name the layout's locales and localized names
252            * @param title the layout's locales and localized titles
253            * @param description the layout's locales and localized descriptions
254            * @param type the layout's type (optionally {@link
255            LayoutConstants#TYPE_PORTLET}). The possible types can be found
256            in {@link LayoutConstants}.
257            * @param hidden whether the layout is hidden
258            * @param friendlyURL the layout's locales and localized friendly URLs. To
259            see how the URL is normalized when accessed, see {@link
260            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
261            String)}.
262            * @param serviceContext the service context to be applied. Must set the
263            UUID for the layout. Can specify the creation date, modification
264            date, and expando bridge attributes for the layout. For layouts
265            that belong to a layout set prototype, an attribute named
266            <code>layoutUpdateable</code> can be used to specify whether site
267            administrators can modify this page within their site.
268            * @return the layout
269            */
270            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
271                    boolean privateLayout, long parentLayoutId, java.lang.String name,
272                    java.lang.String title, java.lang.String description,
273                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
274                    com.liferay.portal.service.ServiceContext serviceContext)
275                    throws RemoteException {
276                    try {
277                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
278                                            privateLayout, parentLayoutId, name, title, description,
279                                            type, hidden, friendlyURL, serviceContext);
280    
281                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
282                    }
283                    catch (Exception e) {
284                            _log.error(e, e);
285    
286                            throw new RemoteException(e.getMessage());
287                    }
288            }
289    
290            /**
291            * Deletes the layout with the primary key, also deleting the layout's child
292            * layouts, and associated resources.
293            *
294            * @param groupId the primary key of the group
295            * @param privateLayout whether the layout is private to the group
296            * @param layoutId the primary key of the layout
297            * @param serviceContext the service context to be applied
298            */
299            public static void deleteLayout(long groupId, boolean privateLayout,
300                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
301                    throws RemoteException {
302                    try {
303                            LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId,
304                                    serviceContext);
305                    }
306                    catch (Exception e) {
307                            _log.error(e, e);
308    
309                            throw new RemoteException(e.getMessage());
310                    }
311            }
312    
313            /**
314            * Deletes the layout with the plid, also deleting the layout's child
315            * layouts, and associated resources.
316            *
317            * @param plid the primary key of the layout
318            * @param serviceContext the service context to be applied
319            */
320            public static void deleteLayout(long plid,
321                    com.liferay.portal.service.ServiceContext serviceContext)
322                    throws RemoteException {
323                    try {
324                            LayoutServiceUtil.deleteLayout(plid, serviceContext);
325                    }
326                    catch (Exception e) {
327                            _log.error(e, e);
328    
329                            throw new RemoteException(e.getMessage());
330                    }
331            }
332    
333            public static void deleteTempFileEntry(long groupId,
334                    java.lang.String folderName, java.lang.String fileName)
335                    throws RemoteException {
336                    try {
337                            LayoutServiceUtil.deleteTempFileEntry(groupId, folderName, fileName);
338                    }
339                    catch (Exception e) {
340                            _log.error(e, e);
341    
342                            throw new RemoteException(e.getMessage());
343                    }
344            }
345    
346            /**
347            * @deprecated As of 7.0.0, replaced by {@link
348            com.liferay.portlet.exportimport.service.ExportImportService#exportLayoutsAsFileInBackground(
349            ExportImportConfiguration)}
350            */
351            @Deprecated
352            public static long exportLayoutsAsFileInBackground(
353                    com.liferay.portlet.exportimport.model.ExportImportConfigurationSoap exportImportConfiguration)
354                    throws RemoteException {
355                    try {
356                            long returnValue = LayoutServiceUtil.exportLayoutsAsFileInBackground(com.liferay.portlet.exportimport.model.impl.ExportImportConfigurationModelImpl.toModel(
357                                                    exportImportConfiguration));
358    
359                            return returnValue;
360                    }
361                    catch (Exception e) {
362                            _log.error(e, e);
363    
364                            throw new RemoteException(e.getMessage());
365                    }
366            }
367    
368            /**
369            * @deprecated As of 7.0.0, replaced by {@link
370            com.liferay.portlet.exportimport.service.ExportImportService#exportLayoutsAsFileInBackground(
371            long)}
372            */
373            @Deprecated
374            public static long exportLayoutsAsFileInBackground(
375                    long exportImportConfigurationId) throws RemoteException {
376                    try {
377                            long returnValue = LayoutServiceUtil.exportLayoutsAsFileInBackground(exportImportConfigurationId);
378    
379                            return returnValue;
380                    }
381                    catch (Exception e) {
382                            _log.error(e, e);
383    
384                            throw new RemoteException(e.getMessage());
385                    }
386            }
387    
388            /**
389            * Returns all the ancestor layouts of the layout.
390            *
391            * @param plid the primary key of the layout
392            * @return the ancestor layouts of the layout
393            */
394            public static com.liferay.portal.model.LayoutSoap[] getAncestorLayouts(
395                    long plid) throws RemoteException {
396                    try {
397                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getAncestorLayouts(plid);
398    
399                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
400                    }
401                    catch (Exception e) {
402                            _log.error(e, e);
403    
404                            throw new RemoteException(e.getMessage());
405                    }
406            }
407    
408            /**
409            * Returns the primary key of the default layout for the group.
410            *
411            * @param groupId the primary key of the group
412            * @param scopeGroupId the primary key of the scope group. See {@link
413            ServiceContext#getScopeGroupId()}.
414            * @param privateLayout whether the layout is private to the group
415            * @param portletId the primary key of the portlet
416            * @return Returns the primary key of the default layout group; {@link
417            LayoutConstants#DEFAULT_PLID} otherwise
418            */
419            public static long getDefaultPlid(long groupId, long scopeGroupId,
420                    boolean privateLayout, java.lang.String portletId)
421                    throws RemoteException {
422                    try {
423                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
424                                            scopeGroupId, privateLayout, portletId);
425    
426                            return returnValue;
427                    }
428                    catch (Exception e) {
429                            _log.error(e, e);
430    
431                            throw new RemoteException(e.getMessage());
432                    }
433            }
434    
435            public static long getDefaultPlid(long groupId, long scopeGroupId,
436                    java.lang.String portletId) throws RemoteException {
437                    try {
438                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
439                                            scopeGroupId, portletId);
440    
441                            return returnValue;
442                    }
443                    catch (Exception e) {
444                            _log.error(e, e);
445    
446                            throw new RemoteException(e.getMessage());
447                    }
448            }
449    
450            /**
451            * Returns the layout matching the UUID, group, and privacy.
452            *
453            * @param uuid the layout's UUID
454            * @param groupId the primary key of the group
455            * @param privateLayout whether the layout is private to the group
456            * @return the matching layout
457            */
458            public static com.liferay.portal.model.LayoutSoap getLayoutByUuidAndGroupId(
459                    java.lang.String uuid, long groupId, boolean privateLayout)
460                    throws RemoteException {
461                    try {
462                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.getLayoutByUuidAndGroupId(uuid,
463                                            groupId, privateLayout);
464    
465                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
466                    }
467                    catch (Exception e) {
468                            _log.error(e, e);
469    
470                            throw new RemoteException(e.getMessage());
471                    }
472            }
473    
474            /**
475            * Returns the name of the layout.
476            *
477            * @param groupId the primary key of the group
478            * @param privateLayout whether the layout is private to the group
479            * @param layoutId the primary key of the layout
480            * @param languageId the primary key of the language. For more information
481            See {@link Locale}.
482            * @return the layout's name
483            */
484            public static java.lang.String getLayoutName(long groupId,
485                    boolean privateLayout, long layoutId, java.lang.String languageId)
486                    throws RemoteException {
487                    try {
488                            java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
489                                            privateLayout, layoutId, languageId);
490    
491                            return returnValue;
492                    }
493                    catch (Exception e) {
494                            _log.error(e, e);
495    
496                            throw new RemoteException(e.getMessage());
497                    }
498            }
499    
500            /**
501            * Returns the layout references for all the layouts that belong to the
502            * company and belong to the portlet that matches the preferences.
503            *
504            * @param companyId the primary key of the company
505            * @param portletId the primary key of the portlet
506            * @param preferencesKey the portlet's preference key
507            * @param preferencesValue the portlet's preference value
508            * @return the layout references of the matching layouts
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 int getLayoutsCount(long groupId, boolean privateLayout,
575                    long parentLayoutId) throws RemoteException {
576                    try {
577                            int returnValue = LayoutServiceUtil.getLayoutsCount(groupId,
578                                            privateLayout, parentLayoutId);
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            public static java.lang.String[] getTempFileNames(long groupId,
590                    java.lang.String folderName) throws RemoteException {
591                    try {
592                            java.lang.String[] returnValue = LayoutServiceUtil.getTempFileNames(groupId,
593                                            folderName);
594    
595                            return returnValue;
596                    }
597                    catch (Exception e) {
598                            _log.error(e, e);
599    
600                            throw new RemoteException(e.getMessage());
601                    }
602            }
603    
604            /**
605            * Sets the layouts for the group, replacing and prioritizing all layouts of
606            * the parent layout.
607            *
608            * @param groupId the primary key of the group
609            * @param privateLayout whether the layout is private to the group
610            * @param parentLayoutId the primary key of the parent layout
611            * @param layoutIds the primary keys of the layouts
612            * @param serviceContext the service context to be applied
613            */
614            public static void setLayouts(long groupId, boolean privateLayout,
615                    long parentLayoutId, long[] layoutIds,
616                    com.liferay.portal.service.ServiceContext serviceContext)
617                    throws RemoteException {
618                    try {
619                            LayoutServiceUtil.setLayouts(groupId, privateLayout,
620                                    parentLayoutId, layoutIds, serviceContext);
621                    }
622                    catch (Exception e) {
623                            _log.error(e, e);
624    
625                            throw new RemoteException(e.getMessage());
626                    }
627            }
628    
629            /**
630            * Deletes the job from the scheduler's queue.
631            *
632            * @param groupId the primary key of the group
633            * @param jobName the job name
634            * @param groupName the group name (optionally {@link
635            DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). See {@link
636            DestinationNames}.
637            */
638            public static void unschedulePublishToLive(long groupId,
639                    java.lang.String jobName, java.lang.String groupName)
640                    throws RemoteException {
641                    try {
642                            LayoutServiceUtil.unschedulePublishToLive(groupId, jobName,
643                                    groupName);
644                    }
645                    catch (Exception e) {
646                            _log.error(e, e);
647    
648                            throw new RemoteException(e.getMessage());
649                    }
650            }
651    
652            /**
653            * Deletes the job from the scheduler's persistent queue.
654            *
655            * @param groupId the primary key of the group
656            * @param jobName the job name
657            * @param groupName the group name (optionally {@link
658            DestinationNames#LAYOUTS_LOCAL_PUBLISHER}). See {@link
659            DestinationNames}.
660            */
661            public static void unschedulePublishToRemote(long groupId,
662                    java.lang.String jobName, java.lang.String groupName)
663                    throws RemoteException {
664                    try {
665                            LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName,
666                                    groupName);
667                    }
668                    catch (Exception e) {
669                            _log.error(e, e);
670    
671                            throw new RemoteException(e.getMessage());
672                    }
673            }
674    
675            public static com.liferay.portal.model.LayoutSoap updateIconImage(
676                    long plid, byte[] bytes) throws RemoteException {
677                    try {
678                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateIconImage(plid,
679                                            bytes);
680    
681                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
682                    }
683                    catch (Exception e) {
684                            _log.error(e, e);
685    
686                            throw new RemoteException(e.getMessage());
687                    }
688            }
689    
690            /**
691            * Updates the layout with additional parameters.
692            *
693            * @param groupId the primary key of the group
694            * @param privateLayout whether the layout is private to the group
695            * @param layoutId the primary key of the layout
696            * @param parentLayoutId the primary key of the layout's new parent layout
697            * @param localeNamesMap the layout's locales and localized names
698            * @param localeTitlesMap the layout's locales and localized titles
699            * @param descriptionMap the locales and localized descriptions to merge
700            (optionally <code>null</code>)
701            * @param keywordsMap the locales and localized keywords to merge
702            (optionally <code>null</code>)
703            * @param robotsMap the locales and localized robots to merge (optionally
704            <code>null</code>)
705            * @param type the layout's new type (optionally {@link
706            LayoutConstants#TYPE_PORTLET})
707            * @param hidden whether the layout is hidden
708            * @param friendlyURLMap the layout's locales and localized friendly URLs.
709            To see how the URL is normalized when accessed see {@link
710            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
711            String)}.
712            * @param iconImage whether the icon image will be updated
713            * @param iconBytes the byte array of the layout's new icon image
714            * @param serviceContext the service context to be applied. Can set the
715            modification date and expando bridge attributes for the layout.
716            * @return the updated layout
717            */
718            public static com.liferay.portal.model.LayoutSoap updateLayout(
719                    long groupId, boolean privateLayout, long layoutId,
720                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
721                    java.lang.String[] localeNamesMapValues,
722                    java.lang.String[] localeTitlesMapLanguageIds,
723                    java.lang.String[] localeTitlesMapValues,
724                    java.lang.String[] descriptionMapLanguageIds,
725                    java.lang.String[] descriptionMapValues,
726                    java.lang.String[] keywordsMapLanguageIds,
727                    java.lang.String[] keywordsMapValues,
728                    java.lang.String[] robotsMapLanguageIds,
729                    java.lang.String[] robotsMapValues, java.lang.String type,
730                    boolean hidden, java.lang.String[] friendlyURLMapLanguageIds,
731                    java.lang.String[] friendlyURLMapValues, boolean iconImage,
732                    byte[] iconBytes,
733                    com.liferay.portal.service.ServiceContext serviceContext)
734                    throws RemoteException {
735                    try {
736                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
737                                            localeNamesMapValues);
738                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
739                                            localeTitlesMapValues);
740                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
741                                            descriptionMapValues);
742                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
743                                            keywordsMapValues);
744                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
745                                            robotsMapValues);
746                            Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds,
747                                            friendlyURLMapValues);
748    
749                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
750                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
751                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
752                                            type, hidden, friendlyURLMap, iconImage, iconBytes,
753                                            serviceContext);
754    
755                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
756                    }
757                    catch (Exception e) {
758                            _log.error(e, e);
759    
760                            throw new RemoteException(e.getMessage());
761                    }
762            }
763    
764            /**
765            * Updates the layout with additional parameters.
766            *
767            * @param groupId the primary key of the group
768            * @param privateLayout whether the layout is private to the group
769            * @param layoutId the primary key of the layout
770            * @param parentLayoutId the primary key of the layout's new parent
771            layout
772            * @param localeNamesMap the layout's locales and localized names
773            * @param localeTitlesMap the layout's locales and localized titles
774            * @param descriptionMap the locales and localized descriptions to
775            merge (optionally <code>null</code>)
776            * @param keywordsMap the locales and localized keywords to merge
777            (optionally <code>null</code>)
778            * @param robotsMap the locales and localized robots to merge
779            (optionally <code>null</code>)
780            * @param type the layout's new type (optionally {@link
781            LayoutConstants#TYPE_PORTLET})
782            * @param hidden whether the layout is hidden
783            * @param friendlyURL the layout's locales and new friendly URLs. To
784            see how the URL is normalized when accessed, see {@link
785            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
786            String)}.
787            * @param iconImage whether the icon image will be updated
788            * @param iconBytes the byte array of the layout's new icon image
789            * @param serviceContext the service context to be applied. Can set the
790            modification date and expando bridge attributes for the
791            layout.
792            * @return the updated layout
793            * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean,
794            long, long, Map, Map, Map, Map, Map, String, boolean, Map,
795            boolean, byte[], ServiceContext)}
796            */
797            @Deprecated
798            public static com.liferay.portal.model.LayoutSoap updateLayout(
799                    long groupId, boolean privateLayout, long layoutId,
800                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
801                    java.lang.String[] localeNamesMapValues,
802                    java.lang.String[] localeTitlesMapLanguageIds,
803                    java.lang.String[] localeTitlesMapValues,
804                    java.lang.String[] descriptionMapLanguageIds,
805                    java.lang.String[] descriptionMapValues,
806                    java.lang.String[] keywordsMapLanguageIds,
807                    java.lang.String[] keywordsMapValues,
808                    java.lang.String[] robotsMapLanguageIds,
809                    java.lang.String[] robotsMapValues, java.lang.String type,
810                    boolean hidden, java.lang.String friendlyURL,
811                    java.lang.Boolean iconImage, byte[] iconBytes,
812                    com.liferay.portal.service.ServiceContext serviceContext)
813                    throws RemoteException {
814                    try {
815                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
816                                            localeNamesMapValues);
817                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
818                                            localeTitlesMapValues);
819                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
820                                            descriptionMapValues);
821                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
822                                            keywordsMapValues);
823                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
824                                            robotsMapValues);
825    
826                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
827                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
828                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
829                                            type, hidden, friendlyURL, iconImage, iconBytes,
830                                            serviceContext);
831    
832                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
833                    }
834                    catch (Exception e) {
835                            _log.error(e, e);
836    
837                            throw new RemoteException(e.getMessage());
838                    }
839            }
840    
841            /**
842            * Updates the layout replacing its type settings.
843            *
844            * @param groupId the primary key of the group
845            * @param privateLayout whether the layout is private to the group
846            * @param layoutId the primary key of the layout
847            * @param typeSettings the settings to load the unicode properties object.
848            See {@link com.liferay.portal.kernel.util.UnicodeProperties
849            #fastLoad(String)}.
850            * @return the updated layout
851            */
852            public static com.liferay.portal.model.LayoutSoap updateLayout(
853                    long groupId, boolean privateLayout, long layoutId,
854                    java.lang.String typeSettings) throws RemoteException {
855                    try {
856                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
857                                            privateLayout, layoutId, typeSettings);
858    
859                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
860                    }
861                    catch (Exception e) {
862                            _log.error(e, e);
863    
864                            throw new RemoteException(e.getMessage());
865                    }
866            }
867    
868            /**
869            * Updates the look and feel of the layout.
870            *
871            * @param groupId the primary key of the group
872            * @param privateLayout whether the layout is private to the group
873            * @param layoutId the primary key of the layout
874            * @param themeId the primary key of the layout's new theme
875            * @param colorSchemeId the primary key of the layout's new color scheme
876            * @param css the layout's new CSS
877            * @param wapTheme whether the theme is for WAP browsers
878            * @return the updated layout
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 Locale}.
908            * @return the updated layout
909            */
910            public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
911                    boolean privateLayout, long layoutId, java.lang.String name,
912                    java.lang.String languageId) throws RemoteException {
913                    try {
914                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
915                                            privateLayout, layoutId, name, languageId);
916    
917                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
918                    }
919                    catch (Exception e) {
920                            _log.error(e, e);
921    
922                            throw new RemoteException(e.getMessage());
923                    }
924            }
925    
926            /**
927            * Updates the name of the layout matching the primary key.
928            *
929            * @param plid the primary key of the layout
930            * @param name the name to be assigned
931            * @param languageId the primary key of the language. For more information
932            see {@link Locale}.
933            * @return the updated layout
934            */
935            public static com.liferay.portal.model.LayoutSoap updateName(long plid,
936                    java.lang.String name, java.lang.String languageId)
937                    throws RemoteException {
938                    try {
939                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
940                                            name, languageId);
941    
942                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
943                    }
944                    catch (Exception e) {
945                            _log.error(e, e);
946    
947                            throw new RemoteException(e.getMessage());
948                    }
949            }
950    
951            /**
952            * Updates the parent layout ID of the layout matching the group, layout ID,
953            * and privacy.
954            *
955            * @param groupId the primary key of the group
956            * @param privateLayout whether the layout is private to the group
957            * @param layoutId the primary key of the layout
958            * @param parentLayoutId the primary key to be assigned to the parent
959            layout
960            * @return the matching layout
961            */
962            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
963                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
964                    throws RemoteException {
965                    try {
966                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
967                                            privateLayout, layoutId, parentLayoutId);
968    
969                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
970                    }
971                    catch (Exception e) {
972                            _log.error(e, e);
973    
974                            throw new RemoteException(e.getMessage());
975                    }
976            }
977    
978            /**
979            * Updates the parent layout ID of the layout matching the primary key. If a
980            * layout matching the parent primary key is found, the layout ID of that
981            * layout is assigned, otherwise {@link
982            * LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is assigned.
983            *
984            * @param plid the primary key of the layout
985            * @param parentPlid the primary key of the parent layout
986            * @return the layout matching the primary key
987            */
988            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
989                    long plid, long parentPlid) throws RemoteException {
990                    try {
991                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
992                                            parentPlid);
993    
994                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
995                    }
996                    catch (Exception e) {
997                            _log.error(e, e);
998    
999                            throw new RemoteException(e.getMessage());
1000                    }
1001            }
1002    
1003            /**
1004            * Updates the parent layout ID and priority of the layout.
1005            *
1006            * @param plid the primary key of the layout
1007            * @param parentPlid the primary key of the parent layout
1008            * @param priority the layout's new priority
1009            * @return the layout matching the primary key
1010            */
1011            public static com.liferay.portal.model.LayoutSoap updateParentLayoutIdAndPriority(
1012                    long plid, long parentPlid, int priority) throws RemoteException {
1013                    try {
1014                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutIdAndPriority(plid,
1015                                            parentPlid, priority);
1016    
1017                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1018                    }
1019                    catch (Exception e) {
1020                            _log.error(e, e);
1021    
1022                            throw new RemoteException(e.getMessage());
1023                    }
1024            }
1025    
1026            /**
1027            * Updates the priority of the layout matching the group, layout ID, and
1028            * privacy.
1029            *
1030            * @param groupId the primary key of the group
1031            * @param privateLayout whether the layout is private to the group
1032            * @param layoutId the primary key of the layout
1033            * @param priority the layout's new priority
1034            * @return the updated layout
1035            */
1036            public static com.liferay.portal.model.LayoutSoap updatePriority(
1037                    long groupId, boolean privateLayout, long layoutId, int priority)
1038                    throws RemoteException {
1039                    try {
1040                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
1041                                            privateLayout, layoutId, priority);
1042    
1043                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1044                    }
1045                    catch (Exception e) {
1046                            _log.error(e, e);
1047    
1048                            throw new RemoteException(e.getMessage());
1049                    }
1050            }
1051    
1052            /**
1053            * Updates the priority of the layout matching the group, layout ID, and
1054            * privacy, setting the layout's priority based on the priorities of the
1055            * next and previous layouts.
1056            *
1057            * @param groupId the primary key of the group
1058            * @param privateLayout whether the layout is private to the group
1059            * @param layoutId the primary key of the layout
1060            * @param nextLayoutId the primary key of the next layout
1061            * @param previousLayoutId the primary key of the previous layout
1062            * @return the updated layout
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            */
1087            public static com.liferay.portal.model.LayoutSoap updatePriority(
1088                    long plid, int priority) throws RemoteException {
1089                    try {
1090                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
1091                                            priority);
1092    
1093                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1094                    }
1095                    catch (Exception e) {
1096                            _log.error(e, e);
1097    
1098                            throw new RemoteException(e.getMessage());
1099                    }
1100            }
1101    
1102            private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
1103    }