Package org.jboss.as.logging
Class PropertyAttributeDefinition
- java.lang.Object
-
- org.jboss.as.controller.AttributeDefinition
-
- org.jboss.as.controller.SimpleAttributeDefinition
-
- org.jboss.as.logging.PropertyAttributeDefinition
-
- All Implemented Interfaces:
Feature,ConfigurationProperty<String>
public class PropertyAttributeDefinition extends SimpleAttributeDefinition implements ConfigurationProperty<String>
Defines an attribute with a property name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPropertyAttributeDefinition.Builder-
Nested classes/interfaces inherited from class org.jboss.as.controller.AttributeDefinition
AttributeDefinition.NameAndGroup
-
-
Field Summary
-
Fields inherited from class org.jboss.as.controller.AttributeDefinition
COMPLEX_TYPES
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetPropertyName()Returns the property name for the logging configuration property.inthashCode()StringresolvePropertyValue(OperationContext context, org.jboss.dmr.ModelNode model)Resolves the value of the model node the type.ModelNodeResolver<String>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.StringtoString()-
Methods inherited from class org.jboss.as.controller.SimpleAttributeDefinition
marshallAsAttribute, marshallAsAttribute, marshallAsElement, parseAndSetParameter
-
Methods inherited from class org.jboss.as.controller.AttributeDefinition
addAccessConstraints, addAllowedValuesToDescription, addCapabilityRequirements, addDeprecatedInfo, addOperationParameterDescription, addOperationParameterDescription, addOperationReplyDescription, addOperationReplyDescription, addResourceAttributeDescription, addResourceAttributeDescription, convertParameterExpressions, convertStringExpression, correctValue, getAccessConstraints, getAllowedValues, getAlternatives, getArbitraryDescriptors, getAttributeDeprecatedDescription, getAttributeGroup, getAttributeTextDescription, getCorrector, getDefaultValue, getDeprecationData, getFlags, getMarshaller, getMeasurementUnit, getName, getNoTextDescription, getParser, getReferenceRecorder, getRequires, getStability, getType, getUndefinedMetricValue, getValidator, getXmlName, hasAlternative, hasCapabilityRequirements, isAllowed, isAllowExpression, isDeprecated, isMarshallable, isMarshallable, isNillable, isNullSignificant, isRequired, isRequired, isResourceOnly, marshallAsElement, removeCapabilityRequirements, resolveModelAttribute, resolveModelAttribute, resolveValue, resolveValue, validateAndSet, validateOperation
-
-
-
-
Method Detail
-
setPropertyValue
public void setPropertyValue(OperationContext context, org.jboss.dmr.ModelNode model, org.jboss.logmanager.config.PropertyConfigurable configuration) throws OperationFailedException
Description copied from interface:ConfigurationPropertySets the property on the configuration. If the result ofConfigurationProperty.resolvePropertyValue(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.- Specified by:
setPropertyValuein interfaceConfigurationProperty<String>- 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.
-
resolver
public ModelNodeResolver<String> resolver()
Description copied from interface:ConfigurationPropertyReturns the resolver for the attribute.- Specified by:
resolverin interfaceConfigurationProperty<String>- Returns:
- the resolver.
-
getPropertyName
public String getPropertyName()
Description copied from interface:ConfigurationPropertyReturns the property name for the logging configuration property.- Specified by:
getPropertyNamein interfaceConfigurationProperty<String>- Returns:
- the property name.
-
resolvePropertyValue
public String resolvePropertyValue(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
Description copied from interface:ConfigurationPropertyResolves 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.- Specified by:
resolvePropertyValuein interfaceConfigurationProperty<String>- 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.
-
-