Package org.jboss.logmanager.config
Class AbstractPropertyConfiguration<T,C extends AbstractPropertyConfiguration<T,C>>
java.lang.Object
org.jboss.logmanager.config.AbstractBasicConfiguration<T,C>
org.jboss.logmanager.config.AbstractPropertyConfiguration<T,C>
- All Implemented Interfaces:
NamedConfigurable
,ObjectConfigurable
,PropertyConfigurable
- Direct Known Subclasses:
ErrorManagerConfigurationImpl
,FilterConfigurationImpl
,FormatterConfigurationImpl
,HandlerConfigurationImpl
,PojoConfigurationImpl
abstract class AbstractPropertyConfiguration<T,C extends AbstractPropertyConfiguration<T,C>>
extends AbstractBasicConfiguration<T,C>
implements ObjectConfigurable, PropertyConfigurable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final String[]
private final String
private final Map
<String, ValueExpression<String>> Fields inherited from class org.jboss.logmanager.config.AbstractBasicConfiguration
configs, refs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
private void
addPostConfigurationActions
(boolean replace) boolean
addPostConfigurationMethod
(String methodName) Adds a method name to be invoked after all properties have been set.(package private) static boolean
Get the class name for this object's configuration.(package private) ConfigAction
<T> Returns a collection of the constructor properties.(package private) static Class
<?> getConstructorPropertyType
(Class<?> clazz, String propertyName) (package private) abstract String
Get the module name for this object's configuration, if any.Returns a collection of the methods to be invoked after the properties have been set.(package private) static Method
getPropertyGetter
(Class<?> clazz, String propertyName) Get the names of the configured properties in order.(package private) static Method
getPropertySetter
(Class<?> clazz, String propertyName) (package private) static Class
<?> getPropertyType
(Class<?> clazz, String propertyName) getPropertyValueExpression
(String propertyName) Get the property value.getPropertyValueString
(String propertyName) Get the string property value with the given name.boolean
hasConstructorProperty
(String propertyName) Determine whether the given property name is a constructor property.boolean
hasProperty
(String propertyName) Determine whether the given property name is configured.protected final Deque
<?> boolean
removePostConfigurationMethod
(String methodName) Removes the post configuration method.boolean
removeProperty
(String propertyName) Remove a configured property.void
setPostConfigurationMethods
(String... methodNames) Sets the method names to be invoked after the properties have been set.void
setPostConfigurationMethods
(List<String> methodNames) Sets the method names to be invoked after the properties have been set.void
setPropertyValueExpression
(String propertyName, String expression) Sets the expression value for the property.void
setPropertyValueExpression
(String propertyName, String expression, String value) Sets the expression value for the property.private void
setPropertyValueExpression
(String propertyName, ValueExpression<String> expression) void
setPropertyValueString
(String propertyName, String value) Set a property value from a string.Methods inherited from class org.jboss.logmanager.config.AbstractBasicConfiguration
clearRemoved, getConfigs, getConfiguration, getName, getRefs, getRemoveAction, isRemoved, setRemoved
-
Field Details
-
actualClass
-
moduleName
-
className
-
constructorProperties
-
properties
-
postConfigurationMethods
-
-
Constructor Details
-
AbstractPropertyConfiguration
-
-
Method Details
-
getConstructAction
ConfigAction<T> getConstructAction() -
getDescription
-
getModuleName
Description copied from interface:ObjectConfigurable
Get the module name for this object's configuration, if any. If JBoss Modules is not present on the class path, onlynull
values are accepted.- Specified by:
getModuleName
in interfaceObjectConfigurable
- Returns:
- the module name, or
null
if none is configured
-
getClassName
Description copied from interface:ObjectConfigurable
Get the class name for this object's configuration.- Specified by:
getClassName
in interfaceObjectConfigurable
- Returns:
- the class name
-
contains
-
setPropertyValueString
public void setPropertyValueString(String propertyName, String value) throws IllegalArgumentException Description copied from interface:PropertyConfigurable
Set a property value from a string.- Specified by:
setPropertyValueString
in interfacePropertyConfigurable
- Parameters:
propertyName
- the property namevalue
- the property value- Throws:
IllegalArgumentException
- if the given value is not acceptable for this property
-
getPropertyValueString
Description copied from interface:PropertyConfigurable
Get the string property value with the given name.- Specified by:
getPropertyValueString
in interfacePropertyConfigurable
- Parameters:
propertyName
- the property name- Returns:
- the property value string
-
getPropertyValueExpression
Description copied from interface:PropertyConfigurable
Get the property value.- Specified by:
getPropertyValueExpression
in interfacePropertyConfigurable
- Parameters:
propertyName
- the property name- Returns:
- the property value
-
setPropertyValueExpression
Description copied from interface:PropertyConfigurable
Sets the expression value for the property.- Specified by:
setPropertyValueExpression
in interfacePropertyConfigurable
- Parameters:
propertyName
- the name of the propertyexpression
- the expression used to resolve the value
-
setPropertyValueExpression
Description copied from interface:PropertyConfigurable
Sets the expression value for the property. This method will not parse the expression for the value and instead use thevalue
parameter for the value.- Specified by:
setPropertyValueExpression
in interfacePropertyConfigurable
- Parameters:
propertyName
- the name of the propertyexpression
- the expression used to resolve the valuevalue
- the value to use
-
setPropertyValueExpression
-
hasProperty
Description copied from interface:PropertyConfigurable
Determine whether the given property name is configured.- Specified by:
hasProperty
in interfacePropertyConfigurable
- Parameters:
propertyName
- the property name to test- Returns:
true
if the name is configured,false
otherwise
-
removeProperty
Description copied from interface:PropertyConfigurable
Remove a configured property. Does not affect the underlying configured value; just removes it from the configuration.- Specified by:
removeProperty
in interfacePropertyConfigurable
- Parameters:
propertyName
- the property name- Returns:
true
if the property name was removed,false
if it was not present
-
getPropertyNames
Description copied from interface:PropertyConfigurable
Get the names of the configured properties in order.- Specified by:
getPropertyNames
in interfacePropertyConfigurable
- Returns:
- the property names
-
hasConstructorProperty
Description copied from interface:PropertyConfigurable
Determine whether the given property name is a constructor property.- Specified by:
hasConstructorProperty
in interfacePropertyConfigurable
- Parameters:
propertyName
- the name of the property to check.- Returns:
true
if the property should be used as a construction property, otherwisefalse
.
-
getActualClass
-
getConstructorProperties
Description copied from interface:PropertyConfigurable
Returns a collection of the constructor properties.- Specified by:
getConstructorProperties
in interfacePropertyConfigurable
- Returns:
- a collection of the constructor properties.
-
addPostConfigurationMethod
Description copied from interface:PropertyConfigurable
Adds a method name to be invoked after all properties have been set.- Specified by:
addPostConfigurationMethod
in interfacePropertyConfigurable
- Parameters:
methodName
- the name of the method- Returns:
true
if the method was successfully added, otherwisefalse
-
getPostConfigurationMethods
Description copied from interface:PropertyConfigurable
Returns a collection of the methods to be invoked after the properties have been set.- Specified by:
getPostConfigurationMethods
in interfacePropertyConfigurable
- Returns:
- a collection of method names or an empty list
-
setPostConfigurationMethods
Description copied from interface:PropertyConfigurable
Sets the method names to be invoked after the properties have been set.- Specified by:
setPostConfigurationMethods
in interfacePropertyConfigurable
- Parameters:
methodNames
- the method names to invoke
-
setPostConfigurationMethods
Description copied from interface:PropertyConfigurable
Sets the method names to be invoked after the properties have been set.- Specified by:
setPostConfigurationMethods
in interfacePropertyConfigurable
- Parameters:
methodNames
- the method names to invoke
-
removePostConfigurationMethod
Description copied from interface:PropertyConfigurable
Removes the post configuration method.- Specified by:
removePostConfigurationMethod
in interfacePropertyConfigurable
- Parameters:
methodName
- the method to remove- Returns:
true
if the method was removed, otherwisefalse
-
addPostConfigurationActions
protected final void addPostConfigurationActions() -
addPostConfigurationActions
private void addPostConfigurationActions(boolean replace) -
removePostConfigurationActions
-
getPropertyType
-
getConstructorPropertyType
-
getPropertySetter
-
getPropertyGetter
-