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
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration folder of this bundle/installation.static final StringFile name, which could contain bundle_home and bundle_conf.static final StringHome (installation) folder of this bundle/installation.static final StringLogging folder of this bundle/installation.static final StringLogging file of this bundle/installation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidcheckLogging.getApplicationConfigFile(String appName, String appConfFile) getApplicationConfigFile.getApplicationConfigFolder(String appName) getApplicationConfigFolder.getApplicationConfigProperties(String appName, String appConfFile) getApplicationConfigProperties.getBundleConfDir.getBundleHomeDir.static final BootstrapLoadergetInstance.getProperty(String key) getProperty.getProperty(String key, String def) getProperty.loadIcon.static voidmain.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 ofStringobjects
-
checkLogging
public static final void checkLogging()checkLogging.
-
getInstance
getInstance.
- Returns:
- a
BootstrapLoaderobject
-
getBundleConfDir
getBundleConfDir.
- Returns:
- a
Fileobject
-
getBundleHomeDir
getBundleHomeDir.
- Returns:
- a
Fileobject
-
getProperty
getProperty.
-
getProperty
getProperty.
-
getApplicationConfigFile
getApplicationConfigFile.
-
getApplicationConfigFolder
getApplicationConfigFolder.
-
getApplicationConfigProperties
public Properties getApplicationConfigProperties(String appName, String appConfFile) throws IOException getApplicationConfigProperties.
- Parameters:
appName- aStringobjectappConfFile- aStringobject- Returns:
- a
Propertiesobject - 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.
-