java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.me.commands.CreateShippingBillingAddressCmdImpl
This command creates a shipping or billing address based on the memberId
provided. This is called by BatchOrderRequestCmd
during batch
processing of a new order. 1. validateParameters checks whether the
addressType
equals to "S" or "B" and set
checkParametersOk to true 2. performExecute returns with
INVALID_ADDRESS_TYPE
if checkParameters is not true 3.
performExecute retrieves from the ADDRESS table based on the member_id and user
name in the Address (billTo/shipTo) class. This is done using ejb
AddressAccessBean
. 4. If no matching entry is found, the task
command creates a new one based on the information.
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.me.commands. CreateShippingBillingAddressCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CreateShippingBillingAddressCmdImpl() ShipBillToAddressCmdImpl default constructor |
Method Summary | |
---|---|
java.lang.Long |
getAddressId() Gets AddressId |
int |
getErrorCode() Gets the errorCode |
void |
performExecute() The business logic for this task command. |
void |
setAddressId(java.lang.Long addressId) Sets Address Id |
void |
setAddressType(java.lang.String addressType) Sets Address Type to either shipping or billing |
void |
setBillToAddress(
Address billToAddress) Updates local variable sbToAddress (Please note that this set method updates the same variable as setShipToAddress) |
void |
setMemberId(java.lang.Long memberId) Sets member Id |
void |
setShipToAddress(
Address shipToAddress) Updates local variable sbToAddress (Please note that this set method updates the same variable as setBillToAddress) |
void |
validateParameters() Check whether all the required parameters are available authentication. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Constructor Detail |
---|
public CreateShippingBillingAddressCmdImpl()
Method Detail |
---|
public java.lang.Long getAddressId()
getAddressId
in interface
CreateShippingBillingAddressCmd
public int getErrorCode()
getErrorCode
in interface
CreateShippingBillingAddressCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- Raised with message _ERR_GENERIC,
_ERR_REMOTE_EXCEPTION if AddressAccessBean
or
AddressBookAccessBean
raised any ejb related
exceptionspublic void setAddressId(java.lang.Long addressId)
addressId
- Id identifing a unique addresspublic void setAddressType(java.lang.String addressType)
setAddressType
in interface
CreateShippingBillingAddressCmd
addressType
- code indicates the type of address "S"
represents a shipping address "B" represents a billing
addresspublic void setBillToAddress(Address billToAddress)
setBillToAddress
in interface
CreateShippingBillingAddressCmd
billToAddress
- The new billing addresspublic void setMemberId(java.lang.Long memberId)
setMemberId
in interface
CreateShippingBillingAddressCmd
memberId
- Id used to identifying the
organizationpublic void setShipToAddress(Address shipToAddress)
setShipToAddress
in interface
CreateShippingBillingAddressCmd
shipToAddress
- The new shipping addresspublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException