public class ValidateOrderAddressCmdImpl extends TaskCommandImpl implements ValidateOrderAddressCmd
ValidateOrderAddressCmd
.
getAddressType().equals(OrderConstants.ADDRESS_TYPE_SHIPPING)
,
call validateShippingAddress(addressAccessBean)
to validate the shipping address.getAddressType().equals(OrderConstants.ADDRESS_TYPE_BILLING)
,
call validateBillingAddress(addressAccessBean)
to validate the billing address.getAddressType()
is null, try to check shipping address first, if there is error occurs,
try to check billing address then.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
ValidateOrderAddressCmdImpl()
The default constructor of ValidateOrderAddressCmdImpl.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getAddressId()
Gets the identifier of the address to be validated.
|
java.lang.String |
getAddressType()
Gets the type of address to validate
|
java.lang.Long |
getContractId()
Gets the identifier of the contract which is used to check if the address is defined by the Shipping TCs of this contract.
|
java.lang.Long |
getMemberId()
Gets the identifier of the member who is used to check if the address is owned by.
|
OrderAccessBean |
getOrder()
Gets the order
|
java.lang.Long |
getTcId()
Gets the identifier of the PaymentTC
terms and conditions object which could be used to check if the address is defined by the PaymentTC. |
boolean |
isCheckPermanent()
Gets the flag which indicates whether to check the address is permanent or not.
|
void |
performExecute()
Executes the main business logic of the command.
|
void |
setAddressId(java.lang.Long anAddressId)
Sets the identifier of the address to be validated which is a required parameter.
|
void |
setAddressType(java.lang.String anAddressType)
Sets the type of address to validate.
|
void |
setCheckPermanent(boolean aCheckPermanent)
Sets the flag which indicates whether to check the address is permanent or not.
|
void |
setContractId(java.lang.Long aContractId)
Sets the identifier of the contract which is used to check if the address is defined by the Shipping TCs of this contract.
|
void |
setFulfillmentCenterId(java.lang.Integer anFulfillmentCenterId)
This method is used to set the fulfillment center for shipping address validation.
|
void |
setMemberId(java.lang.Long aMmemberId)
Sets the identifier of the member.
|
void |
setOrder(OrderAccessBean anOrderAB)
Sets the order
|
void |
setShippingModeId(java.lang.Integer anShippingModeId)
This method is used to set the shipping mode for shipping address validation.
|
void |
setTcId(java.lang.Long aTcId)
Sets the identifier of the PaymentTC
terms and conditions object which could be used to check if the address is defined by the PaymentTC. |
void |
validateParameters()
Verify if the required parameter is set.
|
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 static final java.lang.String COPYRIGHT
public ValidateOrderAddressCmdImpl()
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- ShipTo TCs
(for a contract)
and no PaymentTC specified.
ECCommand.performExecute()
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
- Raised when the required parameter is null.public void setAddressId(java.lang.Long anAddressId)
setAddressId
in interface ValidateOrderAddressCmd
anAddressId
- the identifier of the address to be validated.public java.lang.Long getAddressId()
getAddressId
in interface ValidateOrderAddressCmd
public void setMemberId(java.lang.Long aMmemberId)
setMemberId
in interface ValidateOrderAddressCmd
aMmemberId
- the member identifier.public java.lang.Long getMemberId()
getMemberId
in interface ValidateOrderAddressCmd
public void setContractId(java.lang.Long aContractId)
setContractId
in interface ValidateOrderAddressCmd
aContractId
- the identifier of a contract.public java.lang.Long getContractId()
getContractId
in interface ValidateOrderAddressCmd
public void setTcId(java.lang.Long aTcId)
terms and conditions
object which could be used to check if the address is defined by the PaymentTC.setTcId
in interface ValidateOrderAddressCmd
aTcId
- the identifier of a terms and conditions
object.public java.lang.Long getTcId()
terms and conditions
object which could be used to check if the address is defined by the PaymentTC.getTcId
in interface ValidateOrderAddressCmd
terms and conditions
object.public void setCheckPermanent(boolean aCheckPermanent)
setCheckPermanent
in interface ValidateOrderAddressCmd
aCheckPermanent
- a flag to indicate whether to check the address is permanent or not.public boolean isCheckPermanent()
isCheckPermanent
in interface ValidateOrderAddressCmd
public void setOrder(OrderAccessBean anOrderAB)
setOrder
in interface ValidateOrderAddressCmd
anOrderAB
- the order used to validate the address againstpublic OrderAccessBean getOrder()
getOrder
in interface ValidateOrderAddressCmd
public void setAddressType(java.lang.String anAddressType)
setAddressType
in interface ValidateOrderAddressCmd
anAddressType
- public java.lang.String getAddressType()
getAddressType
in interface ValidateOrderAddressCmd
public void setShippingModeId(java.lang.Integer anShippingModeId)
anShippingModeId
- public void setFulfillmentCenterId(java.lang.Integer anFulfillmentCenterId)
anFulfillmentCenterId
-