public abstract class AbstractAttributeDefinitionBuilder<BUILDER extends AbstractAttributeDefinitionBuilder,ATTRIBUTE extends AttributeDefinition> extends Object
AttributeDefinition
.Modifier and Type | Field and Description |
---|---|
protected AccessConstraintDefinition[] |
accessConstraints |
protected boolean |
allowExpression |
protected boolean |
allowNull |
protected String[] |
alternatives |
protected AttributeMarshaller |
attributeMarshaller |
protected ParameterCorrector |
corrector |
protected org.jboss.dmr.ModelNode |
defaultValue |
protected DeprecationData |
deprecated |
protected AttributeAccess.Flag[] |
flags |
protected int |
maxSize |
protected MeasurementUnit |
measurementUnit |
protected int |
minSize |
protected String |
name |
protected Boolean |
nullSignficant |
protected String[] |
requires |
protected boolean |
resourceOnly |
protected org.jboss.dmr.ModelType |
type |
protected boolean |
validateNull |
protected ParameterValidator |
validator |
protected String |
xmlName |
Constructor and Description |
---|
AbstractAttributeDefinitionBuilder(AttributeDefinition basis) |
AbstractAttributeDefinitionBuilder(String attributeName,
AttributeDefinition basis) |
AbstractAttributeDefinitionBuilder(String attributeName,
org.jboss.dmr.ModelType type) |
AbstractAttributeDefinitionBuilder(String attributeName,
org.jboss.dmr.ModelType type,
boolean allowNull) |
protected final String name
protected final org.jboss.dmr.ModelType type
protected String xmlName
protected boolean allowNull
protected boolean allowExpression
protected org.jboss.dmr.ModelNode defaultValue
protected MeasurementUnit measurementUnit
protected String[] alternatives
protected String[] requires
protected ParameterCorrector corrector
protected ParameterValidator validator
protected boolean validateNull
protected int minSize
protected int maxSize
protected AttributeAccess.Flag[] flags
protected AttributeMarshaller attributeMarshaller
protected boolean resourceOnly
protected DeprecationData deprecated
protected AccessConstraintDefinition[] accessConstraints
protected Boolean nullSignficant
public AbstractAttributeDefinitionBuilder(String attributeName, org.jboss.dmr.ModelType type)
public AbstractAttributeDefinitionBuilder(String attributeName, org.jboss.dmr.ModelType type, boolean allowNull)
public AbstractAttributeDefinitionBuilder(AttributeDefinition basis)
public AbstractAttributeDefinitionBuilder(String attributeName, AttributeDefinition basis)
public abstract ATTRIBUTE build()
public BUILDER setAllowNull(boolean allowNull)
public BUILDER setAllowExpression(boolean allowExpression)
public BUILDER setDefaultValue(org.jboss.dmr.ModelNode defaultValue)
public BUILDER setMeasurementUnit(MeasurementUnit unit)
public BUILDER setCorrector(ParameterCorrector corrector)
public BUILDER setValidator(ParameterValidator validator)
public BUILDER setValidateNull(boolean validateNull)
undefined
values if
null is not allowed
in addition to any validation provided by any
configured validator
. The default if not set is true
. The use
case for setting this to false
would be to ignore undefined values in the basic validation performed
by the AttributeDefinition
and instead let operation handlers validate using more complex logic
(e.g. checking for alternatives
.validateNull
- true
if additional validation should be performed; false
otherwisepublic BUILDER setFlags(AttributeAccess.Flag... flags)
public BUILDER addFlag(AttributeAccess.Flag flag)
public BUILDER removeFlag(AttributeAccess.Flag flag)
protected boolean isFlagPresent(AttributeAccess.Flag flag)
public BUILDER setStorageRuntime()
public BUILDER setRestartAllServices()
public BUILDER setRestartJVM()
public BUILDER setMaxSize(int maxSize)
public BUILDER setMinSize(int minSize)
public BUILDER setAttributeMarshaller(AttributeMarshaller marshaller)
public BUILDER setResourceOnly()
public BUILDER setDeprecated(ModelVersion since)
public BUILDER setAccessConstraints(AccessConstraintDefinition... accessConstraints)
public BUILDER addAccessConstraint(AccessConstraintDefinition accessConstraint)
public BUILDER setNullSignficant(boolean nullSignficant)
Copyright © 2013 JBoss by Red Hat. All rights reserved.