Class SeriesEndpoint

java.lang.Object
org.opencastproject.external.endpoint.SeriesEndpoint

@Path("/api/series") @Produces({"application/json","application/v1.0.0+json","application/v1.1.0+json","application/v1.2.0+json","application/v1.3.0+json","application/v1.4.0+json","application/v1.5.0+json","application/v1.6.0+json","application/v1.7.0+json","application/v1.8.0+json","application/v1.9.0+json","application/v1.10.0+json","application/v1.11.0+json"}) public class SeriesEndpoint extends Object
  • Field Details

    • endpointBaseUrl

      protected String endpointBaseUrl
      Base URL of this endpoint
  • Constructor Details

    • SeriesEndpoint

      public SeriesEndpoint()
  • Method Details

    • getSeriesList

      @GET @Path("") public javax.ws.rs.core.Response getSeriesList(@HeaderParam("Accept") String acceptHeader, @QueryParam("filter") String filter, @QueryParam("sort") String sort, @QueryParam("order") String order, @QueryParam("offset") int offset, @QueryParam("limit") int limit, @QueryParam("onlyWithWriteAccess") Boolean onlyWithWriteAccess, @QueryParam("withacl") Boolean withAcl) throws UnauthorizedException
      Throws:
      UnauthorizedException
    • getSeries

      @GET @Path("{seriesId}") public javax.ws.rs.core.Response getSeries(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id, @QueryParam("withacl") Boolean withAcl) throws Exception
      Throws:
      Exception
    • getSeriesMetadata

      @GET @Path("{seriesId}/metadata") public javax.ws.rs.core.Response getSeriesMetadata(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id, @QueryParam("type") String type) throws Exception
      Throws:
      Exception
    • updateSeriesMetadata

      @PUT @Path("{seriesId}/metadata") public javax.ws.rs.core.Response updateSeriesMetadata(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id, @QueryParam("type") String type, @FormParam("metadata") String metadataJSON) throws Exception
      Throws:
      Exception
    • deleteSeriesMetadataByType

      @DELETE @Path("{seriesId}/metadata") public javax.ws.rs.core.Response deleteSeriesMetadataByType(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id, @QueryParam("type") String type) throws Exception
      Throws:
      Exception
    • getSeriesAcl

      @GET @Path("{seriesId}/acl") public javax.ws.rs.core.Response getSeriesAcl(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id) throws Exception
      Throws:
      Exception
    • getSeriesProperties

      @GET @Path("{seriesId}/properties") public javax.ws.rs.core.Response getSeriesProperties(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id) throws Exception
      Throws:
      Exception
    • deleteSeries

      @DELETE @Path("{seriesId}") public javax.ws.rs.core.Response deleteSeries(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String id) throws NotFoundException
      Throws:
      NotFoundException
    • updateSeriesMetadata

      @PUT @Path("{seriesId}") public javax.ws.rs.core.Response updateSeriesMetadata(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String seriesID, @FormParam("metadata") String metadataJSON) throws UnauthorizedException, NotFoundException, SearchIndexException
      Throws:
      UnauthorizedException
      NotFoundException
      SearchIndexException
    • createNewSeries

      @POST @Path("") public javax.ws.rs.core.Response createNewSeries(@HeaderParam("Accept") String acceptHeader, @FormParam("metadata") String metadataParam, @FormParam("acl") String aclParam, @FormParam("theme") String themeIdParam) throws UnauthorizedException, NotFoundException
      Throws:
      UnauthorizedException
      NotFoundException
    • deserializeMetadataList

      protected MetadataList deserializeMetadataList(String json) throws org.json.simple.parser.ParseException, NotFoundException
      Change the simplified fields of key values provided to the external api into a MetadataList.
      Parameters:
      json - The json string that contains an array of metadata field lists for the different catalogs.
      Returns:
      A MetadataList with the fields populated with the values provided.
      Throws:
      org.json.simple.parser.ParseException - Thrown if unable to parse the json string.
      NotFoundException - Thrown if unable to find the catalog or field that the json refers to.
    • updateSeriesAcl

      @PUT @Path("{seriesId}/acl") public javax.ws.rs.core.Response updateSeriesAcl(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String seriesID, @FormParam("acl") String aclJson, @DefaultValue("false") @FormParam("override") boolean override) throws NotFoundException, SeriesException, UnauthorizedException
      Throws:
      NotFoundException
      SeriesException
      UnauthorizedException
    • updateSeriesProperties

      @PUT @Path("{seriesId}/properties") public javax.ws.rs.core.Response updateSeriesProperties(@HeaderParam("Accept") String acceptHeader, @PathParam("seriesId") String seriesID, @FormParam("properties") String propertiesJson) throws NotFoundException, SeriesException, UnauthorizedException
      Throws:
      NotFoundException
      SeriesException
      UnauthorizedException
    • getSeriesAsJson

      @GET @Produces("application/json") @Path("series.json") public javax.ws.rs.core.Response getSeriesAsJson(@QueryParam("q") String text, @QueryParam("seriesId") String seriesId, @QueryParam("edit") Boolean edit, @QueryParam("fuzzyMatch") Boolean fuzzyMatch, @QueryParam("seriesTitle") String seriesTitle, @QueryParam("creator") String creator, @QueryParam("contributor") String contributor, @QueryParam("publisher") String publisher, @QueryParam("rightsholder") String rightsHolder, @QueryParam("createdfrom") String createdFrom, @QueryParam("createdto") String createdTo, @QueryParam("language") String language, @QueryParam("license") String license, @QueryParam("subject") String subject, @QueryParam("description") String description, @QueryParam("sort") String sort, @QueryParam("offset") String offset, @QueryParam("count") String count) throws UnauthorizedException
      Throws:
      UnauthorizedException