Class ResolveSkuCmdImpl

  • All Implemented Interfaces:
    ResolveSkuCmd,, ECCommand, ECTargetableCommand, TaskCommand,,,,,,

    public class ResolveSkuCmdImpl
    extends TaskCommandImpl
    implements ResolveSkuCmd
    This command first determines the type of CatalogEntry that is provided as input to the command. If it is a Package, then the PackageResolveSku command is called. If it is a Product, then first the command determines the distinct Attributes that are needed to resolve the Product into an orderable Item. For each of these Attributes, the command ensures that an appropriate AttributeValue has been supplied as input. Once these Attribute name-value pairs have been identified, the command resolves this information into an ItemId that represents the orderable Item. Also, the command sets the ItemSpecId to be the ItemSpecification for the resolved CatalogEntry. If Attributes are missing or are incorrect, the ErrorMissingAttributeErrorCmd or ErrorProductAttributeErrorCmd error tasks are launched respectively. If the type of CatalogEntry that is provided as input to the command is neither a Package nor a Product, then the command returns and sets the ItemId to be equal to the ProductId.
    See Also:
    Serialized Form
    • Field Detail


        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResolveSkuCmdImpl

        public ResolveSkuCmdImpl()
        No value constructor.
    • Method Detail

      • getItemId

        public java.lang.Long getItemId()
        Returns the ItemId that represents the primary key of the resolved Item
        Specified by:
        getItemId in interface ResolveSkuCmd
        java.lang.Long The Item ID.
      • getItemSpecId

        public java.lang.Long getItemSpecId()
        Returns the ItemSpecId that represents the ItemSpecification identifier for the resolved Item.
        Specified by:
        getItemSpecId in interface ResolveSkuCmd
        java.lang.Long The ID of the item specification.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Description copied from class: AbstractECTargetableCommand
        This method is called by the targetable command framework. This is where client side parameter checking is performed (before the execution of the command). The default implementation is to return true.
        Specified by:
        isReadyToCallExecute in interface
        isReadyToCallExecute in class AbstractECTargetableCommand
        This method returns a boolean value; true if we can execute the command and false otherwise. This default implementation will return true.
      • reset

        public void reset()
        Description copied from class: AbstractECTargetableCommand
        This method is called after a command has been executed. It is used to reset its states variables. After the call to reset, the command should be able to be executed again.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • setAttributeNVPs

        public void setAttributeNVPs(java.util.Hashtable ahshAttrNVPs)
        Sets the hashtable that represents the Attribute names and values that will be used to perform the Item resolution.
        Specified by:
        setAttributeNVPs in interface ResolveSkuCmd
        ahshAttrNVPs - java.util.Hashtable The Hash table of attribute names and values.
      • setProductId

        public void setProductId(java.lang.Long anProductNumber)
        Sets the ProductId that represents the primary key of the CatalogEntry that is to be resolved,
        Specified by:
        setProductId in interface ResolveSkuCmd
        anProductId - java.lang.Long The product ID.