Class AnnotationRestService

java.lang.Object
org.opencastproject.annotation.impl.AnnotationRestService

@Path("/annotation") public class AnnotationRestService extends Object
The REST endpoint for the annotation service.
  • Field Details

    • serverUrl

      protected String serverUrl
      This server's base URL
    • serviceUrl

      protected String serviceUrl
      The REST endpoint's base URL
  • Constructor Details

    • AnnotationRestService

      public AnnotationRestService()
  • Method Details

    • setService

      public void setService(org.opencastproject.annotation.api.AnnotationService service)
      Method to set the service this REST endpoint uses
      Parameters:
      service - the annotation service implementation
    • 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
    • getAnnotationsAsXml

      @GET @Produces("text/xml") @Path("annotations.xml") public javax.ws.rs.core.Response getAnnotationsAsXml(@QueryParam("episode") String id, @QueryParam("type") String type, @QueryParam("day") String day, @QueryParam("limit") int limit, @QueryParam("offset") int offset)
      Returns:
      XML with all footprints
    • getAnnotationsAsJson

      @GET @Produces("application/json") @Path("annotations.json") public javax.ws.rs.core.Response getAnnotationsAsJson(@QueryParam("episode") String id, @QueryParam("type") String type, @QueryParam("day") String day, @QueryParam("limit") int limit, @QueryParam("offset") int offset)
      Returns:
      JSON with all footprints
    • add

      @PUT @Path("") @Produces("text/xml") public javax.ws.rs.core.Response add(@FormParam("episode") String mediapackageId, @FormParam("in") int inpoint, @FormParam("out") int outpoint, @FormParam("type") String type, @FormParam("value") String value, @FormParam("isPrivate") boolean isPrivate, @Context javax.servlet.http.HttpServletRequest request)
    • change

      @PUT @Path("{id}") @Produces("text/xml") public javax.ws.rs.core.Response change(@PathParam("id") String idAsString, @FormParam("value") String value, @Context javax.servlet.http.HttpServletRequest request) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getAnnotationAsXml

      @GET @Produces("text/xml") @Path("{id}.xml") public AnnotationImpl getAnnotationAsXml(@PathParam("id") String idAsString) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getAnnotationAsJson

      @GET @Produces("application/json") @Path("{id}.json") public AnnotationImpl getAnnotationAsJson(@PathParam("id") String idAsString) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • removeAnnotation

      @DELETE @Path("{id}") public javax.ws.rs.core.Response removeAnnotation(@PathParam("id") String idAsString) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException