java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.contract.commands.TradingAgreementImportBaseCmdImpl
This is the base implementation of Contrat Import Commands
Field Summary | |
---|---|
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.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
TradingAgreementImportBaseCmdImpl() |
Method Summary | |
---|---|
protected
java.lang.Long |
getAccountId() Gets the id of the account. |
protected
java.lang.Long |
getContractId() Gets the id of the contract. |
protected
org.w3c.dom.Document |
getDOMFromFile(java.lang.String XMLFileName, boolean validation,
boolean xsd, java.lang.String entityPath) Gets the contract xml Document object from the specified xml file. |
protected
org.w3c.dom.Document |
getDOMFromInputStream(java.io.InputStream xmlInputStream,
boolean validation, boolean xsd, java.lang.String entityPath) Gets the contract xml Document object from the InputStream. |
protected
java.util.Vector |
getElementsByTag(org.w3c.dom.Element pElement,
java.lang.String tag) Gets all the elements which the tag name ends with the specified tag. |
protected
boolean |
getXMLFlag() Gets the value of the xsd flag. |
protected
void |
importContractNLDesc(org.w3c.dom.Element cntrDescElement) Imports a contract description based on the contract description element |
protected
void |
importFfcNLDesc(org.w3c.dom.Element ffcDescElement) Imports a fulfillment center description based on the fulfillment center description element. |
protected
void |
importStoreNLDesc(org.w3c.dom.Element storeDescElement) Imports a store description based on the store description element. |
protected
java.lang.Long |
saveAccount(org.w3c.dom.Element accountElement,
boolean actionFlag) Saves the account based on the account Element object. |
protected
void |
saveContract(org.w3c.dom.Element contractElement,
boolean actionFlag) Saves a contract based on the contract element |
void |
setXSDFlag(boolean xsdFlag) Sets the value of the xsd flag. |
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,
setRequestProperties,
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,
performExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
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,
setRequestProperties,
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,
getResources,
getStoreId,
getUser,
getUserId,
performExecute,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public TradingAgreementImportBaseCmdImpl()
Method Detail |
---|
protected java.lang.Long getAccountId()
protected java.lang.Long getContractId()
protected boolean getXMLFlag()
protected org.w3c.dom.Document getDOMFromFile(java.lang.String XMLFileName, boolean validation, boolean xsd, java.lang.String entityPath) throws ECException
XMLFileName
- The xml file name.validation
- If ture, do the xml validate, false no.xsd
- true if the file is xml schema based; false if the file
is dtd basedentityPath
- the paths of the xml schema filesECException
- Raised with message _ERR_FILE_NOT_FOUND if the contract xml file or the xsd
file cannot be found. Raised with message _ERR_PARSE_XML_FILE if an error
occurred when the parser parses the xml file. Raised with message
_ERR_GENRIC_PARSE_XML_FILE if an error occurred when there is IO exception
occurred.protected org.w3c.dom.Document getDOMFromInputStream(java.io.InputStream xmlInputStream, boolean validation, boolean xsd, java.lang.String entityPath) throws ECException
xmlInputStream
- the InputStream object contain the contract
xml instancevalidation
- If ture, do the xml validate, false no.xsd
- true if the file is xml schema based; false if the file
is dtd basedentityPath
- the paths of the xml schema filesECException
- Raised with message _ERR_PARSE_XML_FILE if an error occurred when the parser
parses the input stream. Raised with message _ERR_GENRIC_PARSE_XML_FILE if an
error occurred when there is IO exception occurred.protected java.util.Vector getElementsByTag(org.w3c.dom.Element pElement, java.lang.String tag)
pElement
- a xml elementtag
- the tag nameprotected void importContractNLDesc(org.w3c.dom.Element cntrDescElement) throws ECException
cntrDescElement
- The contract national language description
Element object.ECException
AddContractNLDescriptionCmdImpl
protected void importStoreNLDesc(org.w3c.dom.Element storeDescElement) throws ECException
storeDescElement
- the national language description of the
storeECException
AddStoreNLDescriptionCmdImpl#performExecute()
protected void importFfcNLDesc(org.w3c.dom.Element ffcDescElement) throws ECException
ffcDescElement
- the national language description of the
fulfillment centerECException
AddStoreNLDescriptionCmdImpl#performExecute()
protected java.lang.Long saveAccount(org.w3c.dom.Element accountElement, boolean actionFlag) throws ECException
accountElement
- the account Element objectactionFlag
- the action of the account saving process. true:
create false: updateECException
SaveAccountCmdImpl
protected void saveContract(org.w3c.dom.Element contractElement, boolean actionFlag) throws ECException
contractElement
- The Element object contains the contract
information.actionFlag
- the action of the contract saving process. true:
create false: updateECException
CreateXSDContractCmdImpl
,
UpdateXSDContractCmdImpl
public void setXSDFlag(boolean xsdFlag)
xsdFlag
- the flag indicate it is xsd based or dtd based xml
instance.