com.ibm.commerce.pagelayout.widgetdefinition.cache

Class WidgetDefinitionCache

  • java.lang.Object
    • com.ibm.commerce.pagelayout.widgetdefinition.cache.WidgetDefinitionCache


  • public class WidgetDefinitionCache
    extends java.lang.Object
    The dynamic cache for widget definitions. It supports retrieving widget definition based on either the UniqueID or the combination of Identifier and Store ID.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copy right field.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static com.ibm.commerce.pagelayout.facade.datatypes.WidgetDefinitionType getWidgetDefinition(java.lang.Long widgetDefinitionUniqueID, java.lang.Integer storeId, java.lang.String accessProfile)
      This method retrieves the widget definition based on the widget definition unique ID specified and store id.
      static com.ibm.commerce.pagelayout.facade.datatypes.WidgetDefinitionType getWidgetDefinition(java.lang.String widgetDefinitionIdentifier, java.lang.Integer storeId, java.lang.String accessProfile)
      This method retrieves the widget definition based on the identifier and store specified.
      static boolean isCachingEnabledForAccessProfile(java.lang.String accessProfile)
      This method checks if caching is enabled for the access profile specified.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copy right field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WidgetDefinitionCache

        public WidgetDefinitionCache()
    • Method Detail

      • getWidgetDefinition

        public static com.ibm.commerce.pagelayout.facade.datatypes.WidgetDefinitionType getWidgetDefinition(java.lang.Long widgetDefinitionUniqueID,
                                                                                                            java.lang.Integer storeId,
                                                                                                            java.lang.String accessProfile)
                                                                                                     throws PageLayoutApplicationException
        This method retrieves the widget definition based on the widget definition unique ID specified and store id.
        Parameters:
        widgetDefinitionUniqueID - The widget definition's unique ID
        storeId - The store id. If store id is not specified, the store id in current context will be used.
        accessProfile - The access profile to use while fetching the noun
        Returns:
        The widget definition Logical SDO if found. Null, if the unique ID does not exist.
        Throws:
        PageLayoutApplicationException - When retrieval from the data cache fails.
      • isCachingEnabledForAccessProfile

        public static boolean isCachingEnabledForAccessProfile(java.lang.String accessProfile)
        This method checks if caching is enabled for the access profile specified. Caching is configured in the CachedAccessProfilesForWidgetDefinition extended configuration.
        Parameters:
        accessProfile - The access profile to check
        Returns:
        True, if caching is enabled. False, otherwise.
      • getWidgetDefinition

        public static com.ibm.commerce.pagelayout.facade.datatypes.WidgetDefinitionType getWidgetDefinition(java.lang.String widgetDefinitionIdentifier,
                                                                                                            java.lang.Integer storeId,
                                                                                                            java.lang.String accessProfile)
                                                                                                     throws PageLayoutApplicationException
        This method retrieves the widget definition based on the identifier and store specified. It looks for the widget definition in the stores related to the store ID specified to return the first matching widget definition. The store relationship used is ECConstants.EC_STRELTYP_VIEW.
        Parameters:
        widgetDefinitionIdentifier - The widget definition's identifier.
        storeId - The store Id
        accessProfile - The access profile to use for fetching the noun.
        Returns:
        The widget definition if found. Null, otherwise.
        Throws:
        PageLayoutApplicationException - When the data retrieval from the cache fails.