public static class AttributeMarshallers.PropertiesAttributeMarshaller extends AttributeMarshaller
ATTRIBUTE_OBJECT, COMMA_STRING_LIST, ELEMENT_ONLY_OBJECT, OBJECT_LIST_MARSHALLER, PROPERTIES_MARSHALLER, PROPERTIES_MARSHALLER_UNWRAPPED, SIMPLE, STRING_LIST| Constructor and Description |
|---|
PropertiesAttributeMarshaller() |
PropertiesAttributeMarshaller(String wrapperElement,
boolean wrapElement) |
PropertiesAttributeMarshaller(String wrapperElement,
String elementName,
boolean wrapElement) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isMarshallable(AttributeDefinition attribute,
org.jboss.dmr.ModelNode resourceModel,
boolean marshallDefault)
Gets whether the given
resourceModel has a value for this attribute that should be marshalled to XML. |
boolean |
isMarshallableAsElement() |
void |
marshallAsAttribute(AttributeDefinition attribute,
org.jboss.dmr.ModelNode resourceModel,
boolean marshallDefault,
XMLStreamWriter writer)
Marshalls the value from the given
resourceModel as an xml element, if it
is marshallable. |
void |
marshallAsElement(AttributeDefinition attribute,
org.jboss.dmr.ModelNode resourceModel,
boolean marshallDefault,
XMLStreamWriter writer) |
isMarshallable, marshallpublic PropertiesAttributeMarshaller(String wrapperElement, String elementName, boolean wrapElement)
public PropertiesAttributeMarshaller(String wrapperElement, boolean wrapElement)
public PropertiesAttributeMarshaller()
public boolean isMarshallable(AttributeDefinition attribute, org.jboss.dmr.ModelNode resourceModel, boolean marshallDefault)
AttributeMarshallerresourceModel has a value for this attribute that should be marshalled to XML.isMarshallable in class AttributeMarshallerattribute - - attribute for which marshaling is being doneresourceModel - the model, a non-null node of ModelType.OBJECT.marshallDefault - true if the value should be marshalled even if it matches the default valuetrue if the given resourceModel has a defined value under this attribute's AttributeDefinition.getName() () name}
and marshallDefault is true or that value differs from this attribute's default value.public void marshallAsElement(AttributeDefinition attribute, org.jboss.dmr.ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException
marshallAsElement in class AttributeMarshallerXMLStreamExceptionpublic void marshallAsAttribute(AttributeDefinition attribute, org.jboss.dmr.ModelNode resourceModel, boolean marshallDefault, XMLStreamWriter writer) throws XMLStreamException
AttributeMarshallerresourceModel as an xml element, if it
is marshallable.marshallAsAttribute in class AttributeMarshallerattribute - - attribute for which marshaling is being doneresourceModel - the model, a non-null node of ModelType.OBJECT.writer - stream writer to use for writing the attributeXMLStreamException - if thrown by writerpublic boolean isMarshallableAsElement()
isMarshallableAsElement in class AttributeMarshallerCopyright © 2016 JBoss by Red Hat. All rights reserved.