Class XmlConfigurationWriter
java.lang.Object
org.infinispan.commons.configuration.io.AbstractConfigurationWriter
org.infinispan.commons.configuration.io.xml.XmlConfigurationWriter
- All Implemented Interfaces:
AutoCloseable
,ConfigurationWriter
- Since:
- 12.1
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.infinispan.commons.configuration.io.AbstractConfigurationWriter
AbstractConfigurationWriter.Tag
Nested classes/interfaces inherited from interface org.infinispan.commons.configuration.io.ConfigurationWriter
ConfigurationWriter.Builder
-
Field Summary
Fields inherited from class org.infinispan.commons.configuration.io.AbstractConfigurationWriter
clearTextSecrets, currentIndent, namespaces, naming, prettyPrint, tagStack, writer
-
Constructor Summary
ConstructorDescriptionXmlConfigurationWriter
(Writer writer, boolean prettyPrint, boolean clearTextSecrets) -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasFeature
(ConfigurationFormatFeature feature) void
setEncoding
(String encoding) void
setStandalone
(Optional<Boolean> standalone) void
setVersion
(String version) void
void
writeAttribute
(String name, Iterable<String> values) void
writeAttribute
(String name, String value) void
writeCharacters
(String chars) void
writeComment
(String comment) void
writeDefaultNamespace
(String namespace) void
writeEmptyElement
(String name) void
void
void
void
void
void
void
writeMapItem
(String element, String name, String key) Writes a complex map entry.void
writeMapItem
(String element, String name, String key, String value) Writes a simple map entry.void
writeNamespace
(String prefix, String namespace) void
writeStartArrayElement
(String name) Writes an array element.void
void
writeStartElement
(String name) void
writeStartElement
(String prefix, String namespace, String name) void
writeStartListElement
(String name, boolean explicit) Starts a list element.void
writeStartListElement
(String prefix, String namespace, String name, boolean explicit) void
writeStartMap
(String name) Methods inherited from class org.infinispan.commons.configuration.io.AbstractConfigurationWriter
clearTextSecrets, close, indent, nl, outdent, tab, writeArrayElement, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeEmptyElement, writeMapItem, writeMapItem, writeStartArrayElement, writeStartElement, writeStartElement, writeStartListElement, writeStartListElement, writeStartMap
-
Constructor Details
-
XmlConfigurationWriter
-
-
Method Details
-
getVersion
-
setVersion
-
getEncoding
-
setEncoding
-
getStandalone
-
setStandalone
-
writeStartDocument
public void writeStartDocument() -
writeStartElement
-
writeStartElement
-
writeStartArrayElement
Description copied from interface:ConfigurationWriter
Writes an array element. This will be treated as follows by the various implementations:- XML <outer></outer>
- YAML
name:
- item1 - item2 - JSON name: [ item1, item2 ]
- Parameters:
name
-
-
writeEndArrayElement
public void writeEndArrayElement() -
writeStartListElement
Description copied from interface:ConfigurationWriter
Starts a list element.- Parameters:
name
-explicit
-
-
writeStartListElement
-
writeEndListElement
public void writeEndListElement()- Specified by:
writeEndListElement
in interfaceConfigurationWriter
- Overrides:
writeEndListElement
in classAbstractConfigurationWriter
-
writeNamespace
-
writeDefaultNamespace
-
writeEndElement
public void writeEndElement() -
writeEndDocument
public void writeEndDocument() -
writeAttribute
-
writeAttribute
-
writeArrayElement
-
writeCharacters
-
writeEmptyElement
-
writeStartMap
-
writeMapItem
Description copied from interface:ConfigurationWriter
Writes a simple map entry.- XML: <element name="key">value<element>
- JSON: { key: value }
- YAML: key: value
The key name is not translated by the underlying serialization implementation and is used as is
- Parameters:
element
- Used only by XMLname
- Used only by XMLkey
-value
-
-
writeMapItem
Description copied from interface:ConfigurationWriter
Writes a complex map entry.- XML: <element name="key">...<element>
- JSON: { key: { ... } }
- YAML: key:
The key name is not translated by the underlying serialization implementation and is used as is
- Parameters:
element
- Used only by XMLname
- Used only by XMLkey
-
-
writeEndMapItem
public void writeEndMapItem() -
writeEndMap
public void writeEndMap() -
writeComment
-
hasFeature
-