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