Package com.activeviam.properties
Interface IActiveViamPropertyRegistry
-
- All Known Implementing Classes:
ActiveViamPropertyRegistry
public interface IActiveViamPropertyRegistryInterface to handle the Properties defined in ActiveViam products.- Author:
- ActiveViam
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear(IActiveViamProperty prop)Resets the value of a property.booleangetBoolean(IActiveViamProperty prop, boolean defaultValue)Gets the value of the property ordefaultValueif it is not defined.doublegetDouble(IActiveViamProperty prop, double defaultValue)Gets the value of the property ordefaultValueif it is not defined.intgetInteger(IActiveViamProperty prop, int defaultValue)Gets the value of the property ordefaultValueif it is not defined.longgetLong(IActiveViamProperty prop, long defaultValue)Gets the value of the property ordefaultValueif it is not defined.booleangetRequiredBoolean(IActiveViamProperty prop)Gets the value of the property.doublegetRequiredDouble(IActiveViamProperty prop)Gets the value of the property.intgetRequiredInteger(IActiveViamProperty prop)Gets the value of the property.longgetRequiredLong(IActiveViamProperty prop)Gets the value of the property.StringgetRequiredString(IActiveViamProperty prop)Gets the value of the property (nevernull).StringgetString(IActiveViamProperty prop, String defaultValue)Gets the value of the property ordefaultValueif it is not defined.voidset(IActiveViamProperty prop, Object value)Sets the value of a property.
-
-
-
Method Detail
-
getString
String getString(IActiveViamProperty prop, String defaultValue)
Gets the value of the property ordefaultValueif it is not defined.- Parameters:
prop- the property to resolvedefaultValue- the default value to return if no value is found- Returns:
- the value of the property or
defaultValueif it is not defined
-
getRequiredString
String getRequiredString(IActiveViamProperty prop) throws IllegalStateException
Gets the value of the property (nevernull).- Parameters:
prop- the property to resolve- Returns:
- the value of the property as a string
- Throws:
IllegalStateException- if the property is not defined
-
getBoolean
boolean getBoolean(IActiveViamProperty prop, boolean defaultValue)
Gets the value of the property ordefaultValueif it is not defined.- Parameters:
prop- the property to resolvedefaultValue- the default value to return if no value is found- Returns:
- the value of the property or
defaultValueif it is not defined
-
getRequiredBoolean
boolean getRequiredBoolean(IActiveViamProperty prop) throws IllegalStateException
Gets the value of the property.- Parameters:
prop- the property to resolve- Returns:
- the value of the property
- Throws:
IllegalStateException- if the property is not defined
-
getInteger
int getInteger(IActiveViamProperty prop, int defaultValue)
Gets the value of the property ordefaultValueif it is not defined.- Parameters:
prop- the property to resolvedefaultValue- the default value to return if no value is found- Returns:
- the value of the property or
defaultValueif it is not defined
-
getRequiredInteger
int getRequiredInteger(IActiveViamProperty prop) throws IllegalStateException
Gets the value of the property.- Parameters:
prop- the property to resolve- Returns:
- the value of the property
- Throws:
IllegalStateException- if the property is not defined
-
getDouble
double getDouble(IActiveViamProperty prop, double defaultValue)
Gets the value of the property ordefaultValueif it is not defined.- Parameters:
prop- the property to resolvedefaultValue- the default value to return if no value is found- Returns:
- the value of the property or
defaultValueif it is not defined
-
getRequiredDouble
double getRequiredDouble(IActiveViamProperty prop) throws IllegalStateException
Gets the value of the property.- Parameters:
prop- the property to resolve- Returns:
- the value of the property
- Throws:
IllegalStateException- if the property is not defined
-
getLong
long getLong(IActiveViamProperty prop, long defaultValue)
Gets the value of the property ordefaultValueif it is not defined.- Parameters:
prop- the property to resolvedefaultValue- the default value to return if no value is found- Returns:
- the value of the property or
defaultValueif it is not defined
-
getRequiredLong
long getRequiredLong(IActiveViamProperty prop) throws IllegalStateException
Gets the value of the property.- Parameters:
prop- the property to resolve- Returns:
- the value of the property
- Throws:
IllegalStateException- if the property is not defined
-
set
void set(IActiveViamProperty prop, Object value)
Sets the value of a property.- Parameters:
prop- the property to set in the registryvalue- value to set in the registry
-
clear
void clear(IActiveViamProperty prop)
Resets the value of a property.- Parameters:
prop- the property to clear
-
-