Liferay 6.1.2-ce-ga3

com.liferay.portal.service.http
Class LayoutServiceSoap

java.lang.Object
  extended by com.liferay.portal.service.http.LayoutServiceSoap

public class LayoutServiceSoap
extends Object

This class provides a SOAP utility for the LayoutServiceUtil service utility. The static methods of this class calls the same methods of the service utility. However, the signatures are different because it is difficult for SOAP to support certain types.

ServiceBuilder follows certain rules in translating the methods. For example, if the method in the service utility returns a List, that is translated to an array of LayoutSoap. If the method in the service utility returns a Layout, that is translated to a LayoutSoap. Methods that SOAP cannot safely wire are skipped.

The benefits of using the SOAP utility is that it is cross platform compatible. SOAP allows different languages like Java, .NET, C++, PHP, and even Perl, to call the generated services. One drawback of SOAP is that it is slow because it needs to serialize all calls into a text format (XML).

You can see a list of services at http://localhost:8080/api/secure/axis. Set the property axis.servlet.hosts.allowed in portal.properties to configure security.

The SOAP utility is only generated for remote services.

See Also:
LayoutServiceHttp, LayoutSoap, LayoutServiceUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
LayoutServiceSoap()
           
 
Method Summary
static LayoutSoap addLayout(long groupId, boolean privateLayout, long parentLayoutId, String[] localeNamesMapLanguageIds, String[] localeNamesMapValues, String[] localeTitlesMapLanguageIds, String[] localeTitlesMapValues, String[] descriptionMapLanguageIds, String[] descriptionMapValues, String[] keywordsMapLanguageIds, String[] keywordsMapValues, String[] robotsMapLanguageIds, String[] robotsMapValues, String type, boolean hidden, String friendlyURL, ServiceContext serviceContext)
          Adds a layout with additional parameters.
static LayoutSoap addLayout(long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, String friendlyURL, ServiceContext serviceContext)
           This method handles the creation of the layout including its resources, metadata, and internal data structures.
static void deleteLayout(long groupId, boolean privateLayout, long layoutId, ServiceContext serviceContext)
          Deletes the layout with the primary key, also deleting the layout's child layouts, and associated resources.
static void deleteLayout(long plid, ServiceContext serviceContext)
          Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.
static LayoutSoap[] getAncestorLayouts(long plid)
          Returns all the ancestor layouts of the layout.
static long getDefaultPlid(long groupId, long scopeGroupId, boolean privateLayout, String portletId)
          Returns the primary key of the default layout for the group.
static long getDefaultPlid(long groupId, long scopeGroupId, String portletId)
           
static LayoutSoap getLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout)
           
static String getLayoutName(long groupId, boolean privateLayout, long layoutId, String languageId)
          Returns the name of the layout.
static LayoutReference[] getLayoutReferences(long companyId, String portletId, String preferencesKey, String preferencesValue)
          Returns the layout references for all the layouts that belong to the company and belong to the portlet that matches the preferences.
static LayoutSoap[] getLayouts(long groupId, boolean privateLayout)
           
static LayoutSoap[] getLayouts(long groupId, boolean privateLayout, long parentLayoutId)
           
static LayoutSoap[] getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end)
           
static void setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, ServiceContext serviceContext)
          Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.
static void unschedulePublishToLive(long groupId, String jobName, String groupName)
          Deletes the job from the scheduler's queue.
static void unschedulePublishToRemote(long groupId, String jobName, String groupName)
          Deletes the job from the scheduler's persistent queue.
static LayoutSoap updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, String[] localeNamesMapLanguageIds, String[] localeNamesMapValues, String[] localeTitlesMapLanguageIds, String[] localeTitlesMapValues, String[] descriptionMapLanguageIds, String[] descriptionMapValues, String[] keywordsMapLanguageIds, String[] keywordsMapValues, String[] robotsMapLanguageIds, String[] robotsMapValues, String type, boolean hidden, String friendlyURL, Boolean iconImage, byte[] iconBytes, ServiceContext serviceContext)
          Updates the layout.
