Package org.jboss.as.controller
Class PersistentResourceXMLDescription
- java.lang.Object
-
- org.jboss.as.controller.PersistentResourceXMLDescription
-
- All Implemented Interfaces:
ResourceMarshaller
,ResourceParser
public final class PersistentResourceXMLDescription extends Object implements ResourceParser, ResourceMarshaller
A representation of a resource as needed by the XML parser.- Author:
- Tomaz Cerar, Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PersistentResourceXMLDescription.AdditionalOperationsGenerator
Some resources require more operations that just a simple add.static class
PersistentResourceXMLDescription.PersistentResourceXMLBuilder
-
Field Summary
Fields Modifier and Type Field Description protected PathElement
pathElement
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PersistentResourceXMLDescription.PersistentResourceXMLBuilder
builder(PathElement pathElement)
Creates builder for passed path elementstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilder
builder(PathElement pathElement, String namespaceURI)
Creates builder for passed path elementstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilder
builder(PersistentResourceDefinition resource)
Deprecated.please use PersistentResourceXMLBuilder(PathElement, String) variantstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilder
builder(PersistentResourceDefinition resource, String namespaceURI)
Deprecated.please use PersistentResourceXMLBuilder(PathElement, String) variantstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilder
builder(ResourceDefinition resource)
Deprecated.please use PersistentResourceXMLBuilder(PathElement, String) variantstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilder
decorator(String elementName)
Deprecated.decorator element support is currently considered as previewPathElement
getPathElement()
void
parse(org.jboss.staxmapper.XMLExtendedStreamReader reader, PathAddress parentAddress, List<org.jboss.dmr.ModelNode> list)
Parse xml from providedreader
and add resulting operations to passed listvoid
persist(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model)
void
persist(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model, String namespaceURI)
void
persistChildren(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model)
-
-
-
Field Detail
-
pathElement
protected final PathElement pathElement
-
-
Method Detail
-
getPathElement
public PathElement getPathElement()
-
parse
public void parse(org.jboss.staxmapper.XMLExtendedStreamReader reader, PathAddress parentAddress, List<org.jboss.dmr.ModelNode> list) throws XMLStreamException
Parse xml from providedreader
and add resulting operations to passed list- Specified by:
parse
in interfaceResourceParser
- Parameters:
reader
- xml reader to parse fromparentAddress
- address of the parent, used as base for all child elementslist
- list of operations where result will be put to.- Throws:
XMLStreamException
- if any error occurs while parsing
-
persist
public void persist(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model) throws XMLStreamException
- Specified by:
persist
in interfaceResourceMarshaller
- Throws:
XMLStreamException
-
persist
public void persist(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model, String namespaceURI) throws XMLStreamException
- Throws:
XMLStreamException
-
persistChildren
public void persistChildren(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model) throws XMLStreamException
- Throws:
XMLStreamException
-
builder
@Deprecated public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder(PersistentResourceDefinition resource)
Deprecated.please use PersistentResourceXMLBuilder(PathElement, String) variant- Parameters:
resource
- resource for which path we are creating builder- Returns:
- PersistentResourceXMLBuilder
-
builder
@Deprecated public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder(ResourceDefinition resource)
Deprecated.please use PersistentResourceXMLBuilder(PathElement, String) variant- Parameters:
resource
- resource for which path we are creating builder- Returns:
- PersistentResourceXMLBuilder
-
builder
@Deprecated public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder(PersistentResourceDefinition resource, String namespaceURI)
Deprecated.please use PersistentResourceXMLBuilder(PathElement, String) variant- Parameters:
resource
- resource for which path we are creating buildernamespaceURI
- xml namespace to use for this resource, usually used for top level elements such as subsystems- Returns:
- PersistentResourceXMLBuilder
-
builder
public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder(PathElement pathElement)
Creates builder for passed path element- Parameters:
pathElement
- for which we are creating builder- Returns:
- PersistentResourceXMLBuilder
-
builder
public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder(PathElement pathElement, String namespaceURI)
Creates builder for passed path element- Parameters:
pathElement
- for which we are creating buildernamespaceURI
- xml namespace to use for this resource, usually used for top level elements such as subsystems- Returns:
- PersistentResourceXMLBuilder
-
decorator
@Deprecated public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder decorator(String elementName)
Deprecated.decorator element support is currently considered as previewCreates builder for passed path element- Parameters:
elementName
- name of xml element that is used as decorator- Returns:
- PersistentResourceXMLBuilder
- Since:
- 4.0
-
-