Interface Attribute
- All Superinterfaces:
Definable<org.jboss.as.controller.AttributeDefinition>
- All Known Subinterfaces:
Metric<C>
- All Known Implementing Classes:
SimpleAttribute
Interface to be implemented by attribute enumerations.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetName()Returns the name of this attribute.default org.jboss.dmr.ModelNoderesolveModelAttribute(org.jboss.as.controller.ExpressionResolver resolver, org.jboss.dmr.ModelNode model) Resolves the value of this attribute from the specified model applying any default value.Convenience method that exposes an Attribute enum as a stream ofAttributeDefinitions.stream(Collection<A> attributes) Convenience method that exposes a set of attributes as a stream ofAttributeDefinitions.Methods inherited from interface org.jboss.as.clustering.controller.Definable
getDefinition
-
Method Details
-
getName
Returns the name of this attribute.- Returns:
- the attribute name
-
resolveModelAttribute
default org.jboss.dmr.ModelNode resolveModelAttribute(org.jboss.as.controller.ExpressionResolver resolver, org.jboss.dmr.ModelNode model) throws org.jboss.as.controller.OperationFailedException Resolves the value of this attribute from the specified model applying any default value.- Parameters:
resolver- an expression resolvermodel- the resource model- Returns:
- the resolved value
- Throws:
org.jboss.as.controller.OperationFailedException- if the value was not valid
-
stream
static <E extends Enum<E> & Attribute> Stream<org.jboss.as.controller.AttributeDefinition> stream(Class<E> enumClass) Convenience method that exposes an Attribute enum as a stream ofAttributeDefinitions.- Type Parameters:
E- the attribute enum type- Parameters:
enumClass- the enum class- Returns:
- a stream of attribute definitions.
-
stream
static <A extends Attribute> Stream<org.jboss.as.controller.AttributeDefinition> stream(Collection<A> attributes) Convenience method that exposes a set of attributes as a stream ofAttributeDefinitions.- Type Parameters:
A- the attribute type- Returns:
- a stream of attribute definitions.
-