Class CreateShippingBillingAddressCmdImpl

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

    public class CreateShippingBillingAddressCmdImpl
    extends TaskCommandImpl
    implements CreateShippingBillingAddressCmd
    This command creates a shipping or billing address based on the member ID provided. This is called by BatchOrderRequestCmd during batch processing of a new order. 1. validateParameters checks whether the addressType equals to "S" or "B" and sets checkParametersOk to true 2. performExecute returns with INVALID_ADDRESS_TYPE if checkParameters is not true 3. performExecute retrieves from the ADDRESS table based on the member ID and user name in the Address (bill to/ship to) class. This is done using the EJB AddressAccessBean. 4. If no matching entry is found, the task command creates a new one based on the information.
    See Also:
    Serialized Form
    • Constructor Detail

      • CreateShippingBillingAddressCmdImpl

        public CreateShippingBillingAddressCmdImpl()
        ShipBillToAddressCmdImpl default constructor
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the business logic for this task command. To see the details of the logic see the comments for the class.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand
        ECException - Raised with message _ERR_GENERIC, _ERR_REMOTE_EXCEPTION if AddressAccessBean or AddressBookAccessBean raised any EJB related exceptions
      • setAddressId

        public void setAddressId(java.lang.Long addressId)
        This method sets the Address ID.
        addressId - ID identifying a unique address
      • setAddressType

        public void setAddressType(java.lang.String addressType)
        This method sets Address Type to either shipping or billing.
        Specified by:
        setAddressType in interface CreateShippingBillingAddressCmd
        addressType - code indicates the type of address "S" represents a shipping address "B" represents a billing address
      • setBillToAddress

        public void setBillToAddress(Address billToAddress)
        This method updates local variable sbToAddress (Please note that this set method updates the same variable as setShipToAddress).
        Specified by:
        setBillToAddress in interface CreateShippingBillingAddressCmd
        billToAddress - The new billing address
      • setMemberId

        public void setMemberId(java.lang.Long memberId)
        This method sets the member ID.
        Specified by:
        setMemberId in interface CreateShippingBillingAddressCmd
        memberId - ID used to identify the organization
      • setShipToAddress

        public void setShipToAddress(Address shipToAddress)
        This method updates local variable sbToAddress (Please note that this set method updates the same variable as setBillToAddress).
        Specified by:
        setShipToAddress in interface CreateShippingBillingAddressCmd
        shipToAddress - The new shipping address