com.ibm.commerce.contract.commands
Class ContractUpdateCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.contract.commands.ContractUpdateCmdImpl
- All Implemented Interfaces:
-
AccCommand,
ContractUpdateCmd,
ControllerCommand,
ECCommand,
ECTargetableCommand
- public class ContractUpdateCmdImpl
- extends
ControllerCommandImpl
- implements
ContractUpdateCmd
Update a contract (WebSphere Commerce Business Edition only). The specified
contract should be in Draft state. This command called UpdateContractCmd,
UpdateXSDContractCmd. The following AccessBeans are used in this default
implemention: ContractAccessBean, AccountAccessBean, UserAccessBean,
OrganizationAccessBean, MemberGroupAccessBean. and the AccessBeans are used in
default implementation of the called commands.
- See Also:
-
UpdateXSDContractCmdImpl
,
UpdateContractCmdImpl
,
Serialized
Form
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
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,
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 |
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.
ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
-
Constant Field Values
ContractUpdateCmdImpl
public ContractUpdateCmdImpl()
- ContractCreateCommand constructor comment.
public void performExecute()
throws ECException
- Updates the contract based on the information in contract XML file.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException
- See Also:
-
UpdateXSDContractCmdImpl.performExecute()
,
UpdateContractCmdImpl.performExecute()
,
AbstratECTargetableCommand#performExecute()
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperties)
throws ECApplicationException
- Sets the request properties.
-
- Specified by:
-
setRequestProperties
in interface
ControllerCommand
- Overrides:
-
setRequestProperties
in class
ControllerCommandImpl
-
- Parameters:
aRequestProperties
- the request properties The mandatory
name-value pair is XMLString. The optional name-value pairs are XSD, validate,
and 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 indicates the path
of the dtd or XML schema files. The default value of the path parameter is
specified in the WebSphere Commerce instance XML file.
- Throws:
-
ECApplicationException
- Raised with message
_ERR_MISSING_CMD_PARAMETER when the required url parameters is missing.
- See Also:
-
ControllerCommand.setRequestProperties(TypedProperty)
setRequestProperties
public void setRequestProperties(org.w3c.dom.Document contractXML)
- Sets the contract XML instance Document object.
-
- Parameters:
contractXML
- the XML Document object which contains the
contract.
setXML
public void setXML(java.lang.String xmlStirng)
- Sets the string which includes the contract XML.
-
- Specified by:
-
setXML
in interface
ContractUpdateCmd
-
- Parameters:
xmlStirng
- the contract XML string
setXMLEntityPath
public void setXMLEntityPath(java.lang.String path)
- Sets the XML entity path.
-
- Specified by:
-
setXMLEntityPath
in interface
ContractUpdateCmd
-
- Parameters:
path
- the path where can find the DTD or XML Schema
file(s)
validateParameters
public void validateParameters()
throws ECException
- This is where parameter checking is done. This method does the following
checks 1. if the file and the dtd file can be found 2. if the XML file is valid
3. if the contract is in right state for this command. The contract should be
either in Approved or Active state
-
- Specified by:
-
validateParameters
in interface
ECCommand
- Overrides:
-
validateParameters
in class
AbstractECTargetableCommand
-
- Throws:
-
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_CONTRACT_NAME 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_MISSING_CONTRACT_REFERENCE_NUMBER_FOR_UPDATE if the contract
referenceNumber attribute was missing in the XML file for Contract
element.
- See Also:
-
AbstratECTargetableCommand#validateParameters()