com.ibm.commerce.rest.marketing.handler

Class EventHandler

  • All Implemented Interfaces:
    DocumentedResourceHandler, IResourceHandler


    @Path(value="store/{storeId}/event")
     @Encoded
    public class EventHandler
    extends com.ibm.commerce.foundation.rest.resourcehandler.AbstractClassicResourceHandler
    implements IResourceHandler
    This handler triggers Marketing code based on certain type of events, like CategoryDisplay, ProductDisplay etc.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • RESOURCE_NAME

        public static final java.lang.String RESOURCE_NAME
        The Constant RESOURCE_NAME.
        See Also:
        Constant Field Values
      • FORMAT_GROUP_NAME

        public static final java.lang.String FORMAT_GROUP_NAME
        The constant FORMAT_GROUP_NAME.
        See Also:
        Constant Field Values
      • EMARKETING_SPOT_ID

        public static final java.lang.String EMARKETING_SPOT_ID
        The Constant EMARKETING_SPOT_ID
        See Also:
        Constant Field Values
    • Constructor Detail

      • EventHandler

        public EventHandler()
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: IResourceHandler
        This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.
        Specified by:
        getResourceName in interface IResourceHandler
        Returns:
        the resource name
      • triggerMarketing

        @POST
        public javax.ws.rs.core.Response triggerMarketing(@PathParam(value="storeId")
                                                                java.lang.String storeId,
                                                                @QueryParam(value="responseFormat")
                                                                java.lang.String responseFormat)
        Trigger marketing based on certain events. The shopper must log in before invoking this method.
        Parameters:
        storeId - the store id
        responseFormat - the response format shortcut(e.g, json, xml)
        Returns:
        the response
      • getBehaviorRules

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="behavior_rules")
        public javax.ws.rs.core.Response getBehaviorRules(@PathParam(value="storeId")
                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                      java.lang.String astrResponseFormat)
        Retrieve all the user behavior rules
        Parameters:
        astrResponseFormat - the response format shortcut(e.g, json, xml)
        Returns:
        the formatted user behavior rules
      • evaluateTriggers

        @POST
         @Path(value="evaluate_triggers")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response evaluateTriggers(@PathParam(value="storeId")
                                                                                                                                                                                                          java.lang.String storeId,
                                                                                                                                                                                                          @QueryParam(value="responseFormat")
                                                                                                                                                                                                          java.lang.String responseFormat)
        Evaluate triggers sent from remote server, and then record or send valid triggers.
        Parameters:
        storeId - the store id
        responseFormat - the response format shortcut(e.g, json, xml)
        Returns:
        the response
      • handleClickInfo

        @POST
         @Path(value="click_info")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response handleClickInfo(@PathParam(value="storeId")
                                                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                                                  java.lang.String responseFormat)