Package me.desair.tus.server
Interface RequestValidator
- All Known Implementing Classes:
ChecksumAlgorithmValidator
,ContentLengthValidator
,ContentTypeValidator
,HttpMethodValidator
,IdExistsValidator
,NoUploadLengthOnFinalValidator
,PartialUploadsExistValidator
,PatchFinalUploadValidator
,PostEmptyRequestValidator
,PostUriValidator
,TusResumableValidator
,UploadDeferLengthValidator
,UploadLengthValidator
,UploadOffsetValidator
public interface RequestValidator
Interface for request validators
-
Method Summary
Modifier and TypeMethodDescriptionboolean
supports
(HttpMethod method) Test if this validator supports the given HTTP methodvoid
validate
(HttpMethod method, jakarta.servlet.http.HttpServletRequest request, UploadStorageService uploadStorageService, String ownerKey) Validate if the request should be processed
-
Method Details
-
validate
void validate(HttpMethod method, jakarta.servlet.http.HttpServletRequest request, UploadStorageService uploadStorageService, String ownerKey) throws TusException, IOException Validate if the request should be processed- Parameters:
method
- The HTTP method of this request (do not useHttpServletRequest.getMethod()
!)request
- TheHttpServletRequest
to validateuploadStorageService
- The current upload storage serviceownerKey
- A key representing the owner of the upload- Throws:
TusException
- When validation fails and the request should not be processedIOException
-
supports
Test if this validator supports the given HTTP method- Parameters:
method
- The current HTTP method- Returns:
- true if supported, false otherwise
-