static LayoutSoap updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings)
          Updates the layout replacing its type settings.
static LayoutSoap updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css, boolean wapTheme)
          Updates the look and feel of the layout.
static LayoutSoap updateName(long groupId, boolean privateLayout, long layoutId, String name, String languageId)
          Updates the name of the layout matching the group, layout ID, and privacy.
static LayoutSoap updateName(long plid, String name, String languageId)
          Updates the name of the layout matching the primary key.
static LayoutSoap updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
          Updates the parent layout ID of the layout matching the group, layout ID, and privacy.
static LayoutSoap updateParentLayoutId(long plid, long parentPlid)
          Updates the parent layout ID of the layout matching the primary key.
static LayoutSoap updatePriority(long groupId, boolean privateLayout, long layoutId, int priority)
          Updates the priority of the layout matching the group, layout ID, and privacy.
static LayoutSoap updatePriority(long plid, int priority)
          Updates the priority of the layout matching the primary key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutServiceSoap

public LayoutServiceSoap()
Method Detail

addLayout

public static LayoutSoap addLayout(long groupId,
                                   boolean privateLayout,
                                   long parentLayoutId,
                                   String[] localeNamesMapLanguageIds,
                                   String[] localeNamesMapValues,
                                   String[] localeTitlesMapLanguageIds,
                                   String[] localeTitlesMapValues,
                                   String[] descriptionMapLanguageIds,
                                   String[] descriptionMapValues,
                                   String[] keywordsMapLanguageIds,
                                   String[] keywordsMapValues,
                                   String[] robotsMapLanguageIds,
                                   String[] robotsMapValues,
                                   String type,
                                   boolean hidden,
                                   String friendlyURL,
                                   ServiceContext serviceContext)
                            throws RemoteException
Adds a layout with additional parameters.

This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
parentLayoutId - the primary key of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID)
localeNamesMap - the layout's locales and localized names
localeTitlesMap - the layout's locales and localized titles
descriptionMap - the layout's locales and localized descriptions
keywordsMap - the layout's locales and localized keywords
robotsMap - the layout's locales and localized robots
type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
hidden - whether the layout is hidden
friendlyURL - the layout's friendly URL (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL or PropsValues.DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues. To see how the URL is normalized when accessed see FriendlyURLNormalizerUtil.normalize( String).
serviceContext - the service context. Must set the universally unique identifier (UUID) for the layout. Can set the creation date, modification date and the expando bridge attributes for the layout. For layouts that belong to a layout set prototype, an attribute named 'layoutUpdateable' can be used to specify whether site administrators can modify this page within their site.
Returns:
the layout
Throws:
PortalException - if a group with the primary key could not be found, if the group did not have permission to manage the layouts involved, or if layout values were invalid
SystemException - if a system exception occurred
RemoteException

addLayout

public static LayoutSoap addLayout(long groupId,
                                   boolean privateLayout,
                                   long parentLayoutId,
                                   String name,
                                   String title,
                                   String description,
                                   String type,
                                   boolean hidden,
                                   String friendlyURL,
                                   ServiceContext serviceContext)
                            throws RemoteException

This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
parentLayoutId - the primary key of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID)
name - Map the layout's locales and localized names
title - Map the layout's locales and localized titles
description - Map the layout's locales and localized descriptions
type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
hidden - whether the layout is hidden
friendlyURL - the layout's friendly URL (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL or PropsValues.DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues. To see how the URL is normalized when accessed see FriendlyURLNormalizerUtil.normalize( String).
serviceContext - the service context. Must set the universally unique identifier (UUID) for the layout. Can specify the creation date, modification date and the expando bridge attributes for the layout. For layouts that belong to a layout set prototype, an attribute named 'layoutUpdateable' can be used to specify whether site administrators can modify this page within their site.
Returns:
the layout
Throws:
PortalException - if a group with the primary key could not be found, if the group did not have permission to manage the layouts involved, or if layout values were invalid
SystemException - if a system exception occurred
RemoteException

