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 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            * @deprecated As of 6.2.0, replaced by {@link #addLayout(long, boolean,
114            long, Map, Map, Map, Map, Map, String, String, boolean, Map,
115            ServiceContext)}
116            */
117            @Deprecated
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            */
203            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
204                    boolean privateLayout, long parentLayoutId,
205                    java.lang.String[] localeNamesMapLanguageIds,
206                    java.lang.String[] localeNamesMapValues,
207                    java.lang.String[] localeTitlesMapLanguageIds,
208                    java.lang.String[] localeTitlesMapValues,
209                    java.lang.String[] descriptionMapLanguageIds,
210                    java.lang.String[] descriptionMapValues,
211                    java.lang.String[] keywordsMapLanguageIds,
212                    java.lang.String[] keywordsMapValues,
213                    java.lang.String[] robotsMapLanguageIds,
214                    java.lang.String[] robotsMapValues, java.lang.String type,
215                    java.lang.String typeSettings, boolean hidden,
216                    java.lang.String[] friendlyURLMapLanguageIds,
217                    java.lang.String[] friendlyURLMapValues,
218                    com.liferay.portal.service.ServiceContext serviceContext)
219                    throws RemoteException {
220                    try {
221                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
222                                            localeNamesMapValues);
223                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
224                                            localeTitlesMapValues);
225                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
226                                            descriptionMapValues);
227                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
228                                            keywordsMapValues);
229                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
230                                            robotsMapValues);
231                            Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds,
232                                            friendlyURLMapValues);
233    
234                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
235                                            privateLayout, parentLayoutId, localeNamesMap,
236                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
237                                            type, typeSettings, hidden, friendlyURLMap, serviceContext);
238    
239                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
240                    }
241                    catch (Exception e) {
242                            _log.error(e, e);
243    
244                            throw new RemoteException(e.getMessage());
245                    }
246            }
247    
248            /**
249            * Adds a layout with single entry maps for name, title, and description to
250            * the default locale.
251            *
252            * <p>
253            * This method handles the creation of the layout including its resources,
254            * metadata, and internal data structures. It is not necessary to make
255            * subsequent calls to any methods to setup default groups, resources, ...
256            * etc.
257            * </p>
258            *
259            * @param groupId the primary key of the group
260            * @param privateLayout whether the layout is private to the group
261            * @param parentLayoutId the primary key of the parent layout (optionally
262            {@link
263            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
264            * @param name Map the layout's locales and localized names
265            * @param title Map the layout's locales and localized titles
266            * @param description Map the layout's locales and localized descriptions
267            * @param type the layout's type (optionally {@link
268            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
269            possible types can be found in {@link
270            com.liferay.portal.model.LayoutConstants}.
271            * @param hidden whether the layout is hidden
272            * @param friendlyURL the layout's locales and localized friendly URLs. To
273            see how the URL is normalized when accessed, see {@link
274            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
275            String)}.
276            * @param serviceContext the service context to be applied. Must set the
277            UUID for the layout. Can specify the creation date, modification
278            date, and expando bridge attributes for the layout. For layouts
279            that belong to a layout set prototype, an attribute named
280            <code>layoutUpdateable</code> can be used to specify whether site
281            administrators can modify this page within their site.
282            * @return the layout
283            * @throws PortalException if a group with the primary key could not be
284            found, if the group did not have permission to manage the layouts
285            involved, if layout values were invalid, or if a portal exception
286            occurred
287            */
288            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
289                    boolean privateLayout, long parentLayoutId, java.lang.String name,
290                    java.lang.String title, java.lang.String description,
291                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
292                    com.liferay.portal.service.ServiceContext serviceContext)
293                    throws RemoteException {
294                    try {
295                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
296                                            privateLayout, parentLayoutId, name, title, description,
297                                            type, hidden, friendlyURL, serviceContext);
298    
299                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
300                    }
301                    catch (Exception e) {
302                            _log.error(e, e);
303    
304                            throw new RemoteException(e.getMessage());
305                    }
306            }
307    
308            /**
309            * Deletes the layout with the primary key, also deleting the layout's child
310            * layouts, and associated resources.
311            *
312            * @param groupId the primary key of the group
313            * @param privateLayout whether the layout is private to the group
314            * @param layoutId the primary key of the layout
315            * @param serviceContext the service context to be applied
316            * @throws PortalException if the user did not have permission to delete the
317            layout, if a matching layout could not be found , or if some
318            other portal exception occurred
319            */
320            public static void deleteLayout(long groupId, boolean privateLayout,
321                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
322                    throws RemoteException {
323                    try {
324                            LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId,
325                                    serviceContext);
326                    }
327                    catch (Exception e) {
328                            _log.error(e, e);
329    
330                            throw new RemoteException(e.getMessage());
331                    }
332            }
333    
334            /**
335            * Deletes the layout with the plid, also deleting the layout's child
336            * layouts, and associated resources.
337            *
338            * @param plid the primary key of the layout
339            * @param serviceContext the service context to be applied
340            * @throws PortalException if the user did not have permission to delete the
341            layout, if a layout with the primary key could not be found , or
342            if some other portal exception occurred
343            */
344            public static void deleteLayout(long plid,
345                    com.liferay.portal.service.ServiceContext serviceContext)
346                    throws RemoteException {
347                    try {
348                            LayoutServiceUtil.deleteLayout(plid, serviceContext);
349                    }
350                    catch (Exception e) {
351                            _log.error(e, e);
352    
353                            throw new RemoteException(e.getMessage());
354                    }
355            }
356    
357            public static void deleteTempFileEntry(long groupId,
358                    java.lang.String folderName, java.lang.String fileName)
359                    throws RemoteException {
360                    try {
361                            LayoutServiceUtil.deleteTempFileEntry(groupId, folderName, fileName);
362                    }
363                    catch (Exception e) {
364                            _log.error(e, e);
365    
366                            throw new RemoteException(e.getMessage());
367                    }
368            }
369    
370            public static long exportLayoutsAsFileInBackground(
371                    com.liferay.portal.model.ExportImportConfigurationSoap exportImportConfiguration)
372                    throws RemoteException {
373                    try {
374                            long returnValue = LayoutServiceUtil.exportLayoutsAsFileInBackground(com.liferay.portal.model.impl.ExportImportConfigurationModelImpl.toModel(
375                                                    exportImportConfiguration));
376    
377                            return returnValue;
378                    }
379                    catch (Exception e) {
380                            _log.error(e, e);
381    
382                            throw new RemoteException(e.getMessage());
383                    }
384            }
385    
386            public static long exportLayoutsAsFileInBackground(
387                    long exportImportConfigurationId) throws RemoteException {
388                    try {
389                            long returnValue = LayoutServiceUtil.exportLayoutsAsFileInBackground(exportImportConfigurationId);
390    
391                            return returnValue;
392                    }
393                    catch (Exception e) {
394                            _log.error(e, e);
395    
396                            throw new RemoteException(e.getMessage());
397                    }
398            }
399    
400            /**
401            * Returns all the ancestor layouts of the layout.
402            *
403            * @param plid the primary key of the layout
404            * @return the ancestor layouts of the layout
405            * @throws PortalException if a matching layout could not be found or if a
406            portal exception occurred
407            */
408            public static com.liferay.portal.model.LayoutSoap[] getAncestorLayouts(
409                    long plid) throws RemoteException {
410                    try {
411                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getAncestorLayouts(plid);
412    
413                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
414                    }
415                    catch (Exception e) {
416                            _log.error(e, e);
417    
418                            throw new RemoteException(e.getMessage());
419                    }
420            }
421    
422            /**
423            * Returns the primary key of the default layout for the group.
424            *
425            * @param groupId the primary key of the group
426            * @param scopeGroupId the primary key of the scope group. See {@link
427            com.liferay.portal.service.ServiceContext#getScopeGroupId()}.
428            * @param privateLayout whether the layout is private to the group
429            * @param portletId the primary key of the portlet
430            * @return Returns the primary key of the default layout group; {@link
431            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise
432            * @throws PortalException if a group, layout, or portlet with the primary
433            key could not be found
434            */
435            public static long getDefaultPlid(long groupId, long scopeGroupId,
436                    boolean privateLayout, java.lang.String portletId)
437                    throws RemoteException {
438                    try {
439                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
440                                            scopeGroupId, privateLayout, portletId);
441    
442                            return returnValue;
443                    }
444                    catch (Exception e) {
445                            _log.error(e, e);
446    
447                            throw new RemoteException(e.getMessage());
448                    }
449            }
450    
451            public static long getDefaultPlid(long groupId, long scopeGroupId,
452                    java.lang.String portletId) throws RemoteException {
453                    try {
454                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
455                                            scopeGroupId, portletId);
456    
457                            return returnValue;
458                    }
459                    catch (Exception e) {
460                            _log.error(e, e);
461    
462                            throw new RemoteException(e.getMessage());
463                    }
464            }
465    
466            /**
467            * Returns the layout matching the UUID, group, and privacy.
468            *
469            * @param uuid the layout's UUID
470            * @param groupId the primary key of the group
471            * @param privateLayout whether the layout is private to the group
472            * @return the matching layout
473            * @throws PortalException if a matching layout could not be found, if the
474            user did not have permission to view the layout, or if some other
475            portal exception occurred
476            */
477            public static com.liferay.portal.model.LayoutSoap getLayoutByUuidAndGroupId(
478                    java.lang.String uuid, long groupId, boolean privateLayout)
479                    throws RemoteException {
480                    try {
481                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.getLayoutByUuidAndGroupId(uuid,
482                                            groupId, privateLayout);
483    
484                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
485                    }
486                    catch (Exception e) {
487                            _log.error(e, e);
488    
489                            throw new RemoteException(e.getMessage());
490                    }
491            }
492    
493            /**
494            * Returns the name of the layout.
495            *
496            * @param groupId the primary key of the group
497            * @param privateLayout whether the layout is private to the group
498            * @param layoutId the primary key of the layout
499            * @param languageId the primary key of the language. For more information
500            See {@link java.util.Locale}.
501            * @return the layout's name
502            * @throws PortalException if a matching layout could not be found
503            */
504            public static java.lang.String getLayoutName(long groupId,
505                    boolean privateLayout, long layoutId, java.lang.String languageId)
506                    throws RemoteException {
507                    try {
508                            java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
509                                            privateLayout, layoutId, languageId);
510    
511                            return returnValue;
512                    }
513                    catch (Exception e) {
514                            _log.error(e, e);
515    
516                            throw new RemoteException(e.getMessage());
517                    }
518            }
519    
520            /**
521            * Returns the layout references for all the layouts that belong to the
522            * company and belong to the portlet that matches the preferences.
523            *
524            * @param companyId the primary key of the company
525            * @param portletId the primary key of the portlet
526            * @param preferencesKey the portlet's preference key
527            * @param preferencesValue the portlet's preference value
528            * @return the layout references of the matching layouts
529            */
530            public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
531                    long companyId, java.lang.String portletId,
532                    java.lang.String preferencesKey, java.lang.String preferencesValue)
533                    throws RemoteException {
534                    try {
535                            com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
536                                            portletId, preferencesKey, preferencesValue);
537    
538                            return returnValue;
539                    }
540                    catch (Exception e) {
541                            _log.error(e, e);
542    
543                            throw new RemoteException(e.getMessage());
544                    }
545            }
546    
547            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
548                    long groupId, boolean privateLayout) throws RemoteException {
549                    try {
550                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
551                                            privateLayout);
552    
553                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
554                    }
555                    catch (Exception e) {
556                            _log.error(e, e);
557    
558                            throw new RemoteException(e.getMessage());
559                    }
560            }
561    
562            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
563                    long groupId, boolean privateLayout, long parentLayoutId)
564                    throws RemoteException {
565                    try {
566                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
567                                            privateLayout, parentLayoutId);
568    
569                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
570                    }
571                    catch (Exception e) {
572                            _log.error(e, e);
573    
574                            throw new RemoteException(e.getMessage());
575                    }
576            }
577    
578            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
579                    long groupId, boolean privateLayout, long parentLayoutId,
580                    boolean incomplete, int start, int end) throws RemoteException {
581                    try {
582                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
583                                            privateLayout, parentLayoutId, incomplete, start, end);
584    
585                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
586                    }
587                    catch (Exception e) {
588                            _log.error(e, e);
589    
590                            throw new RemoteException(e.getMessage());
591                    }
592            }
593    
594            public static int getLayoutsCount(long groupId, boolean privateLayout,
595                    long parentLayoutId) throws RemoteException {
596                    try {
597                            int returnValue = LayoutServiceUtil.getLayoutsCount(groupId,
598                                            privateLayout, parentLayoutId);
599    
600                            return returnValue;
601                    }
602                    catch (Exception e) {
603                            _log.error(e, e);
604    
605                            throw new RemoteException(e.getMessage());
606                    }
607            }
608    
609            public static java.lang.String[] getTempFileNames(long groupId,
610                    java.lang.String folderName) throws RemoteException {
611                    try {
612                            java.lang.String[] returnValue = LayoutServiceUtil.getTempFileNames(groupId,
613                                            folderName);
614    
615                            return returnValue;
616                    }
617                    catch (Exception e) {
618                            _log.error(e, e);
619    
620                            throw new RemoteException(e.getMessage());
621                    }
622            }
623    
624            /**
625            * Sets the layouts for the group, replacing and prioritizing all layouts of
626            * the parent layout.
627            *
628            * @param groupId the primary key of the group
629            * @param privateLayout whether the layout is private to the group
630            * @param parentLayoutId the primary key of the parent layout
631            * @param layoutIds the primary keys of the layouts
632            * @param serviceContext the service context to be applied
633            * @throws PortalException if a group or layout with the primary key could
634            not be found, if the group did not have permission to manage the
635            layouts, if no layouts were specified, if the first layout was
636            not page-able, if the first layout was hidden, or if some other
637            portal exception occurred
638            */
639            public static void setLayouts(long groupId, boolean privateLayout,
640                    long parentLayoutId, long[] layoutIds,
641                    com.liferay.portal.service.ServiceContext serviceContext)
642                    throws RemoteException {
643                    try {
644                            LayoutServiceUtil.setLayouts(groupId, privateLayout,
645                                    parentLayoutId, layoutIds, serviceContext);
646                    }
647                    catch (Exception e) {
648                            _log.error(e, e);
649    
650                            throw new RemoteException(e.getMessage());
651                    }
652            }
653    
654            /**
655            * Deletes the job from the scheduler's queue.
656            *
657            * @param groupId the primary key of the group
658            * @param jobName the job name
659            * @param groupName the group name (optionally {@link
660            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
661            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
662            * @throws PortalException if the group did not permission to manage staging
663            and publish
664            */
665            public static void unschedulePublishToLive(long groupId,
666                    java.lang.String jobName, java.lang.String groupName)
667                    throws RemoteException {
668                    try {
669                            LayoutServiceUtil.unschedulePublishToLive(groupId, jobName,
670                                    groupName);
671                    }
672                    catch (Exception e) {
673                            _log.error(e, e);
674    
675                            throw new RemoteException(e.getMessage());
676                    }
677            }
678    
679            /**
680            * Deletes the job from the scheduler's persistent queue.
681            *
682            * @param groupId the primary key of the group
683            * @param jobName the job name
684            * @param groupName the group name (optionally {@link
685            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
686            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
687            * @throws PortalException if a group with the primary key could not be
688            found or if the group did not have permission to publish
689            */
690            public static void unschedulePublishToRemote(long groupId,
691                    java.lang.String jobName, java.lang.String groupName)
692                    throws RemoteException {
693                    try {
694                            LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName,
695                                    groupName);
696                    }
697                    catch (Exception e) {
698                            _log.error(e, e);
699    
700                            throw new RemoteException(e.getMessage());
701                    }
702            }
703    
704            public static com.liferay.portal.model.LayoutSoap updateIconImage(
705                    long plid, byte[] bytes) throws RemoteException {
706                    try {
707                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateIconImage(plid,
708                                            bytes);
709    
710                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
711                    }
712                    catch (Exception e) {
713                            _log.error(e, e);
714    
715                            throw new RemoteException(e.getMessage());
716                    }
717            }
718    
719            /**
720            * Updates the layout with additional parameters.
721            *
722            * @param groupId the primary key of the group
723            * @param privateLayout whether the layout is private to the group
724            * @param layoutId the primary key of the layout
725            * @param parentLayoutId the primary key of the layout's new parent layout
726            * @param localeNamesMap the layout's locales and localized names
727            * @param localeTitlesMap the layout's locales and localized titles
728            * @param descriptionMap the locales and localized descriptions to merge
729            (optionally <code>null</code>)
730            * @param keywordsMap the locales and localized keywords to merge
731            (optionally <code>null</code>)
732            * @param robotsMap the locales and localized robots to merge (optionally
733            <code>null</code>)
734            * @param type the layout's new type (optionally {@link
735            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
736            * @param hidden whether the layout is hidden
737            * @param friendlyURLMap the layout's locales and localized friendly URLs.
738            To see how the URL is normalized when accessed see {@link
739            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
740            String)}.
741            * @param iconImage whether the icon image will be updated
742            * @param iconBytes the byte array of the layout's new icon image
743            * @param serviceContext the service context to be applied. Can set the
744            modification date and expando bridge attributes for the layout.
745            * @return the updated layout
746            * @throws PortalException if a group or layout with the primary key could
747            not be found, if the user did not have permission to update the
748            layout, if a unique friendly URL could not be generated, if a
749            valid parent layout ID to use could not be found, or if the
750            layout parameters were invalid
751            */
752            public static com.liferay.portal.model.LayoutSoap updateLayout(
753                    long groupId, boolean privateLayout, long layoutId,
754                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
755                    java.lang.String[] localeNamesMapValues,
756                    java.lang.String[] localeTitlesMapLanguageIds,
757                    java.lang.String[] localeTitlesMapValues,
758                    java.lang.String[] descriptionMapLanguageIds,
759                    java.lang.String[] descriptionMapValues,
760                    java.lang.String[] keywordsMapLanguageIds,
761                    java.lang.String[] keywordsMapValues,
762                    java.lang.String[] robotsMapLanguageIds,
763                    java.lang.String[] robotsMapValues, java.lang.String type,
764                    boolean hidden, java.lang.String[] friendlyURLMapLanguageIds,
765                    java.lang.String[] friendlyURLMapValues, boolean iconImage,
766                    byte[] iconBytes,
767                    com.liferay.portal.service.ServiceContext serviceContext)
768                    throws RemoteException {
769                    try {
770                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
771                                            localeNamesMapValues);
772                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
773                                            localeTitlesMapValues);
774                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
775                                            descriptionMapValues);
776                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
777                                            keywordsMapValues);
778                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
779                                            robotsMapValues);
780                            Map<Locale, String> friendlyURLMap = LocalizationUtil.getLocalizationMap(friendlyURLMapLanguageIds,
781                                            friendlyURLMapValues);
782    
783                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
784                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
785                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
786                                            type, hidden, friendlyURLMap, iconImage, iconBytes,
787                                            serviceContext);
788    
789                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
790                    }
791                    catch (Exception e) {
792                            _log.error(e, e);
793    
794                            throw new RemoteException(e.getMessage());
795                    }
796            }
797    
798            /**
799            * Updates the layout with additional parameters.
800            *
801            * @param groupId the primary key of the group
802            * @param privateLayout whether the layout is private to the group
803            * @param layoutId the primary key of the layout
804            * @param parentLayoutId the primary key of the layout's new parent
805            layout
806            * @param localeNamesMap the layout's locales and localized names
807            * @param localeTitlesMap the layout's locales and localized titles
808            * @param descriptionMap the locales and localized descriptions to
809            merge (optionally <code>null</code>)
810            * @param keywordsMap the locales and localized keywords to merge
811            (optionally <code>null</code>)
812            * @param robotsMap the locales and localized robots to merge
813            (optionally <code>null</code>)
814            * @param type the layout's new type (optionally {@link
815            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
816            * @param hidden whether the layout is hidden
817            * @param friendlyURL the layout's locales and new friendly URLs. To
818            see how the URL is normalized when accessed, see {@link
819            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
820            String)}.
821            * @param iconImage whether the icon image will be updated
822            * @param iconBytes the byte array of the layout's new icon image
823            * @param serviceContext the service context to be applied. Can set the
824            modification date and expando bridge attributes for the
825            layout.
826            * @return the updated layout
827            * @throws PortalException if a group or layout with the primary key
828            could not be found, if the user did not have permission to
829            update the layout, if a unique friendly URL could not be
830            generated, if a valid parent layout ID to use could not be
831            found, or if the layout parameters were invalid
832            * @deprecated As of 6.2.0, replaced by {@link #updateLayout(long, boolean,
833            long, long, Map, Map, Map, Map, Map, String, boolean, Map,
834            Boolean, byte[], ServiceContext)}
835            */
836            @Deprecated
837            public static com.liferay.portal.model.LayoutSoap updateLayout(
838                    long groupId, boolean privateLayout, long layoutId,
839                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
840                    java.lang.String[] localeNamesMapValues,
841                    java.lang.String[] localeTitlesMapLanguageIds,
842                    java.lang.String[] localeTitlesMapValues,
843                    java.lang.String[] descriptionMapLanguageIds,
844                    java.lang.String[] descriptionMapValues,
845                    java.lang.String[] keywordsMapLanguageIds,
846                    java.lang.String[] keywordsMapValues,
847                    java.lang.String[] robotsMapLanguageIds,
848                    java.lang.String[] robotsMapValues, java.lang.String type,
849                    boolean hidden, java.lang.String friendlyURL,
850                    java.lang.Boolean iconImage, byte[] iconBytes,
851                    com.liferay.portal.service.ServiceContext serviceContext)
852                    throws RemoteException {
853                    try {
854                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
855                                            localeNamesMapValues);
856                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
857                                            localeTitlesMapValues);
858                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
859                                            descriptionMapValues);
860                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
861                                            keywordsMapValues);
862                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
863                                            robotsMapValues);
864    
865                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
866                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
867                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
868                                            type, hidden, friendlyURL, iconImage, iconBytes,
869                                            serviceContext);
870    
871                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
872                    }
873                    catch (Exception e) {
874                            _log.error(e, e);
875    
876                            throw new RemoteException(e.getMessage());
877                    }
878            }
879    
880            /**
881            * Updates the layout replacing its type settings.
882            *
883            * @param groupId the primary key of the group
884            * @param privateLayout whether the layout is private to the group
885            * @param layoutId the primary key of the layout
886            * @param typeSettings the settings to load the unicode properties object.
887            See {@link com.liferay.portal.kernel.util.UnicodeProperties
888            #fastLoad(String)}.
889            * @return the updated layout
890            * @throws PortalException if a matching layout could not be found or if the
891            user did not have permission to update the layout
892            */
893            public static com.liferay.portal.model.LayoutSoap updateLayout(
894                    long groupId, boolean privateLayout, long layoutId,
895                    java.lang.String typeSettings) throws RemoteException {
896                    try {
897                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
898                                            privateLayout, layoutId, typeSettings);
899    
900                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
901                    }
902                    catch (Exception e) {
903                            _log.error(e, e);
904    
905                            throw new RemoteException(e.getMessage());
906                    }
907            }
908    
909            /**
910            * Updates the look and feel of the layout.
911            *
912            * @param groupId the primary key of the group
913            * @param privateLayout whether the layout is private to the group
914            * @param layoutId the primary key of the layout
915            * @param themeId the primary key of the layout's new theme
916            * @param colorSchemeId the primary key of the layout's new color scheme
917            * @param css the layout's new CSS
918            * @param wapTheme whether the theme is for WAP browsers
919            * @return the updated layout
920            * @throws PortalException if a matching layout could not be found, or if
921            the user did not have permission to update the layout and
922            permission to apply the theme
923            */
924            public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
925                    long groupId, boolean privateLayout, long layoutId,
926                    java.lang.String themeId, java.lang.String colorSchemeId,
927                    java.lang.String css, boolean wapTheme) throws RemoteException {
928                    try {
929                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
930                                            privateLayout, layoutId, themeId, colorSchemeId, css,
931                                            wapTheme);
932    
933                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
934                    }
935                    catch (Exception e) {
936                            _log.error(e, e);
937    
938                            throw new RemoteException(e.getMessage());
939                    }
940            }
941    
942            /**
943            * Updates the name of the layout matching the group, layout ID, and
944            * privacy.
945            *
946            * @param groupId the primary key of the group
947            * @param privateLayout whether the layout is private to the group
948            * @param layoutId the primary key of the layout
949            * @param name the layout's new name
950            * @param languageId the primary key of the language. For more information
951            see {@link java.util.Locale}.
952            * @return the updated layout
953            * @throws PortalException if a matching layout could not be found, if the
954            user did not have permission to update the layout, or if the new
955            name was <code>null</code>
956            */
957            public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
958                    boolean privateLayout, long layoutId, java.lang.String name,
959                    java.lang.String languageId) throws RemoteException {
960                    try {
961                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
962                                            privateLayout, layoutId, name, languageId);
963    
964                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
965                    }
966                    catch (Exception e) {
967                            _log.error(e, e);
968    
969                            throw new RemoteException(e.getMessage());
970                    }
971            }
972    
973            /**
974            * Updates the name of the layout matching the primary key.
975            *
976            * @param plid the primary key of the layout
977            * @param name the name to be assigned
978            * @param languageId the primary key of the language. For more information
979            see {@link java.util.Locale}.
980            * @return the updated layout
981            * @throws PortalException if a layout with the primary key could not be
982            found, or if the user did not have permission to update the
983            layout, or if the name was <code>null</code>
984            */
985            public static com.liferay.portal.model.LayoutSoap updateName(long plid,
986                    java.lang.String name, java.lang.String languageId)
987                    throws RemoteException {
988                    try {
989                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
990                                            name, languageId);
991    
992                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
993                    }
994                    catch (Exception e) {
995                            _log.error(e, e);
996    
997                            throw new RemoteException(e.getMessage());
998                    }
999            }
1000    
1001            /**
1002            * Updates the parent layout ID of the layout matching the group, layout ID,
1003            * and privacy.
1004            *
1005            * @param groupId the primary key of the group
1006            * @param privateLayout whether the layout is private to the group
1007            * @param layoutId the primary key of the layout
1008            * @param parentLayoutId the primary key to be assigned to the parent
1009            layout
1010            * @return the matching layout
1011            * @throws PortalException if a valid parent layout ID to use could not be
1012            found, if a matching layout could not be found, or if the user
1013            did not have permission to update the layout
1014            */
1015            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
1016                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
1017                    throws RemoteException {
1018                    try {
1019                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
1020                                            privateLayout, layoutId, parentLayoutId);
1021    
1022                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1023                    }
1024                    catch (Exception e) {
1025                            _log.error(e, e);
1026    
1027                            throw new RemoteException(e.getMessage());
1028                    }
1029            }
1030    
1031            /**
1032            * Updates the parent layout ID of the layout matching the primary key. If a
1033            * layout matching the parent primary key is found, the layout ID of that
1034            * layout is assigned, otherwise {@link
1035            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
1036            * assigned.
1037            *
1038            * @param plid the primary key of the layout
1039            * @param parentPlid the primary key of the parent layout
1040            * @return the layout matching the primary key
1041            * @throws PortalException if a layout with the primary key could not be
1042            found, if the user did not have permission to update the layout,
1043            or if a valid parent layout ID to use could not be found
1044            */
1045            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
1046                    long plid, long parentPlid) throws RemoteException {
1047                    try {
1048                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
1049                                            parentPlid);
1050    
1051                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1052                    }
1053                    catch (Exception e) {
1054                            _log.error(e, e);
1055    
1056                            throw new RemoteException(e.getMessage());
1057                    }
1058            }
1059    
1060            /**
1061            * Updates the parent layout ID and priority of the layout.
1062            *
1063            * @param plid the primary key of the layout
1064            * @param parentPlid the primary key of the parent layout
1065            * @param priority the layout's new priority
1066            * @return the layout matching the primary key
1067            * @throws PortalException if a portal exception occurred
1068            */
1069            public static com.liferay.portal.model.LayoutSoap updateParentLayoutIdAndPriority(
1070                    long plid, long parentPlid, int priority) throws RemoteException {
1071                    try {
1072                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutIdAndPriority(plid,
1073                                            parentPlid, priority);
1074    
1075                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1076                    }
1077                    catch (Exception e) {
1078                            _log.error(e, e);
1079    
1080                            throw new RemoteException(e.getMessage());
1081                    }
1082            }
1083    
1084            /**
1085            * Updates the priority of the layout matching the group, layout ID, and
1086            * privacy.
1087            *
1088            * @param groupId the primary key of the group
1089            * @param privateLayout whether the layout is private to the group
1090            * @param layoutId the primary key of the layout
1091            * @param priority the layout's new priority
1092            * @return the updated layout
1093            * @throws PortalException if a matching layout could not be found or if the
1094            user did not have permission to update the layout
1095            */
1096            public static com.liferay.portal.model.LayoutSoap updatePriority(
1097                    long groupId, boolean privateLayout, long layoutId, int priority)
1098                    throws RemoteException {
1099                    try {
1100                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
1101                                            privateLayout, layoutId, priority);
1102    
1103                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1104                    }
1105                    catch (Exception e) {
1106                            _log.error(e, e);
1107    
1108                            throw new RemoteException(e.getMessage());
1109                    }
1110            }
1111    
1112            /**
1113            * Updates the priority of the layout matching the group, layout ID, and
1114            * privacy, setting the layout's priority based on the priorities of the
1115            * next and previous layouts.
1116            *
1117            * @param groupId the primary key of the group
1118            * @param privateLayout whether the layout is private to the group
1119            * @param layoutId the primary key of the layout
1120            * @param nextLayoutId the primary key of the next layout
1121            * @param previousLayoutId the primary key of the previous layout
1122            * @return the updated layout
1123            * @throws PortalException if a matching layout could not be found or if the
1124            user did not have permission to update the layout
1125            */
1126            public static com.liferay.portal.model.LayoutSoap updatePriority(
1127                    long groupId, boolean privateLayout, long layoutId, long nextLayoutId,
1128                    long previousLayoutId) throws RemoteException {
1129                    try {
1130                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
1131                                            privateLayout, layoutId, nextLayoutId, previousLayoutId);
1132    
1133                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1134                    }
1135                    catch (Exception e) {
1136                            _log.error(e, e);
1137    
1138                            throw new RemoteException(e.getMessage());
1139                    }
1140            }
1141    
1142            /**
1143            * Updates the priority of the layout matching the primary key.
1144            *
1145            * @param plid the primary key of the layout
1146            * @param priority the layout's new priority
1147            * @return the updated layout
1148            * @throws PortalException if a layout with the primary key could not be
1149            found
1150            */
1151            public static com.liferay.portal.model.LayoutSoap updatePriority(
1152                    long plid, int priority) throws RemoteException {
1153                    try {
1154                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
1155                                            priority);
1156    
1157                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
1158                    }
1159                    catch (Exception e) {
1160                            _log.error(e, e);
1161    
1162                            throw new RemoteException(e.getMessage());
1163                    }
1164            }
1165    
1166            private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
1167    }