Package jmri

Interface ConfigureManager

All Known Implementing Classes:
AppsConfigurationManager, ConfigXmlManager, JmriConfigurationManager

public interface ConfigureManager
Provide load/store capabilities for general configuration.

Areas of responsibility:

  • Register and deregister configuration objects so they can eventually be stored.
  • Invoke the load and store operations as needed
  • Give access to the configuration objects for independent GUIs

The managed items are divided into four types:

  1. "Prefs" - handled first on read, these are the general preferences controlling how the program starts up
  2. "Config" - layout configuration information, e.g. turnout, signal, etc - generally, all NamedBeanManagers
  3. "Tool" - (Not really clear yet, but present)
  4. "User" - typically information about panels and windows, these are handled last during startup - all the jmri.display panel types

The configuration manager is generally located through the InstanceManager.

The original implementation was via the jmri.configurexml package.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See Also:
InstanceManager, ConfigXmlManager
  • Method Summary

    Modifier and Type Method Description
    void deregister​(Object o)  
    URL find​(String filename)
    Provide a method-specific way of locating a file to be loaded from a name.
    Object findInstance​(Class<?> c, int index)
    Find the ith instance of an object of particular class that's been registered for storage.
    List<Object> getInstanceList​(Class<?> c)
    Returns a list of instances stored for a given class.
    XmlFile.Validate getValidate()
    Get the scope of validation of XML files when loading.
    boolean load​(File file)
    Create the objects defined in a particular configuration file
    boolean load​(File file, boolean registerDeferred)
    Create the objects defined in a particular configuration file
    boolean load​(URL file)
    Create the objects defined in a particular configuration file
    boolean load​(URL file, boolean registerDeferred)
    Create the objects defined in a particular configuration file
    boolean loadDeferred​(File file)
    Create the objects defined in a particular configuration file that have been deferred until after basic GUI construction completed
    boolean loadDeferred​(URL file)
    Create the objects defined in a particular configuration file that have been deferred until after basic GUI construction completed
    boolean makeBackup​(File file)
    Make a backup file.
    void registerConfig​(Object o)  
    void registerConfig​(Object o, int x)  
    void registerPref​(Object o)  
    void registerTool​(Object o)  
    void registerUser​(Object o)  
    void registerUserPrefs​(Object o)  
    void removePrefItems()  
    void setValidate​(XmlFile.Validate validate)
    Control the scope of validation of XML files when loading.
    boolean storeAll​(File file)
    Stores prefs, config, tools and user information.
    boolean storeConfig​(File file)
    Stores just configuration information.
    void storePrefs()
    Stores just preferences information.
    void storePrefs​(File file)
    Stores just preferences information.
    boolean storeUser​(File file)
    Stores just user information.
    void storeUserPrefs​(File file)
    Stores just user preferences information.