com.ibm.commerce.order.commands

Class UpdateShippingAddressCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, UpdateShippingAddressCmd, 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
    Direct Known Subclasses:
    GiftRegistryUpdateShippingAddressCmdImpl


    public class UpdateShippingAddressCmdImpl
    extends TaskCommandImpl
    implements UpdateShippingAddressCmd
    This is the default implementation of the task command UpdateShippingAddressCmd interface.

    Behavior:

    • The task command checks the required parameters(orderitemABs) passed in.
    • For each order item in the list, the command does the following:

      • It calls findAddressIdForOrderItem() to find the appropriate shipping address for the order item.
      • If the ValidateRequired is set to true and the shipping address found by findAddressIdForOrderItem() is not null, It calls validateShippingAddress() to validate shipping address.
      • It then calls updateShippingAddress() to update the shipping address.

    Task commands called:

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • UpdateShippingAddressCmdImpl

        public UpdateShippingAddressCmdImpl()
        The default constructor of ValidateOrderAddressCmdImpl.
    • Method Detail

      • setAddressIds

        public void setAddressIds(java.lang.Long[] anAddressIds)
        Sets AddressIds which is used to update shipping addresses of order items.
        Specified by:
        setAddressIds in interface UpdateShippingAddressCmd
        Parameters:
        anAddressIds -
      • getAddressIds

        public java.lang.Long[] getAddressIds()
        Gets AddressIds which is used to update shipping addresses of order items.
        Specified by:
        getAddressIds in interface UpdateShippingAddressCmd
        Returns:
        AddressIds
      • setOrderItems

        public void setOrderItems(java.util.Vector anOrderItemABs)
        Sets order items, the shipping Addresses of which will be updated, this is a required parameter.
        Specified by:
        setOrderItems in interface UpdateShippingAddressCmd
        Parameters:
        anOrderItemABs - OrderItemAccessBeans
      • getOrderItems

        public java.util.Vector getOrderItems()
        Gets order items, the shipping Addresses of which will be updated.
        Specified by:
        getOrderItems in interface UpdateShippingAddressCmd
        Returns:
        OrderItemAccessBean
      • setValidateRequired

        public void setValidateRequired(boolean aValidateRequired)
        Sets the value indicating if shipping address validating is required, the default value is false.
        Specified by:
        setValidateRequired in interface UpdateShippingAddressCmd
        Parameters:
        aValidateRequired -
      • isValidateRequired

        public boolean isValidateRequired()
        Gets if shipping address validating is required.
        Specified by:
        isValidateRequired in interface UpdateShippingAddressCmd
        Returns:
        if the shipping address need be validated.
      • setDefaultAddressUsed

        public void setDefaultAddressUsed(boolean aDefaultAddressUsed)
        Sets if it sets the shipping address using the default shipping address for registered user. If no other appropriate address is found, , the default value is true.
        Specified by:
        setDefaultAddressUsed in interface UpdateShippingAddressCmd
        Parameters:
        aDefaultAddressUsed -
      • isDefaultAddressUsed

        public boolean isDefaultAddressUsed()
        Gets Sets if it sets the shipping address using the default shipping address for registered user if no other appropriate address is found.
        Specified by:
        isDefaultAddressUsed in interface UpdateShippingAddressCmd
        Returns:
        if set the shipping address using the default shipping address
      • reset

        public void reset()
        Resets all fields.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand