java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.contract.commands.ImportDTDContractApprovedVersionCmdImpl
Imports an approved contract from a specified XML file (WebSphere Commerce Business Edition only). The state of the contract in the XML file has to be either Approved or Active. Calling commands: ContractImportApprovedVersionCmd. This command called CreateContractCmd, ValidateContractCmd, ContractDeployCmd, AddContractNLDescriptionCmd. The following AccessBeans are used in this default implementation: ContractAccessBean, AccountAccessBean, UserAccessBean, OrganizationAccessBean, MemberGroupAccessBean, and the AccessBeans are used in the default implementation of the called commands.
CreateContractCmdImpl
,
ValidateContractCmdImpl
,
ContractDeployCmdImpl
,
AddContractNLDescriptionCmdImpl
,
Serialized Form
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.contract.commands. ImportDTDContractApprovedVersionCmd |
defaultCommandClassName |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
ImportDTDContractApprovedVersionCmdImpl() |
Method Summary | |
---|---|
TypedProperty |
getResponseProperties() Returns the response properties |
void |
performExecute() Imports the Approved or Active contract based on the information in contract xml file. |
void |
setContractXMLFileName(java.lang.String astrContractFileName) Sets the contracl XML file name. |
void |
setStoreId(java.lang.Integer storeId) Sets the target store ID. |
void |
setUrl(java.lang.String astrUrl) Sets the redirection URL to be called when the command completes successfully. |
void |
setXMLEntityPath(java.lang.String path) Sets the XML entity path. |
void |
validateParameters() This is where parameter checking is done. |
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 |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public ImportDTDContractApprovedVersionCmdImpl()
Method Detail |
---|
public TypedProperty getResponseProperties()
getResponseProperties
in interface
ImportDTDContractApprovedVersionCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
importContract(Element contractElement, Integer
contractState)
, importContractNLDesc(Element
cntrDescElement)
,
AbstratECTargetableCommand#performExecute()
public void setContractXMLFileName(java.lang.String astrContractFileName)
setContractXMLFileName
in interface
ImportDTDContractApprovedVersionCmd
astrContractFileName
- the name of the contract XML
filepublic void setStoreId(java.lang.Integer storeId)
setStoreId
in interface
ImportDTDContractApprovedVersionCmd
storeId
- the store ID which the contract will deployed
topublic void setUrl(java.lang.String astrUrl)
setUrl
in interface
ImportDTDContractApprovedVersionCmd
astrUrl
- the redirect URL stringpublic void setXMLEntityPath(java.lang.String path)
setXMLEntityPath
in interface
ImportDTDContractApprovedVersionCmd
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_MISSING_CMD_PARAMETER if the targetStoreId parmeter
was missing from the url for an Active contract. Raised with message
_ERR_FILE_NOT_FOUND if the xml file or dtd file cannot be found. Raised with
message _ERR_PARSE_XML_FILE if an error occurred when the xml parser parses the
xml file. Raised with message _ERR_GENRIC_PARSE_XML_FILE if an IO error
occurred. Raised with message _ERR_WRONG_CONTRACT_STATE if the contract is not
in Approved or Active state. Raised with message _ERR_VERSION_NUMBER_FORMAT if
the contract version number format is incorrect. It should be numerical. Raised
with message _ERR_MISSING_CONTRACT_NAME if the contract name is empty string in
the xml file. Raised with message _ERR_WRONG_ACCOUNT_OWNER_INFO if an error
occurred when retrieving the account owner id. Raised with message
_ERR_ACCOUNT_DOES_NOT_EXIST if an error occurred when retrieving the account
based the account name and account owner id. Raised with message
_ERR_WRONG_CONTRACT_OWNER_MEMBER_INFO if an error occurred when retrieving the
contract owner id. Raised with message _ERR_DUPLICATED_CONTRACT_NAME if there
is a contract existed with the same name, owner, and origin. Raised with
message _ERR_CONTRACT_REFERENCE_NUMBER_NOT_REQUIRED if the contract
referenceNumber attribute is provided in the xml file for Contract
element.AbstratECTargetableCommand#validateParameters()