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