com.ibm.commerce.contract.tc.commands

Class ContractTCDeployCmdImpl

  • 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.command.AsyncControllerCommandImpl
              • com.ibm.commerce.contract.tc.commands.ContractTCDeployCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.AccCommand, com.ibm.commerce.command.AsyncCommand, com.ibm.commerce.command.ControllerCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, ContractTCDeployCmd, com.ibm.commerce.security.Protectable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class ContractTCDeployCmdImpl
    extends com.ibm.commerce.command.AsyncControllerCommandImpl
    implements ContractTCDeployCmd
    This is the default implementation of the ContractTCDeployCmd controller command.

    Input parameters:

    Name Description
    contractId The ID of term and condition. It is mandatory.
    tcIds The XML string contains the terms and conditions.
    url The redirect URL.

    Output parameters:

    None.

    Behaviour:

    Deploys the specified terms and conditions (WebSphere Commerce Enterprise only).

    Access Beans used:

    • ContractAccessBean
    • TermConditionAccessBean
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from interface com.ibm.commerce.command.ECCommand

        defaultCommandClassName
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getContractId()
      Gets the ID of the contract to be updated.
      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 setContractId(java.lang.Long contractId)
      Sets the ID of the contract to be updated.
      void setRedirectURL(java.lang.String url)
      Sets the redirect URL.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
      Retrieves input parameters from the request properties.
      void setTCIds(java.lang.String[] tcIds)
      Sets the IDs of the terms and conditions to be deployed.
      void validateParameters()
      Validates if the contracts are in either Active or Suspended state.
      • Methods inherited from class com.ibm.commerce.command.AsyncControllerCommandImpl

        getJobInstanceId, getJobReferenceId, getResponseProperties, setJobInstanceId, setJobReferenceId
      • Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl

        checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
      • 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, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.AsyncCommand

        getJobInstanceId, getJobReferenceId, setJobInstanceId, setJobReferenceId
      • Methods inherited from interface com.ibm.commerce.command.ControllerCommand

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

        accessControlCheck, getAccCheck, setAccCheck
      • 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
    • Field Detail

      • COPYRIGHT

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

      • ContractTCDeployCmdImpl

        public ContractTCDeployCmdImpl()
    • Method Detail

      • getContractId

        public java.lang.Long getContractId()
        Gets the ID of the contract to be updated.
        Specified by:
        getContractId in interface ContractTCDeployCmd
        Returns:
        the ID of the contract to be updated.
      • 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 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 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
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes the business logic of this command implementation. The method deploys the terms and conditions to the store.
        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
      • setContractId

        public void setContractId(java.lang.Long contractId)
        Sets the ID of the contract to be updated.
        Specified by:
        setContractId in interface ContractTCDeployCmd
        Parameters:
        contractId - The contract ID.
      • setRedirectURL

        public void setRedirectURL(java.lang.String url)
        Sets the redirect URL.
        Specified by:
        setRedirectURL in interface ContractTCDeployCmd
        Parameters:
        url - The redirect URL.
      • 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.
        Throws:
        com.ibm.commerce.exception.ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER when contractId and the input XML string are missed.
      • setTCIds

        public void setTCIds(java.lang.String[] tcIds)
        Sets the IDs of the terms and conditions to be deployed.
        Specified by:
        setTCIds in interface ContractTCDeployCmd
        Parameters:
        tcIds - The XML string contains the terms and conditions.
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Validates if the contracts are in either Active or Suspended state.
        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