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 interfacePersistentResourceXMLDescription.AdditionalOperationsGeneratorSome resources require more operations that just a simple add.static interfacePersistentResourceXMLDescription.BuilderBuilds aPersistentResourceXMLDescription.static interfacePersistentResourceXMLDescription.FactoryFactory for creating aPersistentResourceXMLDescriptionbuilder.static classPersistentResourceXMLDescription.PersistentResourceXMLBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PersistentResourceXMLDescription.PersistentResourceXMLBuilderbuilder(PathElement pathElement)Creates builder for passed path elementstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilderbuilder(PathElement pathElement, String namespaceURI)Creates builder for passed path elementstatic PersistentResourceXMLDescription.PersistentResourceXMLBuilderbuilder(PathElement path, org.jboss.staxmapper.Namespace namespace)Creates builder for the given subsystem path and namespace.static PersistentResourceXMLDescription.PersistentResourceXMLBuilderdecorator(String elementName)Creates builder for passed path elementstatic <S extends PersistentSubsystemSchema<S>>
PersistentResourceXMLDescription.Factoryfactory(PersistentSubsystemSchema<S> schema)Creates a factory for creating aPersistentResourceXMLDescriptionbuilders for the specified subsystem schema.PathElementgetPathElement()voidparse(org.jboss.staxmapper.XMLExtendedStreamReader reader, PathAddress parentAddress, List<org.jboss.dmr.ModelNode> list)Parse xml from providedreaderand add resulting operations to passed listvoidpersist(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model)voidpersist(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model, String namespaceURI)voidpersistChildren(org.jboss.staxmapper.XMLExtendedStreamWriter writer, org.jboss.dmr.ModelNode model)
-
-
-
Method Detail
-
getPathElement
public PathElement getPathElement()
-
parse
public void parse(org.jboss.staxmapper.XMLExtendedStreamReader reader, PathAddress parentAddress, List<org.jboss.dmr.ModelNode> list) throws XMLStreamExceptionParse xml from providedreaderand add resulting operations to passed list- Specified by:
parsein 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:
persistin 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
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
-
builder
public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder builder(PathElement path, org.jboss.staxmapper.Namespace namespace)
Creates builder for the given subsystem path and namespace.- Parameters:
path- a subsystem path elementnamespace- the subsystem namespace- Returns:
- a builder for creating a
PersistentResourceXMLDescription.
-
decorator
public static PersistentResourceXMLDescription.PersistentResourceXMLBuilder decorator(String elementName)
Creates builder for passed path element- Parameters:
elementName- name of xml element that is used as decorator- Returns:
- PersistentResourceXMLBuilder
- Since:
- 4.0
-
factory
public static <S extends PersistentSubsystemSchema<S>> PersistentResourceXMLDescription.Factory factory(PersistentSubsystemSchema<S> schema)
Creates a factory for creating aPersistentResourceXMLDescriptionbuilders for the specified subsystem schema.- Type Parameters:
S- the schema type- Parameters:
schema- a subsystem schema- Returns:
- a factory for creating a
PersistentResourceXMLDescriptionbuilders
-
-