com.ibm.commerce.contract.commands
Class CloseContractCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.contract.commands.CloseContractCmdImpl
All Implemented Interfaces:
CloseContractCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CloseContractCmdImpl
extends TaskCommandImpl
implements CloseContractCmd

Closes contracts (WebSphere Commerce Business Edition only). Normally this command will close all the contracts which are in active, approved, or suspended state within the same family as the deploying contract. If an error occurred, an ECException will be thrown. Calling commands: DeployContractCmd The following AccessBeans are used in this default implementation: ContractAccessBean, TradingAgreementAccessBean, StoreContractAccessBean, StoreAccessBean, ContractJDBCHelperAccessBean().findSameFamilyContracts(name, ownerId, origin, contractId)

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this command.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.contract.commands. CloseContractCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CloseContractCmdImpl()
           
 
Method Summary
 java.lang.Long getContractId()
          Gets the ID of the deploying contract.
 void performExecute()
          Closes all the closable contract(s) for the deploying contract.
 void setContractId(java.lang.Long contractId)
          Sets the ID of the deploying contract.
 void setStoreId(java.lang.Integer storeId)
          Sets the ID of the store to which the contract is deployed.
 void validateParameters()
          This method gets the closable contract(s) for the deploying contract.
 
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
 

Field Detail
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 command.
See Also:
Constant Field Values
Constructor Detail

CloseContractCmdImpl

public CloseContractCmdImpl()
Method Detail

getContractId

public java.lang.Long getContractId()
Gets the ID of the deploying contract.
Returns:
the ID of the deploying contract

performExecute

public void performExecute()
                    throws ECException
Closes all the closable contract(s) for the deploying contract. If the closed contract is in Active state, it will be removed form the contract cache.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException
See Also:
AbstractECTargetableCommand.performExecute()

setContractId

public void setContractId(java.lang.Long contractId)
Sets the ID of the deploying contract.
Specified by:
setContractId in interface CloseContractCmd
Parameters:
contractId - the ID of the deploying contract

setStoreId

public void setStoreId(java.lang.Integer storeId)
Sets the ID of the store to which the contract is deployed.
Specified by:
setStoreId in interface CloseContractCmd
Parameters:
storeId - the ID of the store

validateParameters

public void validateParameters()
                        throws ECException
This method gets the closable contract(s) for the deploying contract.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException
See Also:
AbstractECTargetableCommand.validateParameters()