|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.container.utils.ModuleConfigHome
public class ModuleConfigHome
The base class for configuration files in universAAL. All configuration files
are contained in the root directory of the universAAL runtime (rundir). The
configuration files of a bundle are contained in a subdirectory with the name
of that module (Best Practice).
Configuration files that follow the key-value format should use
ModuleContext.registerConfigFile(Object[])
and the container-specific
mechanisms to get notified when the configuration changes.
Field Summary | |
---|---|
protected File |
confHome
The File containing the path for the configuration file
(the home directory of the configuration file). |
Constructor Summary | |
---|---|
protected |
ModuleConfigHome()
Default constructor to allow overwriting the default implementation. |
|
ModuleConfigHome(String confHome,
String id)
Constructor the create a new object for accessing configuration files. |
Method Summary | |
---|---|
String |
getAbsolutePath()
Returns the absolute pathname string of this abstract pathname. |
OutputStream |
getConfFileAsOutputStream(String filename)
Get an OutputStream for the file of the given file name in the home directory of the configuration file. |
InputStream |
getConfFileAsStream(String filename)
Get an InputStream for the file of the given file name in the home directory of the configuration file. |
File[] |
listFiles()
List all files in the home directory of the configuration file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File confHome
File
containing the path for the configuration file
(the home directory of the configuration file).
Constructor Detail |
---|
protected ModuleConfigHome()
public ModuleConfigHome(String confHome, String id)
getConfFileAsStream(String)
. The directory is created if it does
not exist.
confHome
- The home directory.id
- The ID of this module.Method Detail |
---|
public String getAbsolutePath()
File.getAbsolutePath()
public InputStream getConfFileAsStream(String filename) throws IOException
filename
- The name of the file.
IOException
public OutputStream getConfFileAsOutputStream(String filename) throws IOException
filename
- The name of the file.
IOException
public File[] listFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |