Class YamlConfigurationWriter

java.lang.Object
org.infinispan.commons.configuration.io.AbstractConfigurationWriter
org.infinispan.commons.configuration.io.yaml.YamlConfigurationWriter
All Implemented Interfaces:
AutoCloseable, ConfigurationWriter

public class YamlConfigurationWriter extends AbstractConfigurationWriter
Since:
12.1
Author:
Tristan Tarrant <tristan@infinispan.org>
  • Field Details

  • Constructor Details

    • YamlConfigurationWriter

      public YamlConfigurationWriter(Writer writer, boolean clearTextSecrets)
  • Method Details

    • writeStartDocument

      public void writeStartDocument()
    • writeStartElement

      public void writeStartElement(String name)
    • writeStartElement

      public void writeStartElement(String prefix, String namespace, String name)
    • writeStartArrayElement

      public void writeStartArrayElement(String name)
      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

      public void writeStartListElement(String name, boolean explicit)
      Description copied from interface: ConfigurationWriter
      Starts a list element.
      Parameters:
      name -
      explicit -
    • writeStartListElement

      public void writeStartListElement(String prefix, String namespace, String name, boolean explicit)
    • writeNamespace

      public void writeNamespace(String prefix, String namespace)
    • writeDefaultNamespace

      public void writeDefaultNamespace(String namespace)
    • writeEndElement

      public void writeEndElement()
    • writeEndDocument

      public void writeEndDocument()
    • writeAttribute

      public void writeAttribute(String name, String value)
    • writeAttribute

      public void writeAttribute(String name, Iterable<String> values)
    • writeArrayElement

      public void writeArrayElement(String outer, String inner, String attribute, Iterable<String> values)
    • writeCharacters

      public void writeCharacters(String chars)
    • writeEmptyElement

      public void writeEmptyElement(String name)
    • writeComment

      public void writeComment(String comment)
    • writeStartMap

      public void writeStartMap(String name)
    • writeMapItem

      public void writeMapItem(String element, String name, String key, String value)
      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 XML
      name - Used only by XML
      key -
      value -
    • writeMapItem

      public void writeMapItem(String element, String name, String key)
      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 XML
      name - Used only by XML
      key -
    • writeEndMapItem

      public void writeEndMapItem()
    • writeEndMap

      public void writeEndMap()
    • hasFeature

      public boolean hasFeature(ConfigurationFormatFeature feature)