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

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.caption.api.CaptionService
    The caption 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.
    javax.ws.rs.core.Response
    convert(String inputType, String outputType, String catalogAsXml, String lang)
    Convert captions in catalog from one format to another.
    org.opencastproject.job.api.JobProducer
    org.opencastproject.serviceregistry.api.ServiceRegistry
    javax.ws.rs.core.Response
    languages(String inputType, String catalogAsXml)
    Parses captions in catalog for language information.
    protected void
    setCaptionService(org.opencastproject.caption.api.CaptionService service)
    Sets the caption service
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback from the OSGi declarative services to set the service registry.
    protected void
    unsetCaptionService(org.opencastproject.caption.api.CaptionService service)
    Removes the caption 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.caption.api.CaptionService service
      The caption service
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.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(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 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 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()