com.ibm.commerce.me.commands

Class CreateShippingBillingAddressCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CreateShippingBillingAddressCmd, 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 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 com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        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.
        Parameters:
        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
        Parameters:
        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
        Parameters:
        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
        Parameters:
        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
        Parameters:
        shipToAddress - The new shipping address