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
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.inspection.api.MediaInspectionServiceThe inspection serviceprotected org.opencastproject.serviceregistry.api.ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.protected voidcheckNotNull(Object... services) Checks if the service or services are available, if not it handles it by returning a 503 with a messagejavax.ws.rs.core.ResponseenrichTrack(String mediaPackageElement, boolean override, String options) org.opencastproject.job.api.JobProducerorg.opencastproject.serviceregistry.api.ServiceRegistryjavax.ws.rs.core.ResponseinspectTrack(URI uri, String options) voidsetService(org.opencastproject.inspection.api.MediaInspectionService service) Sets the inspection serviceprotected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.voidunsetService(org.opencastproject.inspection.api.MediaInspectionService service) Removes the inspection serviceMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
protected org.opencastproject.inspection.api.MediaInspectionService serviceThe inspection service -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe 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
-
enrichTrack
-
getService
public org.opencastproject.job.api.JobProducer getService()- Specified by:
getServicein classorg.opencastproject.rest.AbstractJobProducerEndpoint- See Also:
-
getServiceRegistry
public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.opencastproject.rest.AbstractJobProducerEndpoint- See Also:
-
checkNotNull
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
-