Package org.cristalise.kernel.utils
Class ObjectProperties
java.lang.Object
java.util.Dictionary<Object,Object>
java.util.Hashtable<Object,Object>
java.util.Properties
org.cristalise.kernel.utils.ObjectProperties
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToOutcome(String processName) Convert the properties to an XML using SystemProperties.xsd.voidbooleangetBoolean(String aPropertyName) booleangetBoolean(String aPropertyName, boolean defaultValue) getInstance(String propName) getInstance(String propName, Object defaultVal) ArrayList<?> getInstances(String propName) ArrayList<?> getInstances(String propName, Object defaultVal) intintgetInteger(String aPropertyName) getInteger(String aPropertyName, Integer defaultValue) voidsetProperty(String aPropertyName, Object aPropertyValue) Allow setting of properties as ObjectsMethods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Constructor Details
-
ObjectProperties
public ObjectProperties() -
ObjectProperties
-
-
Method Details
-
getString
-
getString
-
getObject
- Parameters:
propName- the name of the property- Returns:
- the object value of the property. Returns null if the property doesn't exist or if the properties of the gateway is null
-
getObject
- Parameters:
propName- the name of the propertydefaultValue- the default value.- Returns:
- the object value of the property. Returns the default value if the property doesn't exist or if the properties of the gateway is null.
-
getBoolean
- Parameters:
aPropertyName- the name of the paroperty- Returns:
- the boolean value of the property. Returns false if the property doesn't exist or if the value is not a String or a Boolean instance
-
getBoolean
- Parameters:
aPropertyName- the name of the parameter stored in the clc filedefaultValue- the default value- Returns:
- the boolean value of the property. Returns the default value if the property doesn't exist or if the value is not a String or a Boolean instance
-
getInteger
-
getInteger
-
getInt
- Parameters:
aPropertyName- the name of the property- Returns:
- the int value of the property. Returns -1 if the property doesn't exist or if the value is not a String or an Integer instance
-
getInt
- Parameters:
aPropertyName- the name of the propertydefaultValue- the default value- Returns:
- the int value of the property. Returns the default value if the property doesn't exist or if the value is not a String or an Integer instance
-
setProperty
Allow setting of properties as Objects- Parameters:
aPropertyName- the name of the propertyaPropertyValue- the value of the property
-
dumpProps
public void dumpProps() -
getInstance
public Object getInstance(String propName, Object defaultVal) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException -
getInstance
public Object getInstance(String propName) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException -
getInstances
public ArrayList<?> getInstances(String propName, Object defaultVal) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException -
getInstances
public ArrayList<?> getInstances(String propName) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException -
convertToOutcome
public Outcome convertToOutcome(String processName) throws IOException, InvalidDataException, ObjectNotFoundException Convert the properties to an XML using SystemProperties.xsd. It is based on MVEL2 template- Parameters:
processName- the name of process of which properties are converted- Returns:
- the Outcome created from the Properties
- Throws:
IOException- could not load MVEL template from classpathObjectNotFoundException- SystemProperties Schema v0 was not foundInvalidDataException- The Schema is invalid
-