Class FilesProvider

Direct Known Subclasses:
FilesProviderUnary, FilesProviderWithDirectory, FilesProviderWithoutDirectory, SpecificPathList

public abstract class FilesProvider extends AnchorBean<FilesProvider>
Base class for providing a list of Files.
Author:
Owen Feehan
  • Constructor Details

    • FilesProvider

      public FilesProvider()
  • Method Details

    • create

      public abstract List<File> create(InputManagerParameters parameters) throws FilesProviderException
      Creates or provides a list of files.
      Parameters:
      parameters - parameters influencing how input-files are obtained.
      Returns:
      the list of files from the provider
      Throws:
      FilesProviderException - if list of files cannot be successfully established.
    • rootDirectory

      public abstract Optional<Path> rootDirectory(InputContextParameters inputContext) throws FilesProviderException
      A root directory for these files, if it exists.

      Any file that is part of the collection returned by this provider, must exist inside this directory (either directly or in any nested subdirectories).

      Parameters:
      inputContext - the input-context.
      Returns:
      a path to this directory.
      Throws:
      FilesProviderException - if an error occurs establishing the root directory.