Interface PropertyConfigurable
- All Known Subinterfaces:
ErrorManagerConfiguration, FilterConfiguration, FormatterConfiguration, HandlerConfiguration, PojoConfiguration
- All Known Implementing Classes:
AbstractPropertyConfiguration, ErrorManagerConfigurationImpl, FilterConfigurationImpl, FormatterConfigurationImpl, HandlerConfigurationImpl, PojoConfigurationImpl
public interface PropertyConfigurable
An object which is configurable via object properties.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPostConfigurationMethod(String methodName) Adds a method name to be invoked after all properties have been set.Returns a collection of the constructor properties.Returns a collection of the methods to be invoked after the properties have been set.Get the names of the configured properties in order.getPropertyValueExpression(String propertyName) Get the property value.getPropertyValueString(String propertyName) Get the string property value with the given name.booleanhasConstructorProperty(String propertyName) Determine whether the given property name is a constructor property.booleanhasProperty(String propertyName) Determine whether the given property name is configured.booleanremovePostConfigurationMethod(String methodName) Removes the post configuration method.booleanremoveProperty(String propertyName) Remove a configured property.voidsetPostConfigurationMethods(String... methodNames) Sets the method names to be invoked after the properties have been set.voidsetPostConfigurationMethods(List<String> methodNames) Sets the method names to be invoked after the properties have been set.voidsetPropertyValueExpression(String propertyName, String expression) Sets the expression value for the property.voidsetPropertyValueExpression(String propertyName, String expression, String value) Sets the expression value for the property.voidsetPropertyValueString(String propertyName, String value) Set a property value from a string.
-
Method Details
-
setPropertyValueString
Set a property value from a string.- Parameters:
propertyName- the property namevalue- the property value- Throws:
IllegalArgumentException- if the given value is not acceptable for this property
-
getPropertyValueString
-
getPropertyValueExpression
Get the property value.- Parameters:
propertyName- the property name- Returns:
- the property value
-
setPropertyValueExpression
-
setPropertyValueExpression
Sets the expression value for the property. This method will not parse the expression for the value and instead use thevalueparameter for the value.- Parameters:
propertyName- the name of the propertyexpression- the expression used to resolve the valuevalue- the value to use
-
hasProperty
Determine whether the given property name is configured.- Parameters:
propertyName- the property name to test- Returns:
trueif the name is configured,falseotherwise
-
removeProperty
Remove a configured property. Does not affect the underlying configured value; just removes it from the configuration.- Parameters:
propertyName- the property name- Returns:
trueif the property name was removed,falseif it was not present
-
getPropertyNames
-
hasConstructorProperty
Determine whether the given property name is a constructor property.- Parameters:
propertyName- the name of the property to check.- Returns:
trueif the property should be used as a construction property, otherwisefalse.
-
getConstructorProperties
-
addPostConfigurationMethod
Adds a method name to be invoked after all properties have been set.- Parameters:
methodName- the name of the method- Returns:
trueif the method was successfully added, otherwisefalse
-
getPostConfigurationMethods
-
setPostConfigurationMethods
Sets the method names to be invoked after the properties have been set.- Parameters:
methodNames- the method names to invoke
-
setPostConfigurationMethods
-
removePostConfigurationMethod
Removes the post configuration method.- Parameters:
methodName- the method to remove- Returns:
trueif the method was removed, otherwisefalse
-