com.ibm.commerce.context.experiment

Interface ExperimentContext

  • All Superinterfaces:
    Context, java.io.Serializable
    All Known Implementing Classes:
    ExperimentContextImpl


    public interface ExperimentContext
    extends Context
    This interface defines the context object that is used in Experimentation. This context contains user and store dependent experiment result information, which is a randomly generated number used to determine the experimental element that will be converted to the control activity.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CONTEXT_NAME
      This is the name of the context.
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.Short getExperimentResult(java.lang.Integer experimentId)
      This method returns the result of the given experiment for the user who owns this context.
      java.lang.String getSessionId()
      This method returns the current session ID for the user who is accessing this context.
      void setExperimentResult(java.lang.Integer experimentId, java.lang.Short newExperimentResult)
      This method sets the result of the given experiment for the user who owns this context.
      void setSessionId(java.lang.String newSessionId)
      This method sets the current session ID for the user who is accessing this context.
    • Field Detail

      • COPYRIGHT

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

        static final java.lang.String CONTEXT_NAME
        This is the name of the context.
        See Also:
        Constant Field Values
    • Method Detail

      • getExperimentResult

        java.lang.Short getExperimentResult(java.lang.Integer experimentId)
        This method returns the result of the given experiment for the user who owns this context. Experiment result is a randomly generated number used to determine the experimental element that will be converted to the control activity.
        Parameters:
        experimentId - The ID of the experiment.
        Returns:
        The result of the given experiment.
      • getSessionId

        java.lang.String getSessionId()
        This method returns the current session ID for the user who is accessing this context.
        Returns:
        The current session ID used specifically in marketing experimentation.
      • setExperimentResult

        void setExperimentResult(java.lang.Integer experimentId,
                                 java.lang.Short newExperimentResult)
        This method sets the result of the given experiment for the user who owns this context. Experiment result is a randomly generated number used to determine the experimental element that will be converted to the control activity.
        Parameters:
        experimentId - The ID of the experiment.
        newExperimentResult - The result of the given experiment.
      • setSessionId

        void setSessionId(java.lang.String newSessionId)
        This method sets the current session ID for the user who is accessing this context.
        Parameters:
        newSessionId - The current session ID used specifically in marketing experimentation.