Package jmri.jmrit.operations
Class OperationsManager
java.lang.Object
jmri.jmrit.operations.OperationsManager
- All Implemented Interfaces:
InstanceManagerAutoDefault,InstanceManagerAutoInitialize
public final class OperationsManager
extends Object
implements InstanceManagerAutoDefault, InstanceManagerAutoInitialize
A manager for Operations. This manager controls the Operations ShutDownTask.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ShutDownTaskGet a copy of the default operationsShutDownTask.Get aFilerooted in the Operations path.getPath()Get the path to the Operations folder, rooted in the User's file path, as a String.Get the path to a file rooted in the Operations path.voidPerform any initialization that occurs after this object has been constructed and made available by the InstanceManager.voidsetShutDownTask(ShutDownTask shutDownTask) Register the non-defaultShutDownTask.
-
Constructor Details
-
OperationsManager
public OperationsManager()
-
-
Method Details
-
getPath
Get the path to the Operations folder, rooted in the User's file path, as a String.- Returns:
- A path
-
getPath
Get the path to a file rooted in the Operations path.- Parameters:
name- The name of the file- Returns:
- A path
- See Also:
-
getFile
Get aFilerooted in the Operations path.- Parameters:
name- The name of the file- Returns:
- A file
- See Also:
-
setShutDownTask
Register the non-defaultShutDownTask.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 operationsShutDownTask. The default ShutDownTask saves the operations state at shutdown without prompting.- Returns:
- A new ShutDownTask
-
initialize
Description copied from interface:InstanceManagerAutoInitializePerform any initialization that occurs after this object has been constructed and made available by the InstanceManager.- Specified by:
initializein interfaceInstanceManagerAutoInitialize
-