Package org.approvej.verify
Class ApprovedPathProvider
java.lang.Object
org.approvej.verify.ApprovedPathProvider
- All Implemented Interfaces:
PathProvider
A
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
, thereceivedPath
will be/path/to/file-received.json
- if the given approved path is
/path/to/file.txt
, thereceivedPath
will 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.PathProvider
APPROVED, DEFAULT_FILENAME_EXTENSION, RECEIVED
-
Method Summary
Modifier and TypeMethodDescriptionThe path of the file containing a previously approved value.The path of the directory containing the approved and received files.The path of the file containing the latest received value that didn't match the previously approved.
-
Method Details
-
directory
Description copied from interface:PathProvider
The path of the directory containing the approved and received files.- Specified by:
directory
in interfacePathProvider
- Returns:
- the
Path
to the directory
-
receivedPath
Description copied from interface:PathProvider
The path of the file containing the latest received value that didn't match the previously approved.- Specified by:
receivedPath
in interfacePathProvider
- Returns:
- the
Path
to the received file
-
approvedPath
Description copied from interface:PathProvider
The path of the file containing a previously approved value.- Specified by:
approvedPath
in interfacePathProvider
- Returns:
- the
Path
to the approved file
-