Class ExperimentVariantsTracker
- java.lang.Object
-
- lumis.service.analytics.abtest.track.ExperimentVariantsTracker
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.EventListener
,javax.servlet.http.HttpSessionBindingListener
public class ExperimentVariantsTracker extends java.lang.Object implements javax.servlet.http.HttpSessionBindingListener, java.io.Serializable
Class responsible for dealing with the storage of theActiveExperimentVariant
.- Since:
- 14.0.0
- Version:
- $Revision$ $Date$
- 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(javax.servlet.http.HttpSession session, java.lang.String experimentId, java.lang.String trackId)
Abandon the given experiment in the current session.static ActiveExperimentVariant
applyExperiment(javax.servlet.http.HttpSession session, java.lang.String experimentId, java.lang.String trackId)
Apply the given experiment to the current session.static void
completeExperiment(javax.servlet.http.HttpSession session, java.lang.String experimentId, java.lang.String trackId)
Complete the given experiment in the current session.static java.util.Collection<ActiveExperimentVariant>
getActiveExperiments(javax.servlet.http.HttpSession session)
Returns all validActiveExperimentVariant
in the current session.void
valueBound(javax.servlet.http.HttpSessionBindingEvent event)
void
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
-
-
-
Method Detail
-
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
- Specified by:
valueBound
in interfacejavax.servlet.http.HttpSessionBindingListener
-
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
- Specified by:
valueUnbound
in interfacejavax.servlet.http.HttpSessionBindingListener
-
getActiveExperiments
public static java.util.Collection<ActiveExperimentVariant> getActiveExperiments(javax.servlet.http.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(javax.servlet.http.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
ornull
if no experiment was applied. - Throws:
PortalException
- Since:
- 14.0.0
-
completeExperiment
public static void completeExperiment(javax.servlet.http.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(javax.servlet.http.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
-
-