Class ABTestResource
- java.lang.Object
-
- lumis.service.analytics.abtest.rest.ABTestResource
-
@Path("/lumis/service/analytics/abtest/api/rest") public class ABTestResource extends java.lang.Object
Perform operations with the A/B Test API using REST.- Since:
- 14.0.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description ABTestResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abandonExperiment(javax.servlet.http.HttpServletRequest request, java.lang.String experimentId, @NotNull java.lang.String reqData)
Abandon theActiveExperimentVariant
.java.lang.String
applyExperiment(javax.servlet.http.HttpServletRequest request, java.lang.String experimentId, @NotNull java.lang.String reqData)
Perform the operation of creating a newActiveExperimentVariant
if need and respond with theABTestExperimentVariant
configuration.void
deleteExperiment(java.lang.String experimentId)
Deletes the experiment with the given identifier.void
experimentGoalAchieved(javax.servlet.http.HttpServletRequest request, java.lang.String experimentId, @NotNull java.lang.String reqData)
Complete theActiveExperimentVariant
.
-
-
-
Method Detail
-
applyExperiment
@Path("/applyExperiment/{targetExperiment:[a-fA-F0-9]{32}}") @POST @Consumes({"application/json","text/plain"}) @Produces("application/json") public java.lang.String applyExperiment(@Context javax.servlet.http.HttpServletRequest request, @PathParam("targetExperiment") java.lang.String experimentId, @NotNull @NotNull java.lang.String reqData) throws PortalException
Perform the operation of creating a newActiveExperimentVariant
if need and respond with theABTestExperimentVariant
configuration.- Parameters:
request
- The request to save the applied experiment.experimentId
- The experiment to be applied.reqData
- JSON object containing the additional data.- Returns:
- A JSON containing the variant configuration or null if the session is not in a
ActiveExperimentVariant
. - Throws:
PortalException
- Since:
- 14.0.0
-
experimentGoalAchieved
@Path("/experimentGoalAchieved/{targetExperiment:[a-fA-F0-9]{32}}") @POST public void experimentGoalAchieved(@Context javax.servlet.http.HttpServletRequest request, @PathParam("targetExperiment") java.lang.String experimentId, @NotNull @NotNull java.lang.String reqData) throws PortalException
Complete theActiveExperimentVariant
.- Parameters:
request
- The request of the applied experiment.experimentId
- The experiment to be complete.reqData
- JSON object containing the additional data.- Throws:
PortalException
- Since:
- 14.0.0
-
abandonExperiment
@Path("/abandonExperiment/{targetExperiment:[a-fA-F0-9]{32}}") @POST public void abandonExperiment(@Context javax.servlet.http.HttpServletRequest request, @PathParam("targetExperiment") java.lang.String experimentId, @NotNull @NotNull java.lang.String reqData) throws PortalException
Abandon theActiveExperimentVariant
.- Parameters:
request
- The request of the applied experiment.experimentId
- The experiment to be abandon.reqData
- JSON object containing the additional data.- Throws:
PortalException
- Since:
- 14.0.0
-
deleteExperiment
@Path("/experiment/{experimentId: [a-fA-F0-9]{32}}") @DELETE public void deleteExperiment(@PathParam("experimentId") java.lang.String experimentId) throws PortalException
Deletes the experiment with the given identifier.- Parameters:
experimentId
- the experiment identifier- Throws:
PortalException
- Since:
- 16.0.0
-
-