Class OperationsManager

java.lang.Object
jmri.jmrit.operations.OperationsManager
All Implemented Interfaces:
InstanceManagerAutoDefault, InstanceManagerAutoInitialize

A manager for Operations. This manager controls the Operations ShutDownTask.
  • Constructor Details

  • Method Details

    • getPath

      public String getPath()
      Get the path to the Operations folder, rooted in the User's file path, as a String.
      Returns:
      A path
    • getPath

      public String getPath(String name)
      Get the path to a file rooted in the Operations path.
      Parameters:
      name - The name of the file
      Returns:
      A path
      See Also:
    • getFile

      public File getFile(String name)
      Get a File rooted in the Operations path.
      Parameters:
      name - The name of the file
      Returns:
      A file
      See Also:
    • setShutDownTask

      public void setShutDownTask(ShutDownTask shutDownTask)
      Register the non-default ShutDownTask.

      Replaces the existing operations ShutDownTask with the new task. Use a null value to prevent an operations ShutDownTask from being run when JMRI shuts down. Use getDefaultShutDownTask() to use the default operations ShutDownTask.

      Parameters:
      shutDownTask - The new ShutDownTask or null
    • getDefaultShutDownTask

      Get a copy of the default operations ShutDownTask. The default ShutDownTask saves the operations state at shutdown without prompting.
      Returns:
      A new ShutDownTask
    • initialize

      public void initialize()
      Description copied from interface: InstanceManagerAutoInitialize
      Perform any initialization that occurs after this object has been constructed and made available by the InstanceManager.
      Specified by:
      initialize in interface InstanceManagerAutoInitialize