com.ibm.commerce.account.commands
Class AccountImportCmdImpl
java.lang.Object
CacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.ControllerCommandImpl
com.ibm.commerce.contract.commands.TradingAgreementImportBaseCmdImpl
com.ibm.commerce.account.commands.AccountImportCmdImpl
- All Implemented Interfaces:
- AccCommand, AccountImportCmd, ControllerCommand, ECCommand, ECTargetableCommand, Protectable
- public class AccountImportCmdImpl
- extends TradingAgreementImportBaseCmdImpl
- implements AccountImportCmd
This is the default implementation of the AccountImport controller command. The following access beans are used in this default implementation: AccountAccessBean, StoreEntityAccessBean, UserAccessBean and OrganizationAccessBean.
- See Also:
- SaveAccountCmd, CreateAccountCmd, AccountImportCmd, Serialized Form
Field Summary |
static java.lang.String |
CLASSNAME
The name of this class. |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
Methods inherited from class com.ibm.commerce.contract.commands.TradingAgreementImportBaseCmdImpl |
getAccountId, getContractId, getDOMFromFile, getDOMFromInputStream, getElementsByTag, getXMLFlag, importContractNLDesc, importFfcNLDesc, importStoreNLDesc, saveAccount, saveContract, setXSDFlag |
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.ECCommand |
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
CLASSNAME
public static final java.lang.String CLASSNAME
- The name of this class.
- See Also:
- Constant Field Values
AccountImportCmdImpl
public AccountImportCmdImpl()
getResources
public AccessVector getResources()
throws ECException
- Gets the access vector accessed by this command. The default implementation returns the OrganizationAccessBean of the account owner.
-
- Specified by:
- getResources in interface ECCommand
- Overrides:
- getResources in class AbstractECTargetableCommand
-
- Returns:
- AccessVector - a vector of resource action pairs
- Throws:
- ECException
- See Also:
- AbstratECTargetableCommand#getResources()
performExecute
public void performExecute()
throws ECException
- Creates the account.
-
- Specified by:
- performExecute in interface ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- ECException
- See Also:
- TradingAgreementImportBaseCmdImpl#saveAccount(Element, boolean), SaveAccountCmdImpl.performExecute(), CreateAccountCmdImpl#performExcute(), AbstratECTargetableCommand#performExecute()
setAccountXMLFileName
public void setAccountXMLFileName(java.lang.String accountXMLFileName)
- Sets the name of the account XML file.
-
- Specified by:
- setAccountXMLFileName in interface AccountImportCmd
-
- Parameters:
- accountXMLFileName - the name of the acocunt XML file
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperties)
throws ECApplicationException
- Retrieves input parameters from the request properties.
-
- Specified by:
- setRequestProperties in interface ControllerCommand
- Overrides:
- setRequestProperties in class ControllerCommandImpl
-
- Parameters:
- aRequestProperties - An TypedProperty object contains the input parameters.
- Throws:
- ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER when the input XML file name and store id are missed.
setStoreId
public void setStoreId(java.lang.Integer anStoreId)
- Sets the storeId.
-
- Specified by:
- setStoreId in interface AccountImportCmd
-
- Parameters:
- anStoreId - the id of a store
setValidationFlag
public void setValidationFlag(boolean validationFlag)
- Sets the validation flag to indiciate if XML file will be validated by XML parser against the XSD.
-
- Specified by:
- setValidationFlag in interface AccountImportCmd
-
- Parameters:
- validationFlag - boolean - validation flag, true: validate the XML instance file against the XSD, false: not
setXMLEntityPath
public void setXMLEntityPath(java.lang.String path)
- Sets the XML entity path.
-
- Specified by:
- setXMLEntityPath in interface AccountImportCmd
-
- Parameters:
- path - the path where can find the DTD or XML Schema file(s)
validateParameters
public void validateParameters()
throws ECException
- The method checks if the information provided in account Element object is valid.
-
- Specified by:
- validateParameters in interface ECCommand
- Overrides:
- validateParameters in class AbstractECTargetableCommand
-
- Throws:
- ECException - Raised with message _ERR_DUPLICATED_ACCOUNT_NAME if the account name is duplicated during creating. Raised with message _ERR_ACCOUNT_REFERENCE_NUMBER_NOT_REQUIRED if the account id is provided during creating. Raised with message _ERR_FILE_NOT_FOUND if the XML file or DTD/XSD 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.
- See Also:
- AbstratECTargetableCommand#validateParameters()
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.