com.ibm.commerce.catalog.facade.server.commands

Class ComposeCatalogEntryDetailsTaskCmdImpl

  • java.lang.Object
    • com.ibm.commerce.catalog.facade.server.commands.ComposeCatalogEntryDetailsTaskCmdImpl
  • All Implemented Interfaces:
    ComposeCatalogEntryTaskCmd, com.ibm.websphere.command.Command, java.io.Serializable


    public class ComposeCatalogEntryDetailsTaskCmdImpl
    extends java.lang.Object
    implements ComposeCatalogEntryTaskCmd
    This compose task command is called from AbstractFetchCatalogEntrySOICmdImpl. It populates the Catalog Entry Show BOD using CatalogEntryDataBean. It calls the ComposeCatalogEntrySummaryTaskCmdImpl to populate the Show BOD according to Summary profile and populates following additional field as required for Details profile.
    • /CatalogEntry/Description(language)/FullImage
    • /CatalogEntry/Description(language)/LongDescription
    • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)
    • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/Name
    • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/Description
    • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/StringValue/Value
    • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/IntegerValue/Value
    • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/FloatValue/Value
    One of the Attributes/Names will be set to "displayTemplate" and Attributes/StringValue/Value will be set to the associated display template (most probably a jsp file) for this catalog entry.
    Moreover since the command uses the CatalogEntryDataBean, it can be used for all types of catalog entries: products, SKUs, bundles and kits.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ComposeCatalogEntryDetailsTaskCmdImpl()
      The Constructor of this commands retrieves the command key for instantiating compose task command for summary to be used in this command.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void execute()
      The method contains the actual business logic of this task command.
      CatalogEntryType getCatalogEntry()
      This method retrieves CatalogEntryType.
      boolean isReadyToCallExecute()
      This method is called before calling execute() method to check if a non null object of CatalogEntryDataBean is present which is used to retrieve data required to populate CatalogEntryType.
      void reset()
      This method is used to reset the objects of CatalogEntryDataBean and CatalogEntryType to null value after processing is done.
      void setCatalogEntry(java.util.ArrayList avCatalogEntry)
      This method sets an ArrayList object containing CatalogEntryDataBean which is used to populate CatalogEntryType.
      • Methods inherited from class java.lang.Object

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

      • ComposeCatalogEntryDetailsTaskCmdImpl

        public ComposeCatalogEntryDetailsTaskCmdImpl()
        The Constructor of this commands retrieves the command key for instantiating compose task command for summary to be used in this command.
    • Method Detail

      • setCatalogEntry

        public void setCatalogEntry(java.util.ArrayList avCatalogEntry)
        This method sets an ArrayList object containing CatalogEntryDataBean which is used to populate CatalogEntryType.
        Specified by:
        setCatalogEntry in interface ComposeCatalogEntryTaskCmd
        Parameters:
        avCatalogEntry - - a list of catalogDataBean.
      • execute

        public void execute()
                     throws com.ibm.websphere.command.CommandException
        The method contains the actual business logic of this task command. It uses CatalogEntryDataBean AttributeDataBean and AttributeValueDataBean to populate following data in catalog entry Show BOD:
        • /CatalogEntry/Description(language)/FullImage
        • /CatalogEntry/Description(language)/LongDescription
        • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)
        • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/Name
        • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/Description
        • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/StringValue/Value
        • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/IntegerValue/Value
        • /CatalogEntry/CatalogEntryAttributes/Attributes(displaySequence language usage)/FloatValue/Value
        One of the Attributes/Names will be set to "displayTemplate" and Attributes/StringValue/Value will be set to the associated display template (most probably a jsp file) for this catalog entry.
        Specified by:
        execute in interface com.ibm.websphere.command.Command
        Throws:
        com.ibm.websphere.command.CommandException - This exception is raised when a command key is not present in the command registry.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method is called before calling execute() method to check if a non null object of CatalogEntryDataBean is present which is used to retrieve data required to populate CatalogEntryType.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Returns:
        Returns true if object of CatalogEntryDataBean is not null, else returns false.
      • reset

        public void reset()
        This method is used to reset the objects of CatalogEntryDataBean and CatalogEntryType to null value after processing is done.
        Specified by:
        reset in interface com.ibm.websphere.command.Command