Class AbstractAttributeDefinitionBuilder<BUILDER extends AbstractAttributeDefinitionBuilder,ATTRIBUTE extends AttributeDefinition>
- java.lang.Object
-
- org.jboss.as.controller.AbstractAttributeDefinitionBuilder<BUILDER,ATTRIBUTE>
-
- Type Parameters:
BUILDER- the specific subclass type returned by the various builder API methodsATTRIBUTE- the type ofAttributeDefinitionproduced by thebuild()method
- Direct Known Subclasses:
ListAttributeDefinition.Builder,MapAttributeDefinition.Builder,ObjectTypeAttributeDefinition.Builder,SimpleAttributeDefinitionBuilder
public abstract class AbstractAttributeDefinitionBuilder<BUILDER extends AbstractAttributeDefinitionBuilder,ATTRIBUTE extends AttributeDefinition> extends Object
Provides a builder API for creating anAttributeDefinition.- Author:
- Tomaz Cerar
-
-
Constructor Summary
Constructors Constructor Description AbstractAttributeDefinitionBuilder(String attributeName, AttributeDefinition basis)Creates a builder populated with the values of an existing attribute definition, with an optional change of the attribute's name.AbstractAttributeDefinitionBuilder(String attributeName, org.jboss.dmr.ModelType type)Creates a builder for an attribute with the give name and type.AbstractAttributeDefinitionBuilder(String attributeName, org.jboss.dmr.ModelType type, boolean optional)Creates a builder for an attribute with the give name and type and nullability setting.AbstractAttributeDefinitionBuilder(AttributeDefinition basis)Creates a builder populated with the values of an existing attribute definition.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BUILDERaddAccessConstraint(AccessConstraintDefinition accessConstraint)Adds an access constraint to the set used with the attributeBUILDERaddAlternatives(String... alternatives)Addsnames of alternative attributesthat should not be defined if this attribute is defined.BUILDERaddArbitraryDescriptor(String arbitraryDescriptor, org.jboss.dmr.ModelNode value)Addsarbitrary descriptor.BUILDERaddFlag(AttributeAccess.Flag flag)Adds aspecial purpose flagthat is relevant to the attributeabstract ATTRIBUTEbuild()Create theAttributeDefinitionAccessConstraintDefinition[]getAccessConstraints()org.jboss.dmr.ModelNode[]getAllowedValues()String[]getAlternatives()Map<String,org.jboss.dmr.ModelNode>getArbitraryDescriptors()StringgetAttributeGroup()AttributeMarshallergetAttributeMarshaller()protected CapabilityReferenceRecordergetCapabilityReferenceRecorder()ParameterCorrectorgetCorrector()org.jboss.dmr.ModelNodegetDefaultValue()DeprecationDatagetDeprecated()AttributeAccess.Flag[]getFlags()intgetMaxSize()MeasurementUnitgetMeasurementUnit()intgetMinSize()StringgetName()BooleangetNullSignificant()AttributeParsergetParser()String[]getRequires()org.jboss.dmr.ModelTypegetType()org.jboss.dmr.ModelNodegetUndefinedMetricValue()ParameterValidatorgetValidator()StringgetXmlName()booleanisAllowExpression()protected booleanisFlagPresent(AttributeAccess.Flag flag)Checks if aspecial purpose flaghas been recorded as relevant to the attributebooleanisNillable()booleanisResourceOnly()BUILDERremoveAlternatives(String... alternatives)Removesnames of alternative attributesfrom the set of those that should not be defined if this attribute is defined.BUILDERremoveFlag(AttributeAccess.Flag flag)Removes aspecial purpose flagfrom the set of those relevant to the attributeBUILDERsetAccessConstraints(AccessConstraintDefinition... accessConstraints)Sets access constraints to use with the attributeBUILDERsetAllowedValues(int... allowedValues)Sets allowed values for attributeBUILDERsetAllowedValues(String... allowedValues)Sets allowed values for attributeBUILDERsetAllowedValues(org.jboss.dmr.ModelNode... allowedValues)Sets allowed values for attributeBUILDERsetAllowExpression(boolean allowExpression)Sets whether the attribute shouldallow expressionsIf not set the default value isfalse.BUILDERsetAlternatives(String... alternatives)Setsnames of alternative attributesthat should not be defined if this attribute is defined.BUILDERsetAttributeGroup(String attributeGroup)Sets the name of the attribute group with which this attribute is associated.BUILDERsetAttributeMarshaller(AttributeMarshaller marshaller)Sets a customAttributeMarshallerto use for marshalling the attribute to xml.BUILDERsetAttributeParser(AttributeParser parser)Sets a customAttributeParserto use for parsing attribute from xml.BUILDERsetCapabilityReference(String referencedCapability)Records that this attribute's value represents a reference to an instance of adynamic capability.BUILDERsetCapabilityReference(String referencedCapability, String dependentCapability)Records that this attribute's value represents a reference to an instance of adynamic capability.BUILDERsetCapabilityReference(String referencedCapability, AttributeDefinition... dependantAttributes)Records that this attribute's value represents a reference to an instance of adynamic capability.BUILDERsetCapabilityReference(String referencedCapability, RuntimeCapability<?> dependentCapability)Records that this attribute's value represents a reference to an instance of adynamic capability.BUILDERsetCapabilityReference(RuntimeCapability capability, String referencedCapability, AttributeDefinition... dependantAttributes)Records that this attribute's value represents a reference to an instance of adynamic capability.BUILDERsetCapabilityReference(CapabilityReferenceRecorder referenceRecorder)Records that this attribute's value represents a reference to an instance of adynamic capabilityand assigns the object that should be used to handle adding and removing capability requirements.BUILDERsetCorrector(ParameterCorrector corrector)Sets aParameterCorrectorto use to adjust any user provided values beforevalidationoccurs.BUILDERsetDefaultValue(org.jboss.dmr.ModelNode defaultValue)Sets adefault valueto use for the attribute if no user-provided value is available.BUILDERsetDeprecated(ModelVersion since)Marks the attribute as deprecated since the given API version.BUILDERsetDeprecated(ModelVersion since, boolean notificationUseful)Marks the attribute as deprecated since the given API version, with the ability to configure that notifications to the user (e.g.BUILDERsetExpressionsDeprecated()Marks that support for use of an expression for the attribute's value is deprecated and may be removed in a future release.BUILDERsetFlags(AttributeAccess.Flag... flags)Sets thespecial purpose flagsthat are relevant to the attributeBUILDERsetMaxSize(int maxSize)Sets a maximum size for a collection-type attribute or one whose value is a string or byte[].BUILDERsetMeasurementUnit(MeasurementUnit unit)Sets ameasurement unitto describe the unit in which a numeric attribute is expressed.BUILDERsetMinSize(int minSize)Sets a minimum size description for a collection-type attribute or one whose value is a string or byte[].BUILDERsetNullSignificant(boolean nullSignificant)Sets whether an access control check is required to implicitly set an attribute toundefinedin a resource "add" operation.BUILDERsetRequired(boolean required)Sets whether the attribute shouldrequire a defined valuein the absence ofalternatives.BUILDERsetRequires(String... requires)Setsnames of required attributesthat must be defined if this attribute is defined.BUILDERsetResourceOnly()Marks an attribute as only relevant to a resource, and not a valid parameter to an "add" operation that creates that resource.BUILDERsetRestartAllServices()Adds theAttributeAccess.Flag.RESTART_ALL_SERVICESflag and removes any conflicting flag.BUILDERsetRestartJVM()Adds theAttributeAccess.Flag.RESTART_JVMflag and removes any conflicting flag.BUILDERsetRuntimeServiceNotRequired()Adds theAttributeAccess.Flag.RUNTIME_SERVICE_NOT_REQUIREDflag.BUILDERsetStorageRuntime()Adds theAttributeAccess.Flag.STORAGE_RUNTIMEflag and removes any conflicting flag.BUILDERsetUndefinedMetricValue(org.jboss.dmr.ModelNode undefinedMetricValue)Sets adefault valueto use for the metric if no runtime value is available (e.g.BUILDERsetValidator(ParameterValidator validator)Sets the validator that should be used to validate attribute values.BUILDERsetXmlName(String xmlName)Sets thexml namefor the attribute, which is only needed if the name used for the attribute is different from its ordinaryname in the model.
-
-
-
Constructor Detail
-
AbstractAttributeDefinitionBuilder
public AbstractAttributeDefinitionBuilder(String attributeName, org.jboss.dmr.ModelType type)
Creates a builder for an attribute with the give name and type. Equivalent toAbstractAttributeDefinitionBuilder(attributeName, type, false
-
AbstractAttributeDefinitionBuilder
public AbstractAttributeDefinitionBuilder(String attributeName, org.jboss.dmr.ModelType type, boolean optional)
Creates a builder for an attribute with the give name and type and nullability setting.- Parameters:
attributeName- thenameof the attribute. Cannot benulltype- thetypeof the attribute. Cannot benulloptional-trueif the attributeallows undefined valuesin the absence ofalternatives
-
AbstractAttributeDefinitionBuilder
public AbstractAttributeDefinitionBuilder(AttributeDefinition basis)
Creates a builder populated with the values of an existing attribute definition.- Parameters:
basis- the existing attribute definition. Cannot benull
-
AbstractAttributeDefinitionBuilder
public AbstractAttributeDefinitionBuilder(String attributeName, AttributeDefinition basis)
Creates a builder populated with the values of an existing attribute definition, with an optional change of the attribute's name.- Parameters:
attributeName- thenameof the attribute, ornullif the name frombasisshould be usedbasis- the existing attribute definition. Cannot benull
-
-
Method Detail
-
build
public abstract ATTRIBUTE build()
Create theAttributeDefinition- Returns:
- the attribute definition. Will not return
null
-
setXmlName
public BUILDER setXmlName(String xmlName)
Sets thexml namefor the attribute, which is only needed if the name used for the attribute is different from its ordinaryname in the model. If not set the default value is the name passed to the builder constructor.- Parameters:
xmlName- the xml name.nullis allowed- Returns:
- a builder that can be used to continue building the attribute definition
-
setRequired
public BUILDER setRequired(boolean required)
Sets whether the attribute shouldrequire a defined valuein the absence ofalternatives. If not set the default value is the value provided to the builder constructor, ortrueif no value is provided.- Parameters:
required-trueif undefined values should not be allowed in the absence of alternatives- Returns:
- a builder that can be used to continue building the attribute definition
-
setAllowExpression
public BUILDER setAllowExpression(boolean allowExpression)
Sets whether the attribute shouldallow expressionsIf not set the default value isfalse.- Parameters:
allowExpression-trueif expression values should be allowed- Returns:
- a builder that can be used to continue building the attribute definition
-
setDefaultValue
public BUILDER setDefaultValue(org.jboss.dmr.ModelNode defaultValue)
Sets adefault valueto use for the attribute if no user-provided value is available.- Parameters:
defaultValue- the default value, ornullif no default should be used- Returns:
- a builder that can be used to continue building the attribute definition
-
setMeasurementUnit
public BUILDER setMeasurementUnit(MeasurementUnit unit)
Sets ameasurement unitto describe the unit in which a numeric attribute is expressed.- Parameters:
unit- the unit.nullis allowed- Returns:
- a builder that can be used to continue building the attribute definition
-
setCorrector
public BUILDER setCorrector(ParameterCorrector corrector)
Sets aParameterCorrectorto use to adjust any user provided values beforevalidationoccurs.- Parameters:
corrector- the corrector. May benull- Returns:
- a builder that can be used to continue building the attribute definition
-
setValidator
public BUILDER setValidator(ParameterValidator validator)
Sets the validator that should be used to validate attribute values. The resulting attribute definition will wrap this validator in one that enforces the attribute'sallow nullandallow expressionsettings, so the givenvalidatorneed not be properly configured for those validations.- Parameters:
validator- the validator.nullis allowed- Returns:
- a builder that can be used to continue building the attribute definition
-
setAlternatives
public BUILDER setAlternatives(String... alternatives)
Setsnames of alternative attributesthat should not be defined if this attribute is defined.- Parameters:
alternatives- the attribute names- Returns:
- a builder that can be used to continue building the attribute definition
-
addAlternatives
public BUILDER addAlternatives(String... alternatives)
Addsnames of alternative attributesthat should not be defined if this attribute is defined.- Parameters:
alternatives- the attribute names- Returns:
- a builder that can be used to continue building the attribute definition
-
removeAlternatives
public final BUILDER removeAlternatives(String... alternatives)
Removesnames of alternative attributesfrom the set of those that should not be defined if this attribute is defined.- Parameters:
alternatives- the attribute names- Returns:
- a builder that can be used to continue building the attribute definition
-
addArbitraryDescriptor
public BUILDER addArbitraryDescriptor(String arbitraryDescriptor, org.jboss.dmr.ModelNode value)
Addsarbitrary descriptor.- Parameters:
arbitraryDescriptor- the arbitrary descriptor name.value- the value of the arbitrary descriptor.- Returns:
- a builder that can be used to continue building the attribute definition
-
setRequires
public BUILDER setRequires(String... requires)
Setsnames of required attributesthat must be defined if this attribute is defined.- Parameters:
requires- the attribute names- Returns:
- a builder that can be used to continue building the attribute definition
-
setFlags
public BUILDER setFlags(AttributeAccess.Flag... flags)
Sets thespecial purpose flagsthat are relevant to the attribute- Parameters:
flags- the flags- Returns:
- a builder that can be used to continue building the attribute definition
-
addFlag
public BUILDER addFlag(AttributeAccess.Flag flag)
Adds aspecial purpose flagthat is relevant to the attribute- Parameters:
flag- the flag- Returns:
- a builder that can be used to continue building the attribute definition
-
removeFlag
public BUILDER removeFlag(AttributeAccess.Flag flag)
Removes aspecial purpose flagfrom the set of those relevant to the attribute- Parameters:
flag- the flag- Returns:
- a builder that can be used to continue building the attribute definition
-
isFlagPresent
protected boolean isFlagPresent(AttributeAccess.Flag flag)
Checks if aspecial purpose flaghas been recorded as relevant to the attribute- Parameters:
flag- the flag- Returns:
- a builder that can be used to continue building the attribute definition
-
setStorageRuntime
public BUILDER setStorageRuntime()
Adds theAttributeAccess.Flag.STORAGE_RUNTIMEflag and removes any conflicting flag.- Returns:
- a builder that can be used to continue building the attribute definition
-
setRuntimeServiceNotRequired
public BUILDER setRuntimeServiceNotRequired()
Adds theAttributeAccess.Flag.RUNTIME_SERVICE_NOT_REQUIREDflag.- Returns:
- a builder that can be used to continue building the attribute definition
-
setRestartAllServices
public BUILDER setRestartAllServices()
Adds theAttributeAccess.Flag.RESTART_ALL_SERVICESflag and removes any conflicting flag.- Returns:
- a builder that can be used to continue building the attribute definition
-
setRestartJVM
public BUILDER setRestartJVM()
Adds theAttributeAccess.Flag.RESTART_JVMflag and removes any conflicting flag.- Returns:
- a builder that can be used to continue building the attribute definition
-
setMaxSize
public BUILDER setMaxSize(int maxSize)
Sets a maximum size for a collection-type attribute or one whose value is a string or byte[]. The value represents the maximum number of elements in the collection, or the maximum length of the string or array. It does not represent a maximum value for a numeric attribute and should not be configured for numeric attributes.- Parameters:
maxSize- the maximum size- Returns:
- a builder that can be used to continue building the attribute definition
-
setMinSize
public BUILDER setMinSize(int minSize)
Sets a minimum size description for a collection-type attribute or one whose value is a string or byte[]. The value represents the minimum number of elements in the collection, or the minimum length of the string or array. It does not represent a minimum value for a numeric attribute and should not be configured for numeric attributes.- Parameters:
minSize- the minimum size- Returns:
- a builder that can be used to continue building the attribute definition
-
setAttributeMarshaller
public BUILDER setAttributeMarshaller(AttributeMarshaller marshaller)
Sets a customAttributeMarshallerto use for marshalling the attribute to xml. If not set, aDefaultAttributeMarshallerwill be used.- Parameters:
marshaller- the marshaller. Can benull- Returns:
- a builder that can be used to continue building the attribute definition
-
setAttributeParser
public BUILDER setAttributeParser(AttributeParser parser)
Sets a customAttributeParserto use for parsing attribute from xml. If not set, aAttributeParser.SIMPLEwill be used.- Parameters:
parser- the parser. Can benull- Returns:
- a builder that can be used to continue building the attribute definition
-
setResourceOnly
public BUILDER setResourceOnly()
Marks an attribute as only relevant to a resource, and not a valid parameter to an "add" operation that creates that resource. Typically used for legacy "name" attributes that display the final value in the resource's address as an attribute.- Returns:
- a builder that can be used to continue building the attribute definition
-
setDeprecated
public BUILDER setDeprecated(ModelVersion since)
Marks the attribute as deprecated since the given API version. This is equivalent to callingsetDeprecated(ModelVersion, boolean)with thenotificationUsefulparameter set totrue.- Parameters:
since- the API version, with the API being the one (core or a subsystem) in which the attribute is used- Returns:
- a builder that can be used to continue building the attribute definition
-
setDeprecated
public BUILDER setDeprecated(ModelVersion since, boolean notificationUseful)
Marks the attribute as deprecated since the given API version, with the ability to configure that notifications to the user (e.g. via a log message) about deprecation of the attribute should not be emitted. Notifying the user should only be done if the user can take some action in response. Advising that something will be removed in a later release is not useful if there is no alternative in the current release. If thenotificationUsefulparam istruethe text description of the attribute deprecation available from theread-resource-descriptionmanagement operation should provide useful information about how the user can avoid using the attribute.- Parameters:
since- the API version, with the API being the one (core or a subsystem) in which the attribute is usednotificationUseful- whether actively advising the user about the deprecation is useful- Returns:
- a builder that can be used to continue building the attribute definition
-
setExpressionsDeprecated
public final BUILDER setExpressionsDeprecated()
Marks that support for use of an expression for the attribute's value is deprecated and may be removed in a future release.- Returns:
- a builder that can be used to continue building the attribute definition
-
setAccessConstraints
public BUILDER setAccessConstraints(AccessConstraintDefinition... accessConstraints)
Sets access constraints to use with the attribute- Parameters:
accessConstraints- the constraints- Returns:
- a builder that can be used to continue building the attribute definition
-
addAccessConstraint
public BUILDER addAccessConstraint(AccessConstraintDefinition accessConstraint)
Adds an access constraint to the set used with the attribute- Parameters:
accessConstraint- the constraint- Returns:
- a builder that can be used to continue building the attribute definition
-
setNullSignificant
public BUILDER setNullSignificant(boolean nullSignificant)
Sets whether an access control check is required to implicitly set an attribute toundefinedin a resource "add" operation. "Implicitly" setting an attribute refers to not providing a value for it in the add operation, leaving the attribute in an undefined state. If not set the default value is whether the attributeAttributeDefinition.isRequired()() is not required} and has adefault value.- Parameters:
nullSignificant-trueif an undefined value is significant;falseif it is not significant, even if a default value is configured- Returns:
- a builder that can be used to continue building the attribute definition
-
setAttributeGroup
public BUILDER setAttributeGroup(String attributeGroup)
Sets the name of the attribute group with which this attribute is associated.- Parameters:
attributeGroup- the attribute group name. Cannot be an empty string but can benullif the attribute is not associated with a group.- Returns:
- a builder that can be used to continue building the attribute definition
-
setAllowedValues
public BUILDER setAllowedValues(org.jboss.dmr.ModelNode... allowedValues)
Sets allowed values for attribute- Parameters:
allowedValues- values that are legal as part in this attribute- Returns:
- a builder that can be used to continue building the attribute definition
-
setAllowedValues
public BUILDER setAllowedValues(String... allowedValues)
Sets allowed values for attribute- Parameters:
allowedValues- values that are legal as part in this attribute- Returns:
- a builder that can be used to continue building the attribute definition
-
setAllowedValues
public BUILDER setAllowedValues(int... allowedValues)
Sets allowed values for attribute- Parameters:
allowedValues- values that are legal as part in this attribute- Returns:
- a builder that can be used to continue building the attribute definition
-
setCapabilityReference
public BUILDER setCapabilityReference(String referencedCapability, RuntimeCapability<?> dependentCapability)
Records that this attribute's value represents a reference to an instance of adynamic capability.This method is a convenience method equivalent to calling
setCapabilityReference(CapabilityReferenceRecorder)passing in aCapabilityReferenceRecorder.DefaultCapabilityReferenceRecorderconstructed using the parameters passed to this method.- Parameters:
referencedCapability- the name of the dynamic capability the dynamic portion of whose name is represented by the attribute's valuedependentCapability- the capability that depends onreferencedCapability- Returns:
- the builder
- See Also:
AttributeDefinition.addCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode),AttributeDefinition.removeCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode)
-
setCapabilityReference
public BUILDER setCapabilityReference(String referencedCapability)
Records that this attribute's value represents a reference to an instance of adynamic capability.This method is a convenience method equivalent to calling
setCapabilityReference(CapabilityReferenceRecorder)passing in aCapabilityReferenceRecorder.ContextDependencyRecorderconstructed using the parameters passed to this method.NOTE: This method of recording capability references is only suitable for use in attributes only used in resources that themselves expose a single capability. If your resource exposes more than single you should use
setCapabilityReference(RuntimeCapability, String, AttributeDefinition...)variant When the capability requirement is registered, the dependent capability will be that capability.- Parameters:
referencedCapability- the name of the dynamic capability the dynamic portion of whose name is represented by the attribute's value- Returns:
- the builder
- See Also:
AttributeDefinition.addCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode),AttributeDefinition.removeCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode)
-
setCapabilityReference
public BUILDER setCapabilityReference(String referencedCapability, AttributeDefinition... dependantAttributes)
Records that this attribute's value represents a reference to an instance of adynamic capability.This method is a convenience method equivalent to calling *
setCapabilityReference(CapabilityReferenceRecorder)passing in aCapabilityReferenceRecorder.CompositeAttributeDependencyRecorderconstructed using the parameters passed to this method.NOTE: This method of recording capability references is only suitable for use in attributes only used in resources that themselves expose a single capability. If your resource exposes more than single capability, you should use
setCapabilityReference(RuntimeCapability, String, AttributeDefinition...)When the capability requirement is registered, the dependent capability will be that capability.- Parameters:
referencedCapability- the name of the dynamic capability the dynamic portion of whose name is represented by the attribute's valuedependantAttributes- attribute from same resource that will be used to derive multiple dynamic parts for the dependant capability- Returns:
- the builder
- See Also:
AttributeDefinition.addCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode),AttributeDefinition.removeCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode)
-
setCapabilityReference
public BUILDER setCapabilityReference(RuntimeCapability capability, String referencedCapability, AttributeDefinition... dependantAttributes)
Records that this attribute's value represents a reference to an instance of adynamic capability.This method is a convenience method equivalent to calling
setCapabilityReference(CapabilityReferenceRecorder)passing in aCapabilityReferenceRecorder.CompositeAttributeDependencyRecorderconstructed using the parameters passed to this method.When the capability requirement is registered, the dependent capability will be that capability.
- Parameters:
capability- requirement capabilityreferencedCapability- the name of the dynamic capability the dynamic portion of whose name is represented by the attribute's valuedependantAttributes- attributes on resource which will be used for registering capability reference, can be multiple.- Returns:
- the builder
- See Also:
AttributeDefinition.addCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode),AttributeDefinition.removeCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode)
-
setCapabilityReference
public BUILDER setCapabilityReference(String referencedCapability, String dependentCapability)
Records that this attribute's value represents a reference to an instance of adynamic capability.This method is a convenience method equivalent to calling
setCapabilityReference(CapabilityReferenceRecorder)passing in aCapabilityReferenceRecorder.DefaultCapabilityReferenceRecorderconstructed using the parameters passed to this method.- Parameters:
referencedCapability- the name of the dynamic capability the dynamic portion of whose name is represented by the attribute's valuedependentCapability- the name of the capability that depends onreferencedCapability- Returns:
- the builder
- See Also:
AttributeDefinition.addCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode),AttributeDefinition.removeCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode)
-
setCapabilityReference
public BUILDER setCapabilityReference(CapabilityReferenceRecorder referenceRecorder)
Records that this attribute's value represents a reference to an instance of adynamic capabilityand assigns the object that should be used to handle adding and removing capability requirements.- Parameters:
referenceRecorder- recorder to handle adding and removing capability requirements. May benull- Returns:
- the builder
- See Also:
AttributeDefinition.addCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode),AttributeDefinition.removeCapabilityRequirements(OperationContext, org.jboss.as.controller.registry.Resource, ModelNode)
-
setUndefinedMetricValue
public BUILDER setUndefinedMetricValue(org.jboss.dmr.ModelNode undefinedMetricValue)
Sets adefault valueto use for the metric if no runtime value is available (e.g. we are a server running in admin-only mode).- Parameters:
undefinedMetricValue- the default value, ornullif no default should be used- Returns:
- a builder that can be used to continue building the attribute definition
-
getName
public String getName()
-
getType
public org.jboss.dmr.ModelType getType()
-
getXmlName
public String getXmlName()
-
isNillable
public boolean isNillable()
-
isAllowExpression
public boolean isAllowExpression()
-
getDefaultValue
public org.jboss.dmr.ModelNode getDefaultValue()
-
getMeasurementUnit
public MeasurementUnit getMeasurementUnit()
-
getAlternatives
public String[] getAlternatives()
-
getRequires
public String[] getRequires()
-
getCorrector
public ParameterCorrector getCorrector()
-
getValidator
public ParameterValidator getValidator()
-
getMinSize
public int getMinSize()
-
getMaxSize
public int getMaxSize()
-
getFlags
public AttributeAccess.Flag[] getFlags()
-
getAttributeMarshaller
public AttributeMarshaller getAttributeMarshaller()
-
isResourceOnly
public boolean isResourceOnly()
-
getDeprecated
public DeprecationData getDeprecated()
-
getAccessConstraints
public AccessConstraintDefinition[] getAccessConstraints()
-
getNullSignificant
public Boolean getNullSignificant()
-
getUndefinedMetricValue
public org.jboss.dmr.ModelNode getUndefinedMetricValue()
-
getParser
public AttributeParser getParser()
-
getAttributeGroup
public String getAttributeGroup()
-
getAllowedValues
public org.jboss.dmr.ModelNode[] getAllowedValues()
-
getCapabilityReferenceRecorder
protected final CapabilityReferenceRecorder getCapabilityReferenceRecorder()
-
-