001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.LocalizationUtil;
020    import com.liferay.portal.service.LayoutServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    import java.util.Locale;
025    import java.util.Map;
026    
027    /**
028     * <p>
029     * This class provides a SOAP utility for the
030     * {@link com.liferay.portal.service.LayoutServiceUtil} service utility. The
031     * static methods of this class calls the same methods of the service utility.
032     * However, the signatures are different because it is difficult for SOAP to
033     * support certain types.
034     * </p>
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
055     * http://localhost:8080/api/secure/axis. Set the property
056     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
057     * security.
058     * </p>
059     *
060     * <p>
061     * The SOAP utility is only generated for remote services.
062     * </p>
063     *
064     * @author    Brian Wing Shun Chan
065     * @see       LayoutServiceHttp
066     * @see       com.liferay.portal.model.LayoutSoap
067     * @see       com.liferay.portal.service.LayoutServiceUtil
068     * @generated
069     */
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 (optionally
084            {@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 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            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
093            possible types can be found in {@link
094            com.liferay.portal.model.LayoutConstants}.
095            * @param hidden whether the layout is hidden
096            * @param friendlyURL the layout's friendly URL (optionally {@link
097            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
098            or {@link
099            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
100            The default values can be overridden in
101            <code>portal-ext.properties</code> by specifying new values for
102            the corresponding properties defined in {@link
103            com.liferay.portal.util.PropsValues}. To see how the URL is
104            normalized when accessed see {@link
105            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
106            String)}.
107            * @param serviceContext the service context. Must set the universally
108            unique identifier (UUID) for the layout. Can set the creation
109            date, modification date and the expando bridge attributes for the
110            layout. For layouts that belong to a layout set prototype, an
111            attribute named 'layoutUpdateable' can be used to specify whether
112            site administrators can modify this page within their site.
113            * @return the layout
114            * @throws PortalException if a group with the primary key could not be
115            found, if the group did not have permission to manage the layouts
116            involved, or if layout values were invalid
117            * @throws SystemException if a system exception occurred
118            */
119            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
120                    boolean privateLayout, long parentLayoutId,
121                    java.lang.String[] localeNamesMapLanguageIds,
122                    java.lang.String[] localeNamesMapValues,
123                    java.lang.String[] localeTitlesMapLanguageIds,
124                    java.lang.String[] localeTitlesMapValues,
125                    java.lang.String[] descriptionMapLanguageIds,
126                    java.lang.String[] descriptionMapValues,
127                    java.lang.String[] keywordsMapLanguageIds,
128                    java.lang.String[] keywordsMapValues,
129                    java.lang.String[] robotsMapLanguageIds,
130                    java.lang.String[] robotsMapValues, java.lang.String type,
131                    boolean hidden, java.lang.String friendlyURL,
132                    com.liferay.portal.service.ServiceContext serviceContext)
133                    throws RemoteException {
134                    try {
135                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
136                                            localeNamesMapValues);
137                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
138                                            localeTitlesMapValues);
139                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
140                                            descriptionMapValues);
141                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
142                                            keywordsMapValues);
143                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
144                                            robotsMapValues);
145    
146                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
147                                            privateLayout, parentLayoutId, localeNamesMap,
148                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
149                                            type, hidden, friendlyURL, serviceContext);
150    
151                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            /**
161            * <p>
162            * This method handles the creation of the layout including its resources,
163            * metadata, and internal data structures. It is not necessary to make
164            * subsequent calls to any methods to setup default groups, resources, ...
165            * etc.
166            * </p>
167            *
168            * @param groupId the primary key of the group
169            * @param privateLayout whether the layout is private to the group
170            * @param parentLayoutId the primary key of the parent layout (optionally
171            {@link
172            com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID})
173            * @param name Map the layout's locales and localized names
174            * @param title Map the layout's locales and localized titles
175            * @param description Map the layout's locales and localized descriptions
176            * @param type the layout's type (optionally {@link
177            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET}). The
178            possible types can be found in {@link
179            com.liferay.portal.model.LayoutConstants}.
180            * @param hidden whether the layout is hidden
181            * @param friendlyURL the layout's friendly URL (optionally {@link
182            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
183            or {@link
184            com.liferay.portal.util.PropsValues#DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL}).
185            The default values can be overridden in
186            <code>portal-ext.properties</code> by specifying new values for
187            the corresponding properties defined in {@link
188            com.liferay.portal.util.PropsValues}. To see how the URL is
189            normalized when accessed see {@link
190            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
191            String)}.
192            * @param serviceContext the service context. Must set the universally
193            unique identifier (UUID) for the layout. Can specify the creation
194            date, modification date and the expando bridge attributes for the
195            layout. For layouts that belong to a layout set prototype, an
196            attribute named 'layoutUpdateable' can be used to specify whether
197            site administrators can modify this page within their site.
198            * @return the layout
199            * @throws PortalException if a group with the primary key could not be
200            found, if the group did not have permission to manage the layouts
201            involved, or if layout values were invalid
202            * @throws SystemException if a system exception occurred
203            */
204            public static com.liferay.portal.model.LayoutSoap addLayout(long groupId,
205                    boolean privateLayout, long parentLayoutId, java.lang.String name,
206                    java.lang.String title, java.lang.String description,
207                    java.lang.String type, boolean hidden, java.lang.String friendlyURL,
208                    com.liferay.portal.service.ServiceContext serviceContext)
209                    throws RemoteException {
210                    try {
211                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
212                                            privateLayout, parentLayoutId, name, title, description,
213                                            type, hidden, friendlyURL, serviceContext);
214    
215                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            /**
225            * Deletes the layout with the primary key, also deleting the layout's child
226            * layouts, and associated resources.
227            *
228            * @param groupId the primary key of the group
229            * @param privateLayout whether the layout is private to the group
230            * @param layoutId the primary key of the layout
231            * @param serviceContext the service context
232            * @throws PortalException if the user did not have permission to delete the
233            layout, if a matching layout could not be found , or if some
234            other portal exception occurred
235            * @throws SystemException if a system exception occurred
236            */
237            public static void deleteLayout(long groupId, boolean privateLayout,
238                    long layoutId, com.liferay.portal.service.ServiceContext serviceContext)
239                    throws RemoteException {
240                    try {
241                            LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId,
242                                    serviceContext);
243                    }
244                    catch (Exception e) {
245                            _log.error(e, e);
246    
247                            throw new RemoteException(e.getMessage());
248                    }
249            }
250    
251            /**
252            * Deletes the layout with the plid, also deleting the layout's child
253            * layouts, and associated resources.
254            *
255            * @param plid the primary key of the layout
256            * @param serviceContext the service context
257            * @throws PortalException if the user did not have permission to delete the
258            layout, if a layout with the primary key could not be found , or
259            if some other portal exception occurred
260            * @throws SystemException if a system exception occurred
261            */
262            public static void deleteLayout(long plid,
263                    com.liferay.portal.service.ServiceContext serviceContext)
264                    throws RemoteException {
265                    try {
266                            LayoutServiceUtil.deleteLayout(plid, serviceContext);
267                    }
268                    catch (Exception e) {
269                            _log.error(e, e);
270    
271                            throw new RemoteException(e.getMessage());
272                    }
273            }
274    
275            /**
276            * Returns all the ancestor layouts of the layout.
277            *
278            * @param plid the primary key of the layout
279            * @return the ancestor layouts of the layout
280            * @throws PortalException if a matching layout could not be found or if a
281            portal exception occurred
282            * @throws SystemException if a system exception occurred
283            */
284            public static com.liferay.portal.model.LayoutSoap[] getAncestorLayouts(
285                    long plid) throws RemoteException {
286                    try {
287                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getAncestorLayouts(plid);
288    
289                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
290                    }
291                    catch (Exception e) {
292                            _log.error(e, e);
293    
294                            throw new RemoteException(e.getMessage());
295                    }
296            }
297    
298            /**
299            * Returns the primary key of the default layout for the group.
300            *
301            * @param groupId the primary key of the group
302            * @param scopeGroupId the primary key of the scope group. See {@link
303            ServiceContext#getScopeGroupId()}.
304            * @param privateLayout whether the layout is private to the group
305            * @param portletId the primary key of the portlet
306            * @return Returns the primary key of the default layout group; {@link
307            com.liferay.portal.model.LayoutConstants#DEFAULT_PLID} otherwise
308            * @throws PortalException if a group, layout, or portlet with the primary
309            key could not be found
310            * @throws SystemException if a system exception occurred
311            */
312            public static long getDefaultPlid(long groupId, long scopeGroupId,
313                    boolean privateLayout, java.lang.String portletId)
314                    throws RemoteException {
315                    try {
316                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
317                                            scopeGroupId, privateLayout, portletId);
318    
319                            return returnValue;
320                    }
321                    catch (Exception e) {
322                            _log.error(e, e);
323    
324                            throw new RemoteException(e.getMessage());
325                    }
326            }
327    
328            public static long getDefaultPlid(long groupId, long scopeGroupId,
329                    java.lang.String portletId) throws RemoteException {
330                    try {
331                            long returnValue = LayoutServiceUtil.getDefaultPlid(groupId,
332                                            scopeGroupId, portletId);
333    
334                            return returnValue;
335                    }
336                    catch (Exception e) {
337                            _log.error(e, e);
338    
339                            throw new RemoteException(e.getMessage());
340                    }
341            }
342    
343            public static com.liferay.portal.model.LayoutSoap getLayoutByUuidAndGroupId(
344                    java.lang.String uuid, long groupId, boolean privateLayout)
345                    throws RemoteException {
346                    try {
347                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.getLayoutByUuidAndGroupId(uuid,
348                                            groupId, privateLayout);
349    
350                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
351                    }
352                    catch (Exception e) {
353                            _log.error(e, e);
354    
355                            throw new RemoteException(e.getMessage());
356                    }
357            }
358    
359            /**
360            * Returns the name of the layout.
361            *
362            * @param groupId the primary key of the group
363            * @param privateLayout whether the layout is private to the group
364            * @param layoutId the primary key of the layout
365            * @param languageId the primary key of the language. For more information
366            See {@link java.util.Locale}.
367            * @return the layout's name
368            * @throws PortalException if a matching layout could not be found
369            * @throws SystemException if a system exception occurred
370            */
371            public static java.lang.String getLayoutName(long groupId,
372                    boolean privateLayout, long layoutId, java.lang.String languageId)
373                    throws RemoteException {
374                    try {
375                            java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
376                                            privateLayout, layoutId, languageId);
377    
378                            return returnValue;
379                    }
380                    catch (Exception e) {
381                            _log.error(e, e);
382    
383                            throw new RemoteException(e.getMessage());
384                    }
385            }
386    
387            /**
388            * Returns the layout references for all the layouts that belong to the
389            * company and belong to the portlet that matches the preferences.
390            *
391            * @param companyId the primary key of the company
392            * @param portletId the primary key of the portlet
393            * @param preferencesKey the portlet's preference key
394            * @param preferencesValue the portlet's preference value
395            * @return the layout references of the matching layouts
396            * @throws SystemException if a system exception occurred
397            */
398            public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
399                    long companyId, java.lang.String portletId,
400                    java.lang.String preferencesKey, java.lang.String preferencesValue)
401                    throws RemoteException {
402                    try {
403                            com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
404                                            portletId, preferencesKey, preferencesValue);
405    
406                            return returnValue;
407                    }
408                    catch (Exception e) {
409                            _log.error(e, e);
410    
411                            throw new RemoteException(e.getMessage());
412                    }
413            }
414    
415            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
416                    long groupId, boolean privateLayout) throws RemoteException {
417                    try {
418                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
419                                            privateLayout);
420    
421                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
422                    }
423                    catch (Exception e) {
424                            _log.error(e, e);
425    
426                            throw new RemoteException(e.getMessage());
427                    }
428            }
429    
430            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
431                    long groupId, boolean privateLayout, long parentLayoutId)
432                    throws RemoteException {
433                    try {
434                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
435                                            privateLayout, parentLayoutId);
436    
437                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
438                    }
439                    catch (Exception e) {
440                            _log.error(e, e);
441    
442                            throw new RemoteException(e.getMessage());
443                    }
444            }
445    
446            public static com.liferay.portal.model.LayoutSoap[] getLayouts(
447                    long groupId, boolean privateLayout, long parentLayoutId,
448                    boolean incomplete, int start, int end) throws RemoteException {
449                    try {
450                            java.util.List<com.liferay.portal.model.Layout> returnValue = LayoutServiceUtil.getLayouts(groupId,
451                                            privateLayout, parentLayoutId, incomplete, start, end);
452    
453                            return com.liferay.portal.model.LayoutSoap.toSoapModels(returnValue);
454                    }
455                    catch (Exception e) {
456                            _log.error(e, e);
457    
458                            throw new RemoteException(e.getMessage());
459                    }
460            }
461    
462            /**
463            * Sets the layouts for the group, replacing and prioritizing all layouts of
464            * the parent layout.
465            *
466            * @param groupId the primary key of the group
467            * @param privateLayout whether the layout is private to the group
468            * @param parentLayoutId the primary key of the parent layout
469            * @param layoutIds the primary keys of the layouts
470            * @param serviceContext the service context
471            * @throws PortalException if a group or layout with the primary key could
472            not be found, if the group did not have permission to manage the
473            layouts, if no layouts were specified, if the first layout was
474            not page-able, if the first layout was hidden, or if some other
475            portal exception occurred
476            * @throws SystemException if a system exception occurred
477            */
478            public static void setLayouts(long groupId, boolean privateLayout,
479                    long parentLayoutId, long[] layoutIds,
480                    com.liferay.portal.service.ServiceContext serviceContext)
481                    throws RemoteException {
482                    try {
483                            LayoutServiceUtil.setLayouts(groupId, privateLayout,
484                                    parentLayoutId, layoutIds, serviceContext);
485                    }
486                    catch (Exception e) {
487                            _log.error(e, e);
488    
489                            throw new RemoteException(e.getMessage());
490                    }
491            }
492    
493            /**
494            * Deletes the job from the scheduler's queue.
495            *
496            * @param groupId the primary key of the group
497            * @param jobName the job name
498            * @param groupName the group name (optionally {@link
499            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
500            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
501            * @throws PortalException if the group did not permission to manage staging
502            and publish
503            * @throws SystemException if a system exception occurred
504            */
505            public static void unschedulePublishToLive(long groupId,
506                    java.lang.String jobName, java.lang.String groupName)
507                    throws RemoteException {
508                    try {
509                            LayoutServiceUtil.unschedulePublishToLive(groupId, jobName,
510                                    groupName);
511                    }
512                    catch (Exception e) {
513                            _log.error(e, e);
514    
515                            throw new RemoteException(e.getMessage());
516                    }
517            }
518    
519            /**
520            * Deletes the job from the scheduler's persistent queue.
521            *
522            * @param groupId the primary key of the group
523            * @param jobName the job name
524            * @param groupName the group name (optionally {@link
525            com.liferay.portal.kernel.messaging.DestinationNames#LAYOUTS_LOCAL_PUBLISHER}).
526            See {@link com.liferay.portal.kernel.messaging.DestinationNames}.
527            * @throws PortalException if a group with the primary key could not be
528            found or if the group did not have permission to publish
529            * @throws SystemException if a system exception occurred
530            */
531            public static void unschedulePublishToRemote(long groupId,
532                    java.lang.String jobName, java.lang.String groupName)
533                    throws RemoteException {
534                    try {
535                            LayoutServiceUtil.unschedulePublishToRemote(groupId, jobName,
536                                    groupName);
537                    }
538                    catch (Exception e) {
539                            _log.error(e, e);
540    
541                            throw new RemoteException(e.getMessage());
542                    }
543            }
544    
545            /**
546            * Updates the layout.
547            *
548            * @param groupId the primary key of the group
549            * @param privateLayout whether the layout is private to the group
550            * @param layoutId the primary key of the layout
551            * @param parentLayoutId the primary key of the layout's new parent layout
552            * @param localeNamesMap the layout's locales and localized names
553            * @param localeTitlesMap the layout's locales and localized titles
554            * @param descriptionMap the locales and localized descriptions to merge
555            (optionally <code>null</code>)
556            * @param keywordsMap the locales and localized keywords to merge
557            (optionally <code>null</code>)
558            * @param robotsMap the locales and localized robots to merge (optionally
559            <code>null</code>)
560            * @param type the layout's new type (optionally {@link
561            com.liferay.portal.model.LayoutConstants#TYPE_PORTLET})
562            * @param hidden whether the layout is hidden
563            * @param friendlyURL the layout's new friendly URL (optionally {@link
564            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}
565            or {@link
566            com.liferay.portal.util.PropsValues#DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL}).
567            The default values can be overridden in
568            <code>portal-ext.properties</code> by specifying new values for
569            the corresponding properties defined in {@link
570            com.liferay.portal.util.PropsValues}. To see how the URL is
571            normalized when accessed see {@link
572            com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil#normalize(
573            String)}.
574            * @param iconImage whether the icon image will be updated
575            * @param iconBytes the byte array of the layout's new icon image
576            * @param serviceContext the service context. Can set the modification date
577            and expando bridge attributes for the layout.
578            * @return the updated layout
579            * @throws PortalException if a group or layout with the primary key could
580            not be found, if the user did not have permission to update the
581            layout, if a unique friendly URL could not be generated, if a
582            valid parent layout ID to use could not be found, or if the
583            layout parameters were invalid
584            * @throws SystemException if a system exception occurred
585            */
586            public static com.liferay.portal.model.LayoutSoap updateLayout(
587                    long groupId, boolean privateLayout, long layoutId,
588                    long parentLayoutId, java.lang.String[] localeNamesMapLanguageIds,
589                    java.lang.String[] localeNamesMapValues,
590                    java.lang.String[] localeTitlesMapLanguageIds,
591                    java.lang.String[] localeTitlesMapValues,
592                    java.lang.String[] descriptionMapLanguageIds,
593                    java.lang.String[] descriptionMapValues,
594                    java.lang.String[] keywordsMapLanguageIds,
595                    java.lang.String[] keywordsMapValues,
596                    java.lang.String[] robotsMapLanguageIds,
597                    java.lang.String[] robotsMapValues, java.lang.String type,
598                    boolean hidden, java.lang.String friendlyURL,
599                    java.lang.Boolean iconImage, byte[] iconBytes,
600                    com.liferay.portal.service.ServiceContext serviceContext)
601                    throws RemoteException {
602                    try {
603                            Map<Locale, String> localeNamesMap = LocalizationUtil.getLocalizationMap(localeNamesMapLanguageIds,
604                                            localeNamesMapValues);
605                            Map<Locale, String> localeTitlesMap = LocalizationUtil.getLocalizationMap(localeTitlesMapLanguageIds,
606                                            localeTitlesMapValues);
607                            Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
608                                            descriptionMapValues);
609                            Map<Locale, String> keywordsMap = LocalizationUtil.getLocalizationMap(keywordsMapLanguageIds,
610                                            keywordsMapValues);
611                            Map<Locale, String> robotsMap = LocalizationUtil.getLocalizationMap(robotsMapLanguageIds,
612                                            robotsMapValues);
613    
614                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
615                                            privateLayout, layoutId, parentLayoutId, localeNamesMap,
616                                            localeTitlesMap, descriptionMap, keywordsMap, robotsMap,
617                                            type, hidden, friendlyURL, iconImage, iconBytes,
618                                            serviceContext);
619    
620                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
621                    }
622                    catch (Exception e) {
623                            _log.error(e, e);
624    
625                            throw new RemoteException(e.getMessage());
626                    }
627            }
628    
629            /**
630            * Updates the layout replacing its type settings.
631            *
632            * @param groupId the primary key of the group
633            * @param privateLayout whether the layout is private to the group
634            * @param layoutId the primary key of the layout
635            * @param typeSettings the settings to load the unicode properties object.
636            See {@link com.liferay.portal.kernel.util.UnicodeProperties
637            #fastLoad(String)}.
638            * @return the updated layout
639            * @throws PortalException if a matching layout could not be found or if the
640            user did not have permission to update the layout
641            * @throws SystemException if a system exception occurred
642            */
643            public static com.liferay.portal.model.LayoutSoap updateLayout(
644                    long groupId, boolean privateLayout, long layoutId,
645                    java.lang.String typeSettings) throws RemoteException {
646                    try {
647                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
648                                            privateLayout, layoutId, typeSettings);
649    
650                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
651                    }
652                    catch (Exception e) {
653                            _log.error(e, e);
654    
655                            throw new RemoteException(e.getMessage());
656                    }
657            }
658    
659            /**
660            * Updates the look and feel of the layout.
661            *
662            * @param groupId the primary key of the group
663            * @param privateLayout whether the layout is private to the group
664            * @param layoutId the primary key of the layout
665            * @param themeId the primary key of the layout's new theme
666            * @param colorSchemeId the primary key of the layout's new color scheme
667            * @param css the layout's new CSS
668            * @param wapTheme whether the theme is for WAP browsers
669            * @return the updated layout
670            * @throws PortalException if a matching layout could not be found, or if
671            the user did not have permission to update the layout and
672            permission to apply the theme
673            * @throws SystemException if a system exception occurred
674            */
675            public static com.liferay.portal.model.LayoutSoap updateLookAndFeel(
676                    long groupId, boolean privateLayout, long layoutId,
677                    java.lang.String themeId, java.lang.String colorSchemeId,
678                    java.lang.String css, boolean wapTheme) throws RemoteException {
679                    try {
680                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
681                                            privateLayout, layoutId, themeId, colorSchemeId, css,
682                                            wapTheme);
683    
684                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
685                    }
686                    catch (Exception e) {
687                            _log.error(e, e);
688    
689                            throw new RemoteException(e.getMessage());
690                    }
691            }
692    
693            /**
694            * Updates the name of the layout matching the group, layout ID, and
695            * privacy.
696            *
697            * @param groupId the primary key of the group
698            * @param privateLayout whether the layout is private to the group
699            * @param layoutId the primary key of the layout
700            * @param name the layout's new name
701            * @param languageId the primary key of the language. For more information
702            see {@link java.util.Locale}.
703            * @return the updated layout
704            * @throws PortalException if a matching layout could not be found, if the
705            user did not have permission to update the layout, or if the new
706            name was <code>null</code>
707            * @throws SystemException if a system exception occurred
708            */
709            public static com.liferay.portal.model.LayoutSoap updateName(long groupId,
710                    boolean privateLayout, long layoutId, java.lang.String name,
711                    java.lang.String languageId) throws RemoteException {
712                    try {
713                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
714                                            privateLayout, layoutId, name, languageId);
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 name of the layout matching the primary key.
727            *
728            * @param plid the primary key of the layout
729            * @param name the name to be assigned
730            * @param languageId the primary key of the language. For more information
731            see {@link java.util.Locale}.
732            * @return the updated layout
733            * @throws PortalException if a layout with the primary key could not be
734            found, or if the user did not have permission to update the
735            layout, or if the name was <code>null</code>
736            * @throws SystemException if a system exception occurred
737            */
738            public static com.liferay.portal.model.LayoutSoap updateName(long plid,
739                    java.lang.String name, java.lang.String languageId)
740                    throws RemoteException {
741                    try {
742                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
743                                            name, languageId);
744    
745                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
746                    }
747                    catch (Exception e) {
748                            _log.error(e, e);
749    
750                            throw new RemoteException(e.getMessage());
751                    }
752            }
753    
754            /**
755            * Updates the parent layout ID of the layout matching the group, layout ID,
756            * and privacy.
757            *
758            * @param groupId the primary key of the group
759            * @param privateLayout whether the layout is private to the group
760            * @param layoutId the primary key of the layout
761            * @param parentLayoutId the primary key to be assigned to the parent
762            layout
763            * @return the matching layout
764            * @throws PortalException if a valid parent layout ID to use could not be
765            found, if a matching layout could not be found, or if the user
766            did not have permission to update the layout
767            * @throws SystemException if a system exception occurred
768            */
769            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
770                    long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
771                    throws RemoteException {
772                    try {
773                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
774                                            privateLayout, layoutId, parentLayoutId);
775    
776                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
777                    }
778                    catch (Exception e) {
779                            _log.error(e, e);
780    
781                            throw new RemoteException(e.getMessage());
782                    }
783            }
784    
785            /**
786            * Updates the parent layout ID of the layout matching the primary key. If a
787            * layout matching the parent primary key is found, the layout ID of that
788            * layout is assigned, otherwise {@link
789            * com.liferay.portal.model.LayoutConstants#DEFAULT_PARENT_LAYOUT_ID} is
790            * assigned.
791            *
792            * @param plid the primary key of the layout
793            * @param parentPlid the primary key of the parent layout
794            * @return the layout matching the primary key
795            * @throws PortalException if a layout with the primary key could not be
796            found, if the user did not have permission to update the layout,
797            or if a valid parent layout ID to use could not be found
798            * @throws SystemException if a system exception occurred
799            */
800            public static com.liferay.portal.model.LayoutSoap updateParentLayoutId(
801                    long plid, long parentPlid) throws RemoteException {
802                    try {
803                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
804                                            parentPlid);
805    
806                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
807                    }
808                    catch (Exception e) {
809                            _log.error(e, e);
810    
811                            throw new RemoteException(e.getMessage());
812                    }
813            }
814    
815            /**
816            * Updates the priority of the layout matching the group, layout ID, and
817            * privacy.
818            *
819            * @param groupId the primary key of the group
820            * @param privateLayout whether the layout is private to the group
821            * @param layoutId the primary key of the layout
822            * @param priority the layout's new priority
823            * @return the updated layout
824            * @throws PortalException if a matching layout could not be found or if the
825            user did not have permission to update the layout
826            * @throws SystemException if a system exception occurred
827            */
828            public static com.liferay.portal.model.LayoutSoap updatePriority(
829                    long groupId, boolean privateLayout, long layoutId, int priority)
830                    throws RemoteException {
831                    try {
832                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
833                                            privateLayout, layoutId, priority);
834    
835                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
836                    }
837                    catch (Exception e) {
838                            _log.error(e, e);
839    
840                            throw new RemoteException(e.getMessage());
841                    }
842            }
843    
844            /**
845            * Updates the priority of the layout matching the primary key.
846            *
847            * @param plid the primary key of the layout
848            * @param priority the layout's new priority
849            * @return the updated layout
850            * @throws PortalException if a layout with the primary key could not be
851            found
852            * @throws SystemException if a system exception occurred
853            */
854            public static com.liferay.portal.model.LayoutSoap updatePriority(
855                    long plid, int priority) throws RemoteException {
856                    try {
857                            com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
858                                            priority);
859    
860                            return com.liferay.portal.model.LayoutSoap.toSoapModel(returnValue);
861                    }
862                    catch (Exception e) {
863                            _log.error(e, e);
864    
865                            throw new RemoteException(e.getMessage());
866                    }
867            }
868    
869            private static Log _log = LogFactoryUtil.getLog(LayoutServiceSoap.class);
870    }