Interface IXmlBindingSupport<JAXBContext>

Type Parameters:
JAXBContext - the JAXBContext implementation with the package javax.xml.bind or jakarta.xml.bind
All Known Implementing Classes:
XmlBindingSupportHelper

public interface IXmlBindingSupport<JAXBContext>
Abstraction to provide access to classic JAXB and Jakarta XML Binding.

You can use the methods newJAXBContext(IRuntimeRepository) and newJAXBContext(Object, IRuntimeRepository) on the INSTANCE of the JaxbSupport implementation from the package org.faktorips.runtime.jaxb or org.faktorips.runtime.jakarta.xml like this:

 
 JAXBContext context = JaxbSupport.INSTANCE.newJAXBContext(repo);
 
 
  • Method Summary

    Modifier and Type
    Method
    Description
    static <JAXBContext>
    IXmlBindingSupport<JAXBContext>
    get()
    Returns the IXmlBindingSupport implementation matching the expected JAXBContext.
    Creates a JAXBContext that wraps the provided context and extends the marshaling methods to provide marshaling of Faktor-IPS enumerations and model objects configured by product components.
    Creates a new JAXBContext that can marshal / unmarshal all model classes defined in the given repository.
  • Method Details

    • newJAXBContext

      JAXBContext newJAXBContext(IRuntimeRepository repository)
      Creates a new JAXBContext that can marshal / unmarshal all model classes defined in the given repository. If the repository references other repositories (directly or indirectly), the context can also handle the classes defined in those.
      Throws:
      RuntimeException - Exceptions that are thrown while trying to load a class from the class loader or creating the jakarta context are wrapped into a runtime exception
    • newJAXBContext

      JAXBContext newJAXBContext(JAXBContext ctx, IRuntimeRepository repository)
      Creates a JAXBContext that wraps the provided context and extends the marshaling methods to provide marshaling of Faktor-IPS enumerations and model objects configured by product components.
    • get

      static <JAXBContext> IXmlBindingSupport<JAXBContext> get()
      Returns the IXmlBindingSupport implementation matching the expected JAXBContext.
      Type Parameters:
      JAXBContext - the JAXBContext implementation with the package javax.xml.bind or jakarta.xml.bind