Package jmri.util.prefs
Class JmriUserInterfaceConfigurationProvider
- java.lang.Object
-
- jmri.util.prefs.AbstractConfigurationProvider
-
- jmri.util.prefs.JmriUserInterfaceConfigurationProvider
-
public final class JmriUserInterfaceConfigurationProvider extends AbstractConfigurationProvider
Provides a general purpose XML element storage mechanism for the storage of user interface configuration.There are two configuration files per
ProfileandNodeIdentity, both stored in the directoryprofile:profile:"user-interface.xml"preferences that are shared across multiple nodes for a single profile. An example of such a preference would be the Railroad Name preference.<node-identity>/"user-interface.xml"preferences that are specific to the profile running on a specific host (<node-identity> is the identity returned byNodeIdentity.networkIdentity()). An example of such a preference would be a file location.
Non-profile specific configuration that applies to all profiles is stored in the file
settings:preferences/"user-interface.xml".
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMESPACE-
Fields inherited from class jmri.util.prefs.AbstractConfigurationProvider
project
-
-
Constructor Summary
Constructors Constructor Description JmriUserInterfaceConfigurationProvider(Profile project)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static JmriUserInterfaceConfigurationProviderfindProvider(Profile project)Get the JmriPrefererncesProvider for the specified profile.protected AuxiliaryConfigurationgetConfiguration()Get theAuxiliaryConfiguration.static AuxiliaryConfigurationgetConfiguration(Profile project)Get thePreferencesfor the specified class in the specified profile.protected java.io.FilegetConfigurationFile(boolean shared)-
Methods inherited from class jmri.util.prefs.AbstractConfigurationProvider
getConfigurationDirectory, isPrivateBackedUp, isSharedBackedUp, setPrivateBackedUp, setSharedBackedUp
-
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JmriUserInterfaceConfigurationProvider
JmriUserInterfaceConfigurationProvider(Profile project)
-
-
Method Detail
-
findProvider
static JmriUserInterfaceConfigurationProvider findProvider(Profile project)
Get the JmriPrefererncesProvider for the specified profile.- Parameters:
project- The profile. This is most often the profile returned by theProfileManager.getActiveProfile()method of the ProfileManager returned byProfileManager.getDefault()- Returns:
- The shared or private JmriPreferencesProvider for the project.
-
getConfiguration
public static AuxiliaryConfiguration getConfiguration(Profile project)
Get thePreferencesfor the specified class in the specified profile.- Parameters:
project- The profile. This is most often the profile returned by theProfileManager.getActiveProfile()method of the ProfileManager returned byProfileManager.getDefault()- Returns:
- The shared or private AuxiliaryConfiguration for project.
-
getConfiguration
protected AuxiliaryConfiguration getConfiguration()
Get theAuxiliaryConfiguration.- Specified by:
getConfigurationin classAbstractConfigurationProvider- Returns:
- The AuxiliaryConfiguration.
-
getConfigurationFile
protected java.io.File getConfigurationFile(boolean shared)
- Specified by:
getConfigurationFilein classAbstractConfigurationProvider
-
-