Class UserTrackingRestService
java.lang.Object
org.opencastproject.usertracking.endpoint.UserTrackingRestService
REST Endpoint for User Tracking Service
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) The method that is called, when the service is activatedjavax.ws.rs.core.ResponseaddFootprint(String mediapackageId, String inString, String outString, String type, String isPlaying, javax.servlet.http.HttpServletRequest request) getActionAsJson(String actionId) getActionAsXml(String actionId) getFootprintAsJson(String mediapackageId) getFootprintAsXml(String mediapackageId) getUserActionsAsJson(String id, String type, String day, int limit, int offset) getUserActionsAsXml(String id, String type, String day, int limit, int offset) javax.ws.rs.core.ResponsereportAsJson(String from, String to, int offset, int limit) reportAsXml(String from, String to, int offset, int limit) voidsetSecurityService(SecurityService securityService) Sets the security servicevoidsetService(UserTrackingService service) Method to set the service this REST endpoint usesstatsAsJson(String mediapackageId) statsAsXml(String mediapackageId)
-
Field Details
-
securityService
-
serverUrl
-
serviceUrl
-
-
Constructor Details
-
UserTrackingRestService
public UserTrackingRestService()
-
-
Method Details
-
setService
Method to set the service this REST endpoint uses- Parameters:
service-
-
setSecurityService
Sets the security service- Parameters:
securityService- the securityService to set
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) The method that is called, when the service is activated- Parameters:
cc- The ComponentContext of this service
-
getUserActionsAsXml
@GET @Produces("text/xml") @Path("/actions.xml") public UserActionListImpl getUserActionsAsXml(@QueryParam("id") String id, @QueryParam("type") String type, @QueryParam("day") String day, @QueryParam("limit") int limit, @QueryParam("offset") int offset) - Returns:
- XML with all footprints
-
getUserActionsAsJson
@GET @Produces("application/json") @Path("/actions.json") public UserActionListImpl getUserActionsAsJson(@QueryParam("id") String id, @QueryParam("type") String type, @QueryParam("day") String day, @QueryParam("limit") int limit, @QueryParam("offset") int offset) - Returns:
- JSON with all footprints
-
statsAsXml
-
statsAsJson
-
reportAsXml
@GET @Produces("text/xml") @Path("/report.xml") public ReportImpl reportAsXml(@QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("offset") int offset, @QueryParam("limit") int limit) -
reportAsJson
@GET @Produces("application/json") @Path("/report.json") public ReportImpl reportAsJson(@QueryParam("from") String from, @QueryParam("to") String to, @QueryParam("offset") int offset, @QueryParam("limit") int limit) -
addFootprint
@PUT @Path("") @Produces("text/xml") public javax.ws.rs.core.Response addFootprint(@FormParam("id") String mediapackageId, @FormParam("in") String inString, @FormParam("out") String outString, @FormParam("type") String type, @FormParam("playing") String isPlaying, @Context javax.servlet.http.HttpServletRequest request) -
getActionAsXml
@GET @Produces("text/xml") @Path("/action/{id}.xml") public UserActionImpl getActionAsXml(@PathParam("id") String actionId) -
getActionAsJson
@GET @Produces("application/json") @Path("/action/{id}.json") public UserActionImpl getActionAsJson(@PathParam("id") String actionId) -
getFootprintAsXml
@GET @Produces("text/xml") @Path("/footprint.xml") public FootprintsListImpl getFootprintAsXml(@QueryParam("id") String mediapackageId) -
getFootprintAsJson
@GET @Produces("application/json") @Path("/footprint.json") public FootprintsListImpl getFootprintAsJson(@QueryParam("id") String mediapackageId) -
getUserTrackingEnabled
@GET @Produces("text/plain") @Path("/detailenabled") public javax.ws.rs.core.Response getUserTrackingEnabled()
-