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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecreateNewSeries(String acceptHeader, String metadataParam, String aclParam, String themeIdParam) javax.ws.rs.core.ResponsedeleteSeries(String acceptHeader, String id) javax.ws.rs.core.ResponsedeleteSeriesMetadataByType(String acceptHeader, String id, String type) protected MetadataListChange the simplified fields of key values provided to the external api into aMetadataList.javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetSeriesAcl(String acceptHeader, String id) javax.ws.rs.core.ResponsegetSeriesAsJson(String text, String seriesId, Boolean edit, Boolean fuzzyMatch, String seriesTitle, String creator, String contributor, String publisher, String rightsHolder, String createdFrom, String createdTo, String language, String license, String subject, String description, String sort, String offset, String count) javax.ws.rs.core.ResponsegetSeriesList(String acceptHeader, String filter, String sort, String order, int offset, int limit, Boolean onlyWithWriteAccess, Boolean withAcl) javax.ws.rs.core.ResponsegetSeriesMetadata(String acceptHeader, String id, String type) javax.ws.rs.core.ResponsegetSeriesProperties(String acceptHeader, String id) javax.ws.rs.core.ResponseupdateSeriesAcl(String acceptHeader, String seriesID, String aclJson, boolean override) javax.ws.rs.core.ResponseupdateSeriesMetadata(String acceptHeader, String seriesID, String metadataJSON) javax.ws.rs.core.ResponseupdateSeriesMetadata(String acceptHeader, String id, String type, String metadataJSON) javax.ws.rs.core.ResponseupdateSeriesProperties(String acceptHeader, String seriesID, String propertiesJson)
-
Field Details
-
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 -
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 -
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 aMetadataList.- Parameters:
json- The json string that contains an array of metadata field lists for the different catalogs.- Returns:
- A
MetadataListwith 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 -
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 -
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
-