public class OrderProfileUpdateCmdImpl extends ControllerCommandImpl implements OrderProfileUpdateCmd
OrderProfileUpdateCmd
controller command.
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.
|
NAME
defaultCommandClassName
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.
|
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.
|
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
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()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public void setBillingAddress(java.lang.Long anBillingAddress)
setBillingAddress
in interface OrderProfileUpdateCmd
anBillingAddress
- java.lang.Long - billing address identifierpublic void setPaymentInfo(java.util.Hashtable ahshPaymentInfo)
setPaymentInfo
in interface OrderProfileUpdateCmd
ahshPaymentInfo
- java.util.Hashtable - payment name-value pairs.public void setRequestProperties(TypedProperty aReqParms) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class ControllerCommandImpl
aReqParms
- request properties.ECException
public void setShippingAddress(java.lang.Long anShippingAddress)
setShippingAddress
in interface OrderProfileUpdateCmd
anShippingAddress
- java.lang.Long - shipping address identifierpublic void setShippingMode(java.lang.Integer newShippingMode)
setShippingMode
in interface OrderProfileUpdateCmd
newShippingMode
- java.lang.Integer - shipping mode identifierpublic void setStoreEntityId(java.lang.Integer newStoreEntityId)
newStoreEntityId
- store entity id.public void setUrl(java.lang.String astrUrl)
astrUrl
- URL.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException