Class TypeAdaptersConfiguration


  • public class TypeAdaptersConfiguration
    extends java.lang.Object
    DTO to encapsulate type adapters parameters for the marshalling and unmarshalling API.

    This class is used to inject your own adapters to the marshaller and unmarshaller via the MxWriteConfiguration and MxReadConfiguration parameters in the API.

    Notice the configured adapters in the model are the IsoDateTimeAdapter, IsoDateAdapter and IsoTimeAdapter. These are just wrapper classes configured in the model via @XmlJavaTypeAdapter annotation. The actual adapter implementation is injected in the constructor, thus you can use any of the default adapters such as the OffsetDateTimeAdapter or your own.

    Since:
    9.2.6
    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.prowidesoftware.swift.model.mx.adapters.IsoDateAdapter dateAdapter
      Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      com.prowidesoftware.swift.model.mx.adapters.IsoDateTimeAdapter dateTimeAdapter
      Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      com.prowidesoftware.swift.model.mx.adapters.IsoMonthAdapter monthAdapter
      Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      com.prowidesoftware.swift.model.mx.adapters.IsoTimeAdapter timeAdapter
      Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      com.prowidesoftware.swift.model.mx.adapters.IsoYearAdapter yearAdapter
      Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      com.prowidesoftware.swift.model.mx.adapters.IsoYearMonthAdapter yearMonthAdapter
      Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeAdaptersConfiguration()
      Initializes the adapters with the default implementations
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<jakarta.xml.bind.annotation.adapters.XmlAdapter> asList()  
      • Methods inherited from class java.lang.Object

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

      • dateTimeAdapter

        public com.prowidesoftware.swift.model.mx.adapters.IsoDateTimeAdapter dateTimeAdapter
        Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      • dateAdapter

        public com.prowidesoftware.swift.model.mx.adapters.IsoDateAdapter dateAdapter
        Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      • timeAdapter

        public com.prowidesoftware.swift.model.mx.adapters.IsoTimeAdapter timeAdapter
        Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
      • yearMonthAdapter

        public com.prowidesoftware.swift.model.mx.adapters.IsoYearMonthAdapter yearMonthAdapter
        Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
        Since:
        10.0.0
      • yearAdapter

        public com.prowidesoftware.swift.model.mx.adapters.IsoYearAdapter yearAdapter
        Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
        Since:
        10.0.0
      • monthAdapter

        public com.prowidesoftware.swift.model.mx.adapters.IsoMonthAdapter monthAdapter
        Customized instances or subclasses of this adapter can be injected to change the default serialization of date time elements.
        Since:
        10.0.0
    • Constructor Detail

      • TypeAdaptersConfiguration

        public TypeAdaptersConfiguration()
        Initializes the adapters with the default implementations
        See Also:
        LocalDateAdapter, OffsetDateTimeAdapter, OffsetTimeAdapter, YearMonthAdapter, YearAdapter, MonthAdapter
    • Method Detail

      • asList

        public java.util.List<jakarta.xml.bind.annotation.adapters.XmlAdapter> asList()
        Returns:
        this configuration non-null adapters into a list