Package org.jboss.as.logging
Interface ConfigurationProperty<T>
-
- All Known Implementing Classes:
LogHandlerListAttributeDefinition,PropertyAttributeDefinition,PropertyObjectTypeAttributeDefinition
public interface ConfigurationProperty<T>Used for configuring logging properties.- Author:
- James R. Perkins
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetPropertyName()Returns the property name for the logging configuration property.TresolvePropertyValue(OperationContext context, org.jboss.dmr.ModelNode model)Resolves the value of the model node the type.ModelNodeResolver<T>resolver()Returns the resolver for the attribute.voidsetPropertyValue(OperationContext context, org.jboss.dmr.ModelNode model, org.jboss.logmanager.config.PropertyConfigurable configuration)Sets the property on the configuration.
-
-
-
Method Detail
-
resolver
ModelNodeResolver<T> resolver()
Returns the resolver for the attribute.- Returns:
- the resolver.
-
getPropertyName
String getPropertyName()
Returns the property name for the logging configuration property.- Returns:
- the property name.
-
resolvePropertyValue
T resolvePropertyValue(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
Resolves the value of the model node the type. Uses theModelNodeResolver.resolveValue(org.jboss.as.controller.OperationContext, org.jboss.dmr.ModelNode)to resolve the value. If theresolverisnull, eithernullis returned or a default value based on the type implementation.- Parameters:
context- the operation context.model- the model used to resolve the value from.- Returns:
- the resolved value or
null. - Throws:
OperationFailedException- if the value is invalid.
-
setPropertyValue
void setPropertyValue(OperationContext context, org.jboss.dmr.ModelNode model, org.jboss.logmanager.config.PropertyConfigurable configuration) throws OperationFailedException
Sets the property on the configuration. If the result ofresolvePropertyValue(org.jboss.as.controller.OperationContext, org.jboss.dmr.ModelNode)is notnull, the value is set on the property withString.valueOf(Object). If the result isnulland the model is defined,ModelNode.asString()is used for the property, otherwise the property is removed from the handler.- Parameters:
context- the operation context used to resolve the value from the model.model- the model used to resolve the value.configuration- the configuration to set the value on.- Throws:
OperationFailedException- if the value is invalid.
-
-