com.ibm.commerce.interestitems.commands

Class InterestItemAddCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, InterestItemAddCmd, Protectable, 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


    public class InterestItemAddCmdImpl
    extends ControllerCommandImpl
    implements InterestItemAddCmd
    The InterestItemAdd command adds one or more products to one or more shopper's interest item lists. For example, to add three catalog entries with ID 15, 16, and 17 to certain interest item list, you can pass catEntryId_1=15&catEntryId_2=16&catEntryId_3=17 to the command. If you call the individual set method to pass the above parameters, you need to create a hashtable and add the following to the hashtable:
    • hashtable.put(new Integer(1), new String("15"));
    • hashtable.put(new Integer(2), new String("16"));
    • hashtable.put(new Integer(3), new String("17"));
    then passed the hashtable to the method setCatEntryId(Hashtable).
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String CLASSNAME
        The fully qualified name of this class.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InterestItemAddCmdImpl

        public InterestItemAddCmdImpl()
        No value constructor.
    • Method Detail

      • checkIsAllowed

        public void checkIsAllowed(AccessVector resource,
                                   java.lang.String action)
                            throws ECException
        Check to see if user can perform action on resource. This is called by the command to perform resource level access control check in addition to the resources returned by the getResources() method.

        Parameters:
        resource - AccessVector - the resource to be acted on
        action - String - action to be performed on the resource
        Throws:
        ECException
      • getResolvedRequestProperties

        public TypedProperty getResolvedRequestProperties()
        Description copied from class: ControllerCommandImpl
        This method gets the resolved request properties associated with this command. This method is called after a controller command has been executed successfully. It returns a Hashtable of name/value pairs of interpreted request properties. This method needs to be implemented for all commands that accept wild card parameter values and where user traffic data monitoring is desired. The default implementation returns null. The command will return only the properties with expanded parameter values.
        Specified by:
        getResolvedRequestProperties in interface ControllerCommand
        Overrides:
        getResolvedRequestProperties in class ControllerCommandImpl
        Returns:
        This method returns the request properties.
      • getResourceOwners

        public java.lang.Long[] getResourceOwners()
                                           throws ECException
        Description copied from class: ControllerCommandImpl
        This method gets all the organization units that own the resources accessed by this command. It returns null if no resource is being accessed by this command. This method was used in WebSphere Commerce 5.1 for command level access control checking. It is no longer required. It is kept for backward compatibility. The default implementation returns null.
        Specified by:
        getResourceOwners in interface AccCommand
        Overrides:
        getResourceOwners in class ControllerCommandImpl
        Returns:
        This method returns an array of Long objects that represents all the organization unit reference numbers. A site owner is represented by an organization unit value of -1.
        Throws:
        ECException
      • 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 com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        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 com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setAttrName

        public void setAttrName(java.util.Hashtable ahshAttrName)
        Description copied from interface: InterestItemAddCmd
        Sets the attribute name parameters (optional). The attribute name, together with the attribute value are used to determine an item.
        Specified by:
        setAttrName in interface InterestItemAddCmd
        Parameters:
        ahshAttrName - the hash table of attribute names
      • setAttrValue

        public void setAttrValue(java.util.Hashtable ahshAttrValue)
        Description copied from interface: InterestItemAddCmd
        Sets the attribute value parameters (optional). The attribute name, together with the attribute value are used to determine an item.
        Specified by:
        setAttrValue in interface InterestItemAddCmd
        Parameters:
        ahshAttrValue - the hash table of attribute values
      • setCatEntryId

        public void setCatEntryId(java.util.Hashtable ahshCatEntryId)
        Description copied from interface: InterestItemAddCmd
        Sets the catentry ID parameters.
        Specified by:
        setCatEntryId in interface InterestItemAddCmd
        Parameters:
        ahshCatEntryId - the hash table of catalog entry IDs
      • setField1

        public void setField1(java.util.Hashtable ahshField1)
        Description copied from interface: InterestItemAddCmd
        Sets the field1 parameters (optional).
        Specified by:
        setField1 in interface InterestItemAddCmd
        Parameters:
        ahshField1 - the hash table of custom fields
      • setField2

        public void setField2(java.util.Hashtable ahshField2)
        Description copied from interface: InterestItemAddCmd
        Sets the field2 parameters (optional).
        Specified by:
        setField2 in interface InterestItemAddCmd
        Parameters:
        ahshField2 - the hash table of custom fields
      • setField3

        public void setField3(java.util.Hashtable ahshField3)
        Description copied from interface: InterestItemAddCmd
        Sets the field3 parameters (optional).
        Specified by:
        setField3 in interface InterestItemAddCmd
        Parameters:
        ahshField3 - the hash table of custom fields
      • setListId

        public void setListId(java.lang.String[] asaListId)
        Specifies zero or more interest item lists from which to be added. In addition to interest item list reference numbers it can be specified as one of the special abbreviations ".", "*". If "." is specified, the GetCurrentIILists process task is invoked to obtain the shopper's current interest item lists. Then the command behaves as if the current interest item lists were specified. If GetCurrentIILists process task determines that there are no current interest item lists, the most recently updated item interest item list is used. If there is no interest item list at all, a new interest item list will be created. If "*" is specified, the command behaves as if all shopper's interest item lists were specified. If a specified interest item list no longer exists, it is not added. If this parameter is missing, this command behaves as if "." was specified.
        Specified by:
        setListId in interface InterestItemAddCmd
        Parameters:
        asaListId - the ListId
      • setListIdName

        public void setListIdName(java.lang.String[] asaListIdName)
        Specifies the names of name-value pairs to be added to the redirection URL. The values of the added name-value pairs are the reference numbers of the interest item lists specified by ListId. This is provided to make it possible to obtain the reference numbers of the interest item lists when ListId is not explicitly specified.
        Specified by:
        setListIdName in interface InterestItemAddCmd
        Parameters:
        asaListIdName - the array of names
      • setMemberId

        public void setMemberId(java.util.Hashtable ahshMemberId)
        Set the member id parameters. MemberId + PartNumber can be supplied in place of a CatentryId
        Specified by:
        setMemberId in interface InterestItemAddCmd
        Parameters:
        ahshMemberId - java.util.Hashtable
      • setPartNumber

        public void setPartNumber(java.util.Hashtable ahshPartNumber)
        Set the part number parameters. MemberId + PartNumber can be supplied in place of a CatentryId
        Specified by:
        setPartNumber in interface InterestItemAddCmd
        Parameters:
        ahshPartNumber - java.util.Hashtable
      • setQuantity

        public void setQuantity(java.util.Hashtable ahshQuantity)
        The quantity of the item to add.
        Specified by:
        setQuantity in interface InterestItemAddCmd
        Parameters:
        adQuantity - the quantity of the item
      • setUOM

        public void setUOM(java.util.Hashtable ahshUOM)
        Description copied from interface: InterestItemAddCmd
        Set the unit of measure parameters (optional). Used with quantity to calculate the normalized quantity
        Specified by:
        setUOM in interface InterestItemAddCmd
        Parameters:
        astrUOM - the UOM, used with quantity to calculate the normalized quantity
      • setUpdateable

        public void setUpdateable(java.util.Hashtable ahshUpdateable)
        updateable={ 1 | 0 } If updateable=1: Add a new record. Update the record if already exists. updateable=0: Add a new record. Throw an exception if the record already exists. updateable is not specified: Default to 1(Update)
        Specified by:
        setUpdateable in interface InterestItemAddCmd
        Parameters:
        anUpdatable - the updatable flag