Class ApprovedPathProvider

java.lang.Object
org.approvej.approve.ApprovedPathProvider
All Implemented Interfaces:
PathProvider

@NullMarked @Deprecated(since="0.8.3", forRemoval=true) public class ApprovedPathProvider extends Object implements PathProvider
Deprecated, for removal: This API element is subject to removal in a future version.
A PathProvider that uses the path of a previously approved file to determine the path the received file and the filename extension.

For example,

  1. if the given approved path is /path/to/file-approved.json, the receivedPath will be /path/to/file-received.json
  2. if the given approved path is /path/to/file.txt, the receivedPath 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.approve.PathProvider

    APPROVED, DEFAULT_FILENAME_EXTENSION, RECEIVED
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    The path of the file containing a previously approved value.
    Deprecated, for removal: This API element is subject to removal in a future version.
    The path of the directory containing the approved and received files.
    Deprecated, for removal: This API element is subject to removal in a future version.
    The path of the file containing the latest received value that didn't match the previously approved.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • directory

      public Path directory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PathProvider
      The path of the directory containing the approved and received files.
      Specified by:
      directory in interface PathProvider
      Returns:
      the Path to the directory
    • receivedPath

      public Path receivedPath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 interface PathProvider
      Returns:
      the Path to the received file
    • approvedPath

      public Path approvedPath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PathProvider
      The path of the file containing a previously approved value.
      Specified by:
      approvedPath in interface PathProvider
      Returns:
      the Path to the approved file