public abstract class AttributeParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AttributeParser.DiscardOldDefaultValueParser |
| Modifier and Type | Field and Description |
|---|---|
static AttributeParser |
COMMA_DELIMITED_STRING_LIST |
static AttributeParser |
LIST
Deprecated.
|
static AttributeParser |
OBJECT_LIST_PARSER |
static AttributeParser |
OBJECT_PARSER |
static AttributeParser |
PROPERTIES_PARSER |
static AttributeParser |
PROPERTIES_PARSER_UNWRAPPED |
static AttributeParser |
SIMPLE |
static AttributeParser |
STRING_LIST |
static AttributeParser |
UNWRAPPED_OBJECT_LIST_PARSER |
static AttributeParser |
WRAPPED_OBJECT_LIST_PARSER |
| Constructor and Description |
|---|
AttributeParser() |
| Modifier and Type | Method and Description |
|---|---|
String |
getXmlName(AttributeDefinition attribute) |
boolean |
isParseAsElement() |
org.jboss.dmr.ModelNode |
parse(AttributeDefinition attribute,
String value,
XMLStreamReader reader)
Creates and returns a
ModelNode using the given value after first validating the node
against this object's validator. |
void |
parseAndSetParameter(AttributeDefinition attribute,
String value,
org.jboss.dmr.ModelNode operation,
XMLStreamReader reader)
Creates a
ModelNode using the given value after first validating the node
against this object's validator., and then stores it in the given operation
model node as a key/value pair whose key is this attribute's getName() name}. |
void |
parseElement(AttributeDefinition attribute,
org.jboss.staxmapper.XMLExtendedStreamReader reader,
org.jboss.dmr.ModelNode operation) |
public static final AttributeParser SIMPLE
@Deprecated public static final AttributeParser LIST
public static final AttributeParser STRING_LIST
public static final AttributeParser COMMA_DELIMITED_STRING_LIST
public static final AttributeParser PROPERTIES_PARSER
public static final AttributeParser PROPERTIES_PARSER_UNWRAPPED
public static final AttributeParser OBJECT_PARSER
public static final AttributeParser OBJECT_LIST_PARSER
public static final AttributeParser WRAPPED_OBJECT_LIST_PARSER
public static final AttributeParser UNWRAPPED_OBJECT_LIST_PARSER
public void parseAndSetParameter(AttributeDefinition attribute, String value, org.jboss.dmr.ModelNode operation, XMLStreamReader reader) throws XMLStreamException
ModelNode using the given value after first validating the node
against this object's validator., and then stores it in the given operation
model node as a key/value pair whose key is this attribute's getName() name}.
If value is null an undefined node will be stored if such a value
is acceptable to the validator.
The expected usage of this method is in parsers seeking to build up an operation to store their parsed data into the configuration.
value - the value. Will be trimmed before use if not null.operation - model node of type ModelType.OBJECT into which the parsed value should be storedreader - XMLStreamReader from which the location from which
the attribute value was read can be obtained and used in any XMLStreamException, in case
the given value is invalid.XMLStreamException - if value is not validpublic org.jboss.dmr.ModelNode parse(AttributeDefinition attribute, String value, XMLStreamReader reader) throws XMLStreamException
ModelNode using the given value after first validating the node
against this object's validator.
If value is null an undefined node will be returned.
value - the value. Will be trimmed before use if not null.reader - XMLStreamReader from which the location from which
the attribute value was read can be obtained and used in any XMLStreamException, in case
the given value is invalid.ModelNode representing the parsed valueXMLStreamException - if value is not validparseAndSetParameter(org.jboss.as.controller.AttributeDefinition, String, ModelNode, XMLStreamReader)public boolean isParseAsElement()
public void parseElement(AttributeDefinition attribute, org.jboss.staxmapper.XMLExtendedStreamReader reader, org.jboss.dmr.ModelNode operation) throws XMLStreamException
XMLStreamExceptionpublic String getXmlName(AttributeDefinition attribute)
Copyright © 2019 JBoss by Red Hat. All rights reserved.