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

Class ComposeCatalogEntryMerchandisingAssociationsTaskCmdImpl

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


    public class ComposeCatalogEntryMerchandisingAssociationsTaskCmdImpl
    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 ComposeCatalogEntryDetailsTaskCmdImpl to populate the Show BOD according to Details profile and populates following additional field as required for MerchandisingAssociations profile.
    • /CatalogEntry/Association(quantity sequence)
    • /CatalogEntry/Association(quantity sequence)/Name
    • /CatalogEntry/Association(quantity sequence)/AssociationCodeType
    • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/displayName
    • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/CatalogEntryIdentifier/UniqueID
    • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/CatalogEntryIdentifier/ExternalIdentifier(ownerID)
    • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/CatalogEntryIdentifier/ExternalIdentifier(ownerID)/PartNumber
    See Also:
    Serialized Form
    • 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

      • ComposeCatalogEntryMerchandisingAssociationsTaskCmdImpl

        public ComposeCatalogEntryMerchandisingAssociationsTaskCmdImpl()
        The Constructor of this commands retrieves the command key for instantiating compose task command for details 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 - an 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. It uses CatalogEntryDataBean AttributeDataBean AttributeValueDataBean CatalogEntryDataBean RelatedBundleDataBean RelatedDynamicKitDataBean RelatedItemDataBean RelatedProductDataBean RelatedPackageDataBean to populate following data in Catalog Entry Show BOD.
        • /CatalogEntry/Association(quantity sequence)
        • /CatalogEntry/Association(quantity sequence)/Name
        • /CatalogEntry/Association(quantity sequence)/AssociationCodeType
        • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/displayName
        • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/CatalogEntryIdentifier/UniqueID
        • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/CatalogEntryIdentifier/ExternalIdentifier(ownerID)
        • /CatalogEntry/Association(quantity sequence)/CatalogEntryReference(catalogEntryTypeCode)/CatalogEntryIdentifier/ExternalIdentifier(ownerID)/PartNumber
        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