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