Package tools
Class BootstrapLoader
java.lang.Object
tools.BootstrapLoader
This class tries to initialize two parameters: bundle.conf and bundle.home.
The initialization process has three main steps to determine this folder:
- Checks if bundle.conf and bundle.home are provided trough system properties. If they are, search is over.
- Tries to locate file bundle.properties on classpath. If successful, parameters are loaded from the file or location of bundle.properties is used instead.
- If nothing of above works, then current folder is used.
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Configuration folder of this bundle/installation.static final String
File name, which could contain bundle_home and bundle_conf.static final String
Home (installation) folder of this bundle/installation.static final String
Logging folder of this bundle/installation.static final String
Logging file of this bundle/installation. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
checkLogging.getApplicationConfigFile
(String appName, String appConfFile) getApplicationConfigFile.getApplicationConfigFolder
(String appName) getApplicationConfigFolder.getApplicationConfigProperties
(String appName, String appConfFile) getApplicationConfigProperties.getBundleConfDir.getBundleHomeDir.static final BootstrapLoader
getInstance.getProperty
(String key) getProperty.getProperty
(String key, String def) getProperty.loadIcon.static void
main.substitute
(String str) Substitutes (replaces) occurrences of property macros (example ${property.name}) with values if they are available in bundle or System properties.
-
Field Details
-
BUNDLE_CONF
Configuration folder of this bundle/installation. Usually should be under bundle.home.- See Also:
-
BUNDLE_HOME
Home (installation) folder of this bundle/installation.- See Also:
-
BUNDLE_LOG
Logging folder of this bundle/installation.- See Also:
-
BUNDLE_LOG_FILE
Logging file of this bundle/installation.- See Also:
-
BUNDLE_CONF_FILE_NAME
File name, which could contain bundle_home and bundle_conf.- See Also:
-
-
Constructor Details
-
BootstrapLoader
Creates instance of bootstrap loader.- Parameters:
bootstrap
- the bootstrap parameters. System parameters should be used if nothing else is available.
-
-
Method Details
-
main
main.
- Parameters:
args
- an array ofString
objects
-
checkLogging
public static final void checkLogging()checkLogging.
-
getInstance
getInstance.
- Returns:
- a
BootstrapLoader
object
-
getBundleConfDir
getBundleConfDir.
- Returns:
- a
File
object
-
getBundleHomeDir
getBundleHomeDir.
- Returns:
- a
File
object
-
getProperty
getProperty.
-
getProperty
getProperty.
-
getApplicationConfigFile
getApplicationConfigFile.
-
getApplicationConfigFolder
getApplicationConfigFolder.
-
getApplicationConfigProperties
public Properties getApplicationConfigProperties(String appName, String appConfFile) throws IOException getApplicationConfigProperties.
- Parameters:
appName
- aString
objectappConfFile
- aString
object- Returns:
- a
Properties
object - Throws:
IOException
- if any.
-
substitute
Substitutes (replaces) occurrences of property macros (example ${property.name}) with values if they are available in bundle or System properties. -
loadIcon
loadIcon.
-