- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderPrepareCmd, Protectable, 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 GiftRegistryOrderPrepareCmdImpl
extends OrderPrepareCmdImpl
implements OrderPrepareCmd
This class extends OrderPrepareCmdImpl.
It adds logic to create or update addresses from the gift registry system.
For each orderItem, the command determines if the orderItem is associated with a gift registry.
For each order item, which is associated with a gift registry, the command finds the relationship between the orderItem and the gift registry.
If ORDERITEM.ADDRESS_ID is specified and the address type ID is G, the command updates this address later using address information from the gift registry system.
Otherwise, it finds the address by nickname and memberId. If it is found, the command updates this address later using address information from the gift registry system. If not found, it creates an address in the ADDRESS table. The address will have a status of G to indicate an IBM Gift Center shipping address. MEMBER_ID will be the user's memberId. NICKNAME will be OrderId:ExternalId).
The command finds the gift registry by externalId. It then calls getGiftRegistryPrePostShipAddress method for the GiftRegistryDataBean to get address information from the gift registry system.
The command updates the address using address information from the gift registry system.
The command updates orderItem shipping addresses that are associated with gift registries.
Finally, the command invokes Super.performExecute() for OrderPrepare.
- See Also:
- Serialized Form