Class FilterTools

java.lang.Object
io.goobi.viewer.api.rest.filters.FilterTools

public final class FilterTools extends Object
  • Field Details

  • Method Details

    • checkForConcurrentViewLimit

      public static boolean checkForConcurrentViewLimit(String pi, jakarta.servlet.http.HttpServletRequest request)
      Set a lock for the given record pi and the request's session if possible.
      Parameters:
      pi -
      request -
      Returns:
      false if the view limit is already exceeded and the record may not be viewed, true otherwise
      Throws:
      RecordNotFoundException - if no record was found
    • isThumbnail

      public static boolean isThumbnail(jakarta.servlet.http.HttpServletRequest servletRequest)

      Check if the request contains a size and region parameter (and is this a IIIF image request) and if so wether they describe a request for a full image not larger than Configuration.getThumbnailImageAccessMaxWidth().

      Parameters:
      servletRequest - The servlet request for the resource
      Returns:
      true if the request is for a IIIF image resource which is considered a thumbnail