java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.contract.tc.commands.ContractTCCreateCmdImpl
This is the default implementation of ContractTCCreateCmd (WebSphere Commerce Business Edition only). Create a terms and conditions based on the TermCondition element XML string to the specified contract. The contract has to be in Draft state. The following AccessBeans are used in this default implementation: 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
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME The name of this command. |
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl |
requestProperties,
responseProperties,
retriable,
viewReqProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.contract.tc.commands. ContractTCCreateCmd |
defaultCommandClassName,
NAME |
Constructor Summary | |
---|---|
ContractTCCreateCmdImpl() |
Method Summary | |
---|---|
org.w3c.dom.Element |
getElement() Returns the term condition element. |
AccessVector |
getResources() Gets the access vector accessed by this command. |
void |
parseXMLElement(org.w3c.dom.Element anTCElement) Parses the term and condition element and gets the long description and the short description of the term and condition. |
void |
performExecute() The method creates the term and condition . |
void |
setContractId(java.lang.Long contractId) Sets the ID of the contract which the term and condition will be added to. |
void |
setElement(org.w3c.dom.Element anElement) Sets term and condition Element object. |
void |
setLanguageId(java.lang.Integer langId) Deprecated. |
void |
setRequestProperties(
TypedProperty aRequestProperties) Retrieves input parameters from the request properties. |
void |
setTcLongDescription(java.lang.String tcLongDescription) Deprecated. |
void |
setTcReferenceNumber(java.lang.Long tcId) Deprecated. |
void |
setTcReferenceNumber(java.lang.String tcIdStr) Deprecated. |
void |
setTcShortDescription(java.lang.String tcShortDescription) Deprecated. |
void |
setXMLEntityPath(java.lang.String path) Sets the XML entity path. |
void |
validateParameters() Checks if the contract object exists. |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setResponseProperties,
setRetriable,
setViewInputProperties |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
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 |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRetriable,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
getForUserId,
getResourceOwners,
setAccCheck,
setForUserId,
setOwner |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
Constructor Detail |
---|
public ContractTCCreateCmdImpl()
Method Detail |
---|
public org.w3c.dom.Element getElement()
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
AbstractECTargetableCommand.getResources()
public void parseXMLElement(org.w3c.dom.Element anTCElement)
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- Raised with message _ERR_RETRIEVE_STORE_ID if the store id cannot be retrived
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 retrived 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 lang 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_CMD_EXEC if
any other types of errors occurred.AbstratECTargetableCommand#performExecute()
public void setContractId(java.lang.Long contractId)
contractId
- the contract IDpublic void setElement(org.w3c.dom.Element anElement)
anElement
- the term and condition Element
objectpublic void setLanguageId(java.lang.Integer langId)
langId
- the language IDpublic void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
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 indicate the path of the
DTD or XML schema files. The default value of the path parameter is specified
in WebSphere Commerce instance XML file.
ECApplicationException
- Raised with message
_ERR_MISSING_CMD_PARAMETER when contractId or the input XML string is
missed.ControllerCommand#setRequestProperties(TypedProperty)
public void setTcLongDescription(java.lang.String tcLongDescription)
tcLongDescription
- the term and condition long description
stringpublic void setTcReferenceNumber(java.lang.Long tcId)
tcId
- the ID of the term and condition in Long
objectpublic void setTcReferenceNumber(java.lang.String tcIdStr)
tcIdStr
- the ID of the term and condition in String
objectpublic void setTcShortDescription(java.lang.String tcShortDescription)
tcShortDescription
- the short description of the term and
conditionpublic void setXMLEntityPath(java.lang.String path)
path
- the path where can find the DTD or XML Schema
file(s)public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
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_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()