com.ibm.commerce.contract.commands

Class PolicyUpdateCmdImpl

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


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

    Input parameters:

    Name Description
    BusinessPolicyName The name of the business policy. Mandatory.
    BusinessPolicyType The type of the business policy. Mandatory.
    Commands The commands which process the business policy. Optional.
    CommonProperty The common property string which business policy commands need.. Optional.
    CommonSingleProperty The single common property string which business policy commands need.. Optional.
    EndDate The end date of the business policy. Optional.
    Properties The specific properties of the business policy commands need. Optional.
    RequestProperties The request properties. Possible values include: redirecturl, XMLFile, type, name, plcyStoreId, cmd, props, prop, commonProps, commonProp, startDate, endDate. Optional.
    SingleProperties The single specific properties of the business policy commands need. Optional.
    StartDate The start date of the business policy. Mandatory.
    StoreEntityId The store entity id which the business policy belongs to. Mandatory.

    Output parameters:

    Name Description
    EndDate The end date of the business policy.
    StartDate The start date of the business policy.
    Resources The access vector accessed by this command.

    Behaviour:

      Updates a business policy in the POLICY database table (WebSphere Commerce Enterprise only).
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The default implementation class is "com.ibm.commerce.contract.commands.PolicyUpdateCmdImpl".
      static java.lang.String COPYRIGHT
      The IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.sql.Timestamp getEndDate()
      Returns the end date of the business policy.
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Gets the access vector accessed by this command.
      java.sql.Timestamp getStartDate()
      Returns the start date of the business policy.
      void performExecute()
      Executes the business logic of this command implementation.
      void setBusinessPolicyName(java.lang.String name)
      Sets the name of the business policy.
      void setBusinessPolicyType(java.lang.String type)
      Sets the type of the business policy.
      void setCommands(java.util.Hashtable commands)
      Sets the commands which process the business policy.
      void setCommonProperty(java.lang.String commonProp)
      Sets the common property string which business policy commands need.
      void setCommonSingleProperty(java.lang.String commonSingleProp)
      Sets a single common property string which business policy commands need.
      void setEndDate(java.lang.Long anEndDate)
      Set the end date of the business policy.
      void setEndDate(java.lang.String endDate)
      Sets the end date of the business policy.
      void setEndDate(java.sql.Timestamp newEndDate)
      Sets the end date of the business policy.
      void setProperties(java.util.Hashtable props)
      Sets the specific properties of the business policy commands need.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
      Sets the request properties
      void setSingleProperties(java.util.Hashtable props)
      Sets the single specific properties of the business policy commands need.
      void setStartDate(java.lang.Long anStartDate)
      Sets the start date of the business policy.
      void setStartDate(java.lang.String startDate)
      Sets the starting date of the business policy.
      void setStartDate(java.sql.Timestamp newStartDate)
      Sets the start date of the business policy.
      void setStoreEntityId(java.lang.Integer storeEntId)
      Sets the store entity id which the business policy belongs to.
      • 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, validateParameters
      • 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, validateParameters
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The default implementation class is "com.ibm.commerce.contract.commands.PolicyUpdateCmdImpl".
        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

      • PolicyUpdateCmdImpl

        public PolicyUpdateCmdImpl()
    • Method Detail

      • getEndDate

        public java.sql.Timestamp getEndDate()
        Returns the end date of the business policy.
        Returns:
        The end date of the business policy.
      • 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
      • getStartDate

        public java.sql.Timestamp getStartDate()
        Returns the start date of the business policy.
        Returns:
        The start date of the business policy.
      • 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
      • setBusinessPolicyName

        public void setBusinessPolicyName(java.lang.String name)
        Sets the name of the business policy.
        Specified by:
        setBusinessPolicyName in interface PolicyUpdateCmd
        Parameters:
        name - The name of the business policy.
      • setBusinessPolicyType

        public void setBusinessPolicyType(java.lang.String type)
        Sets the type of the business policy.
        Specified by:
        setBusinessPolicyType in interface PolicyUpdateCmd
        Parameters:
        type - the business policy type
      • setCommands

        public void setCommands(java.util.Hashtable commands)
        Sets the commands which process the business policy. A Hashtable object contains all the commands process the business policy. The keys of this Hashtable are Integer objects which start with 0 to the number of the commands. The values of the Hashtable are String objects which represent the commands. For example, if there are three commands. the keys of the Hashtable object will be 0, 1, 2.
        Specified by:
        setCommands in interface PolicyUpdateCmd
        Parameters:
        commands - All the commands to process the business policy.
      • setCommonProperty

        public void setCommonProperty(java.lang.String commonProp)
        Sets the common property string which business policy commands need.
        Specified by:
        setCommonProperty in interface PolicyUpdateCmd
        Parameters:
        commonProp - The common property which business policy commands need to process the policy.
      • setCommonSingleProperty

        public void setCommonSingleProperty(java.lang.String commonSingleProp)
        Sets a single common property string which business policy commands need.
        Specified by:
        setCommonSingleProperty in interface PolicyUpdateCmd
        Parameters:
        commonSingleProp - The common property which business policy commands need to process the policy.
      • setEndDate

        public void setEndDate(java.lang.Long anEndDate)
        Set the end date of the business policy.
        Parameters:
        anEndDate - The end date of the business policy.
      • setEndDate

        public void setEndDate(java.lang.String endDate)
        Sets the end date of the business policy.
        Specified by:
        setEndDate in interface PolicyUpdateCmd
        Parameters:
        endDate - A string object in yyyy-mm-dd hh:mm:ss.fffffffff format.
      • setEndDate

        public void setEndDate(java.sql.Timestamp newEndDate)
        Sets the end date of the business policy.
        Parameters:
        newEndDate - The end date of the business policy.
      • setProperties

        public void setProperties(java.util.Hashtable props)
        Sets the specific properties of the business policy commands need. The keys of this Hashtable are Integer objects. The values of the Hashtable are String objects which represent the properties. The keys of this Hashtable are depended on which command the property is for. For example, if you have three commands in commands Hashtable, the first one and the third one have the common property. And the second command needs a specific property, then you set the key to Integer 2.
        Specified by:
        setProperties in interface PolicyUpdateCmd
        Parameters:
        props - A hashtable contains the business properties for a business command
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
                                  throws com.ibm.commerce.exception.ECApplicationException
        Sets the request properties
        Specified by:
        setRequestProperties in interface com.ibm.commerce.command.ControllerCommand
        Overrides:
        setRequestProperties in class com.ibm.commerce.command.ControllerCommandImpl
        Parameters:
        aRequestProperties - the request properties
        Throws:
        com.ibm.commerce.exception.ECApplicationException
      • setSingleProperties

        public void setSingleProperties(java.util.Hashtable props)
        Sets the single specific properties of the business policy commands need. The keys of this Hashtable are Integer objects. The values of the Hashtable are String objects which represent the properties. The keys of this Hashtable are depended on which command the property is for. For example, if you have three commands in commands Hashtable, the first one and the third one have the common property. And the second command needs a specific property, then you set the key to Integer 2.
        Specified by:
        setSingleProperties in interface PolicyUpdateCmd
        Parameters:
        props - A hashtable contains the business properties for a business command
      • setStartDate

        public void setStartDate(java.lang.Long anStartDate)
        Sets the start date of the business policy.
        Parameters:
        anStartDate - The start date of the business policy.
      • setStartDate

        public void setStartDate(java.lang.String startDate)
        Sets the starting date of the business policy.
        Specified by:
        setStartDate in interface PolicyUpdateCmd
        Parameters:
        startDate - java.lang.String
      • setStartDate

        public void setStartDate(java.sql.Timestamp newStartDate)
        Sets the start date of the business policy.
        Parameters:
        newStartDate - The start date of the business policy.
      • setStoreEntityId

        public void setStoreEntityId(java.lang.Integer storeEntId)
        Sets the store entity id which the business policy belongs to.
        Specified by:
        setStoreEntityId in interface PolicyUpdateCmd
        Parameters:
        storeEntId - The store entity id.