Class MCRRestObjects

java.lang.Object
org.mycore.restapi.v2.MCRRestObjects

@Path("/objects") public class MCRRestObjects extends Object
  • Field Details

  • 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

      @POST @Consumes("application/xml") public jakarta.ws.rs.core.Response createObject(String xml)
    • 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

      @GET @Path("{mcrid}/thumb-{size}.{ext : (jpg|jpeg|png)}") @Produces({"image/png","image/jpeg"}) public jakarta.ws.rs.core.Response getThumbnailWithSize(@PathParam("mcrid") String id, @PathParam("size") int size, @PathParam("ext") String ext)
    • getThumbnail

      @GET @Path("{mcrid}/thumb.{ext : (jpg|jpeg|png)}") @Produces({"image/png","image/jpeg"}) public jakarta.ws.rs.core.Response getThumbnail(@PathParam("mcrid") String id, @PathParam("ext") String ext)
    • 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)