deleteLayout

public static void deleteLayout(long groupId,
                                boolean privateLayout,
                                long layoutId,
                                ServiceContext serviceContext)
                         throws RemoteException
Deletes the layout with the primary key, also deleting the layout's child layouts, and associated resources.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
serviceContext - the service context
Throws:
PortalException - if the user did not have permission to delete the layout, if a matching layout could not be found , or if some other portal exception occurred
SystemException - if a system exception occurred
RemoteException

deleteLayout

public static void deleteLayout(long plid,
                                ServiceContext serviceContext)
                         throws RemoteException
Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.

Parameters:
plid - the primary key of the layout
serviceContext - the service context
Throws:
PortalException - if the user did not have permission to delete the layout, if a layout with the primary key could not be found , or if some other portal exception occurred
SystemException - if a system exception occurred
RemoteException

getAncestorLayouts

public static LayoutSoap[] getAncestorLayouts(long plid)
                                       throws RemoteException
Returns all the ancestor layouts of the layout.

Parameters:
plid - the primary key of the layout
Returns:
the ancestor layouts of the layout
Throws:
PortalException - if a matching layout could not be found or if a portal exception occurred
SystemException - if a system exception occurred
RemoteException

getDefaultPlid

public static long getDefaultPlid(long groupId,
                                  long scopeGroupId,
                                  boolean privateLayout,
                                  String portletId)
                           throws RemoteException
Returns the primary key of the default layout for the group.

Parameters:
groupId - the primary key of the group
scopeGroupId - the primary key of the scope group. See ServiceContext#getScopeGroupId().
privateLayout - whether the layout is private to the group
portletId - the primary key of the portlet
Returns:
Returns the primary key of the default layout group; LayoutConstants.DEFAULT_PLID otherwise
Throws:
PortalException - if a group, layout, or portlet with the primary key could not be found
SystemException - if a system exception occurred
RemoteException

getDefaultPlid

public static long getDefaultPlid(long groupId,
                                  long scopeGroupId,
                                  String portletId)
                           throws RemoteException
Throws:
RemoteException

getLayoutByUuidAndGroupId

public static LayoutSoap getLayoutByUuidAndGroupId(String uuid,
                                                   long groupId,
                                                   boolean privateLayout)
                                            throws RemoteException
Throws:
RemoteException

getLayoutName

public static String getLayoutName(long groupId,
                                   boolean privateLayout,
                                   long layoutId,
                                   String languageId)
                            throws RemoteException
Returns the name of the layout.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
languageId - the primary key of the language. For more information See Locale.
Returns:
the layout's name
Throws:
PortalException - if a matching layout could not be found
SystemException - if a system exception occurred
RemoteException

getLayoutReferences

public static LayoutReference[] getLayoutReferences(long companyId,
                                                    String portletId,
                                                    String preferencesKey,
                                                    String preferencesValue)
                                             throws RemoteException
Returns the layout references for all the layouts that belong to the company and belong to the portlet that matches the preferences.

Parameters:
companyId - the primary key of the company
portletId - the primary key of the portlet
preferencesKey - the portlet's preference key
preferencesValue - the portlet's preference value
Returns:
the layout references of the matching layouts
Throws:
SystemException - if a system exception occurred
RemoteException

getLayouts

public static LayoutSoap[] getLayouts(long groupId,
                                      boolean privateLayout)
                               throws RemoteException
Throws:
RemoteException

getLayouts

public static LayoutSoap[] getLayouts(long groupId,
                                      boolean privateLayout,
                                      long parentLayoutId)
                               throws RemoteException
Throws:
RemoteException

getLayouts

public static LayoutSoap[] getLayouts(long groupId,
                                      boolean privateLayout,
                                      long parentLayoutId,
                                      boolean incomplete,
                                      int start,
                                      int end)
                               throws RemoteException
Throws:
RemoteException

