com.ibm.commerce.contract.commands
Class ContractDeployCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.scheduler.commands.AddJobCmdImpl
                          |
                          +--com.ibm.commerce.contract.commands.ContractDeployCmdImpl
All Implemented Interfaces:
AccCommand, AddJobCmd, ContractDeployCmd, ControllerCommand, ECCommand, ECTargetableCommand

public class ContractDeployCmdImpl
extends AddJobCmdImpl
implements ContractDeployCmd

The default implemenation of the ContractDeploy command.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this class is "com.ibm.commerce.contract.commands.ContractDeployCmdImpl".
static java.lang.String COPYRIGHT
          The internal copyright 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.contract.commands. ContractDeployCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.scheduler.commands. AddJobCmd
defaultCommandClassName, NAME
 
Constructor Summary
ContractDeployCmdImpl()
          The constructor of this class
 
Method Summary
  AccessVector getResources()
          Gets the access vector accessed by this command.
 java.lang.String getScheduledCommandName()
          Gets scheuduled command name
 java.lang.String getUrlName()
          Gets redirect URL
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setContractId(java.lang.Long contractId)
          Sets the contract ID parameter
 void setPropertiesForScheduler()
          Sets the properties for scheduler
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the request properties
 void validateParameters()
          Validates parameters
 
Methods inherited from class com.ibm.commerce.scheduler.commands. AddJobCmdImpl
convertTime, getApplicationType, getAttempts, getCheckCommandId, getDelay, getEndTime, getErrorUrl, getHost, getInterfaceName, getInterval, getJobId, getJobInstanceId, getName, getPathInfo, getPriority, getQueryString, getSequence, getStartTime, getStoreId, getStringEndTime, getStringStartTime, getUrl, getUserRefNum, setApplicationType, setAttempts, setCheckCommandId, setDelay, setEndTime, setErrorUrl, setHost, setInterfaceName, setInterval, setJobId, setJobInfo, setName, setPathInfo, setPriority, setQueryString, setSequence, setStartTime, setStoreId, setStringEndTime, setStringStartTime, setUrl, setUserRefNum
 
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, 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. 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, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
The internal copyright field.
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
The name of this class is "com.ibm.commerce.contract.commands.ContractDeployCmdImpl".
See Also:
Constant Field Values
Constructor Detail

ContractDeployCmdImpl

public ContractDeployCmdImpl()
The constructor of this class
Method Detail

getResources

public AccessVector getResources()
                          throws ECException
Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AddJobCmdImpl
Returns:
a vector of resource action pairs
Throws:
ECException
See Also:
AccessVector

getScheduledCommandName

public java.lang.String getScheduledCommandName()
Gets scheuduled command name
Returns:
scheduled command name

getUrlName

public java.lang.String getUrlName()
Gets redirect URL
Returns:
redirect URL

performExecute

public void performExecute()
                    throws ECException
Description copied from interface: ECCommand
Contains the actual business logic of the command It should be implemented by all the command writer.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AddJobCmdImpl
Throws:
ECException - Raised with message _ERR_CONTRACT_SYS_GENERIC whenever an error was occured
See Also:
AddJobCmdImpl.performExecute()

setContractId

public void setContractId(java.lang.Long contractId)
Sets the contract ID parameter
Specified by:
setContractId in interface ContractDeployCmd
Parameters:
contractId - Contract ID

setPropertiesForScheduler

public void setPropertiesForScheduler()
Sets the properties for scheduler

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECApplicationException
Sets the request properties
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class AddJobCmdImpl
Parameters:
aRequestProperties - Request Properties name-value pairs are: redirect URL, contract Id and target store Id. They are all required.
Throws:
ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER if contract Id or sotre Id was not found. Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if contract Id or sotre Id is not in the correct format (number).
See Also:
AddJobCmdImpl.setRequestProperties(TypedProperty)

validateParameters

public void validateParameters()
                        throws ECException
Validates parameters
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AddJobCmdImpl
Throws:
ECApplicationException - Raised with message _ERR_CONTRACT_ALREADY_DEPLOY_TO_THE_STORE if the contract has been deployed to the store. Raised with meesage _ERR_WRONG_CONTRACT_STATE if the contract is not in the desired state (normally, a Draft and Deploy Failed contract can be deployed). Raised with message _ERR_CONTRACT_EXPIRED if the contract is expired. Raised with message _ERR_INVALID_CONTRACT_EXPIRED_DATE if the expriation date of the contract is invalid. Raised with message _ERR_CONTRACT_SYS_GENERIC when other unknown error occurs.
ECException
See Also:
AddJobCmdImpl.validateParameters()