org.universAAL.middleware.container.osgi.util
Class BundleConfigHome
java.lang.Object
org.universAAL.middleware.container.utils.ModuleConfigHome
org.universAAL.middleware.container.osgi.util.BundleConfigHome
- Direct Known Subclasses:
- Messages
public class BundleConfigHome
- extends 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 bundle (Best Practice).
- Author:
- Carsten Stockloew
Constructor Summary |
BundleConfigHome(String id)
Constructor the create a new object for accessing configuration files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
uAAL_CONF_ROOT_DIR
public static final String uAAL_CONF_ROOT_DIR
- The root directory of the runtime configuration.
- See Also:
- Constant Field Values
BundleConfigHome
public BundleConfigHome(String id)
- Constructor the create a new object for accessing configuration files.
The actual file name consists of the root directory of the universAAL
runtime, the given ID (which is by Best Practice the bundle name), and a
file name which is given to the methods
ModuleConfigHome.getConfFileAsStream(String)
or
ModuleConfigHome.getConfFileAsOutputStream(String)
.
- Parameters:
id
- The ID of this module.
getConfFileAsStream
public InputStream getConfFileAsStream(File f)
throws IOException
- Get an InputStream for the given File.
- Parameters:
f
- The file.
- Returns:
- An InputStream for the file.
- Throws:
IOException
getPropFile
public File getPropFile(String nameWithoutExtension)
- Get a
File
of the configuration file. The file name is created by
the home directory (as created in the constructor), the parameter given
to this method and the suffix ".properties".
- Parameters:
nameWithoutExtension
-
- Returns:
Copyright © 2014 universAAL Consortium. All Rights Reserved.