com.ibm.commerce.pagelayout.facade.server.commands

Class FetchPageDesignCmdImpl

  • All Implemented Interfaces:
    AbstractFetchNounCmd, FetchPageDesignCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
    Direct Known Subclasses:
    FetchPageDesignUsingDataCacheCmdImpl


    public class FetchPageDesignCmdImpl
    extends AbstractFetchNounCmdImpl
    implements FetchPageDesignCmd
    This command is used to fetch a Winning Layout for a Store Page at runtime for a given Page Group, Object Identifier (of the Object being rendered in the Store Page) and Device Class.

    It uses Marketing Engine as the execution engine for evaluating the Winning Layout. Refer to evaluateWinningLayout(PageDesignType) for more details on the evaluation of a Winning Layout.

    Refer to performExecute() for more details on the execution steps that this command follows.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class com.ibm.websphere.command.TargetableCommandImpl

        LOCAL
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Constructor Summary

      Constructors 
      Constructor and Description
      FetchPageDesignCmdImpl()
      This method is the default constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getFallBackDeviceClass(java.lang.String deviceClass)
      For a given deviceClass, this method returns the fall back device class defined in wc-component.xml under the extended configuration group DeviceClassDefaultLayoutFallback.
      static java.lang.String getFallBackPageGroup(java.lang.String pageGroup)
      For a given pageGroup, this method returns the fall back page group defined in wc-component.xml under the extended configuration group PageGroupDefaultLayoutFallback.
      java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType> getNouns()
      This method returns the list of nouns retrieved by the fetch implementation.
      void performExecute()
      This method performs the main execution logic of this command.
      void reset()
      This method resets the instance variables so the command can be reused.
      • Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl

        execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
      • Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl

        getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.websphere.command.Command

        execute, isReadyToCallExecute
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
    • Constructor Detail

      • FetchPageDesignCmdImpl

        public FetchPageDesignCmdImpl()
        This method is the default constructor.

        It sets the following:

        • The CatalogNavigationView Facade Client Instance.
        • The Marketing Facade Client Instance.
        • The access profile for fetching the Marketing Spot Data to IBM_Store_All.
        • The access profile for fetching the details of the Winning Layout to IBM_Widgets_With_Hierarchy.
    • Method Detail

      • reset

        public void reset()
        Description copied from class: AbstractFetchNounCmdImpl
        This method resets the instance variables so the command can be reused.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractFetchNounCmdImpl
        See Also:
        Command.reset()
      • getNouns

        public java.util.List<com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType> getNouns()
        Description copied from interface: AbstractFetchNounCmd
        This method returns the list of nouns retrieved by the fetch implementation.
        Specified by:
        getNouns in interface AbstractFetchNounCmd
        Returns:
        A list of nouns that matches the search expression.
      • getFallBackPageGroup

        public static java.lang.String getFallBackPageGroup(java.lang.String pageGroup)
        For a given pageGroup, this method returns the fall back page group defined in wc-component.xml under the extended configuration group PageGroupDefaultLayoutFallback.

        Parameters:
        pageGroup -
        Returns:
        fall back pageGroup
      • getFallBackDeviceClass

        public static java.lang.String getFallBackDeviceClass(java.lang.String deviceClass)
        For a given deviceClass, this method returns the fall back device class defined in wc-component.xml under the extended configuration group DeviceClassDefaultLayoutFallback.

        Parameters:
        deviceClass -
        Returns:
        fall back device class
      • performExecute

        public void performExecute()
                            throws java.lang.Exception
        This method performs the main execution logic of this command.

        It performs the following:

        1. Parses the XPath and creates the PageDesign Noun.
        2. Resolves the Layout by invoking resolveLayout(PageDesignType).
        3. If a layout is resolved in the resolveLayout(PageDesignType) method, it populates the PageDesign Noun with the details of the Resolved Layout by invoking populateLayoutDetails(PageDesignType).
        4. If no layout was returned by resolveLayout(PageDesignType), it populates the PageDesign Noun with the details of the default layout associated with the layout group and device class.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Specified by:
        performExecute in class com.ibm.websphere.command.TargetableCommandImpl
        Throws:
        java.lang.Exception - If any exception occurs.