public class PageLayoutFacadeClient extends AbstractPageLayoutFacadeClient
This class provides common methods that this and other utility class to the PageLayout facade can use. This class also provides a set of convenient Java API to represent particular PageLayout operations. This set of Java API also include APIs for Web based requests to transform the name value pair request into the appropriate request documents.
CHANGE_VERB_ACTION_ADD, CHANGE_VERB_ACTION_CHANGE, CHANGE_VERB_ACTION_CREATE, CHANGE_VERB_ACTION_DELETE, CHANGE_VERB_ACTION_UPDATE
Constructor and Description |
---|
PageLayoutFacadeClient()
Creates an instance of the client to communicate with the PageLayout facade.
|
PageLayoutFacadeClient(BusinessContextType businessContext,
javax.security.auth.callback.CallbackHandler callbackHandler)
Creates an instance of the client to communicate with the PageLayout facade.
|
Modifier and Type | Method and Description |
---|---|
static ExpressionType |
buildGetWidgetDefinitionByWidgetTypesExpression(java.util.Map parameters)
This method constructs the expression to retrieve widget definitions based on the widget types specified.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
createLayouts(java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> layouts)
This method creates a given list of Layouts by invoking the ProcessLayout service.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
createPages(java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> pages)
This method creates a given list of Pages by invoking the ProcessPage service.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
fetchAllLayouts(java.lang.String accessProfile,
boolean isTemplate)
This method returns either all Layouts or all Layout Templates for the current store path & site based on the given isTemplate flag.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
fetchAllPages(java.lang.String accessProfile,
java.lang.String dataLanguageIDs)
This method fetches all the Pages for the current store path as well as the site.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
fetchAllURLConfigurablePages(java.lang.String isURLConfigurable,
java.lang.String accessProfile,
java.lang.String dataLanguageIDs)
This method fetches all the URL configurable Pages for the current store path as well as the site.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.LayoutType>> |
fetchDefaultLayoutsByLayoutGroups(java.util.Set<java.lang.String> layoutGroups,
java.util.Set<java.lang.String> deviceClasses,
java.lang.String accessProfile)
This method fetches default Layouts by Layout Groups & Device Classes.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
fetchLayoutsById(java.util.List<java.lang.String> uniqueIdList,
java.lang.String accessProfile)
This method returns the layouts with given Unique Ids in the current store.
|
java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
fetchLayoutsByNamesForStore(java.util.Set<java.lang.String> names,
java.lang.String storeId,
java.lang.String accessProfile)
This method fetches Layout nouns by names for a given Store ID.
|
java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
fetchLayoutsByOwnerID(java.lang.String ownerId,
java.lang.String accessProfile)
This method fetches Layout nouns by ownerID.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
fetchLayoutsByPage(java.lang.String pageGroup,
java.lang.String pageId,
java.lang.String accessProfile)
This method returns all the applicable layouts for the given Page Group and Page Id in the current store.
|
java.util.List |
fetchLayoutTemplatesByDeviceClass(java.lang.String deviceClass,
java.lang.String accessProfile)
This method returns the list of Layout templates by device type.
|
com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType |
fetchPageDesign(java.lang.String pageGroup,
java.lang.String objectIdentifier,
java.lang.String deviceClass,
java.lang.String accessProfile,
java.util.Map<java.lang.String,java.lang.String> controlParams)
This method fetches a Page Design for the given Page Group and the Object Identifier of the Object being rendered in the Store Page.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
fetchPagesById(java.util.List<java.lang.String> uniqueIdList,
java.lang.String accessProfile,
java.lang.String dataLanguageIDs)
This method returns the pages with given Unique Ids in the current store path.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
fetchPagesByNames(java.util.List<java.lang.String> pageNames,
java.lang.String accessProfile)
This method returns the pages with given names for the current store path & site
|
java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
fetchPagesByNamesForStore(java.util.Set<java.lang.String> names,
java.lang.String storeId,
java.lang.String accessProfile,
java.lang.String dataLanguageIDs)
This method fetches Page nouns by names for a given Store ID.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
fetchPagesByPageGroup(java.lang.String pageGroup,
java.lang.String accessProfile,
java.lang.String dataLanguageIDs)
This method returns a list of Page nouns fetching by page group.
|
java.util.List |
getWidgetDefinitionByIdentifier(java.lang.String widgetIdentifier,
java.lang.String accessProfile)
This method returns the widget definition based on the widgets external identifier.
|
java.util.List |
getWidgetDefinitionByUniqueId(java.lang.String widgetId,
java.lang.String accessProfile)
This method returns the widget definition based on the widgets uniqueId.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.WidgetDefinitionType> |
getWidgetDefinitionByUniqueIds(java.util.List<java.lang.String> widgetId,
java.lang.String accessProfile)
This method returns the widget definition based on the widgets uniqueId.
|
java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> |
searchLayouts(java.lang.String name,
java.lang.String accessProfile,
java.util.Map<java.lang.String,java.lang.String> controlParams)
This method returns a list of Layout nouns that satisfies the search criteria.
|
java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.PageType> |
searchPagesByName(java.lang.String name,
java.lang.String accessProfile,
java.lang.String dataLanguageIDs)
This method returns a Map of Page nouns with the Page name as the key.
|
changeLayout, changePage, getLayout, getLayout, getLayout, getPage, getPage, getPage, getPageDesign, getPageDesign, getPageDesign, getWidgetDefinition, getWidgetDefinition, getWidgetDefinition, processLayout, processPage
createActionExpression, createChangeVerb, createGetVerb, createGetVerb, createProcessVerb, createSyncVerb
public PageLayoutFacadeClient()
public PageLayoutFacadeClient(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler)
businessContext
- The default business context to associate with the messages
when making requests.callbackHandler
- Used for authentication purposes so the controller can give
the authentication information to the transport when required.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> fetchPagesById(java.util.List<java.lang.String> uniqueIdList, java.lang.String accessProfile, java.lang.String dataLanguageIDs) throws PageException
uniqueIdList
- The list of Unique Ids for pages.accessProfile
- The access profile.dataLanguageIDs
- The comma separated list of data language ids for which the SEO properties need to be returned.
This parameter is required only for access profiles that return the SEO properties.PageException
public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> fetchPagesByNames(java.util.List<java.lang.String> pageNames, java.lang.String accessProfile) throws PageException
pageNames
- The list of page nameaccessProfile
- The access profile to use. If no access profile is specified, IBM_Store_Summary is used.PageException
public java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.PageType> fetchPagesByNamesForStore(java.util.Set<java.lang.String> names, java.lang.String storeId, java.lang.String accessProfile, java.lang.String dataLanguageIDs) throws PageException
names
- The given set of names.storeId
- The given Store ID.accessProfile
- The access profile to use to fetch the Page nouns.dataLanguageIDs
- The comma separated list of data language ids for which the SEO properties need to be returned.
This parameter is required only for access profiles that return the SEO properties.PageException
- If any exception occurs.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> fetchAllPages(java.lang.String accessProfile, java.lang.String dataLanguageIDs) throws PageException
accessProfile
- The access profile to use to fetch the Page nouns.dataLanguageIDs
- The comma separated list of data language ids for which the SEO properties need to be returned.
This parameter is required only for access profiles that return the SEO properties.PageException
- If any exception occurs.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> fetchAllURLConfigurablePages(java.lang.String isURLConfigurable, java.lang.String accessProfile, java.lang.String dataLanguageIDs) throws PageException
isURLConfigurable
- The flag to indicate if the page is URL configurable or not. The value could be 'true' or 'false'.accessProfile
- The access profile to use to fetch the Page nouns.dataLanguageIDs
- The comma separated list of data language ids for which the SEO properties need to be returned.
This parameter is required only for access profiles that return the SEO properties.PageException
- If any exception occurs.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> fetchPagesByPageGroup(java.lang.String pageGroup, java.lang.String accessProfile, java.lang.String dataLanguageIDs) throws PageException
pageGroup
- The page group to use for fetching the Pages. Cannot be null or empty.accessProfile
- The Access Profile to use for fetching the Page nouns. Cannot be null or empty.dataLanguageIDs
- The comma separated list of data language ids for which the SEO properties need to be returned.PageException
- If any exception occurs.public java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.PageType> searchPagesByName(java.lang.String name, java.lang.String accessProfile, java.lang.String dataLanguageIDs) throws PageException
name
- The name of the Page to search for. It can contain wild cards(*). Cannot be null or empty.accessProfile
- The Access Profile to use for fetching the Page nouns. Cannot be null or empty.dataLanguageIDs
- The comma separated list of data language ids for which the SEO properties need to be returned.
This parameter is required only for access profiles that return the SEO properties.PageException
- If any exception occurs.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> createPages(java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageType> pages) throws PageException
pages
- the given list of Pages to create.PageException
- If there are any errors while creating the Pages.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> fetchAllLayouts(java.lang.String accessProfile, boolean isTemplate) throws LayoutException
accessProfile
- The access profile.isTemplate
- Flag that indicates whether to return all Layouts or all Layout Templates.
false: Returns all Layouts for the current store path & site.
true: Returns all Layout Templates for the current store path & site.LayoutException
public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> fetchLayoutsById(java.util.List<java.lang.String> uniqueIdList, java.lang.String accessProfile) throws LayoutException
uniqueIdList
- The list of Unique Ids for layouts.accessProfile
- The access profile.LayoutException
public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> fetchLayoutsByPage(java.lang.String pageGroup, java.lang.String pageId, java.lang.String accessProfile) throws LayoutException
pageGroup
- The Page Group.
Three Page Groups are supported: 1) Category 2) CatalogEntry 3) Content.pageId
- The Page Id.
1) For Category Page, the Page Id is the Catalog Group Id that represents the Category;
2) For CatalogEntry Page, the Page Id is the Catalog Entry Id;
3) For Content Page, the Page Id is the Unique Id of the Content Page.accessProfile
- The access profile.LayoutException
public java.util.List fetchLayoutTemplatesByDeviceClass(java.lang.String deviceClass, java.lang.String accessProfile) throws LayoutException
deviceClass
- The device type of the templateaccessProfile
- The access profile.LayoutType
object.LayoutException
- if an error is encountered.public java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> fetchLayoutsByNamesForStore(java.util.Set<java.lang.String> names, java.lang.String storeId, java.lang.String accessProfile) throws LayoutException
names
- The given set of names.storeId
- The given Store ID.accessProfile
- The access profile to use to fetch the Layout nouns.LayoutException
- If any exception occurs.public java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> fetchLayoutsByOwnerID(java.lang.String ownerId, java.lang.String accessProfile) throws LayoutException
ownerId
- The owner of the layout. FK to member table.accessProfile
- The access profile to use to fetch the Layout nouns.LayoutException
- If any exception occurs.public java.util.Map<java.lang.String,java.util.Map<java.lang.String,com.ibm.commerce.pagelayout.facade.datatypes.LayoutType>> fetchDefaultLayoutsByLayoutGroups(java.util.Set<java.lang.String> layoutGroups, java.util.Set<java.lang.String> deviceClasses, java.lang.String accessProfile) throws LayoutException
layoutGroups
- The given set of Layout Groups.deviceClasses
- The given set of Device Classes.accessProfile
- The access profile to use to fetch the Layout nouns.LayoutException
- If any exception occurs.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> searchLayouts(java.lang.String name, java.lang.String accessProfile, java.util.Map<java.lang.String,java.lang.String> controlParams) throws LayoutException
name
- The name of the Layout to search for. It can contain wildcards(*).accessProfile
- The Access Profile to use for fetching the Layout nouns.controlParams
- The the control parameters map. The following control parameters can be specified:
_pgl.deviceClass
- The comma(,) separated list of device classes of Layouts, e.g. "Mobile,Web,Any".
If device classes are not specified, then the device classes of the Layout are simply ignored while searching Layouts._pgl.startDate
- The start date of the Layouts, e.g. "2009-01-01 00:00:00.0". If start date is specified,
then Layouts created on or after this start date are searched. If start date is not specified, then start dates of the Layouts are simply ignored while searching Layouts._pgl.endDate
- The end date of the Layouts, e.g. "2009-01-01 00:00:00.0". If end date is specified,
then Layouts created on or before this end date are searched. If end date is not specified, then end dates of the Layouts are simply ignored while searching Layouts._pgl.isTemplate
- Flag that indicates whether Layouts or Layout Templates need to be searched, e.g. "false".
If this parameter is not specified then both Layouts & Layout Templates are searched.LayoutException
- If any exception occurs.public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> createLayouts(java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.LayoutType> layouts) throws LayoutException
layouts
- the given list of Layouts to create.LayoutException
- If there are any errors while creating the Layouts.public java.util.List getWidgetDefinitionByUniqueId(java.lang.String widgetId, java.lang.String accessProfile) throws WidgetDefinitionException
widgetId
- - Unique ID of the widget.accessProfile
- - Access profile to use while making service call.WidgetDefinitionException
public java.util.List getWidgetDefinitionByIdentifier(java.lang.String widgetIdentifier, java.lang.String accessProfile) throws WidgetDefinitionException
widgetIdentifier
- - External identifier of the widget.accessProfile
- - Access profile to use while making service call.WidgetDefinitionException
public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.WidgetDefinitionType> getWidgetDefinitionByUniqueIds(java.util.List<java.lang.String> widgetId, java.lang.String accessProfile) throws WidgetDefinitionException
widgetId
- - Unique ID of the widget.accessProfile
- - Access profile to use while making service call.WidgetDefinitionException
public com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType fetchPageDesign(java.lang.String pageGroup, java.lang.String objectIdentifier, java.lang.String deviceClass, java.lang.String accessProfile, java.util.Map<java.lang.String,java.lang.String> controlParams) throws PageDesignException
pageGroup
- The Page Group of the Store Page, e.g. "Category"
.objectIdentifier
- The Object Identifier of the Object being rendered in the Store Page, e.g. "10008"
.deviceClass
- The Device Classes, e.g. "Mobile"
.accessProfile
- The access profile to use.controlParams
- (Optional) The Map of Control Parameters. Apart from parameters having the prefix
_pgl.
, all other control parameters are sent as Trigger Parameters to
the Marketing Engine while evaluating the Winning Layout.PageDesignException
- If any exception occurs.public static ExpressionType buildGetWidgetDefinitionByWidgetTypesExpression(java.util.Map parameters)
{_wcf.ap=$accessProfile$}/WidgetDefinition[(WidgetType=) and @includeInactiveWidgets=]
.parameters
- The input parameters to build the expression.