Package org.frankframework.util
Class AppConstants
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.frankframework.util.PropertyLoader
org.frankframework.util.AppConstants
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
Object>
Singleton class that has the constant values for this application.
When an instance is created, it tries to load the properties file specified
by the propertiesFileName
field
If a property exits with the name ADDITIONAL.PROPERTIES.FILE
that file is loaded also
- Version:
- 2.1
- Author:
- Niels Meijer
- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults
-
Method Summary
Modifier and TypeMethodDescriptiongetAppConstants
(String keyBase) Returns a list ofAppConstants
which names begin with the keyBasegetAppConstants
(String keyBase, boolean useSystemProperties, boolean useEnvironmentVariables) Returns a list ofAppConstants
which names begin with the keyBasestatic AppConstants
Return the AppConstants root instancestatic AppConstants
getInstance
(ClassLoader classLoader) Retrieve an instance based on a ClassLoader.getTokenizedProperty
(String key, String defaults) Deprecated.protected void
load
(ClassLoader classLoader, String filename) void
Add property to global (all) AppConstantsstatic void
static void
setProperty
(String key, boolean value) setProperty
(String key, String value) Add property to global AppConstantsMethods inherited from class org.frankframework.util.PropertyLoader
get, getBoolean, getDouble, getInt, getListProperty, getListProperty, getLong, getOrDefault, getProperty, getResolvedProperty, getString, getUnresolvedProperty, put
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, getOrDefault, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Field Details
-
APPLICATION_SERVER_TYPE_PROPERTY
- See Also:
-
APPLICATION_SERVER_CUSTOMIZATION_PROPERTY
- See Also:
-
ADDITIONAL_PROPERTIES_FILE_SUFFIX_KEY
- See Also:
-
-
Method Details
-
getInstance
Return the AppConstants root instance- Returns:
- AppConstants instance
-
getInstance
Retrieve an instance based on a ClassLoader. This should be used by classes which are part of the Ibis configuration (like pipes and senders) because the configuration might be loaded from outside the webapp classpath. Hence, the Thread.currentThread().getContextClassLoader() at the time the class was instantiated should be used.- Parameters:
classLoader
- ClassLoader to retrieve AppConstants from- Returns:
- AppConstants instance
-
removeInstance
public static void removeInstance() -
removeInstance
-
getTokenizedProperty
Deprecated.Creates a tokenizer from the resolved value of this key. As a separator the "," is used. Uses thePropertyLoader.getResolvedProperty(String)
method. Can be used to process lists of values. -
getAppConstants
Returns a list ofAppConstants
which names begin with the keyBase -
getAppConstants
public Properties getAppConstants(String keyBase, boolean useSystemProperties, boolean useEnvironmentVariables) Returns a list ofAppConstants
which names begin with the keyBase -
setProperty
Add property to global AppConstants- Overrides:
setProperty
in classProperties
-
setProperty
-
put
Add property to global (all) AppConstants -
load
- Overrides:
load
in classPropertyLoader
-