Class ExperimentVariantsTracker

    • Constructor Detail

      • ExperimentVariantsTracker

        public ExperimentVariantsTracker()
    • Method Detail

      • applyExperiment

        public static ActiveExperimentVariant applyExperiment​(HttpSession session,
                                                              java.lang.String experimentId,
                                                              java.lang.String trackId)
                                                       throws PortalException
        Apply the given experiment to the current session.
        Parameters:
        session - the current session.
        experimentId - the experiment identifier to apply to the session.
        trackId - the track identifier of the user that will apply the experiment.
        Returns:
        the applied ActiveExperimentVariant or null if no experiment was applied.
        Throws:
        PortalException
        Since:
        14.0.0
      • completeExperiment

        public static void completeExperiment​(HttpSession session,
                                              java.lang.String experimentId,
                                              java.lang.String trackId)
                                       throws PortalException
        Complete the given experiment in the current session.
        Parameters:
        session - the current session.
        experimentId - the experiment identifier to apply to the session.
        trackId - the track identifier of the user that will complete the experiment.
        Throws:
        PortalException
        Since:
        14.0.0
      • abandonExperiment

        public static void abandonExperiment​(HttpSession session,
                                             java.lang.String experimentId,
                                             java.lang.String trackId)
                                      throws PortalException
        Abandon the given experiment in the current session.
        Parameters:
        session - the current session.
        experimentId - the experiment identifier to apply to the session.
        trackId - the track identifier of the user that will abandon the experiment.
        Throws:
        PortalException
        Since:
        14.0.0