public class EIBProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHE_SIZE
Deprecated.
|
static java.lang.String |
CACHE_TIMEOUT
Deprecated.
|
static java.lang.String |
COMPONENT
Determines the name of the current component.
|
static java.lang.String |
CONFIG_DIRECTORY_NAME
Name of the directory containing the wcp.properties file inside CORDYS_INSTALL_DIR
|
static java.lang.String |
CORDYS_INSTANCE_NAME
Determines the Cordys instance name
|
static java.lang.String |
DEFAULT_BACKEND
Determines the name of the System Property denoting what the default backend name is for new business document
managers
|
static java.lang.String |
DEFAULT_CONNECTION_POINT
Determines the name of the System Property denoting what the default uri is that should be used when starting an
anonymous client
|
static java.lang.String |
DEFAULT_ITERATOR_SIZE
Determines the name of the System Property denoting what the default value is for the initial size of new iterators
|
static java.lang.String |
DEFAULT_PROTOCOL
Determines the name of the System Property denoting which class should be used for the middleware connection
|
static java.lang.String |
DEFAULT_TIMEOUT
Determines the name of the System Property denoting what the default value is for the timeout for synchronous calls
in BusinessDocumentManagers
|
static java.lang.String |
DIRECTORY_PORT
Deprecated.
|
static java.lang.String |
DIRECTORY_ROOT
Deprecated.
|
static java.lang.String |
GUID_FACTORY
Determines the name of the System Property denoting which class should be used for the Guid Factory
|
static java.lang.String |
INSTALL_DIR
Determines the name of the Systems Environment variable where in the name of the EIB install directory is saved
|
static java.lang.String |
LDAP_CACHE_SIZE
Size of LDAP cache
|
static java.lang.String |
LDAP_CACHE_TIMEOUT
Lifetime of objects in LDAP cache
|
static java.lang.String |
LDAP_PASSWORD
Password with which to connect to the LDAP server
|
static java.lang.String |
LDAP_PORT
Port on which LDAP server can be reached
|
static java.lang.String |
LDAP_ROOT
Determines the root object in the directory service
|
static java.lang.String |
LDAP_SERVER
Server on which LDAP can be reached
|
static java.lang.String |
LDAP_USER
User name with which to connect to the LDAP server
|
static Logger |
LOGGER |
static java.lang.String |
MAX_READERS
Determines the name of the System Property denoting the maximum number of reading connections can be active at the
same time (e.g.
|
static java.lang.String |
PROPERTIES_FILE
The name of the properties file to search for.
|
static java.lang.String |
QUEUE_READ_TIMEOUT
Deprecated.
please use the connection point specific settings for this
|
static java.lang.String |
SAX_PARSER
Determines the name of the System Property denoting which class should be used for the SAX parser
|
static java.lang.String |
SPY_FILE
Deprecated.
use com.eibus.util.logger.CordysLogger instead.
|
static java.lang.String |
SPY_PUBLISH
Deprecated.
use com.eibus.util.logger.CordysLogger instead.
|
static java.lang.String |
UNICODE_FONT |
static java.lang.String |
USER
Determines the name of the System Property denoting what the User name is.
|
static java.lang.String |
WEB_DIR
Determines the name of the Systems Environment variable where in the name of the EIB web directory is saved
|
Constructor and Description |
---|
EIBProperties() |
Modifier and Type | Method and Description |
---|---|
static java.util.Locale |
_localeFromString(java.lang.String strLocale) |
static java.util.Locale |
get_ManagementLocale()
Provides Locale object prepared from language, country code specified using property com.eibus.management.locale .
|
static java.util.Locale |
get_SystemDefaultLocale()
Provides Locale object prepared from language, country code specified using property com.eibus.defaultLocale.
|
static boolean |
getBoolean(java.lang.String name)
Returns is
true if and only if the (system) property named by the argument exists and is equal to the
string "true" . |
static boolean |
getBoolean(java.lang.String name,
boolean defaultValue)
Returns is
true if and only if the (system) property named by the argument exists and is equal to the
string "true" . |
static java.lang.String |
getDefaultPropertiesFileName() |
static java.lang.String |
getFontName() |
static java.lang.String |
getInstallDir()
Get the Cordys Installation directory: Read from environment variable, if fail then read it from CORDYS_HOME or CORDYS_INSTALL_DIR
|
static java.lang.Integer |
getInteger(java.lang.String name)
Determines the integer value of the (system) property with the specified name.
|
static java.lang.Integer |
getInteger(java.lang.String name,
int defaultValue)
Determines the integer value of the system property with the specified name.
|
static java.lang.Integer |
getInteger(java.lang.String name,
java.lang.Integer defaultValue)
Determines the integer value of the (system) property with the specified name.
|
static java.lang.String |
getLDAPServer()
Deprecated.
|
static java.lang.String |
getLoadedPropertiesFileName() |
static java.lang.Long |
getLong(java.lang.String name)
Determines the long value of the (system) property with the specified name.
|
static java.lang.Long |
getLong(java.lang.String name,
java.lang.Long defaultValue)
Determines the long value of the (system) property with the specified name.
|
static java.util.Properties |
getProperties()
The current effective set of properties is returned as a
Properties object. |
static java.lang.String |
getProperty(java.lang.String propertyName)
Gets the (system) property indicated by the specified key.
|
static java.lang.String |
getProperty(java.lang.String propertyName,
java.lang.String defaultValue)
Gets the (system) property indicated by the specified key.
|
static java.lang.String |
getSystemRoot()
Get OSInstallation Directory
|
static java.lang.String |
getWebDir()
Get the Cordys Web directory as defined by the wcp property 'web.root'.
|
static boolean |
isValidFileEncoding() |
protected static boolean |
loadProperties(java.lang.String filePath)
Method that loads the properties from filesystem.
|
static java.util.Properties |
loadPropertiesFromFile(java.lang.String fileName)
Load only the Eib Properties from a file without merging with default and system properties
|
static void |
saveProperties(java.util.Properties np)
Save a set of wcp property in the runtime properties as well in the properties file.
|
static void |
savePropertiesToFile(java.util.Properties np,
java.lang.String fileName)
Save only the Eib Properties to a file without merging with default and system properties
|
static void |
saveProperty(java.lang.String name,
java.lang.String value)
Save a particular wcp property in the runtime properties as well in the properties file.
|
static void |
setInstallDir(java.lang.String installDir)
Set the value of the Install Dir in the environment.
|
static void |
setLDAPServer(java.lang.String ldapServer)
Set the value of the LDAP Server in the environment.
|
static void |
setLoader(com.eibus.util.system.EIBProperties.PropertiesLoader ignored)
Deprecated.
|
static void |
setUserName(java.lang.String username) |
static void |
setWebDir(java.lang.String webDir)
Set the value of the Web Dir in the environment.
|
public static final java.lang.String CONFIG_DIRECTORY_NAME
public static final java.lang.String PROPERTIES_FILE
public static final java.lang.String LDAP_SERVER
public static final java.lang.String LDAP_PORT
public static final java.lang.String LDAP_USER
public static final java.lang.String LDAP_PASSWORD
public static final java.lang.String LDAP_CACHE_SIZE
public static final java.lang.String LDAP_CACHE_TIMEOUT
public static final java.lang.String LDAP_ROOT
@Deprecated public static final java.lang.String CACHE_SIZE
@Deprecated public static final java.lang.String CACHE_TIMEOUT
@Deprecated public static final java.lang.String DIRECTORY_PORT
@Deprecated public static final java.lang.String DIRECTORY_ROOT
public static final java.lang.String COMPONENT
public static final java.lang.String SAX_PARSER
public static final java.lang.String GUID_FACTORY
public static final java.lang.String MAX_READERS
public static final java.lang.String DEFAULT_PROTOCOL
public static final java.lang.String DEFAULT_CONNECTION_POINT
public static final java.lang.String DEFAULT_TIMEOUT
public static final java.lang.String DEFAULT_ITERATOR_SIZE
@Deprecated public static final java.lang.String QUEUE_READ_TIMEOUT
public static final java.lang.String DEFAULT_BACKEND
public static final java.lang.String USER
public static final java.lang.String INSTALL_DIR
public static final java.lang.String WEB_DIR
@Deprecated public static final java.lang.String SPY_PUBLISH
@Deprecated public static final java.lang.String SPY_FILE
public static final java.lang.String UNICODE_FONT
public static final java.lang.String CORDYS_INSTANCE_NAME
public static final Logger LOGGER
protected static boolean loadProperties(java.lang.String filePath)
filePath
- the name of the property file.@Deprecated public static void setLoader(com.eibus.util.system.EIBProperties.PropertiesLoader ignored)
public static java.lang.String getProperty(java.lang.String propertyName)
key
- the name of the system property.null
if there is no property with that key.public static java.lang.String getProperty(java.lang.String propertyName, java.lang.String defaultValue)
If there is no current set of system properties, a set of system properties is first created and initialized in the
same manner as for the getProperties
method.
Note: This method returns the default for system properties that can't be accessed. No security exceptions are
thrown.
key
- the name of the (system) property.defaultValue
- a default value.public static java.util.Properties getProperties()
Properties
object.public static boolean getBoolean(java.lang.String name)
true
if and only if the (system) property named by the argument exists and is equal to the
string "true"
.name
- the (system) property name.boolean
value of the system property.public static boolean getBoolean(java.lang.String name, boolean defaultValue)
true
if and only if the (system) property named by the argument exists and is equal to the
string "true"
.name
- the (system) property name.defaultValue
- the default valueboolean
value of the system property.public static java.lang.Integer getInteger(java.lang.String name)
The first argument is treated as the name of a (system) property. The string value of this property is then
interpreted as an integer value and an Integer
object representing this value is returned. Details of
possible numeric formats can be found with the definition of getProperty
.
If there is no property with the specified name, or if the property does not have the correct numeric format, then
null
is returned.
name
- property name.Integer
value of the property.System.getProperty(java.lang.String)
,
System.getProperty(java.lang.String, java.lang.String)
public static java.lang.Integer getInteger(java.lang.String name, int defaultValue)
The first argument is treated as the name of a (system) property. Properties are accessible through
getProperty
The string value of this property is then interpreted as an integer value and an
Integer
object representing this value is returned. Details of possible numeric formats can be found
with the definition of getProperty
.
If there is no property with the specified name, or if the property does not have the correct numeric format, then
an Integer
object that represents the value of the second argument is returned.
Deprecation notice: This method might get deprecated in the future, so use
getInteger(String,Integer)
instead.
name
- property name.defaultValue
- default value.Integer
value of the property.public static java.lang.Integer getInteger(java.lang.String name, java.lang.Integer defaultValue)
The first argument is treated as the name of a (system) property. The string value of this property is then
interpreted as an integer value and an Integer
object representing this value is returned.
If the property value begins with "0x
" or "#
", not followed by a minus sign, the rest of
it is parsed as a hexadecimal integer exactly as for the method Integer.valueOf
with radix 16.
If the property value begins with "0
" then it is parsed as an octal integer exactly as for the method
Integer.valueOf
with radix 8.
Otherwise the property value is parsed as a decimal integer exactly as for the method Integer.valueOf
with radix 10.
The second argument is the default value. If there is no property of the specified name, or if the property does not have the correct numeric format, then the second argument is returned.
name
- property name.defaultValue
- default value.Integer
value of the property.public static java.lang.Long getLong(java.lang.String name)
The first argument is treated as the name of a (system) property. The string value of this property is then
interpreted as a long value and a Long
object representing this value is returned. Details of possible
numeric formats can be found with the definition of getProperty
.
If there is no property with the specified name, or if the property does not have the correct numeric format, then
null
is returned.
name
- property name.Long
value of the property.System.getProperty(java.lang.String)
,
System.getProperty(java.lang.String, java.lang.String)
public static java.lang.Long getLong(java.lang.String name, java.lang.Long defaultValue)
The first argument is treated as the name of a (system) property. The string value of this property is then
interpreted as a long value and a Long
object representing this value is returned.
If the property value begins with "0x
" or "#
", not followed by a minus sign, the rest of
it is parsed as a hexadecimal long exactly as for the method Long.valueOf
with radix 16.
If the property value begins with "0
" then it is parsed as an octal long exactly as for the method
Long.valueOf
with radix 8.
Otherwise the property value is parsed as a decimal long exactly as for the method Long.valueOf
with
radix 10.
The second argument is the default value. If there is no property of the specified name, or if the property does not have the correct numeric format, then the second argument is returned.
name
- property name.defaultValue
- default value.Long
value of the property.public static java.util.Properties loadPropertiesFromFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static void savePropertiesToFile(java.util.Properties np, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static void saveProperty(java.lang.String name, java.lang.String value) throws java.io.IOException
name
- the name of the propertyvalue
- if the value if the property == null the property will be deletedjava.io.IOException
public static void saveProperties(java.util.Properties np) throws java.io.IOException
java.io.IOException
public static java.lang.String getInstallDir()
public static void setInstallDir(java.lang.String installDir)
public static java.lang.String getSystemRoot()
public static java.lang.String getWebDir()
public static void setWebDir(java.lang.String webDir)
@Deprecated public static java.lang.String getLDAPServer()
public static void setLDAPServer(java.lang.String ldapServer)
public static java.lang.String getDefaultPropertiesFileName()
public static java.lang.String getLoadedPropertiesFileName()
public static java.lang.String getFontName()
public static java.util.Locale get_ManagementLocale()
public static java.util.Locale get_SystemDefaultLocale()
public static java.util.Locale _localeFromString(java.lang.String strLocale)
public static void setUserName(java.lang.String username)
public static boolean isValidFileEncoding()