Class CaptionServiceRestEndpoint
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.caption.endpoint.CaptionServiceRestEndpoint
@Path("/caption")
public class CaptionServiceRestEndpoint
extends org.opencastproject.rest.AbstractJobProducerEndpoint
Rest endpoint for
CaptionService.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.caption.api.CaptionServiceThe caption 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.javax.ws.rs.core.ResponseConvert captions in catalog from one format to another.org.opencastproject.job.api.JobProducerorg.opencastproject.serviceregistry.api.ServiceRegistryjavax.ws.rs.core.ResponseParses captions in catalog for language information.protected voidsetCaptionService(org.opencastproject.caption.api.CaptionService service) Sets the caption serviceprotected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.protected voidunsetCaptionService(org.opencastproject.caption.api.CaptionService service) Removes the caption serviceMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
protected org.opencastproject.caption.api.CaptionService serviceThe caption service -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe service registry
-
-
Constructor Details
-
CaptionServiceRestEndpoint
public CaptionServiceRestEndpoint()
-
-
Method Details
-
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
-
setCaptionService
protected void setCaptionService(org.opencastproject.caption.api.CaptionService service) Sets the caption service- Parameters:
service- the caption service to set
-
unsetCaptionService
protected void unsetCaptionService(org.opencastproject.caption.api.CaptionService service) Removes the caption service- Parameters:
service- the caption service to remove
-
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
-
convert
@POST @Path("convert") @Produces("text/xml") public javax.ws.rs.core.Response convert(@FormParam("input") String inputType, @FormParam("output") String outputType, @FormParam("captions") String catalogAsXml, @FormParam("language") String lang) Convert captions in catalog from one format to another.- Parameters:
inputType- input formatoutputType- output formatcatalogAsXml- catalog containing captionslang- caption language- Returns:
- a Response containing receipt of for conversion
-
languages
@POST @Path("languages") @Produces("text/xml") public javax.ws.rs.core.Response languages(@FormParam("input") String inputType, @FormParam("captions") String catalogAsXml) Parses captions in catalog for language information.- Parameters:
inputType- caption formatcatalogAsXml- catalog containing captions- Returns:
- a Response containing XML with language information
-
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:
-