public class CreateShippingBillingAddressCmdImpl extends TaskCommandImpl implements CreateShippingBillingAddressCmd
BatchOrderRequestCmd
during batch processing of a new order.
1. validateParameters checks whether the addressType
equals to "S" or "B"
and sets 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 (bill to/ship to) class. This is done using the EJB
AddressAccessBean
.
4. If no matching entry is found, the task command creates a new one based on the
information.COPYRIGHT, defaultCommandClassName, NAME
Constructor and Description |
---|
CreateShippingBillingAddressCmdImpl()
ShipBillToAddressCmdImpl default constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getAddressId()
This method gets the Address ID.
|
int |
getErrorCode()
This method gets the errorCode.
|
void |
performExecute()
This method performs the business logic for this task command.
|
void |
setAddressId(java.lang.Long addressId)
This method sets the Address ID.
|
void |
setAddressType(java.lang.String addressType)
This method sets Address Type to either shipping or billing.
|
void |
setBillToAddress(Address billToAddress)
This method updates local variable sbToAddress (Please note that this set
method updates the same variable as setShipToAddress).
|
void |
setMemberId(java.lang.Long memberId)
This method sets the member ID.
|
void |
setShipToAddress(Address shipToAddress)
This method updates local variable sbToAddress (Please note that this set
method updates the same variable as setBillToAddress).
|
void |
validateParameters()
This method checks whether all the required parameters are available for authentication.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, 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
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public CreateShippingBillingAddressCmdImpl()
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 interface com.ibm.websphere.command.TargetableCommand
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 identifying 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 identify 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