Class MediaInspectionRestEndpoint

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.inspection.ffmpeg.endpoints.MediaInspectionRestEndpoint

@Path("/inspection") public class MediaInspectionRestEndpoint extends AbstractJobProducerEndpoint
A service endpoint to expose the MediaInspectionService via REST.
  • Field Details

  • Constructor Details

    • MediaInspectionRestEndpoint

      public MediaInspectionRestEndpoint()
  • Method Details

    • setServiceRegistry

      protected void setServiceRegistry(ServiceRegistry serviceRegistry)
      Callback from the OSGi declarative services to set the service registry.
      Parameters:
      serviceRegistry - the service registry
    • setService

      public void setService(MediaInspectionService service)
      Sets the inspection service
      Parameters:
      service - the inspection service
    • unsetService

      public void unsetService(MediaInspectionService service)
      Removes the inspection service
      Parameters:
      service -
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Callback from OSGi that is called when this service is activated.
      Parameters:
      cc - OSGi component context
    • inspectTrack

      @GET @Produces("text/xml") @Path("inspect") public javax.ws.rs.core.Response inspectTrack(@QueryParam("uri") URI uri, @QueryParam("options") String options)
    • enrichTrack

      @POST @Produces("text/xml") @Path("enrich") public javax.ws.rs.core.Response enrichTrack(@FormParam("mediaPackageElement") String mediaPackageElement, @FormParam("override") boolean override, @FormParam("options") String options)
    • getService

      public JobProducer getService()
      Returns the job producer that is backing this REST endpoint.
      Specified by:
      getService in class AbstractJobProducerEndpoint
      Returns:
      the job producer
      See Also:
    • getServiceRegistry

      public ServiceRegistry getServiceRegistry()
      Return the service registry.
      Specified by:
      getServiceRegistry in class AbstractJobProducerEndpoint
      See Also:
    • checkNotNull

      protected void checkNotNull(Object... services)
      Checks if the service or services are available, if not it handles it by returning a 503 with a message
      Parameters:
      services - an array of services to check