Class DownloadDistributionRestService

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.distribution.download.endpoint.DownloadDistributionRestService

@Path("/distribution/download") public class DownloadDistributionRestService extends org.opencastproject.rest.AbstractJobProducerEndpoint
Rest endpoint for distributing media to the local distribution channel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.distribution.api.DownloadDistributionService
    The download distribution 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
    distribute(String mediaPackageXml, String elementId, String channelId, boolean checkAvailability, boolean preserveReference)
     
    javax.ws.rs.core.Response
    distributeSync(String mediaPackageXml, String elementId, String channelId, boolean checkAvailability)
     
    org.opencastproject.job.api.JobProducer
    org.opencastproject.serviceregistry.api.ServiceRegistry
    javax.ws.rs.core.Response
    retract(String mediaPackageXml, String elementId, String channelId)
     
    javax.ws.rs.core.Response
    retractSync(String mediaPackageXml, String elementId, String channelId)
     
    void
    setService(org.opencastproject.distribution.api.DownloadDistributionService service)
     
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback from the OSGi declarative services to set the service registry.

    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.distribution.api.DownloadDistributionService service
      The download distribution service
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The service registry
  • Constructor Details

    • DownloadDistributionRestService

      public DownloadDistributionRestService()
  • Method Details

    • 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
    • setService

      public void setService(org.opencastproject.distribution.api.DownloadDistributionService service)
      Parameters:
      service - the service to set
    • 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
    • distribute

      @POST @Path("/") @Produces("text/xml") public javax.ws.rs.core.Response distribute(@FormParam("mediapackage") String mediaPackageXml, @FormParam("elementId") String elementId, @FormParam("channelId") String channelId, @FormParam("checkAvailability") @DefaultValue("true") boolean checkAvailability, @FormParam("preserveReference") @DefaultValue("false") boolean preserveReference) throws Exception
      Throws:
      Exception
    • distributeSync

      @POST @Path("/distributesync") @Produces("text/xml") public javax.ws.rs.core.Response distributeSync(@FormParam("mediapackage") String mediaPackageXml, @FormParam("elementId") String elementId, @FormParam("channelId") String channelId, @DefaultValue("true") @FormParam("checkAvailability") boolean checkAvailability) throws Exception
      Throws:
      Exception
    • retract

      @POST @Path("/retract") @Produces("text/xml") public javax.ws.rs.core.Response retract(@FormParam("mediapackage") String mediaPackageXml, @FormParam("elementId") String elementId, @FormParam("channelId") String channelId) throws Exception
      Throws:
      Exception
    • retractSync

      @POST @Path("/retractsync") @Produces("text/xml") public javax.ws.rs.core.Response retractSync(@FormParam("mediapackage") String mediaPackageXml, @FormParam("elementId") String elementId, @FormParam("channelId") String channelId) throws Exception
      Throws:
      Exception
    • 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()