setLayouts

public static void setLayouts(long groupId,
                              boolean privateLayout,
                              long parentLayoutId,
                              long[] layoutIds,
                              ServiceContext serviceContext)
                       throws RemoteException
Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
parentLayoutId - the primary key of the parent layout
layoutIds - the primary keys of the layouts
serviceContext - the service context
Throws:
PortalException - if a group or layout with the primary key could not be found, if the group did not have permission to manage the layouts, if no layouts were specified, if the first layout was not page-able, if the first layout was hidden, or if some other portal exception occurred
SystemException - if a system exception occurred
RemoteException

unschedulePublishToLive

public static void unschedulePublishToLive(long groupId,
                                           String jobName,
                                           String groupName)
                                    throws RemoteException
Deletes the job from the scheduler's queue.

Parameters:
groupId - the primary key of the group
jobName - the job name
groupName - the group name (optionally DestinationNames.LAYOUTS_LOCAL_PUBLISHER). See DestinationNames.
Throws:
PortalException - if the group did not permission to manage staging and publish
SystemException - if a system exception occurred
RemoteException

unschedulePublishToRemote

public static void unschedulePublishToRemote(long groupId,
                                             String jobName,
                                             String groupName)
                                      throws RemoteException
Deletes the job from the scheduler's persistent queue.

Parameters:
groupId - the primary key of the group
jobName - the job name
groupName - the group name (optionally DestinationNames.LAYOUTS_LOCAL_PUBLISHER). See DestinationNames.
Throws:
PortalException - if a group with the primary key could not be found or if the group did not have permission to publish
SystemException - if a system exception occurred
RemoteException

updateLayout

public static LayoutSoap updateLayout(long groupId,
                                      boolean privateLayout,
                                      long layoutId,
                                      long parentLayoutId,
                                      String[] localeNamesMapLanguageIds,
                                      String[] localeNamesMapValues,
                                      String[] localeTitlesMapLanguageIds,
                                      String[] localeTitlesMapValues,
                                      String[] descriptionMapLanguageIds,
                                      String[] descriptionMapValues,
                                      String[] keywordsMapLanguageIds,
                                      String[] keywordsMapValues,
                                      String[] robotsMapLanguageIds,
                                      String[] robotsMapValues,
                                      String type,
                                      boolean hidden,
                                      String friendlyURL,
                                      Boolean iconImage,
                                      byte[] iconBytes,
                                      ServiceContext serviceContext)
                               throws RemoteException
Updates the layout.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
parentLayoutId - the primary key of the layout's new parent layout
localeNamesMap - the layout's locales and localized names
localeTitlesMap - the layout's locales and localized titles
descriptionMap - the locales and localized descriptions to merge (optionally null)
keywordsMap - the locales and localized keywords to merge (optionally null)
robotsMap - the locales and localized robots to merge (optionally null)
type - the layout's new type (optionally LayoutConstants.TYPE_PORTLET)
hidden - whether the layout is hidden
friendlyURL - the layout's new friendly URL (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL or PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues. To see how the URL is normalized when accessed see FriendlyURLNormalizerUtil.normalize( String).
iconImage - whether the icon image will be updated
iconBytes - the byte array of the layout's new icon image
serviceContext - the service context. Can set the modification date and expando bridge attributes for the layout.
Returns:
the updated layout
Throws:
PortalException - if a group or layout with the primary key could not be found, if the user did not have permission to update the layout, if a unique friendly URL could not be generated, if a valid parent layout ID to use could not be found, or if the layout parameters were invalid
SystemException - if a system exception occurred
RemoteException

updateLayout

public static LayoutSoap updateLayout(long groupId,
                                      boolean privateLayout,
                                      long layoutId,
                                      String typeSettings)
                               throws RemoteException
Updates the layout replacing its type settings.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
typeSettings - the settings to load the unicode properties object. See #fastLoad(String).
Returns:
the updated layout
Throws:
PortalException - if a matching layout could not be found or if the user did not have permission to update the layout
SystemException - if a system exception occurred
RemoteException

