com.ibm.commerce.contract.commands

Class PolicyDescriptionUpdateCmdImpl

  • 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.commands.PolicyDescriptionUpdateCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.AccCommand, com.ibm.commerce.command.ControllerCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, PolicyDescriptionUpdateCmd, com.ibm.commerce.security.Protectable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


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

    Input parameters:

    (tools controller command only)
    NameXPath Description
    LanguageId The ID of language of the description. If not set, uses the language id of the commandContext. Optional.
    PolicyDescription The short description of the business policy.. Mandatory.
    PolicyId The ID of business policy which the description will be added to.. Mandatory.
    PolicyLongDescription The long description of business policy. Optional.
    RequestProperties The request properties. Possible values include: policyId, desc, longDesc, langId. Optional.

    Output parameters:

    Name Description
    Resources The access vector accessed by this command.
    Add or update the description of the specified business policy (WebSphere Commerce Enterprise only). The following AccessBeans are used in this default implementation: BusinessPolicyAccessBean, PolicyDescriptionAccessBean
    • 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 setLanguageId(java.lang.Integer langId)
      Sets ID of language of the description.
      void setPolicyDescription(java.lang.String desc)
      Sets the short description of the business policy.
      void setPolicyId(java.lang.Long policyId)
      Sets ID of business policy which the description will be added to.
      void setPolicyLongDescription(java.lang.String longDesc)
      Sets the long description of business policy.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
      Retrieves input parameters from the request properties.
      void validateParameters()
      Checks the input parameters.
      • 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

      • COPYRIGHT

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

      • PolicyDescriptionUpdateCmdImpl

        public PolicyDescriptionUpdateCmdImpl()
    • 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 the BusinessPolicyAccessBean object of the business policy which the description will be added to.

        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.
        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()
      • setLanguageId

        public void setLanguageId(java.lang.Integer langId)
        Sets ID of language of the description.
        Specified by:
        setLanguageId in interface PolicyDescriptionUpdateCmd
        Parameters:
        langId - the language ID of the description
      • setPolicyDescription

        public void setPolicyDescription(java.lang.String desc)
        Sets the short description of the business policy.
        Specified by:
        setPolicyDescription in interface PolicyDescriptionUpdateCmd
        Parameters:
        desc - the short description of the business policy
      • setPolicyId

        public void setPolicyId(java.lang.Long policyId)
        Sets ID of business policy which the description will be added to.
        Specified by:
        setPolicyId in interface PolicyDescriptionUpdateCmd
        Parameters:
        policyId - the business policy ID
      • setPolicyLongDescription

        public void setPolicyLongDescription(java.lang.String longDesc)
        Sets the long description of business policy.
        Specified by:
        setPolicyLongDescription in interface PolicyDescriptionUpdateCmd
        Parameters:
        longDesc - the long description of business policy
      • 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 required parameter is policyId.
        Throws:
        com.ibm.commerce.exception.ECApplicationException - Raised with message _ERR_MISSING_CMD_PARAMETER if one of the these required parameters are missing.
        See Also:
        ControllerCommandImpl.setRequestProperties(TypedProperty)
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Checks the input parameters.
        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_BUSINESS_POLICY_OBJECT_NOT_FOUND if the provided policy ID cannot be found.
        See Also:
        AbstractECTargetableCommand.validateParameters()