public class ContractTCUpdateCmdImpl extends com.ibm.commerce.command.ControllerCommandImpl implements ContractTCUpdateCmd
ContractTCUpdateCmd
controller command.
Name | Description |
---|---|
contractId |
The contract ID. It is mandatory. |
XMLString |
The XML string contains the terms and conditions . It is mandatory. |
path |
The path where it can find the DTD or XML Schema file(s). It is optional. |
ContractAccessBean
TermConditionDescriptionAccessBean
ParticipantAccessBean
OrderApprovalTCAccessBean
PriceTCMasterCatalogWithFilteringAccessBean
PriceTCPriceListWithOptionalAdjustmentAccessBean
PriceTCMasterCatalogWithOptionalAdjustmentAccessBean
PriceTCPriceListWithSelectiveAdjustmentAccessBean
ReferralInterfaceTCAccessBean
FulfillmentTCAccessBean
ObligationToBuyTCByAmountAccessBean
PaymentTCAccessBean
OrderTCOrderCommentAccessBean
OrderTCOrderItemPAttributeAccessBean
PriceTCCustomPriceListAccessBean
ProductSetTCCustomExclusionAccessBean
ProductSetTCCustomInclusionAccessBean
ProductSetTCExclusionAccessBean
ProductSetTCInclusionAccessBean
ReturnTCRefundPaymentMethodAccessBean
ReturnTCReturnChargeAccessBean
RightToBuyTCByAmountAccessBean
ShippingTCShipToAddressAccessBean
ShippingTCShippingChargeAccessBean
ShippingTCShippingModeAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this command.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
ContractTCUpdateCmdImpl() |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Element |
getElement()
Returns the term condition element.
|
com.ibm.commerce.accesscontrol.AccessVector |
getResources()
Gets the access vector accessed by this command.
|
void |
parseXMLElement(org.w3c.dom.Element element)
Parses the term and condition element and gets the long description and the short description
of the term and condition.
|
void |
performExecute()
Executes the business logic of this command implementation.
|
void |
setElement(org.w3c.dom.Element newElement)
Sets term and condition Element object.
|
void |
setLanguageId(java.lang.Integer langId)
Sets the language ID.
|
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
Retrieves input parameters from the request properties.
|
void |
setTcLongDescription(java.lang.String newTcLongDescription)
Sets the long description of the term and condition.
|
void |
setTcShortDescription(java.lang.String newTcShortDescription)
Sets the short description of the term and condition.
|
void |
setTermConditionId(java.lang.Long tcId)
Sets the ID of the term and condition.
|
void |
setXMLEntityPath(java.lang.String path)
Sets the XML entity path.
|
void |
validateParameters()
Checks if the contract object exists.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public org.w3c.dom.Element getElement()
public com.ibm.commerce.accesscontrol.AccessVector getResources() throws com.ibm.commerce.exception.ECException
getResources
in interface com.ibm.commerce.command.ECCommand
getResources
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
AbstractECTargetableCommand.getResources()
public void parseXMLElement(org.w3c.dom.Element element)
element
- the term and condition elementpublic void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_RETRIEVE_STORE_ID if the store id cannot be retrieved from
the information provided in StoreRef element in one of the terms and conditions.
Raised with message _ERR_RETRIEVE_POLICY_TYPE if the policy type cannot be retrieved based on information
in policy reference element.
Raised with message _ERR_RETRIEVE_ORG_ID if an error occurred when retrieving the organization ID.
Raised with message _ERR_RETRIEVE_USER_ID if an error occurred when retrieving the user ID.
Raised with message _ERR_RETRIEVE_MEMBER_GROUP_ID if an error occurred when retrieving the member group ID.
Raised with message _ERR_RETRIEVE_OPERATOR_ID if an error occurred when retrieving opeartor_id.
The value of "operator" in "AttributeValue" element is incorrect.
Raised with message _ERR_RETRIEVE_PATTRIBUTE_ID if an error occurred when retrieving pattribute_id. The
value of "attributeName" in "AttributeDetail" element is incorrect.
Raised with message _ERR_RETRIEVE_CATENTRY_ID if an error occurred when retrieving catentry_id. The
information specified in "OrderTCOrderItemPAttribute" element is incorrect.
Raised with message _ERR_RETRIEVE_POLICY_ID if an error occurred when retrieving policy_id.
The information specified in the policy reference element is incorrect.
Raised with message _ERR_RETRIEVE_FFMCENTER_ID if an error occurred when
retrieving ffmcenter_id. The information specified in "FilfillmentCenterRef" element is incorrect.
Raised with message _ERR_COLUMN_ACCESSBEANNAME_IN_PATTRIBUTE_NOT_POPULATED if an error occurred when
retrieving personalization attribute value accessbean. Column accessbeanname in table pattribute is not
populated correctly.
Raised with message _ERR_PATTRIBUTE_NOT_REGISTERED_IN_TABLE_PATTRPROD_FOR_CATENTRY
if an error occurred when validating whether catentry has the corresponding personalization attribute
registered in table PattrProd. catentry_id and pattribute_id retrieved from OrderTCOrderItemPAttribute
element should be registered in table PattrProd.
Raised with message _ERR_TOO_MANY_FULFILLMENT_TC if a contract has more than three
fulfillment centers defined in a term and condition.
Raised with message _ERR_SAVE_TC_ATTR if an error occurred when saving the attribute of
the term and condition to tcattr table.
Raised with message _ERR_DUPLICATE_KEY_IN_PROCESSING_TC if a duplicate key error
occurred when processing a term and condition.
Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the provided long ID in the description
element cannot be converted to an Integer object. The error will be only occurred for DTD based (Version 5)
element.
Raised with message _ERR_CONTRACT_TC_UPDATE if there is an error rather than the errors mentioned above occurred
during the process.AbstractECTargetableCommand.performExecute()
public void setElement(org.w3c.dom.Element newElement)
newElement
- the term and condition Element objectpublic void setLanguageId(java.lang.Integer langId)
langId
- the language IDpublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties) throws com.ibm.commerce.exception.ECApplicationException
setRequestProperties
in interface com.ibm.commerce.command.ControllerCommand
setRequestProperties
in class com.ibm.commerce.command.ControllerCommandImpl
aRequestProperties
- An TypedProperty object contains the input parameters.
The mandatory name-value pairs are XMLString, contractId.
The optional name-value pair is path. The path parameter indicates the path of the DTD or XML schema files. The default
value of the path parameter is specified in WebSphere Commerce instance XML file.com.ibm.commerce.exception.ECApplicationException
- Raised with message _ERR_MISSING_CMD_PARAMETER when contractId, the input XML string, or redirect URL are missed.ControllerCommand.setRequestProperties(TypedProperty)
public void setTcLongDescription(java.lang.String newTcLongDescription)
newTcLongDescription
- the term and condition long description stringpublic void setTcShortDescription(java.lang.String newTcShortDescription)
newTcShortDescription
- the term and condition short description stringpublic void setTermConditionId(java.lang.Long tcId)
tcId
- the ID of the term and condition in Long objectpublic void setXMLEntityPath(java.lang.String path)
path
- the path where it can find the DTD or XML Schema file(s)public void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_CONTRACT_OBJECT_NOT_FOUND if the contract cannot be found in the database based on the provided contract ID.
Raised with message _ERR_WRONG_CONTRACT_STATE If the contract is not in Draft or Rejected state.
Raised with message _ERR_GENRIC_PARSE_XML_FILE if an error occurred when parse the term and condition element.
Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the term and condition ID cannot be converted to Long object.
Raised with message _ERR_FINDER_EXCEPTION if the FinderException occurred.
Raised with message _ERR_REMOTE_EXCEPTION if the RemoteException occurred.
Raised with message _ERR_NAMING_EXCEPTION if the NamingException occurred.
Raised with message _ERR_CREATE_EXCEPTION if the CreateException occurred.AbstractECTargetableCommand.validateParameters()