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

Class ComposeCatalogEntryComponentsTaskCmdImpl

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


    public class ComposeCatalogEntryComponentsTaskCmdImpl
    extends java.lang.Object
    implements ComposeCatalogEntryTaskCmd
    This compose task command is called from AbstractFetchCatalogEntrySOICmdImpl and populates CatalogEntryNavigationRelationshipType or KitComponentType in Catalog Entry Show BOD. This compose command executes ComposeCatalogEntryDetailsTaskCmdImpl to populate Details access profile in Catalog Entry Show BOD before populating CatalogEntryNavigationRelationshipType or KitComponentType. The type of catalog entry will determine which type will be populated. If the catalog entry type is product then the CatalogEntryNavigationRelationshipType is populated. If the catalog entry type is bundle or kit, then KitComponentType is populated. This command uses CatalogEntryDataBean, passed by Fetch Task Commands, to populate Show BOD.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ComposeCatalogEntryComponentsTaskCmdImpl()
      The Constructor of this commands retrieves the command key for instantiating 'ComposeCatalogEntryDetailsTaskCmdImpl' 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

      • ComposeCatalogEntryComponentsTaskCmdImpl

        public ComposeCatalogEntryComponentsTaskCmdImpl()
        The Constructor of this commands retrieves the command key for instantiating 'ComposeCatalogEntryDetailsTaskCmdImpl' 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 - ArrayList object containing one or more CatalogEntryDataBean
      • execute

        public void execute()
                     throws com.ibm.websphere.command.CommandException
        The method contains the actual business logic of this task command. If the catalog entry is a product, then the command populates the following data for CatalogEntryNavigationRelationshipType in Catalog Entry Show BOD.
        • CatalogEntry/NavigationRelationship(@displaySequence)
        • CatalogEntry/NavigationRelationship/CatalogEntryReference(@catalogEntryTypeCode)
        • CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier/UniqueId
        • CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier(@ownerID)
        • CatalogEntry/NavigationRelationship/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/PartNumber
        • CatalogEntry/NavigationRelationship/CatalogEntryReference/DisplayName

        If the catalog entry is a bundle or kit, then the command populates the following data for KitComponentType in Catalog Entry Show BOD.
        • CatalogEntry/KitComponent(@Sequence)
        • CatalogEntry/KitComponent(@Quantity)
        • CatalogEntry/KitComponent(@KitComponentCodeType)
        • CatalogEntry/KitComponent/CatalogEntryReference(@catalogEntryTypeCode)
        • CatalogEntry/KitComponent/CatalogEntryReference/CatalogEntryIdentifier/UniqueId
        • CatalogEntry/KitComponent/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier(@ownerID)
        • CatalogEntry/KitComponent/CatalogEntryReference/CatalogEntryIdentifier/ExternalIdentifier/PartNumber
        • CatalogEntry/KitComponent/CatalogEntryReference/DisplayName
        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 registery.
      • 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