Package org.jboss.as.controller
Class PrimitiveListAttributeDefinition
java.lang.Object
org.jboss.as.controller.AttributeDefinition
org.jboss.as.controller.ListAttributeDefinition
org.jboss.as.controller.PrimitiveListAttributeDefinition
- All Implemented Interfaces:
Feature
- Direct Known Subclasses:
StringListAttributeDefinition
Date: 13.10.2011
- Author:
- James R. Perkins, Richard Achmatowicz (c) 2012 RedHat Inc., Tomaz Cerar
-
Nested Class Summary
Nested ClassesNested 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
Modifier and TypeMethodDescriptionprotected voidaddAttributeValueTypeDescription(org.jboss.dmr.ModelNode node, ResourceDescriptionResolver resolver, Locale locale, ResourceBundle bundle) voidaddCapabilityRequirements(OperationContext context, Resource resource, org.jboss.dmr.ModelNode attributeValue) Based on the given attribute value, add capability requirements.protected voidaddOperationParameterValueTypeDescription(org.jboss.dmr.ModelNode node, String operationName, ResourceDescriptionResolver resolver, Locale locale, ResourceBundle bundle) org.jboss.dmr.ModelNodeaddResourceAttributeDescription(ResourceBundle bundle, String prefix, org.jboss.dmr.ModelNode resourceDescription) Creates a returns a basic model node describing the attribute, after attaching it to the given overall resource description model node.protected voidaddValueTypeDescription(org.jboss.dmr.ModelNode node) protected voidaddValueTypeDescription(org.jboss.dmr.ModelNode node, ResourceBundle bundle) protected org.jboss.dmr.ModelNodeconvertParameterElementExpressions(org.jboss.dmr.ModelNode parameterElement) Examine the given element of a parameter list for any expression syntax, converting the relevant node toModelType.EXPRESSIONif such is supported.Returns an AttributeDefinition describing the content of the list.org.jboss.dmr.ModelTypevoidremoveCapabilityRequirements(OperationContext context, Resource resource, org.jboss.dmr.ModelNode attributeValue) Based on the given attribute value, remove capability requirements.Methods inherited from class org.jboss.as.controller.ListAttributeDefinition
addOperationParameterDescription, addOperationParameterDescription, addOperationReplyDescription, addOperationReplyValueTypeDescription, addResourceAttributeDescription, convertParameterExpressions, getElementValidator, marshallAsElement, parseAndAddParameterElementMethods inherited from class org.jboss.as.controller.AttributeDefinition
addAccessConstraints, addAllowedValuesToDescription, addDeprecatedInfo, addOperationReplyDescription, convertStringExpression, correctValue, equals, 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, hashCode, isAllowed, isAllowExpression, isDeprecated, isMarshallable, isMarshallable, isNillable, isNullSignificant, isRequired, isRequired, isResourceOnly, marshallAsElement, resolveModelAttribute, resolveModelAttribute, resolveValue, resolveValue, toString, validateAndSet, validateOperation
-
Method Details
-
getValueType
public org.jboss.dmr.ModelType getValueType() -
getValueAttributeDefinition
Description copied from class:ListAttributeDefinitionReturns an AttributeDefinition describing the content of the list.- Overrides:
getValueAttributeDefinitionin classListAttributeDefinition- Returns:
- an AttributeDefinition describing the content of the list - null if none is defined.
-
addResourceAttributeDescription
public org.jboss.dmr.ModelNode addResourceAttributeDescription(ResourceBundle bundle, String prefix, org.jboss.dmr.ModelNode resourceDescription) Description copied from class:AttributeDefinitionCreates a returns a basic model node describing the attribute, after attaching it to the given overall resource description model node. The node describing the attribute is returned to make it easy to perform further modification.- Overrides:
addResourceAttributeDescriptionin classListAttributeDefinition- Parameters:
bundle- resource bundle to use for text descriptionsprefix- prefix to prepend to the attribute name key when looking up descriptionsresourceDescription- the overall resource description- Returns:
- the attribute description node
-
addValueTypeDescription
- Specified by:
addValueTypeDescriptionin classListAttributeDefinition
-
addValueTypeDescription
protected void addValueTypeDescription(org.jboss.dmr.ModelNode node) -
convertParameterElementExpressions
protected org.jboss.dmr.ModelNode convertParameterElementExpressions(org.jboss.dmr.ModelNode parameterElement) Description copied from class:ListAttributeDefinitionExamine the given element of a parameter list for any expression syntax, converting the relevant node toModelType.EXPRESSIONif such is supported. This implementation will only convert elements ofModelType.STRING. Subclasses that need to handle complex elements should override this method.- Overrides:
convertParameterElementExpressionsin classListAttributeDefinition- Parameters:
parameterElement- the node to examine. Will not benull- Returns:
- the parameter element with expressions converted, or the original parameter if no conversion was performed
Cannot return
null
-
addAttributeValueTypeDescription
protected void addAttributeValueTypeDescription(org.jboss.dmr.ModelNode node, ResourceDescriptionResolver resolver, Locale locale, ResourceBundle bundle) - Specified by:
addAttributeValueTypeDescriptionin classListAttributeDefinition
-
addOperationParameterValueTypeDescription
protected void addOperationParameterValueTypeDescription(org.jboss.dmr.ModelNode node, String operationName, ResourceDescriptionResolver resolver, Locale locale, ResourceBundle bundle) - Specified by:
addOperationParameterValueTypeDescriptionin classListAttributeDefinition
-
addCapabilityRequirements
public void addCapabilityRequirements(OperationContext context, Resource resource, org.jboss.dmr.ModelNode attributeValue) Description copied from class:AttributeDefinitionBased on the given attribute value, add capability requirements. If this definition is for an attribute whose value is or contains a reference to the name of some capability, this method should record the addition of a requirement for the capability.This is a no-op in this base class. Subclasses that support attribute types that can represent capability references should override this method.
- Overrides:
addCapabilityRequirementsin classAttributeDefinition- Parameters:
context- the operation contextresource- the resource on which requirements are gatheredattributeValue- the value of the attribute described by this object
-
removeCapabilityRequirements
public void removeCapabilityRequirements(OperationContext context, Resource resource, org.jboss.dmr.ModelNode attributeValue) Description copied from class:AttributeDefinitionBased on the given attribute value, remove capability requirements. If this definition is for an attribute whose value is or contains a reference to the name of some capability, this method should record the removal of a requirement for the capability.This is a no-op in this base class. Subclasses that support attribute types that can represent capability references should override this method.
- Overrides:
removeCapabilityRequirementsin classAttributeDefinition- Parameters:
context- the operation contextresource- resource from which capability requirement is to be removed from,nullis legal value in case thatCapabilityReferenceRecorderdoesn't require it.attributeValue- the value of the attribute described by this object
-