Package org.approvej.verify
Class FileVerifier.BasePathProvider
java.lang.Object
org.approvej.verify.FileVerifier.BasePathProvider
- All Implemented Interfaces:
FileVerifier.PathProvider
- Enclosing class:
FileVerifier
public static final class FileVerifier.BasePathProvider
extends Object
implements FileVerifier.PathProvider
A
FileVerifier.PathProvider that uses the path of a previously approved file to determine the path
the received file and the filename extension.
For example,
- if the given approved path is
/path/to/file-approved.json, thereceivedPathwill be/path/to/file-received.json - if the given approved path is
/path/to/file.txt, thereceivedPathwill be/path/to/file-received.txt
Note that the approved infix is not enforced on the given approved file path. It is
also not necessary for the approved file to exist.
-
Field Summary
Fields inherited from interface org.approvej.verify.FileVerifier.PathProvider
APPROVED, RECEIVED -
Method Summary
Modifier and TypeMethodDescriptionThe path of the file containing a previously approved value.approvedPath(Path approvedPath) Creates a newFileVerifier.BasePathProviderthat uses the given approved path.The path of the file containing the latest received value that didn't match the previously approved.
-
Method Details
-
approvedPath
Creates a newFileVerifier.BasePathProviderthat uses the given approved path.- Parameters:
approvedPath- thePathto the approved file- Returns:
- a new
FileVerifier.BasePathProvider
-
receivedPath
Description copied from interface:FileVerifier.PathProviderThe path of the file containing the latest received value that didn't match the previously approved.- Specified by:
receivedPathin interfaceFileVerifier.PathProvider- Returns:
- the
Pathto the received file
-
approvedPath
Description copied from interface:FileVerifier.PathProviderThe path of the file containing a previously approved value.- Specified by:
approvedPathin interfaceFileVerifier.PathProvider- Returns:
- the
Pathto the approved file
-