public class OrderProfileUpdateCmdImpl extends ControllerCommandImpl implements OrderProfileUpdateCmd
Default order profile consists of one or more of the following:
Order profile information is stored in three tables : ORDERS, ORDERITEMS and ORDPAYINFO. A record in the ORDERS table with a status 'Q' represents the default order profile. It may contain the billing address. A record in the ORDERITEMS table may contain the shipping mode and shipping address information. One or more records in the ORDPAYINFO table store payment information. Records in the ORDERITEMS and ORDPAYINFO tables reference the default profile record in the ORDERS table.
Order profile can be configured per store or mall. A shopper can have an order profile for any store in a mall. A shopper may also have an order profile for a mall. If store order profile does not exist, mall order profile should be used. Parameter storeId is used to specify the store level of the order profile. Parameter storeEntity can specify the mall level of the order profile. If both parameters are specified storeEntity will be used. It is an error to specify the store id which does not belong to the store entity specified.
A shopper can not have more than one default order profile.
OrderProfileUpdate command creates a default order profile for the current shopper if the profile does not exist. The command updates the default profile if it already exists. The new payment information provided for the default order profile will completely overwrite the current payment information if it exists.
While updating the order profile, if the address id for billing and shipping in the URL parameters are the same, only update the billing address. And use that new address id for both billing and shipping in the order profile. As nick name is a unique index for address, it is same for it as address id.
Nick name can't be updated. You can't pass both address id and nick name for an address unless the nick name is same as the original one.
All of the parameters of the command are optional except for 'URL' parameter.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
OrderProfileUpdateCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long | getBillingAddress()
Gets the default address to bill.
|
java.util.Hashtable | getPaymentInfo()
Gets the default payment information.
|
java.lang.Long | getShippingAddress()
Gets the default address to ship.
|
java.lang.Integer | getShippingMode()
Gets the default shipping mode.
|
java.lang.Integer | getStoreEntityId()
Gets store entity id.
|
java.lang.String | getUrl()
Gets redirection URL called after the command completes successfully.
|
protected java.lang.Integer | parseStoreEntityId(TypedProperty aReqParms)
Checks to see whether the store entity id in the TypedProperty is valid.
|
void | performExecute()
Executes the business logic of this command implementation.
|
void | reset()
Resets the instance variables.
|
void | setBillingAddress(java.lang.Long anBillingAddress)
Sets the default address to bill.
|
void | setPaymentInfo(java.util.Hashtable ahshPaymentInfo)
Sets the default payment information.
|
void | setRequestProperties(TypedProperty aReqParms)
Sets the request properties.
|
void | setShippingAddress(java.lang.Long anShippingAddress)
Sets the default address to ship.
|
void | setShippingMode(java.lang.Integer newShippingMode)
Sets the default shipping mode.
|
void | setStoreEntityId(java.lang.Integer newStoreEntityId)
Sets the store entity id.
|
void | setUrl(java.lang.String astrUrl)
Sets redirection URL.
|
void | validateParameters()
This method checks the input parameters of the command.
|
public static final java.lang.String COPYRIGHT
public java.lang.Long getBillingAddress()
public java.util.Hashtable getPaymentInfo()
public java.lang.Long getShippingAddress()
public java.lang.Integer getShippingMode()
public java.lang.Integer getStoreEntityId()
public java.lang.String getUrl()
protected java.lang.Integer parseStoreEntityId(TypedProperty aReqParms) throws ECApplicationException, ECSystemException
public void performExecute() throws ECException
public void reset()
public void setBillingAddress(java.lang.Long anBillingAddress)
public void setPaymentInfo(java.util.Hashtable ahshPaymentInfo)
public void setRequestProperties(TypedProperty aReqParms) throws ECException
public void setShippingAddress(java.lang.Long anShippingAddress)
public void setShippingMode(java.lang.Integer newShippingMode)
public void setStoreEntityId(java.lang.Integer newStoreEntityId)
public void setUrl(java.lang.String astrUrl)
public void validateParameters() throws ECException