Class CaptionServiceRestEndpoint

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.caption.endpoint.CaptionServiceRestEndpoint

@Path("/caption") public class CaptionServiceRestEndpoint extends AbstractJobProducerEndpoint
Rest endpoint for CaptionService.
  • Field Details

    • service

      protected CaptionService service
      The caption service
    • serviceRegistry

      protected ServiceRegistry 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

      protected void setCaptionService(CaptionService service)
      Sets the caption service
      Parameters:
      service - the caption service to set
    • unsetCaptionService

      protected void unsetCaptionService(CaptionService service)
      Removes the caption service
      Parameters:
      service - the caption service to remove
    • setServiceRegistry

      protected void setServiceRegistry(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 format
      outputType - output format
      catalogAsXml - catalog containing captions
      lang - 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 format
      catalogAsXml - catalog containing captions
      Returns:
      a Response containing XML with language information
    • 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: