Interface ImportValidator
- All Known Implementing Classes:
DefaultImportValidator
public interface ImportValidator
Responsible for performing validations of an import request before it is allowed to be
processed/persisted.
For any given request, the ImportManager
will use the first ImportValidator
for
which canValidate(ImportRequest)
returns true.
- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canValidate
(ImportRequest request) Returns whether this validator can validate the given request.validate
(ImportValidationContext<? extends FileReaderContext> context) Validates the file and import request to confirm they meet the basic requirements for allowing persistence and processing of this import.
-
Method Details
-
canValidate
Returns whether this validator can validate the given request.- Parameters:
request
- metadata about the import request- Returns:
- true if this validator can validate the given request, false otherwise
-
validate
Validates the file and import request to confirm they meet the basic requirements for allowing persistence and processing of this import.- Returns:
- a detailed response describing any validation errors that were found
-