Class 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)
      java.lang.String applyExperiment​(javax.servlet.http.HttpServletRequest request, java.lang.String experimentId, @NotNull java.lang.String reqData)
      Perform the operation of creating a new ActiveExperimentVariant if need and respond with the ABTestExperimentVariant 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)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ABTestResource

        public ABTestResource()
    • 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 new ActiveExperimentVariant if need and respond with the ABTestExperimentVariant 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
        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
        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