Class TempMediaImageResource

java.lang.Object
de.unigoettingen.sub.commons.contentlib.servlet.rest.ContentServerResource
de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource
io.goobi.viewer.api.rest.v1.media.TempMediaImageResource

@Path("/temp/files/{folder}/{filename: (?i)[^\\/]*\\.(jpe?g|tiff?|png|gif|jp2)}") public class TempMediaImageResource extends de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource
Author:
florian
  • Nested Class Summary

    Nested classes/interfaces inherited from class de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource

    de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource.ImageStreamingOutput, de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource.PdfStreamingOutput

    Nested classes/interfaces inherited from class de.unigoettingen.sub.commons.contentlib.servlet.rest.ContentServerResource

    de.unigoettingen.sub.commons.contentlib.servlet.rest.ContentServerResource.ResourceStatus
  • Field Summary

    Fields inherited from class de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource

    BACKSLASH_REPLACEMENT, context, IIIF_VERSION, imageURI, PERCENT_REPLACEMENT, QUESTION_MARK_REPLACEMENT, request, REQUEST_ATTRIBUTE_ERROR, resourceURI, response, SLASH_REPLACEMENT

    Fields inherited from class de.unigoettingen.sub.commons.contentlib.servlet.rest.ContentServerResource

    MEDIA_TYPE_APPLICATION_JSONLD, REQUEST_TYPE_IMAGE, REQUEST_TYPE_METSPDF, REQUEST_TYPE_PDF, requestId, requestMap
  • Constructor Summary

    Constructors
    Constructor
    Description
    TempMediaImageResource(javax.ws.rs.container.ContainerRequestContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String folder, String filename)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createResourceURI(javax.servlet.http.HttpServletRequest request, String directory, String filename)
     
    javax.ws.rs.core.Response
    deleteUploadedFile(String folder, String filename)
    Delete the file with the given filename in the temp media folder for the given uuid.
    javax.ws.rs.core.Response
     

    Methods inherited from class de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource

    addContentHeader, createImageURI, getCache, getCachedDate, getGif, getImage, getImageURI, getInfoAsJson, getInfoAsXml, getPdf, getPdf, getRequestedWidth, getResourceURI, getURIPrefix, isInCache, redirectToFullImage, redirectToFullImage, setImageURI, setInitializationException, setResourceURI, unescape

    Methods inherited from class de.unigoettingen.sub.commons.contentlib.servlet.rest.ContentServerResource

    checkMemoryOverflow, checkRequestOverflow, finishRequest, getNumCurrentFooterRequests, getNumCurrentImageRequests, getNumCurrentMetsPdfRequests, getNumCurrentRequests, getNumCurrentSinglePdfRequests, getRequestId, getStatus, remainingMemory, startRequest

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TempMediaImageResource

      public TempMediaImageResource(@Context javax.ws.rs.container.ContainerRequestContext context, @Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response, @PathParam("folder") String folder, @PathParam("filename") String filename)
  • Method Details

    • createResourceURI

      public void createResourceURI(javax.servlet.http.HttpServletRequest request, String directory, String filename) throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
      Overrides:
      createResourceURI in class de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource
      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • redirectToCanonicalImageInfo

      @GET @Produces({"application/json","application/ld+json"}) public javax.ws.rs.core.Response redirectToCanonicalImageInfo() throws de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
      Overrides:
      redirectToCanonicalImageInfo in class de.unigoettingen.sub.commons.contentlib.servlet.rest.ImageResource
      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException
    • deleteUploadedFile

      @DELETE @Produces("application/json") public javax.ws.rs.core.Response deleteUploadedFile(@PathParam("folder") String folder, @PathParam("filename") String filename)
      Delete the file with the given filename in the temp media folder for the given uuid.
      Parameters:
      folder -
      filename -
      Returns:
      A 200 "OK" answer if deletion was successfull, 406 if the file was not found and 500 if there was an error