|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConfigureManager
Provide load/store capabilities for general configuration.
Areas of responsibility:
The managed items are divided into four types:
The configuration manager is generally located through the InstanceManager.
The original implementation was via the jmri.configurexml package.
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.
InstanceManager,
ConfigXmlManager| Method Summary | |
|---|---|
void |
deregister(Object o)
|
File |
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. |
boolean |
load(File file)
Create the objects defined in a particular configuration file |
boolean |
makeBackup(File file)
Make a backup file. |
void |
registerConfig(Object o)
|
void |
registerPref(Object o)
|
void |
registerTool(Object o)
|
void |
registerUser(Object o)
|
void |
removePrefItems()
|
void |
storeAll(File file)
Stores prefs, config, tools and user information. |
void |
storeConfig(File file)
Stores just configuration information. |
void |
storePrefs(File file)
Stores just preferences information. |
void |
storeUser(File file)
Stores just user information. |
| Method Detail |
|---|
void registerPref(Object o)
void removePrefItems()
void registerConfig(Object o)
void registerTool(Object o)
void registerUser(Object o)
void deregister(Object o)
Object findInstance(Class<?> c,
int index)
Note that the index of an object can change when other objects are stored or removed. The index is for indexing over the objects stored at a moment, not for use as an identification number.
There may be synchronization issues associated with this, although they are expected to be rare in practice.
c - Class of the desired objectsindex - a 1-based index of the object to return
void storeAll(File file)
file - Output filevoid storePrefs(File file)
file - Output filevoid storeConfig(File file)
file - Output filevoid storeUser(File file)
file - Output fileboolean load(File file)
file - Input file
File find(String filename)
filename - Local filename, perhaps without path information
boolean makeBackup(File file)
file - to be backed up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||