Package org.jboss.logmanager.config
Interface PropertyConfigurable
-
- All Known Subinterfaces:
ErrorManagerConfiguration,FilterConfiguration,FormatterConfiguration,HandlerConfiguration,PojoConfiguration
public interface PropertyConfigurableAn object which is configurable via object properties.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddPostConfigurationMethod(java.lang.String methodName)Adds a method name to be invoked after all properties have been set.java.util.List<java.lang.String>getConstructorProperties()Returns a collection of the constructor properties.java.util.List<java.lang.String>getPostConfigurationMethods()Returns a collection of the methods to be invoked after the properties have been set.java.util.List<java.lang.String>getPropertyNames()Get the names of the configured properties in order.ValueExpression<java.lang.String>getPropertyValueExpression(java.lang.String propertyName)Get the property value.java.lang.StringgetPropertyValueString(java.lang.String propertyName)Get the string property value with the given name.booleanhasConstructorProperty(java.lang.String propertyName)Determine whether the given property name is a constructor property.booleanhasProperty(java.lang.String propertyName)Determine whether the given property name is configured.booleanremovePostConfigurationMethod(java.lang.String methodName)Removes the post configuration method.booleanremoveProperty(java.lang.String propertyName)Remove a configured property.voidsetPostConfigurationMethods(java.lang.String... methodNames)Sets the method names to be invoked after the properties have been set.voidsetPostConfigurationMethods(java.util.List<java.lang.String> methodNames)Sets the method names to be invoked after the properties have been set.voidsetPropertyValueExpression(java.lang.String propertyName, java.lang.String expression)Sets the expression value for the property.voidsetPropertyValueExpression(java.lang.String propertyName, java.lang.String expression, java.lang.String value)Sets the expression value for the property.voidsetPropertyValueString(java.lang.String propertyName, java.lang.String value)Set a property value from a string.
-
-
-
Method Detail
-
setPropertyValueString
void setPropertyValueString(java.lang.String propertyName, java.lang.String value) throws java.lang.IllegalArgumentExceptionSet a property value from a string.- Parameters:
propertyName- the property namevalue- the property value- Throws:
java.lang.IllegalArgumentException- if the given value is not acceptable for this property
-
getPropertyValueString
java.lang.String getPropertyValueString(java.lang.String propertyName)
Get the string property value with the given name.- Parameters:
propertyName- the property name- Returns:
- the property value string
-
getPropertyValueExpression
ValueExpression<java.lang.String> getPropertyValueExpression(java.lang.String propertyName)
Get the property value.- Parameters:
propertyName- the property name- Returns:
- the property value
-
setPropertyValueExpression
void setPropertyValueExpression(java.lang.String propertyName, java.lang.String expression)Sets the expression value for the property.- Parameters:
propertyName- the name of the propertyexpression- the expression used to resolve the value
-
setPropertyValueExpression
void setPropertyValueExpression(java.lang.String propertyName, java.lang.String expression, java.lang.String value)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
boolean hasProperty(java.lang.String propertyName)
Determine whether the given property name is configured.- Parameters:
propertyName- the property name to test- Returns:
trueif the name is configured,falseotherwise
-
removeProperty
boolean removeProperty(java.lang.String propertyName)
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
java.util.List<java.lang.String> getPropertyNames()
Get the names of the configured properties in order.- Returns:
- the property names
-
hasConstructorProperty
boolean hasConstructorProperty(java.lang.String propertyName)
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
java.util.List<java.lang.String> getConstructorProperties()
Returns a collection of the constructor properties.- Returns:
- a collection of the constructor properties.
-
addPostConfigurationMethod
boolean addPostConfigurationMethod(java.lang.String methodName)
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
java.util.List<java.lang.String> getPostConfigurationMethods()
Returns a collection of the methods to be invoked after the properties have been set.- Returns:
- a collection of method names or an empty list
-
setPostConfigurationMethods
void setPostConfigurationMethods(java.lang.String... methodNames)
Sets the method names to be invoked after the properties have been set.- Parameters:
methodNames- the method names to invoke
-
setPostConfigurationMethods
void setPostConfigurationMethods(java.util.List<java.lang.String> methodNames)
Sets the method names to be invoked after the properties have been set.- Parameters:
methodNames- the method names to invoke
-
removePostConfigurationMethod
boolean removePostConfigurationMethod(java.lang.String methodName)
Removes the post configuration method.- Parameters:
methodName- the method to remove- Returns:
trueif the method was removed, otherwisefalse
-
-