Class MediaInspectionRestEndpoint

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.inspection.api.MediaInspectionService
    The inspection service
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The service registry
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    Callback from OSGi that is called when this service is activated.
    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
    javax.ws.rs.core.Response
    enrichTrack(String mediaPackageElement, boolean override, String options)
     
    org.opencastproject.job.api.JobProducer
    org.opencastproject.serviceregistry.api.ServiceRegistry
    javax.ws.rs.core.Response
    inspectTrack(URI uri, String options)
     
    void
    setService(org.opencastproject.inspection.api.MediaInspectionService service)
    Sets the inspection service
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback from the OSGi declarative services to set the service registry.
    void
    unsetService(org.opencastproject.inspection.api.MediaInspectionService service)
    Removes the inspection service

    Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint

    checkHeartbeat, dispatchJob

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • service

      protected org.opencastproject.inspection.api.MediaInspectionService service
      The inspection service
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The service registry
  • Constructor Details

    • MediaInspectionRestEndpoint

      public MediaInspectionRestEndpoint()
  • Method Details

    • setServiceRegistry

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

      public void setService(org.opencastproject.inspection.api.MediaInspectionService service)
      Sets the inspection service
      Parameters:
      service - the inspection service
    • unsetService

      public void unsetService(org.opencastproject.inspection.api.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 org.opencastproject.job.api.JobProducer getService()
      Specified by:
      getService in class org.opencastproject.rest.AbstractJobProducerEndpoint
      See Also:
      • AbstractJobProducerEndpoint.getService()
    • getServiceRegistry

      public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in class org.opencastproject.rest.AbstractJobProducerEndpoint
      See Also:
      • AbstractJobProducerEndpoint.getServiceRegistry()
    • 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