Class MxWriteConfiguration


  • public class MxWriteConfiguration
    extends java.lang.Object
    Options to customize the behaviour of the MX writer (model into XML serialization) in the AbstractMX and its specific types subclasses.
    Since:
    9.1.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      TypeAdaptersConfiguration adapters
      Type adapters for the marshaller
      jakarta.xml.bind.JAXBContext context
      Optional instance to pass to the write method, if null, a new instance will be created when needed
      java.lang.String documentPrefix
      The prefix for the document namespace.
      EscapeHandler escapeHandler
      Enables switching between different implementations for the element and attributes value escaping.
      java.lang.String headerPrefix
      The prefix for the header namespace.
      boolean includeXMLDeclaration
      Determines if the XML will include the XML declaration as first line.
      java.lang.String indent
      Optional indent string to use when marshalling into XML, if null, a four spaces string will be used as default
      java.lang.String rootElement
      The name of the envelope element that binds a Header to the message to which it applies is implementation/network specific.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rootElement

        public java.lang.String rootElement
        The name of the envelope element that binds a Header to the message to which it applies is implementation/network specific. The header root element ‘AppHdr’ and the ISO 20022 MessageDefinition root element ‘Document’ must always be sibling elements in any XML document, with the AppHdr element preceding the Document element. If no root element name is provided the value in AbstractMX.DEFAULT_ROOT_ELEMENT is used as default
      • includeXMLDeclaration

        public boolean includeXMLDeclaration
        Determines if the XML will include the XML declaration as first line. It is true by default. You can switch this off if the generated XML will then be used a a fragment of another XML wrapper.
      • escapeHandler

        public EscapeHandler escapeHandler
        Enables switching between different implementations for the element and attributes value escaping. Some implementations are available in the library and your own custom class can also be used. This is useful if you handle XML messages with specific charset and you want to control what is escaped and what is propagated as is.
      • headerPrefix

        public java.lang.String headerPrefix
        The prefix for the header namespace. Set it to null if you don't want to have any prefix in header elements. It is "h" by default.
      • documentPrefix

        public java.lang.String documentPrefix
        The prefix for the document namespace. Set it to null if you don't want to have any prefix in document elements. It is "Doc" by default.
      • context

        public jakarta.xml.bind.JAXBContext context
        Optional instance to pass to the write method, if null, a new instance will be created when needed
        Since:
        9.3.5
      • indent

        public java.lang.String indent
        Optional indent string to use when marshalling into XML, if null, a four spaces string will be used as default
        Since:
        9.3.6
    • Constructor Detail

      • MxWriteConfiguration

        public MxWriteConfiguration()
        Creates a configuration with the default options and adapters
      • MxWriteConfiguration

        public MxWriteConfiguration​(jakarta.xml.bind.JAXBContext context)
      • MxWriteConfiguration

        public MxWriteConfiguration​(MxReadConfiguration readConf)
        Creates a configuration with the default options and propagates the adapters from read to write configuration
        Since:
        9.2.6