com.ibm.commerce.contract.tc.commands

Class ContractTCDeleteCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.ControllerCommandImpl
            • com.ibm.commerce.contract.tc.commands.ContractTCDeleteCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.AccCommand, com.ibm.commerce.command.ControllerCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, ContractTCDeleteCmd, com.ibm.commerce.security.Protectable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class ContractTCDeleteCmdImpl
    extends com.ibm.commerce.command.ControllerCommandImpl
    implements ContractTCDeleteCmd
    This is the default implementation of the ContractTCDeleteCmd controller command.

    Input parameters:

    Name Description
    tcId The ID of term and condition. It is mandatory.

    Output parameters:

    None.

    Behaviour:

    Delete terms and conditions from a contract (WebSphere Commerce Enterprise only). The contract has to be in Draft state.

    Access Beans used:

    • ContractAccessBean
    • TermConditionAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Gets the access vector accessed by this command.
      void performExecute()
      Executes the business logic of this command implementation.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
      Retrieves input parameters from the request properties.
      void setTcIdList(java.lang.String[] asaList)
      Sets the IDs of the Terms and Conditions to be deleted
      void validateParameters()
      Checks if the contract object exists.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 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, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • 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, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • CLASSNAME

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

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContractTCDeleteCmdImpl

        public ContractTCDeleteCmdImpl()
    • Method Detail

      • getResources

        public com.ibm.commerce.accesscontrol.AccessVector getResources()
                                                                 throws com.ibm.commerce.exception.ECException
        Gets the access vector accessed by this command. The default implementation returns a vector of ContractAccessBean objects of the contracts which the terms and conditions will be deleted from.

        Specified by:
        getResources in interface com.ibm.commerce.command.ECCommand
        Overrides:
        getResources in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        AccessVector - a vector of resource action pairs
        Throws:
        com.ibm.commerce.exception.ECException
        See Also:
        AbstractECTargetableCommand.getResources()
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes the business logic of this command implementation. Deletes the specified terms and conditions
        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 - Raised with message _ERR_FINDER_EXCEPTION if the FinderException occurred. Raised with message _ERR_REMOTE_EXCEPTION if the RemoteException occurred. Raised with message _ERR_NAMING_EXCEPTION if the NamingException occurred. Raised with message _ERR_CREATE_EXCEPTION if the CreateException occurred. Raised with message _ERR_REMOVE_EXCEPTION if the RemoveException occurred.
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
                                  throws com.ibm.commerce.exception.ECApplicationException
        Retrieves input parameters from the request properties.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.command.ControllerCommand
        Overrides:
        setRequestProperties in class com.ibm.commerce.command.ControllerCommandImpl
        Parameters:
        aRequestProperties - An TypedProperty object contains the input parameters. For this default implementation, the tcId is the required parameter.
        Throws:
        com.ibm.commerce.exception.ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER if one of the these required parameters are missing. Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the provided IDs of the terms and conditions cannot be convert to Long object.
        See Also:
        ControllerCommandImpl.setRequestProperties(TypedProperty)
      • setTcIdList

        public void setTcIdList(java.lang.String[] asaList)
        Sets the IDs of the Terms and Conditions to be deleted
        Specified by:
        setTcIdList in interface ContractTCDeleteCmd
        Parameters:
        asaList - the ID list of the term and condition
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Checks if the contract object exists.
        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 - Raised with message _ERR_TERM_CONDITION_OBJECT_NOT_FOUND if one of terms and conditions cannot be found in the database. Raised with message _ERR_WRONG_CONTRACT_STATE If the contract is not in Draft or Rejected state. Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if an error occurred when converts one of terms and conditions IDs string to Long object. Raised with message _ERR_FINDER_EXCEPTION if the FinderException occurred. Raised with message _ERR_REMOTE_EXCEPTION if the RemoteException occurred. Raised with message _ERR_NAMING_EXCEPTION if the NamingException occurred. Raised with message _ERR_CREATE_EXCEPTION if the CreateException occurred.
        See Also:
        AbstractECTargetableCommand.validateParameters()