Package org.mycore.restapi.v2
Class MCRRestObjects
java.lang.Object
org.mycore.restapi.v2.MCRRestObjects
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final List<MCRThumbnailGenerator>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
createObject
(String xml) jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
getObject
(MCRObjectID id) jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
getObjectVersion
(MCRObjectID id, String revision) jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
getState
(MCRObjectID id) jakarta.ws.rs.core.Response
getThumbnail
(String id, String ext) jakarta.ws.rs.core.Response
getThumbnailWithSize
(String id, int size, String ext) jakarta.ws.rs.core.Response
listObjects
(MCRObjectID afterID, Integer offset, Integer limit, String type, String project, Integer numberGreater, Integer numberLess, Date createdAfter, Date createdBefore, Date modifiedAfter, Date modifiedBefore, Date deletedAfter, Date deletedBefore, String createdBy, String modifiedBy, String deletedBy, MCRObjectQuery.SortBy sortBy, MCRObjectQuery.SortOrder sortOrder, List<String> categories) jakarta.ws.rs.core.Response
setState
(MCRObjectID id, String state) jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response
updateObject
(MCRObjectID id, InputStream xmlSource) jakarta.ws.rs.core.Response
updateObjectMetadata
(MCRObjectID id, InputStream xmlSource)
-
Field Details
-
PARAM_AFTER_ID
- See Also:
-
PARAM_OFFSET
- See Also:
-
PARAM_LIMIT
- See Also:
-
PARAM_TYPE
- See Also:
-
PARAM_PROJECT
- See Also:
-
PARAM_NUMBER_GREATER
- See Also:
-
PARAM_NUMBER_LESS
- See Also:
-
PARAM_CREATED_AFTER
- See Also:
-
PARAM_CREATED_BEFORE
- See Also:
-
PARAM_MODIFIED_AFTER
- See Also:
-
PARAM_MODIFIED_BEFORE
- See Also:
-
PARAM_DELETED_AFTER
- See Also:
-
PARAM_DELETED_BEFORE
- See Also:
-
PARAM_CREATED_BY
- See Also:
-
PARAM_MODIFIED_BY
- See Also:
-
PARAM_DELETED_BY
- See Also:
-
PARAM_SORT_ORDER
- See Also:
-
PARAM_SORT_BY
- See Also:
-
THUMBNAIL_GENERATORS
-
-
Constructor Details
-
MCRRestObjects
public MCRRestObjects()
-
-
Method Details
-
listObjects
@GET @Produces({"application/xml","application/json;charset=UTF-8"}) public jakarta.ws.rs.core.Response listObjects(@QueryParam("after_id") MCRObjectID afterID, @QueryParam("offset") Integer offset, @QueryParam("limit") Integer limit, @QueryParam("type") String type, @QueryParam("project") String project, @QueryParam("number_greater") Integer numberGreater, @QueryParam("number_less") Integer numberLess, @QueryParam("created_after") Date createdAfter, @QueryParam("created_before") Date createdBefore, @QueryParam("modified_after") Date modifiedAfter, @QueryParam("modified_before") Date modifiedBefore, @QueryParam("deleted_after") Date deletedAfter, @QueryParam("deleted_before") Date deletedBefore, @QueryParam("created_by") String createdBy, @QueryParam("modified_by") String modifiedBy, @QueryParam("deleted_by") String deletedBy, @QueryParam("sort_by") @DefaultValue("id") MCRObjectQuery.SortBy sortBy, @QueryParam("sort_order") @DefaultValue("asc") MCRObjectQuery.SortOrder sortOrder, @QueryParam("category") List<String> categories) throws IOException - Throws:
IOException
-
createObject
-
getObject
@GET @Produces({"application/xml","application/json;charset=UTF-8"}) @Path("/{mcrid}") public jakarta.ws.rs.core.Response getObject(@PathParam("mcrid") MCRObjectID id) throws IOException - Throws:
IOException
-
getObjectMetadata
@GET @Produces("application/xml") @Path("/{mcrid}/metadata") public jakarta.ws.rs.core.Response getObjectMetadata(@PathParam("mcrid") MCRObjectID id) throws IOException - Throws:
IOException
-
getThumbnailWithSize
-
getThumbnail
-
getObjectVersions
@GET @Produces({"application/xml","application/json;charset=UTF-8"}) @Path("/{mcrid}/versions") public jakarta.ws.rs.core.Response getObjectVersions(@PathParam("mcrid") MCRObjectID id) throws IOException - Throws:
IOException
-
getObjectVersion
@GET @Produces({"application/xml","application/json;charset=UTF-8"}) @Path("/{mcrid}/versions/{revision}") public jakarta.ws.rs.core.Response getObjectVersion(@PathParam("mcrid") MCRObjectID id, @PathParam("revision") String revision) throws IOException - Throws:
IOException
-
updateObject
@PUT @Consumes("application/xml") @Path("/{mcrid}") public jakarta.ws.rs.core.Response updateObject(@PathParam("mcrid") MCRObjectID id, InputStream xmlSource) throws IOException - Throws:
IOException
-
updateObjectMetadata
@PUT @Consumes("application/xml") @Path("/{mcrid}/metadata") public jakarta.ws.rs.core.Response updateObjectMetadata(@PathParam("mcrid") MCRObjectID id, InputStream xmlSource) throws IOException - Throws:
IOException
-
deleteObject
@DELETE @Path("/{mcrid}") public jakarta.ws.rs.core.Response deleteObject(@PathParam("mcrid") MCRObjectID id) -
testUpdateObject
@PUT @Path("/{mcrid}/try") public jakarta.ws.rs.core.Response testUpdateObject(@PathParam("mcrid") MCRObjectID id) throws IOException - Throws:
IOException
-
testDeleteObject
@DELETE @Path("/{mcrid}/try") public jakarta.ws.rs.core.Response testDeleteObject(@PathParam("mcrid") MCRObjectID id) throws IOException - Throws:
IOException
-
setState
@PUT @Consumes("text/plain") @Produces({"application/json","application/xml"}) @Path("/{mcrid}/service/state") public jakarta.ws.rs.core.Response setState(@PathParam("mcrid") MCRObjectID id, String state) -
getState
@GET @Produces({"application/json","application/xml"}) @Path("/{mcrid}/service/state") public jakarta.ws.rs.core.Response getState(@PathParam("mcrid") MCRObjectID id)
-