Class MCRThumbnailResource

java.lang.Object
org.mycore.media.frontend.jersey.MCRThumbnailResource

@Path("thumbnail") public class MCRThumbnailResource extends Object
  • Constructor Details

    • MCRThumbnailResource

      public MCRThumbnailResource()
  • Method Details

    • getThumbnailFromDocument

      @GET @Path("{documentId}/{size}.{ext}") @Produces({"image/png","image/jpeg"}) public jakarta.ws.rs.core.Response getThumbnailFromDocument(@PathParam("documentId") String documentId, @PathParam("size") int size, @PathParam("ext") String ext)
      This method returns a thumbnail for a given document with a given size in pixel for the shortest side.
      Parameters:
      documentId - the documentID you want the thumbnail from
      size - the size of the shortest side in pixel
      Returns:
      the thumbnail as png, jpg or error 404 if if there is no derivate or no generator for filetype
    • getThumbnailFromDocument

      @GET @Path("{documentId}.{ext}") @Produces({"image/png","image/jpeg"}) public jakarta.ws.rs.core.Response getThumbnailFromDocument(@PathParam("documentId") String documentId, @PathParam("ext") String ext)
      This method returns a thumbnail for a given document with a default size in pixel for the shortest side.
      Parameters:
      documentId - the documentID you want the thumbnail from
      Returns:
      the thumbnail as png, jpg or error 404 if if there is no derivate or no generator for filetype