com.ibm.commerce.giftcenter.commands

Class GiftCenterProcessOrderSubmitEventCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, ProcessOrderSubmitEventCmd, 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 GiftCenterProcessOrderSubmitEventCmdImpl
    extends ProcessOrderSubmitEventCmdImpl
    GiftCenterProcessOrderSubmitEventCmdImpl command is an extension of the ProcessOrderSubmitEventCmdImpl to handle the purchase order creation on a submit order action.
    See Also:
    Serialized Form
    • Field Detail

      • STORE_FEATURE_NAME_GIFTREGISTRY

        public static final java.lang.String STORE_FEATURE_NAME_GIFTREGISTRY
        Constant representing the GiftRegistry feature name. This name is used in the store flex flow feature to enable gift registry.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GiftCenterProcessOrderSubmitEventCmdImpl

        public GiftCenterProcessOrderSubmitEventCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        Performs the logic involved in creating the purchase order. The command retrieves the order items associated with the order and iterate through these order items and validates them with the ORDERITEMGIFT table to identify if the order item is gift item or not. If the order is a gift item, the implementation retrieves the associated attributes such as orderItemsId, addressId, quantity, partNumber, partAuxKey etc. The address would be copied from the ADDRESS table to the GRADDR table. The implementation also execute a select on the ORDERGFTEVNT table to populate the gift item identifier of the gift list item. If there is no item returned, it is assumed that the shopper purchased an item which does not belong to any gift list. This method looks for the GiftRegistry flex flow feature to be enabled before performing the above mentioned operation.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class ProcessOrderSubmitEventCmdImpl
        Throws:
        ECException
      • copyAddress

        public java.lang.Long copyAddress(java.lang.Long addressId)
                                   throws ECSystemException
        Copies the address from ADDRESS table to GRADDR table.
        Parameters:
        addressId - the address identifier of the gift giver in the ADDRESS table.
        Returns:
        the address identifier of the newly created address in the GRADDR table, this will return null if the address not is copied.
        Throws:
        ECSystemException