Class IfRelativeToDirectory

Object
AnchorBean<FileNamer>
FileNamer
IfRelativeToDirectory

public class IfRelativeToDirectory extends FileNamer
Multiplexes between two namers depending on if the relative-to-directory option is selected.
Author:
Owen Feehan
  • Constructor Details

    • IfRelativeToDirectory

      public IfRelativeToDirectory()
  • Method Details

    • deriveName

      public List<NamedFile> deriveName(List<File> files, FileNamerContext context)
      Description copied from class: FileNamer
      Derives a list of names (associated with each file) for some files.
      Specified by:
      deriveName in class FileNamer
      Parameters:
      files - the files to describe.
      context - additional context for naming.
      Returns:
      a list of identical size and order to files, corresponding to the file the extracted name.
    • getWhenRelative

      public FileNamer getWhenRelative()
      The namer to use if the relative-to-directory option is selected.
    • setWhenRelative

      public void setWhenRelative(FileNamer whenRelative)
      The namer to use if the relative-to-directory option is selected.
    • getOtherwise

      public FileNamer getOtherwise()
      The namer to use if the relative-to-directory option is not selected.
    • setOtherwise

      public void setOtherwise(FileNamer otherwise)
      The namer to use if the relative-to-directory option is not selected.