| |
|
| java.lang.Object org.objectweb.jonas.common.JProp
JProp | public class JProp (Code) | | This class manages configuration properties for a JOnAS Server.
It adopts the singleton design-pattern. Configuration parameters
are read from .properties file (jonas.properties or resource.properties).
In order to support dynamically created resources, JProp also allows for
a .properties file generation using a java.lang.Properties object content
author: jonas-team author: Adriana Danes author: Florent Benoit author: author: author: ../03/2003 Adriana Danes author: author: - Manage unique instances for resource.properties
author: - Replace 'config' with 'conf'
author: - Change initial configuration policy : read properties file in a sole location : JONAS_BASE/CONFIG_DIR/
author: - Replace method name
getFilesEnv to getConfigFileEnv author:
author: author: 05/05/2003 Adriana Danes. Support JProp instance creation for dynamically created resources. author:
author: 05/2003 Florent Benoit. Add support of xml files and checkstyle |
DOMAIN_NAME | final public static String DOMAIN_NAME(Code) | | Domain name
|
JONASPREFIX | final public static String JONASPREFIX(Code) | | Prefix for jonas.properties file
|
JONAS_BASE | final public static String JONAS_BASE(Code) | | -Djonas.base property
|
JONAS_DEF_NAME | final public static String JONAS_DEF_NAME(Code) | | Default server name
|
JONAS_NAME | final public static String JONAS_NAME(Code) | | JOnAS server name
|
JONAS_VERSIONS | final public static String JONAS_VERSIONS(Code) | | |
deleteInstance | public static void deleteInstance(String fileName)(Code) | | Remove the JProp instance corresponding to the given file name from the 'multiple'
data structure and delete the file
Parameters: fileName - file name corresponding to the name of the resource to be removedand deleted from the file system |
env2Ctx | public void env2Ctx(Context ctx) throws Exception(Code) | | Bind all the properties found in file properties in a naming context
the naming context must be allocated by the caller
Parameters: ctx - given context for bindings properties throws: Exception - if it fails |
getConfDir | public static String getConfDir()(Code) | | Static method which return the working directory in jonas.base
the jonas.base property |
getConfigFileEnv | public Properties getConfigFileEnv()(Code) | | Returns JOnAS environment as configured with files properties only.
JOnAS properties |
getConfigFileXml | public String getConfigFileXml()(Code) | | Returns xml content of the resource file
xml content of the resource file |
getEnv | public Properties getEnv()(Code) | | Returns JOnAS environment as configured with configuration file properties content and
system properties.
JOnAS properties |
getInstallRoot | public static String getInstallRoot()(Code) | | Static method which return the JOnAS install root value.
the JOnAS install root value. |
getInstance | public static JProp getInstance()(Code) | | Get the unique instance corresponding to the JOnAS server.
Create it at first call.
unique instance corresponding to the JOnAS server. throws: Exception - if no JProp can be built |
getInstance | public static JProp getInstance(String fileName)(Code) | | Get one of the multiple instances corresponding to a given resource.
Create it at first call with a given configuration file name
Parameters: fileName - the name of the configuration file which is given by the resource name one of the multiple instances corresponding to a given resource. throws: Exception - if no JProp can be built |
getInstance | public static JProp getInstance(String fileName, Properties props)(Code) | | Get one of the multiple instances corresponding to a given resource.
Create it at first call with a given configuration file name
Parameters: fileName - the name of the configuration file Parameters: props - the content of the configuration file to be written in fileName one of the multiple instances corresponding to a given resource. throws: Exception - if no JProp can be built |
getJonasBase | public static String getJonasBase()(Code) | | Static method which return the jonas.base property
the jonas.base property |
getPropFile | public String getPropFile()(Code) | | Returns properties filename
JOnAS properties filename |
getValue | public String getValue(String key, String defaultVal)(Code) | | Returns the value of the related property. With default values.
Parameters: key - the search key Parameters: defaultVal - if the key is not found return this default value property value |
getValue | public String getValue(String key)(Code) | | Returns the value of the related property.
The method returns null if the property is not found.
Parameters: key - the wanted key property value, null if not exist |
getValueAsArray | public String[] getValueAsArray(String key)(Code) | | Returns the value of the related property as String [].
The method returns null if the property is not found.
Parameters: key - the wanted key property value, null if not exist |
getValueAsBoolean | public boolean getValueAsBoolean(String key, boolean def)(Code) | | Returns the value of the related property as boolean.
Parameters: key - the wanted key Parameters: def - default run if not found property value, true or false. |
getWorkDir | public static String getWorkDir()(Code) | | Static method which return the working directory in jonas.base
the jonas.base property |
main | public static void main(String args)(Code) | | Displays the JOnAS properties values, as they are set by the
different property files.
Parameters: args - the arguments for launching this program |
removeInstance | public static void removeInstance(String fileName)(Code) | | Remove the JProp instance corresponding to the given file name from the 'multiple'
data structure
Parameters: fileName - file name corresponding to the name of the resource to be removed |
toString | public String toString()(Code) | | String representation of the object for trace purpose
String representation of this object |
|
|
|