Object
TaskFactory

public class TaskFactory extends Object
Determines Paths related to tasks.
Author:
Owen Feehan
  • Method Details

    • pathOrTaskName

      public static SelectParam<Optional<Path>> pathOrTaskName(String[] args, Path tasksDirectory)
      Creates a SelectParam for a path or task name.

      If the argument is a name (no extension, no root, no special-chars apart from forward-slashes), then construct an automatic path to the tasks in the configuration directory. Otherwise treat as path to BeanXML.

      Parameters:
      args - the command-line arguments
      tasksDirectory - the directory containing task configurations
      Returns:
      a SelectParam for an optional Path
      Throws:
      CommandLineException - if invalid arguments were passed