Package org.mycore.media.frontend.jersey
Class MCRThumbnailResource
java.lang.Object
org.mycore.media.frontend.jersey.MCRThumbnailResource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
getThumbnailFromDocument
(String documentId, int size, String ext) This method returns a thumbnail for a given document with a given size in pixel for the shortest side.jakarta.ws.rs.core.Response
getThumbnailFromDocument
(String documentId, String ext) This method returns a thumbnail for a given document with a default size in pixel for the shortest side.
-
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 fromsize
- 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
-