updateLookAndFeel

public static LayoutSoap updateLookAndFeel(long groupId,
                                           boolean privateLayout,
                                           long layoutId,
                                           String themeId,
                                           String colorSchemeId,
                                           String css,
                                           boolean wapTheme)
                                    throws RemoteException
Updates the look and feel of the layout.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
themeId - the primary key of the layout's new theme
colorSchemeId - the primary key of the layout's new color scheme
css - the layout's new CSS
wapTheme - whether the theme is for WAP browsers
Returns:
the updated layout
Throws:
PortalException - if a matching layout could not be found, or if the user did not have permission to update the layout and permission to apply the theme
SystemException - if a system exception occurred
RemoteException

updateName

public static LayoutSoap updateName(long groupId,
                                    boolean privateLayout,
                                    long layoutId,
                                    String name,
                                    String languageId)
                             throws RemoteException
Updates the name of the layout matching the group, layout ID, and privacy.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
name - the layout's new name
languageId - the primary key of the language. For more information see Locale.
Returns:
the updated layout
Throws:
PortalException - if a matching layout could not be found, if the user did not have permission to update the layout, or if the new name was null
SystemException - if a system exception occurred
RemoteException

updateName

public static LayoutSoap updateName(long plid,
                                    String name,
                                    String languageId)
                             throws RemoteException
Updates the name of the layout matching the primary key.

Parameters:
plid - the primary key of the layout
name - the name to be assigned
languageId - the primary key of the language. For more information see Locale.
Returns:
the updated layout
Throws:
PortalException - if a layout with the primary key could not be found, or if the user did not have permission to update the layout, or if the name was null
SystemException - if a system exception occurred
RemoteException

updateParentLayoutId

public static LayoutSoap updateParentLayoutId(long groupId,
                                              boolean privateLayout,
                                              long layoutId,
                                              long parentLayoutId)
                                       throws RemoteException
Updates the parent layout ID of the layout matching the group, layout ID, and privacy.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
parentLayoutId - the primary key to be assigned to the parent layout
Returns:
the matching layout
Throws:
PortalException - if a valid parent layout ID to use could not be found, if a matching layout could not be found, or if the user did not have permission to update the layout
SystemException - if a system exception occurred
RemoteException

updateParentLayoutId

public static LayoutSoap updateParentLayoutId(long plid,
                                              long parentPlid)
                                       throws RemoteException
Updates the parent layout ID of the layout matching the primary key. If a layout matching the parent primary key is found, the layout ID of that layout is assigned, otherwise LayoutConstants.DEFAULT_PARENT_LAYOUT_ID is assigned.

Parameters:
plid - the primary key of the layout
parentPlid - the primary key of the parent layout
Returns:
the layout matching the primary key
Throws:
PortalException - if a layout with the primary key could not be found, if the user did not have permission to update the layout, or if a valid parent layout ID to use could not be found
SystemException - if a system exception occurred
RemoteException

updatePriority

public static LayoutSoap updatePriority(long groupId,
                                        boolean privateLayout,
                                        long layoutId,
                                        int priority)
                                 throws RemoteException
Updates the priority of the layout matching the group, layout ID, and privacy.

Parameters:
groupId - the primary key of the group
privateLayout - whether the layout is private to the group
layoutId - the primary key of the layout
priority - the layout's new priority
Returns:
the updated layout
Throws:
PortalException - if a matching layout could not be found or if the user did not have permission to update the layout
SystemException - if a system exception occurred
RemoteException

updatePriority

public static LayoutSoap updatePriority(long plid,
                                        int priority)
                                 throws RemoteException
Updates the priority of the layout matching the primary key.

Parameters:
plid - the primary key of the layout
priority - the layout's new priority
Returns:
the updated layout
Throws:
PortalException - if a layout with the primary key could not be found
SystemException - if a system exception occurred
RemoteException

Liferay 6.1.2-ce-ga3