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