com.ibm.commerce.contract.commands

Class CloseContractCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.contract.commands.CloseContractCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, CloseContractCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class CloseContractCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements CloseContractCmd
    This is the default implementation of the CloseContractCmd task command.

    Behaviour:

    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.

    Task commands called:

    DeployContractCmd

    Access beans called:

    • TradingAgreementAccessBean
    • ContractAccessBean
    • StoreContractAccessBean
    • StoreAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getContractId()
      Gets the ID of the deploying contract.
      void performExecute()
      This method executes the business logic of this command implementation.
      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()
      Extracts and validates the input parameters of this command implementation.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The full name of this command.
        See Also:
        Constant Field Values
      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright notice field.
        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 com.ibm.commerce.exception.ECException
        This method executes the business logic of this command implementation. 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 com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.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 com.ibm.commerce.exception.ECException
        Extracts and validates the input parameters of this command implementation. This method gets the closable contract(s) for the deploying contract.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException
        See Also:
        AbstractECTargetableCommand.validateParameters()