Class OrderProfileUpdateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderProfileUpdateCmd, Protectable,,,,,,

    public class OrderProfileUpdateCmdImpl
    extends ControllerCommandImpl
    implements OrderProfileUpdateCmd
    This is the default implementation of the OrderProfileUpdateCmd controller command.


    Default order profile consists of one or more of the following:

    • shipping address
    • billing address
    • shipping mode
    • payment information

    Order profile information is stored in three tables : ORDERS, ORDERITEMS and ORDPAYINFO. A record in the ORDERS table with a status 'Q' represents the default order profile. It may contain the billing address. A record in the ORDERITEMS table may contain the shipping mode and shipping address information. One or more records in the ORDPAYINFO table store payment information. Records in the ORDERITEMS and ORDPAYINFO tables reference the default profile record in the ORDERS table.

    Order profile can be configured per store or mall. A shopper can have an order profile for any store in a mall. A shopper may also have an order profile for a mall. If store order profile does not exist, mall order profile should be used. Parameter storeId is used to specify the store level of the order profile. Parameter storeEntity can specify the mall level of the order profile. If both parameters are specified storeEntity will be used. It is an error to specify the store id which does not belong to the store entity specified.

    A shopper can not have more than one default order profile.

    OrderProfileUpdate command creates a default order profile for the current shopper if the profile does not exist. The command updates the default profile if it already exists. The new payment information provided for the default order profile will completely overwrite the current payment information if it exists.

    While updating the order profile, if the address id for billing and shipping in the URL parameters are the same, only update the billing address. And use that new address id for both billing and shipping in the order profile. As nick name is a unique index for address, it is same for it as address id.

    Nick name can't be updated. You can't pass both address id and nick name for an address unless the nick name is same as the original one.

    All of the parameters of the command are optional except for 'URL' parameter.

    See Also:
    Serialized Form
    • Field Detail


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

      • OrderProfileUpdateCmdImpl

        public OrderProfileUpdateCmdImpl()
    • Method Detail

      • getBillingAddress

        public java.lang.Long getBillingAddress()
        Gets the default address to bill.
        address id.
      • getPaymentInfo

        public java.util.Hashtable getPaymentInfo()
        Gets the default payment information.
        payment information hashtable.
      • getShippingAddress

        public java.lang.Long getShippingAddress()
        Gets the default address to ship.
        address id.
      • getShippingMode

        public java.lang.Integer getShippingMode()
        Gets the default shipping mode.
        shipping mode id.
      • getStoreEntityId

        public java.lang.Integer getStoreEntityId()
        Gets store entity id.
        store entity id.
      • getUrl

        public java.lang.String getUrl()
        Gets redirection URL called after the command completes successfully.
      • reset

        public void reset()
        Resets the instance variables.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • setBillingAddress

        public void setBillingAddress(java.lang.Long anBillingAddress)
        Sets the default address to bill.
        Specified by:
        setBillingAddress in interface OrderProfileUpdateCmd
        anBillingAddress - java.lang.Long - billing address identifier
      • setPaymentInfo

        public void setPaymentInfo(java.util.Hashtable ahshPaymentInfo)
        Sets the default payment information.
        Specified by:
        setPaymentInfo in interface OrderProfileUpdateCmd
        ahshPaymentInfo - java.util.Hashtable - payment name-value pairs.
      • setShippingAddress

        public void setShippingAddress(java.lang.Long anShippingAddress)
        Sets the default address to ship.
        Specified by:
        setShippingAddress in interface OrderProfileUpdateCmd
        anShippingAddress - java.lang.Long - shipping address identifier
      • setShippingMode

        public void setShippingMode(java.lang.Integer newShippingMode)
        Sets the default shipping mode.
        Specified by:
        setShippingMode in interface OrderProfileUpdateCmd
        newShippingMode - java.lang.Integer - shipping mode identifier
      • setStoreEntityId

        public void setStoreEntityId(java.lang.Integer newStoreEntityId)
        Sets the store entity id.
        newStoreEntityId - store entity id.
      • setUrl

        public void setUrl(java.lang.String astrUrl)
        Sets redirection URL.
        astrUrl - URL.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method checks the input parameters of the command. It checks shipping address, billing address and ship mode. If any one of them is invalid, it throws an ECException. For shipping address, it is valid:
      • If the shipping address is allowed in the member's all contracts.
      • If the shipping address is not an allowable shipping address of all contracts, it should be owned by the current member. For billing address, it is valid:
      • If the billing address is allowed in the member's all contracts.
      • If the billing address is not an allowable billing address of all contracts, it should be owned by the current member. For shipping mode, it is valid if the shipping mode is an allowable shipping mode by all the member's contracts.
Specified by:
validateParameters in interface ECCommand
validateParameters in class AbstractECTargetableCommand