Class CaptionServiceRestEndpoint
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.caption.endpoint.CaptionServiceRestEndpoint
Rest endpoint for
CaptionService.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CaptionServiceThe caption serviceprotected 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.Returns the job producer that is backing this REST endpoint.Return the service registry.javax.ws.rs.core.ResponseParses captions in catalog for language information.protected voidsetCaptionService(CaptionService service) Sets the caption serviceprotected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.protected voidunsetCaptionService(CaptionService service) Removes the caption serviceMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
The caption service -
serviceRegistry
The 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
Sets the caption service- Parameters:
service- the caption service to set
-
unsetCaptionService
Removes the caption service- Parameters:
service- the caption service to remove
-
setServiceRegistry
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
Returns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
- See Also:
-
getServiceRegistry
Return the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint- See Also:
-