com.ibm.commerce.order.commands

Class SetOrderTemplateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, SetOrderTemplateCmd, OrderConstants, 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 SetOrderTemplateCmdImpl
    extends ControllerCommandImpl
    implements OrderConstants, SetOrderTemplateCmd
    This is the default implementation of the SetOrderTemplateCmd controller command.

    Behaviour:

    • Orders are processed in ascending sequence of i.
    • The CheckOrderTemplateCmd task command is called for each of the specified orders to check whether the customer is allowed to mark or unmark that order.
    • If the customer is allowed, then the order is marked or unmarked in the ORDERTMPL table. The ResolveOrdersCmd task command is used, as specified by the usage_i parameter.

    Input parameters:

    Name Description
    forUser The logon ID of the user on whose behalf the command will be run. Only a person with the authority to process orders can specify this parameter.
    forUserId Same as forUser, but identifying the user by the internal user ID as found in the USERS table.
    langId Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
    URL (Required) The URL to be called when the command completes successfully.
    storeId Sets the store ID of the destination order. It is also used to resolve special abbreviations (".", "*", ".t", ".**.", and "*t") when they appear in fromOrderId_i, toOrderId, orderInfoFrom, and payInfoFrom. For example, the following command refers to all pending orders of member 1001 in store 1: fromOrderId_1=.&memberId_1=1001&storeId=1.
    orderId_i Specifies zero or more orders, using order reference numbers or one of the Order abbreviations ".", "*", ".t", "*t"
    memberId_i The reference number of a member, used to resolve special abbreviations (".", "*", ".t", ".**.", and "*t") when they appear in fromOrderId_i. For example, the following command refers to all pending orders of member 1001: fromOrderId_1=*&memberId_1=1001 The default value is the member ID of the current user. If the current customer attempts to access the orders of other customers but is not authorized to do so, an exception is thrown.
    usage_i If orderId_i is specified, a value for usage_i must also be specified. Specify 1 to mark the specified orders as current template orders for the customer executing this command. Specify 0 to mark the orders as (non-current) template orders for the customer, and specify -1 to unmark the specified orders for the customer.
    storeId_i The store reference number. It is used when evaluating the special abbreviations ".", "*", ".t", and "*t" for the value of the orderId_i parameter. If it is not specified, it defaults to the value provided by the storeId parameter. If neither storeId_i nor storeId are specified, then the special abbreviations are evaluated for all stores.
    outOrderName Specifies the name-value pairs to be added to the redirection URL. The value of each name-value pair is the reference number of the destination order. The default value is "orderId". This parameter can be repeated.

    Output parameters:

    None.

    Task commands called:

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • SetOrderTemplateCmdImpl

        public SetOrderTemplateCmdImpl()
        The default constructor.
    • Method Detail

      • checkIsAllowed

        public void checkIsAllowed(AccessVector resource,
                                   java.lang.String action)
                            throws ECException
        This method is reserved for IBM internal use only.
        Parameters:
        resource - An AccessVector that represents the vector of resource.
        action - A String that specifies the action.
        Throws:
        ECException
      • checkOrderTemplate

        public void checkOrderTemplate(OrderAccessBean aabOrder,
                                       java.lang.Integer anUsage)
                                throws ECException
        This method is Reserved for IBM internal use only.
        Parameters:
        aabOrder -
        anUsage -
        Throws:
        ECException
      • setGroups

        public void setGroups(SetOrderTemplateCmd.Group[] aGroups)
        This method sets the enumerationGroups.
        An enumerationGroup consists of:
        public Long inMemberId - memberId to resolve orderAbbreviations in the enumerationGroup.
        public Integer inStoreId - storeId to resolve orderAbbreviations in the enumerationGroup.
        public Integer inUsage - 0 to mark, 1 to mark as current, -1 to unmark.br> public String[] istrOrderAbbreviations - orderAbbreviations (for example '*').
        Specified by:
        setGroups in interface SetOrderTemplateCmd
        Parameters:
        aGroups - A Group[] that represents the enumerationGroups.
      • setOutOrderNames

        public void setOutOrderNames(java.lang.String[] astrOutOrderNames)
        This method sets the names of the orderId NVPs to be appended to the redirection URL.
        Specified by:
        setOutOrderNames in interface SetOrderTemplateCmd
        Parameters:
        astrOutOrderNames - A String[] that specifies the names of the orderId NVPs.