Class OaiPmhPublicationRestService

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.publication.oaipmh.endpoint.OaiPmhPublicationRestService

@Path("/publication/oaipmh") public class OaiPmhPublicationRestService extends org.opencastproject.rest.AbstractJobProducerEndpoint
Rest endpoint for publishing media to the OAI-PMH publication channel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.publication.api.OaiPmhPublicationService
    The OAI-PMH publication service
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The service registry
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opencastproject.job.api.JobProducer
    org.opencastproject.serviceregistry.api.ServiceRegistry
    javax.ws.rs.core.Response
    publish(String mediaPackageXml, String channel, String downloadElementIds, String streamingElementIds, boolean checkAvailability)
     
    javax.ws.rs.core.Response
    replace(String mediaPackageXml, String channel, String downloadElementsXml, String streamingElementsXml, String retractDownloadFlavorsString, String retractStreamingFlavorsString, String publicationsXml, boolean checkAvailability)
     
    javax.ws.rs.core.Response
    replaceSync(String mediaPackageXml, String channel, String downloadElementsXml, String streamingElementsXml, String retractDownloadFlavorsString, String retractStreamingFlavorsString, String publicationsXml, boolean checkAvailability)
     
    javax.ws.rs.core.Response
    retract(String mediaPackageXml, String channel)
     
    void
    setService(org.opencastproject.publication.api.OaiPmhPublicationService service)
     
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback from the OSGi declarative services to set the service registry.
    javax.ws.rs.core.Response
    updateMetadata(String mediaPackageXml, String channel, String flavors, String tags, boolean checkAvailability)
     

    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.publication.api.OaiPmhPublicationService service
      The OAI-PMH publication service
    • serviceRegistry

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

    • OaiPmhPublicationRestService

      public OaiPmhPublicationRestService()
  • 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.publication.api.OaiPmhPublicationService service)
      Parameters:
      service - the service to set
    • publish

      @POST @Path("/") @Produces("text/xml") public javax.ws.rs.core.Response publish(@FormParam("mediapackage") String mediaPackageXml, @FormParam("channel") String channel, @FormParam("downloadElementIds") String downloadElementIds, @FormParam("streamingElementIds") String streamingElementIds, @FormParam("checkAvailability") @DefaultValue("true") boolean checkAvailability) throws Exception
      Throws:
      Exception
    • replace

      @POST @Path("/replace") @Produces("text/xml") public javax.ws.rs.core.Response replace(@FormParam("mediapackage") String mediaPackageXml, @FormParam("channel") String channel, @FormParam("downloadElements") String downloadElementsXml, @FormParam("streamingElements") String streamingElementsXml, @FormParam("retractDownloadFlavors") String retractDownloadFlavorsString, @FormParam("retractStreamingFlavors") String retractStreamingFlavorsString, @FormParam("publications") String publicationsXml, @FormParam("checkAvailability") @DefaultValue("true") boolean checkAvailability)
    • replaceSync

      @POST @Path("/replacesync") @Produces("text/xml") public javax.ws.rs.core.Response replaceSync(@FormParam("mediapackage") String mediaPackageXml, @FormParam("channel") String channel, @FormParam("downloadElements") String downloadElementsXml, @FormParam("streamingElements") String streamingElementsXml, @FormParam("retractDownloadFlavors") String retractDownloadFlavorsString, @FormParam("retractStreamingFlavors") String retractStreamingFlavorsString, @FormParam("publications") String publicationsXml, @FormParam("checkAvailability") @DefaultValue("true") boolean checkAvailability) throws org.opencastproject.mediapackage.MediaPackageException
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
    • retract

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

      @POST @Path("/updateMetadata") @Produces("text/xml") public javax.ws.rs.core.Response updateMetadata(@FormParam("mediapackage") String mediaPackageXml, @FormParam("channel") String channel, @FormParam("flavors") String flavors, @FormParam("tags") String tags, @FormParam("checkAvailability") @DefaultValue("true") boolean checkAvailability) 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:
      • AbstractJobProducer.getServiceRegistry()