Class ExperimentVariantsTracker
- java.lang.Object
-
- lumis.service.analytics.abtest.track.ExperimentVariantsTracker
-
- All Implemented Interfaces:
Serializable
,EventListener
,HttpSessionBindingListener
public class ExperimentVariantsTracker extends Object implements HttpSessionBindingListener, Serializable
Class responsible for dealing with the storage of theActiveExperimentVariant
.- Since:
- 14.0.0
- Version:
- $Revision: 24678 $ $Date: 2021-08-21 22:28:26 -0300 (Sat, 21 Aug 2021) $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExperimentVariantsTracker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
abandonExperiment(HttpSession session, String experimentId, String trackId)
Abandon the given experiment in the current session.static ActiveExperimentVariant
applyExperiment(HttpSession session, String experimentId, String trackId)
Apply the given experiment to the current session.static void
completeExperiment(HttpSession session, String experimentId, String trackId)
Complete the given experiment in the current session.static Collection<ActiveExperimentVariant>
getActiveExperiments(HttpSession session)
Returns all validActiveExperimentVariant
in the current session.void
valueBound(HttpSessionBindingEvent event)
void
valueUnbound(HttpSessionBindingEvent event)
-
-
-
Method Detail
-
valueBound
public void valueBound(HttpSessionBindingEvent event)
- Specified by:
valueBound
in interfaceHttpSessionBindingListener
-
valueUnbound
public void valueUnbound(HttpSessionBindingEvent event)
- Specified by:
valueUnbound
in interfaceHttpSessionBindingListener
-
getActiveExperiments
public static Collection<ActiveExperimentVariant> getActiveExperiments(HttpSession session)
Returns all validActiveExperimentVariant
in the current session.- Parameters:
session
- the current session.- Returns:
- all valid
ActiveExperimentVariant
in the current session. - Since:
- 14.0.0
-
applyExperiment
public static ActiveExperimentVariant applyExperiment(HttpSession session, String experimentId, 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
ornull
if no experiment was applied. - Throws:
PortalException
- Since:
- 14.0.0
-
completeExperiment
public static void completeExperiment(HttpSession session, String experimentId, 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, String experimentId, 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
-
-