public class ContractCreateCmdImpl extends com.ibm.commerce.command.ControllerCommandImpl implements ContractCreateCmd
ContractCopyCmd
controller command.
Name | Description |
---|---|
XMLString |
The XML string. It is mandatory. |
path |
The XML entity path. It is mandatory. |
validate |
The flag to indicate if validate an importing xml file against an xml schema. It is optional. |
xsd |
The flag to indicate if an xml instance file based on XSD or not. It is optional. |
Name | Description |
---|---|
contractId |
the ID of the newly created contract. |
CreateXSDContractCmd
CreateContractCmd
ContractAccessBean
AccountAccessBean
UserAccessBean
OrganizationAccessBean
MemberGroupAccessBean
ParticipantAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The full name of this class.
|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
ContractCreateCmdImpl()
Constructor for ContractCreateCmdImpl.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getContractId()
Returns the ID of the newly created contract.
|
void |
performExecute()
Executes the business logic of this command implementation.
|
void |
setLanguageId(java.lang.Integer langId)
Sets the language ID.
|
void |
setRequestProperties(org.w3c.dom.Document contractXML)
Sets the contract XML instance Document object.
|
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
Sets the request properties of this command implementation.
|
void |
setXML(java.lang.String xmlStirng)
Sets the string which includes the contract XML.
|
void |
setXMLEntityPath(java.lang.String path)
Sets the XML entity path.
|
void |
validateParameters()
Extracts and validates the input parameters of this command implementation.
|
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, getResources, 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, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public ContractCreateCmdImpl()
public java.lang.Long getContractId()
getContractId
in interface ContractCreateCmd
public 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
CreateXSDContractCmdImpl.performExecute()
,
CreateContractCmdImpl.performExecute()
,
AbstractECTargetableCommand.performExecute()
public void setLanguageId(java.lang.Integer langId)
setLanguageId
in interface ContractCreateCmd
langId
- the language IDpublic void setRequestProperties(org.w3c.dom.Document contractXML)
contractXML
- the XML Document object which contains the contract.public 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
- the request properties
The mandatory name-value pair is XMLString.
The optional name-value pairs are XSD, validate, path. if the XSD parameter is set to true, it means the
XML file is based on XSD. Otherwise it is dtd based. The default value for the XSD parameter is false.
The validate parameter indicates if the XML parser will validate the XML file against XSD/dtd. true - validate, false - do not validate.
The default value of the validate parameter is true. The path parameter specifies 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 the required url parameters is missing.ControllerCommand.setRequestProperties(TypedProperty)
public void setXML(java.lang.String xmlStirng)
setXML
in interface ContractCreateCmd
xmlStirng,
- a contract XML string.public void setXMLEntityPath(java.lang.String path)
setXMLEntityPath
in interface ContractCreateCmd
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_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 Draft 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_MISSING_ACCOUNT_OWNER_ELEMENT if the account name is provided but not the AcocuntOwner element 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.AbstractECTargetableCommand.validateParameters()