com.ibm.commerce.contract.commands
Class ContractUploadCmdImpl

java.lang.Object
  CacheableCommandImpl
      com.ibm.commerce.command.AbstractECTargetableCommand
          com.ibm.commerce.command.ControllerCommandImpl
              com.ibm.commerce.command.UploadToStreamCmdImpl
                  com.ibm.commerce.contract.commands.ContractUploadCmdImpl
All Implemented Interfaces:
AccCommand, ContractUploadCmd, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, UploadToStreamCmd

public class ContractUploadCmdImpl
extends UploadToStreamCmdImpl
implements ContractUploadCmd

Uploads a specified contract XML file from client machine to WebSphere Commerce Server (WebSphere Commerce Business Edition only). The state of the contract in the XML file should be in Approved state.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
String CLASSNAME
static java.lang.String COPYRIGHT
String COPYRIGHT
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.contract.commands.ContractUploadCmd
DEFAULTCOMMANDCLASSNAME, NAME
Fields inherited from interface com.ibm.commerce.command.UploadToStreamCmd
defaultCommandClassName
Constructor Summary
ContractUploadCmdImpl()
Method Summary
java.lang.String getContractXMLFileName()
Gets the contract XML file name submitted by the user.
java.lang.String getTargetStoreId()
Gets the TargetStoreId parameter
void performExecute()
Calls super.performExecute, followed by ContractImportApprovedVersion command.
void setContractXMLFileName(java.lang.String strContractFileName)
Sets the strContractFileName parameter
void setRequestProperties(TypedProperty reqParms)
Gets the input parameters from the requestProperties object and sets each parameter to a local variable.
void setTargetStoreId(java.lang.String strTargetStoreId)
Sets the TargetStoreId parameter
void validateParameters()
Checks the validity of the parameters.
Methods inherited from class com.ibm.commerce.command.UploadToStreamCmdImpl
getAttachmentOwner, getAttachmentStream, getContentType, getErrorURL, getFileExtension, getFileName_NoExt, getFileName, getFileSize, getRootPath, getStoreName, getUrl, setErrorURL, setRefCmd, setRootPath, setUrl
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.UploadToStreamCmd
getAttachmentOwner, getAttachmentStream, getFileName, getFileSize, getUrl
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.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, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
String COPYRIGHT
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

ContractUploadCmdImpl

public ContractUploadCmdImpl()
Method Detail

getContractXMLFileName

public java.lang.String getContractXMLFileName()
Gets the contract XML file name submitted by the user.
Returns:
Returns a String

getTargetStoreId

public java.lang.String getTargetStoreId()
Gets the TargetStoreId parameter
Returns:
Returns a String

performExecute

public void performExecute()
                    throws ECException
Calls super.performExecute, followed by ContractImportApprovedVersion command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class UploadToStreamCmdImpl
Throws:
ECApplicationException
ECException
See Also:
ControllerComand#performExecute

setContractXMLFileName

public void setContractXMLFileName(java.lang.String strContractFileName)
Sets the strContractFileName parameter
Parameters:
strContractFileName - The contract xml file name.

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECApplicationException
Gets the input parameters from the requestProperties object and sets each parameter to a local variable. Calls super.setRequestProperties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class UploadToStreamCmdImpl
Parameters:
reqParms - The input parameters that are received by the command.
Throws:
ECApplicationException
See Also:
ContollerCommand#setRequestProperties()

setTargetStoreId

public void setTargetStoreId(java.lang.String strTargetStoreId)
Sets the TargetStoreId parameter
Parameters:
strTargetStoreId - The target store Id for calling import command

validateParameters

public void validateParameters()
                        throws ECException
Checks the validity of the parameters. This is presently empty since super class checks already checks the parameters, but it catches exception from super class.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class UploadToStreamCmdImpl
Throws:
ECException

Feedback