Class SoxRestService

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.sox.impl.endpoint.SoxRestService

@Path("/sox") public class SoxRestService extends AbstractJobProducerEndpoint
A REST endpoint delegating functionality to the SoxService
  • Field Details

    • docs

      protected String docs
      The rest documentation
    • serverUrl

      protected String serverUrl
      The base server URL
    • soxService

      protected SoxService soxService
      The composer service
    • serviceRegistry

      protected ServiceRegistry serviceRegistry
      The service registry
  • Constructor Details

    • SoxRestService

      public SoxRestService()
  • Method Details

    • setServiceRegistry

      protected void setServiceRegistry(ServiceRegistry serviceRegistry)
      Callback from the OSGi declarative services to set the service registry.
      Parameters:
      serviceRegistry - the service registry
    • setSoxService

      public void setSoxService(SoxService soxService)
      Sets the SoX service.
      Parameters:
      soxService - the SoX 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
    • analyze

      @POST @Path("analyze") @Produces("text/xml") public javax.ws.rs.core.Response analyze(@FormParam("sourceAudioTrack") String sourceAudioTrackAsXml) throws Exception
      Analyze an audio track.
      Parameters:
      sourceAudioTrackAsXml - The source audio track
      Returns:
      A response containing the job for this audio analyzing job in the response body.
      Throws:
      Exception
    • normalize

      @POST @Path("normalize") @Produces("text/xml") public javax.ws.rs.core.Response normalize(@FormParam("sourceAudioTrack") String sourceAudioTrackAsXml, @FormParam("targetRmsLevDb") Float targetRmsLevDb) throws Exception
      Normalize an audio track.
      Parameters:
      sourceAudioTrackAsXml - The source audio track
      targetRmsLevDb - the target RMS level dB
      Returns:
      A response containing the job for this encoding job in the response body.
      Throws:
      Exception
    • getService

      public JobProducer getService()
      Description copied from class: AbstractJobProducerEndpoint
      Returns the job producer that is backing this REST endpoint.
      Specified by:
      getService in class AbstractJobProducerEndpoint
      Returns:
      the job producer
    • getServiceRegistry

      public ServiceRegistry getServiceRegistry()
      Description copied from class: AbstractJobProducerEndpoint
      Return the service registry.
      Specified by:
      getServiceRegistry in class AbstractJobProducerEndpoint