Class OaiPmhPublicationRestService
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.publication.oaipmh.endpoint.OaiPmhPublicationRestService
@Path("/publication/oaipmh")
public class OaiPmhPublicationRestService
extends AbstractJobProducerEndpoint
Rest endpoint for publishing media to the OAI-PMH publication channel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OaiPmhPublicationServiceThe OAI-PMH publication serviceprotected ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the job producer that is backing this REST endpoint.Return the service registry.javax.ws.rs.core.Responsepublish(String mediaPackageXml, String channel, String downloadElementIds, String streamingElementIds, boolean checkAvailability) javax.ws.rs.core.Responsereplace(String mediaPackageXml, String channel, String downloadElementsXml, String streamingElementsXml, String retractDownloadFlavorsString, String retractStreamingFlavorsString, String publicationsXml, boolean checkAvailability) javax.ws.rs.core.ResponsereplaceSync(String mediaPackageXml, String channel, String downloadElementsXml, String streamingElementsXml, String retractDownloadFlavorsString, String retractStreamingFlavorsString, String publicationsXml, boolean checkAvailability) javax.ws.rs.core.ResponsevoidsetService(OaiPmhPublicationService service) protected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.javax.ws.rs.core.ResponseupdateMetadata(String mediaPackageXml, String channel, String flavors, String tags, boolean checkAvailability) Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
The OAI-PMH publication service -
serviceRegistry
The service registry
-
-
Constructor Details
-
OaiPmhPublicationRestService
public OaiPmhPublicationRestService()
-
-
Method Details
-
setServiceRegistry
Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
setService
- 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 MediaPackageException - Throws:
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
Returns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
- See Also:
-
getServiceRegistry
Return the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint- See Also:
-