Class SeriesRestService

java.lang.Object
org.opencastproject.series.endpoint.SeriesRestService

@Path("/series") public class SeriesRestService extends Object
REST endpoint for Series Service.
  • Field Details

    • serverUrl

      protected String serverUrl
      Default server URL
    • serviceUrl

      protected String serviceUrl
      Service url
    • DESCENDING_SUFFIX

      public static final String DESCENDING_SUFFIX
      Suffix to mark descending ordering of results
      See Also:
  • Constructor Details

    • SeriesRestService

      public SeriesRestService()
  • Method Details

    • setService

      public void setService(SeriesService seriesService)
      OSGi callback for setting series service.
      Parameters:
      seriesService -
    • setDublinCoreService

      public void setDublinCoreService(DublinCoreCatalogService dcService)
      OSGi callback for setting Dublin Core Catalog service.
      Parameters:
      dcService -
    • setSecurityService

      public void setSecurityService(SecurityService securityService)
      OSGi callback for the security service
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Activates REST service.
      Parameters:
      cc - ComponentContext
    • getSeriesXmlUrl

      public String getSeriesXmlUrl(String seriesId)
    • getSeriesJsonUrl

      public String getSeriesJsonUrl(String seriesId)
    • getSeriesXml

      @GET @Produces("text/xml") @Path("{seriesID:.+}.xml") public javax.ws.rs.core.Response getSeriesXml(@PathParam("seriesID") String seriesID)
    • getSeriesJSON

      @GET @Produces("application/json") @Path("{seriesID:.+}.json") public javax.ws.rs.core.Response getSeriesJSON(@PathParam("seriesID") String seriesID)
    • getSeriesAccessControlListXml

      @GET @Produces("text/xml") @Path("/{seriesID:.+}/acl.xml") public javax.ws.rs.core.Response getSeriesAccessControlListXml(@PathParam("seriesID") String seriesID)
    • getSeriesAccessControlListJson

      @GET @Produces("application/json") @Path("/{seriesID:.+}/acl.json") public javax.ws.rs.core.Response getSeriesAccessControlListJson(@PathParam("seriesID") String seriesID)
    • getAllInRangeAdministrative

      @GET @Produces("application/json") @Path("/allInRangeAdministrative.json") public javax.ws.rs.core.Response getAllInRangeAdministrative(@FormParam("from") Long from, @FormParam("to") Long to, @FormParam("limit") Integer limit) throws UnauthorizedException
      Throws:
      UnauthorizedException
    • addOrUpdateSeries

      @POST @Path("/") public javax.ws.rs.core.Response addOrUpdateSeries(@FormParam("series") String series, @FormParam("acl") String accessControl, @FormParam("accessRights") String dcAccessRights, @FormParam("available") String dcAvailable, @FormParam("contributor") String dcContributor, @FormParam("coverage") String dcCoverage, @FormParam("created") String dcCreated, @FormParam("creator") String dcCreator, @FormParam("date") String dcDate, @FormParam("description") String dcDescription, @FormParam("extent") String dcExtent, @FormParam("format") String dcFormat, @FormParam("identifier") String dcIdentifier, @FormParam("isPartOf") String dcIsPartOf, @FormParam("isReferencedBy") String dcIsReferencedBy, @FormParam("isReplacedBy") String dcIsReplacedBy, @FormParam("language") String dcLanguage, @FormParam("license") String dcLicense, @FormParam("publisher") String dcPublisher, @FormParam("relation") String dcRelation, @FormParam("replaces") String dcReplaces, @FormParam("rights") String dcRights, @FormParam("rightsHolder") String dcRightsHolder, @FormParam("source") String dcSource, @FormParam("spatial") String dcSpatial, @FormParam("subject") String dcSubject, @FormParam("temporal") String dcTemporal, @FormParam("title") String dcTitle, @FormParam("type") String dcType, @DefaultValue("false") @FormParam("override") boolean override) throws UnauthorizedException
      Throws:
      UnauthorizedException
    • updateAccessControl

      @POST @Path("/{seriesID:.+}/accesscontrol") public javax.ws.rs.core.Response updateAccessControl(@PathParam("seriesID") String seriesID, @FormParam("acl") String accessControl, @DefaultValue("false") @FormParam("override") boolean override) throws UnauthorizedException
      Throws:
      UnauthorizedException
    • deleteSeries

      @DELETE @Path("/{seriesID:.+}") public javax.ws.rs.core.Response deleteSeries(@PathParam("seriesID") String seriesID) throws UnauthorizedException
      Throws:
      UnauthorizedException
    • getCount

      @GET @Produces("text/plain") @Path("/count") public javax.ws.rs.core.Response getCount() throws UnauthorizedException
      Throws:
      UnauthorizedException
    • getSeriesPropertiesAsJson

      @GET @Produces("application/json") @Path("{id}/properties.json") public javax.ws.rs.core.Response getSeriesPropertiesAsJson(@PathParam("id") String seriesId) throws UnauthorizedException, NotFoundException
      Throws:
      UnauthorizedException
      NotFoundException
    • getSeriesProperty

      @GET @Produces("application/json") @Path("{seriesId}/property/{propertyName}.json") public javax.ws.rs.core.Response getSeriesProperty(@PathParam("seriesId") String seriesId, @PathParam("propertyName") String propertyName) throws UnauthorizedException, NotFoundException
      Throws:
      UnauthorizedException
      NotFoundException
    • updateSeriesProperty

      @POST @Path("/{seriesId}/property") public javax.ws.rs.core.Response updateSeriesProperty(@PathParam("seriesId") String seriesId, @FormParam("name") String name, @FormParam("value") String value) throws UnauthorizedException
      Throws:
      UnauthorizedException
    • deleteSeriesProperty

      @DELETE @Path("{seriesId}/property/{propertyName}") public javax.ws.rs.core.Response deleteSeriesProperty(@PathParam("seriesId") String seriesId, @PathParam("propertyName") String propertyName) throws UnauthorizedException, NotFoundException
      Throws:
      UnauthorizedException
      NotFoundException
    • getSeriesElements

      @GET @Path("{seriesId}/elements.json") @Produces("application/json") public javax.ws.rs.core.Response getSeriesElements(@PathParam("seriesId") String seriesId)
    • getSeriesElement

      @GET @Path("{seriesId}/elements/{elementType}") public javax.ws.rs.core.Response getSeriesElement(@PathParam("seriesId") String seriesId, @PathParam("elementType") String elementType)
    • putSeriesExtendedMetadata

      @PUT @Path("{seriesId}/extendedMetadata/{type}") public javax.ws.rs.core.Response putSeriesExtendedMetadata(@PathParam("seriesId") String seriesId, @PathParam("type") String type, @FormParam("dc") String dcString)
    • putSeriesElement

      @PUT @Path("{seriesId}/elements/{elementType}") public javax.ws.rs.core.Response putSeriesElement(@Context javax.servlet.http.HttpServletRequest request, @PathParam("seriesId") String seriesId, @PathParam("elementType") String elementType)
    • deleteSeriesElement

      @DELETE @Path("{seriesId}/elements/{elementType}") public javax.ws.rs.core.Response deleteSeriesElement(@PathParam("seriesId") String seriesId, @PathParam("elementType") String elementType)