com.ibm.commerce.order.commands
Class OrderProfileUpdateCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.order.commands.OrderProfileUpdateCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderProfileUpdateCmd, Protectable
- public class OrderProfileUpdateCmdImpl
- extends ControllerCommandImpl
- implements OrderProfileUpdateCmd
Creates or updates customer's default billing and shipping addresses, shipping mode and payment
information.
Method Summary |
java.lang.Long |
getBillingAddress()
Gets the 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()
Sets store entity id. |
java.lang.String |
getUrl()
Sets redirection URL called after the command completes successfully. |
protected java.lang.Integer |
parseStoreEntityId(TypedProperty aReqParms)
|
void |
performExecute()
Default order profile consists of one or more of the following:
- shipping address
- billing address
- shipping mode
- payment information. |
void |
reset()
This method should be called after a command has been executed to reset its states variables. |
void |
setBillingAddress(java.lang.Long anBillingAddress)
Sets the the default address to bill. |
void |
setPaymentInfo(java.util.Hashtable ahshPaymentInfo)
Sets the default payment information. |
void |
setRequestProperties(TypedProperty aReqParms)
The WebController calls this method before invoking the execute method in this command to
set the request properties for this command. |
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. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
istrCheckParametersFunc
protected static java.lang.String istrCheckParametersFunc
istrIsReadyToCallExecuteFunc
protected static java.lang.String istrIsReadyToCallExecuteFunc
istrPerformFunc
protected static java.lang.String istrPerformFunc
istrSetRequestPropertiesFunc
protected static java.lang.String istrSetRequestPropertiesFunc
istrThisClass
protected static java.lang.String istrThisClass
OrderProfileUpdateCmdImpl
public OrderProfileUpdateCmdImpl()
getBillingAddress
public java.lang.Long getBillingAddress()
- Gets the the default address to bill.
getPaymentInfo
public java.util.Hashtable getPaymentInfo()
- Gets the default payment information.
getShippingAddress
public java.lang.Long getShippingAddress()
- Gets the default address to ship.
getShippingMode
public java.lang.Integer getShippingMode()
- Gets the default shipping mode.
getStoreEntityId
public java.lang.Integer getStoreEntityId()
- Sets store entity id.
getUrl
public java.lang.String getUrl()
- Sets redirection URL called after the command completes successfully.
parseStoreEntityId
protected java.lang.Integer parseStoreEntityId(TypedProperty aReqParms)
throws ECApplicationException
performExecute
public void performExecute()
throws ECException
- Default order profile consists of one or more of the following:
- shipping address
- billing address
- shipping mode
- payment information.
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
the current payment information if it exists.
All of the parameters of the command are optional except for 'URL' parameter.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
reset
public void reset()
- Description copied from class:
AbstractECTargetableCommand
- This method should be called after a command has been executed to reset its states variables.
After the call to reset, we should be able to execute the command again.
- Overrides:
reset
in class AbstractECTargetableCommand
setBillingAddress
public void setBillingAddress(java.lang.Long anBillingAddress)
- Sets the the default address to bill.
- Specified by:
setBillingAddress
in interface OrderProfileUpdateCmd
- Parameters:
anBillingAddress
- java.lang.Long - billing address identifier
setPaymentInfo
public void setPaymentInfo(java.util.Hashtable ahshPaymentInfo)
- Sets the default payment information.
- Specified by:
setPaymentInfo
in interface OrderProfileUpdateCmd
- Parameters:
ahshPaymentInfo
- java.util.Hashtable - payment name-value pairs.
setRequestProperties
public void setRequestProperties(TypedProperty aReqParms)
throws ECApplicationException
- Description copied from interface:
ControllerCommand
- The WebController calls this method before invoking the execute method in this command to
set the request properties for this command.
It is the responsibility of the implementer of the ControllerCommand to extract the
required input parameters from the request properties and perform parameter checking.
- Specified by:
setRequestProperties
in interface ControllerCommand
- Overrides:
setRequestProperties
in class ControllerCommandImpl
- Following copied from interface:
com.ibm.commerce.command.ControllerCommand
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECException.
-
setShippingAddress
public void setShippingAddress(java.lang.Long anShippingAddress)
- Sets the default address to ship.
- Specified by:
setShippingAddress
in interface OrderProfileUpdateCmd
- Parameters:
anShippingAddress
- java.lang.Long - shipping address identifier
setShippingMode
public void setShippingMode(java.lang.Integer newShippingMode)
- Sets the default shipping mode.
- Specified by:
setShippingMode
in interface OrderProfileUpdateCmd
- Parameters:
anShippingMode
- java.lang.Integer - shipping mode identifier
setStoreEntityId
public void setStoreEntityId(java.lang.Integer newStoreEntityId)
- Sets the store entity id.
setUrl
public void setUrl(java.lang.String astrUrl)
- Sets redirection URL.