com.ibm.commerce.experimentation.commands

Interface ExperimentBaseEvaluateCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    ExperimentBaseEvaluateCmdImpl


    public interface ExperimentBaseEvaluateCmd
    extends TaskCommand
    This command evaluates marketing experiments; provide a custom implementation for each type of store element, which is the object used to display content in the store front. An e-Marketing Spot is an example of a store element in which marketing content is delivered to customers.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String defaultCommandClassName
      defaultCommandClassName is the default implementation class used by the command factory to instantiate this command if the interface com.ibm.commerce.experimentation.commands.ExperimentBaseEvaluateCmd is not defined in the CMDREG table.
      static java.lang.String NAME
      The name of this interface.
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Field Detail

      • COPYRIGHT

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

        static final java.lang.String defaultCommandClassName
        defaultCommandClassName is the default implementation class used by the command factory to instantiate this command if the interface com.ibm.commerce.experimentation.commands.ExperimentBaseEvaluateCmd is not defined in the CMDREG table.
        See Also:
        Constant Field Values
    • Method Detail

      • generateExperimentResult

        java.lang.Short generateExperimentResult(ExperimentRuleDefinition ruleDefinition)
        This method returns the ID of a control or test element in the given rule definition object based on the comparison result between the element's display frequency and the randomly generated number.
        Parameters:
        ruleDefinition - An instance of com.ibm.commerce.tools.experimentation.ExperimentRuleDefinition object which contains the definition of experiment rule.
        Returns:
        The ID of the selected control or test element.
      • getExperimentResultFromDB

        java.lang.Short getExperimentResultFromDB(java.lang.Integer experimentId,
                                                  java.lang.String sessionId)
        This method returns the ID of the control or test element to be returned as the result of the experiment evaluation from the database, based on the given experiment and session ID.
        Parameters:
        experimentId - The ID of the experiment.
        sessionId - The ID of the current session.
        Returns:
        The ID of the control or test element to be returned as the result of the experiment evaluation.
      • getExperimentResultFromDB

        java.lang.Short getExperimentResultFromDB(java.lang.Integer experimentId,
                                                  java.lang.Long userId,
                                                  java.lang.String sessionId,
                                                  boolean isUserFallBack)
        This method returns the ID of the control or test element to be returned as the result of the experiment evaluation from the database, based on the given experiment, and user or session, depending on the fallback flag.
        Parameters:
        experimentId - The ID of the experiment.
        userId - The ID of the user.
        sessionId - The ID of the current session.
        isUserFallBack - True if the result will be found based on the session and use the user as fallback; false otherwise.
        Returns:
        The ID of the control or test element to be returned as the result of the experiment evaluation.
      • insertExperimentResultToDB

        void insertExperimentResultToDB(java.lang.Integer experimentId,
                                        java.lang.Long userId,
                                        java.lang.String sessionId,
                                        java.lang.Short resultNumber)
        This method inserts a new record to the EXPRESULT table in the database which holds the experiment result uniquely identified by the experiment, session and user.
        Parameters:
        experimentId - The ID of the experiment.
        userId - The ID of the user.
        sessionId - The ID of the current session.
        resultNumber - The ID of the selected control or test element.