Package io.goobi.viewer.api.rest.filters
Class FilterTools
java.lang.Object
io.goobi.viewer.api.rest.filters.FilterTools
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkForConcurrentViewLimit
(String pi, jakarta.servlet.http.HttpServletRequest request) Set a lock for the given record pi and the request's session if possible.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 thanConfiguration.getThumbnailImageAccessMaxWidth()
.
-
Field Details
-
ATTRIBUTE_PI
- See Also:
-
ATTRIBUTE_FILENAME
- See Also:
-
ATTRIBUTE_LOGID
- See Also:
-
ATTRIBUTE_PAGENO
- See Also:
-
PRIORITY_REDIRECT
public static final int PRIORITY_REDIRECT- See Also:
-
-
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
-