Package jmri.util.prefs
Class JmriConfigurationProvider
- java.lang.Object
-
- jmri.util.prefs.AbstractConfigurationProvider
-
- jmri.util.prefs.JmriConfigurationProvider
-
public final class JmriConfigurationProvider extends AbstractConfigurationProvider
Provides a general purpose XML element storage mechanism for the storage of configuration and preferences too complex to be handled byJmriPreferencesProvider.There are two configuration files per
ProfileandNodeIdentity, both stored in the directoryprofile:profile:profile.xmlpreferences that are shared across multiple nodes for a single profile. An example of such a preference would be the Railroad Name preference.<node-identity>/profile.xmlpreferences that are specific to the profile running on a specific host (<node-identity> is the identity returned byNodeIdentity.storageIdentity()). 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/preferences.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 JmriConfigurationProvider(Profile project)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static JmriConfigurationProviderfindProvider(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
-
JmriConfigurationProvider
JmriConfigurationProvider(Profile project)
-
-
Method Detail
-
findProvider
static JmriConfigurationProvider 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
-
-