public class PageLayoutComponentHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM copyright field.
|
Constructor and Description |
---|
PageLayoutComponentHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
appendStringWithTimeStamp(java.lang.String astrString,
int anMaxLengthOfString)
Append a timestamp to a string and return the new string.
|
static com.ibm.commerce.pagelayout.facade.datatypes.WidgetPropertyType |
buildWidgetPropertyType(com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidgetNameValuePair widgetNVPPhysicalSDO)
This method builds WidgetPropertyType with the physical SDO object PageLayoutWidgetNameValuePair.
|
static java.lang.String |
formatXMLDateTime(java.util.Date date)
Formats a
Date object into an XML dateTime in the business context time zone with
SDODataTypeHelper.formatXMLDateTime(Date) . |
static java.util.Set<java.lang.String> |
getCatentryPageGroups()
Returns all the catalog entry page groups as a set.
|
static ChangeControlBusinessObjectMediator |
getChangeControlMediator(java.lang.Object noun)
Returns the ChangeControlMediator after initializing it with the noun being passed.
|
static java.lang.String |
getEMarketingSpotName(com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
Returns the name of E-Marketing Spot for the widget.
|
static java.lang.String |
getEMarketingSpotUniqueId(com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
Returns the unique id of E-Marketing Spot for the widget.
|
static java.lang.String |
getESpotStoreId(java.lang.String pageLocationStoreId,
java.lang.String objectStoreId)
This method returns the storeId where page location eSpot of type
'LAYOUTMARKETINGESPOT' should be created.
|
static java.lang.Object |
getExternalManagingToolValue(java.lang.Short internalManagingToolValue)
This method maps the internal value of managing tool to its external value.
|
static java.lang.Short |
getInternalLayoutStateValue(java.lang.String externalValue)
This method gets the internal value of the layout state.
|
static java.lang.Short |
getInternalManagingToolValue(java.lang.String managingTool)
This method converts the external managing tool value to its corresponding internal value.
|
static java.lang.Short |
getInternalSortByValue(java.lang.String externalValue)
This method gets the internal value of the sort by criteria.
|
static java.lang.Short |
getInternalSortOrderValue(java.lang.String externalValue)
This method returns the internal value for the sorting order
|
static java.lang.Integer |
getLanguageId()
This method gets the language ID from the service context.
|
static java.lang.Integer |
getLanguageId(com.ibm.commerce.pagelayout.facade.datatypes.AttributesType attrs)
Returns the language id of the attributes of extended data.
|
static java.lang.Integer[] |
getLanguageIds(SelectionCriteria searchCriteria)
Returns language ids in the search criteria.
|
static java.lang.Long |
getOwnerIdForStore(java.lang.Integer storeId)
Gets the owner Id for the given store.
|
static com.ibm.commerce.pagelayout.facade.datatypes.PageLayoutFactory |
getPageLayoutFactory()
This method returns the default instance of the PageLayout Factory.
|
static java.lang.Integer[] |
getPageLayoutStorePath()
This method returns the store path ids which the current store has the
'com.ibm.commerce.view' store relationship type with.
|
static java.util.List<com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget> |
getPhysicalWidgetsById(java.util.List<java.lang.String> widgetIdList)
This method gets the physical widgets by the Unique ID of widgets.
|
static java.lang.Integer |
getStoreId()
This method gets the store ID from the service context.
|
static java.lang.Integer |
getStoreIdForLayout(java.lang.String layoutId)
Returns the store id of the given page layout Id.
|
static java.util.List<java.lang.String> |
getSynonyms(java.lang.String keyword)
The method gets all the synonyms for the given keyword, only if the
UseSynonyms flex flow is enabled for current store.
|
static java.lang.Long |
getUserID()
This method returns the user ID of the user invoking the service.
|
static java.lang.String |
getWidgetIdentifier(java.lang.String widgetDefinitionUniqueID)
This method returns the widget identifier for the given widget definition unique id.
|
static java.util.Date |
getXMLDateTime(java.lang.Object dateObj)
Parses an XML dateTime into a
Date object with SDODataTypeHelper.getXMLDateTime(Object) . |
static boolean |
isCategoryOrCatentryPageGroup(java.lang.String pageGroupID)
Returns whether the given page group is a category or
catalog entry page group . |
static boolean |
isCatentryPageGroup(java.lang.String pageGroupID)
Returns whether the given page group is a
catalog entry page group . |
static boolean |
isCatentryPageGroupWithoutSubLevels(java.lang.String pageGroupID)
Returns whether the given page group is a
catalog entry page group that does not have sub level page groups. |
static java.lang.Boolean |
isPageComposerFeatureEnabled()
This method indicates if the page composer feature is enabled for the current
store.
|
static java.lang.Boolean |
isUseSynonymsEnabled()
This method gets whether the UseSynonyms flex flow is enabled for current
store, which delegates to
MarketingFacadeClient . |
static boolean |
isWidgetTypeAllowed(java.lang.String managingTool,
java.lang.String widgetType)
This method checks if the widget type is allowed for the managing tool specified.
|
static boolean |
requireEMarketingSpot(java.lang.String widgetDefinitionUniqueID)
This method return whether or not a widget definition needs a E-Marketing Spot in the specified store.
|
static com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayout |
resolveLayoutIdentifier(com.ibm.commerce.foundation.common.datatypes.LayoutIdentifierType layoutIdentifier)
This method resolves the layout identifier provided.
|
static java.util.List<ApplicationError> |
validateLayoutDesign(java.lang.String pageLayoutId)
This method validates if the existing design of the layout does not
contain any inactive widgets.
|
public static final java.lang.String COPYRIGHT
public static java.lang.Integer getStoreId()
public static boolean requireEMarketingSpot(java.lang.String widgetDefinitionUniqueID) throws PageLayoutApplicationException
widgetDefinitionUniqueID
- The unique id of the widget definition.PageLayoutApplicationException
- Exception is thrown when there is problem retrieving the widget defintion.public static java.lang.String getWidgetIdentifier(java.lang.String widgetDefinitionUniqueID) throws PageLayoutApplicationException
widgetDefinitionUniqueID
- The unique id of the widget definition.PageLayoutApplicationException
- Exception is thrown when there is problem retrieving the widget defintion.public static java.lang.Integer getStoreIdForLayout(java.lang.String layoutId) throws DataMediatorException
layoutId
- The unique id of the page layout.DataMediatorException
- Exception is thrown when there is problem retrieving the page layout from database.public static java.lang.Long getOwnerIdForStore(java.lang.Integer storeId)
storeId
- The store Id for which the owner needs to be returned.public static java.lang.String formatXMLDateTime(java.util.Date date)
Date
object into an XML dateTime in the business context time zone with
SDODataTypeHelper.formatXMLDateTime(Date)
.
If there are exceptions while formating, null is returned.date
- the Date
object.public static java.util.Date getXMLDateTime(java.lang.Object dateObj)
Date
object with SDODataTypeHelper.getXMLDateTime(Object)
.
If there are exceptions while parsing, null is returned.dateObj
- SDO representation of the XML dateTime.Date
object.public static java.lang.Boolean isPageComposerFeatureEnabled()
public static java.lang.Boolean isUseSynonymsEnabled() throws PageLayoutApplicationException
MarketingFacadeClient
.PageLayoutApplicationException
public static java.util.List<java.lang.String> getSynonyms(java.lang.String keyword) throws PageLayoutApplicationException
keyword
- The given keyword.PageLayoutApplicationException
public static java.lang.String appendStringWithTimeStamp(java.lang.String astrString, int anMaxLengthOfString)
astrString
- The string that will be appended by a timestamp.anMaxLengthOfString
- The max length of the string.public static java.lang.String getEMarketingSpotUniqueId(com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
aWidgetSDO
- The physical data object of the widget.public static com.ibm.commerce.pagelayout.facade.datatypes.WidgetPropertyType buildWidgetPropertyType(com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidgetNameValuePair widgetNVPPhysicalSDO)
widgetNVPPhysicalSDO
- The physical SDO object PageLayoutWidgetNameValuePairpublic static com.ibm.commerce.pagelayout.facade.datatypes.PageLayoutFactory getPageLayoutFactory()
public static java.lang.String getEMarketingSpotName(com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget aWidgetSDO)
aWidgetSDO
- The physical data object of the widget.public static java.lang.Integer[] getLanguageIds(SelectionCriteria searchCriteria)
searchCriteria
- The search criteria.public static java.lang.Integer getLanguageId() throws PageLayoutSystemException
PageLayoutSystemException
- Exception is thrown if the language ID could not be retrieved or returned null.public static java.lang.Integer[] getPageLayoutStorePath() throws PageLayoutApplicationException
PageLayoutApplicationException
- If an error occurs while retrieving storepath.public static java.lang.Integer getLanguageId(com.ibm.commerce.pagelayout.facade.datatypes.AttributesType attrs)
attrs
- The attributes of the extended data.public static java.util.List<com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayoutWidget> getPhysicalWidgetsById(java.util.List<java.lang.String> widgetIdList) throws DataMediatorException
widgetIdList
- The list of Unique ID for widgets.DataMediatorException
public static java.lang.String getESpotStoreId(java.lang.String pageLocationStoreId, java.lang.String objectStoreId)
pageLocationStoreId
- - storeId in which page layout association is being createdobjectStoreId
- - storeId of the object for which layout association is being
created (storeId of catalogEntry / catGroup / content page )public static ChangeControlBusinessObjectMediator getChangeControlMediator(java.lang.Object noun) throws java.lang.Exception
noun
- The noun for which to retrieve the change control mediator.java.lang.Exception
public static boolean isCategoryOrCatentryPageGroup(java.lang.String pageGroupID)
catalog entry page group
.pageGroupID
- The page group to check. If null or empty, false will be
returned.public static boolean isCatentryPageGroup(java.lang.String pageGroupID)
catalog entry page group
.pageGroupID
- The page group to check. If null or empty, false will be
returned.public static boolean isCatentryPageGroupWithoutSubLevels(java.lang.String pageGroupID)
catalog entry page group
that does not have sub level page groups.
This means it is a catalog entry page group but not a
PageLayoutServerConstants.PAGE_GROUP_PRODUCT
.pageGroupID
- The page group to check. If null or empty, false will be
returned.public static java.util.Set<java.lang.String> getCatentryPageGroups()
public static java.util.List<ApplicationError> validateLayoutDesign(java.lang.String pageLayoutId) throws AbstractApplicationException
pageLayoutId
- The unique ID of the pagelayout to be validated.AbstractApplicationException
public static java.lang.Long getUserID()
public static com.ibm.commerce.pagelayout.facade.server.entity.datatypes.PageLayout resolveLayoutIdentifier(com.ibm.commerce.foundation.common.datatypes.LayoutIdentifierType layoutIdentifier) throws AbstractApplicationException
layoutIdentifier
- The identifier to be resolved.AbstractApplicationException
- When the resolution fails.public static java.lang.Object getExternalManagingToolValue(java.lang.Short internalManagingToolValue)
ManagingToolNames
internalManagingToolValue
- The internal value of the managing toolpublic static boolean isWidgetTypeAllowed(java.lang.String managingTool, java.lang.String widgetType)
managingTool
- The tool managing the layout.widgetType
- The type of widget.public static java.lang.Short getInternalManagingToolValue(java.lang.String managingTool)
managingTool
- The external managing tool value.public static java.lang.Short getInternalLayoutStateValue(java.lang.String externalValue)
externalValue
- The external value of the state.public static java.lang.Short getInternalSortByValue(java.lang.String externalValue)
externalValue
- The external value of the sort by criteriapublic static java.lang.Short getInternalSortOrderValue(java.lang.String externalValue)
externalValue
- The external value specified in the query.