Package org.faktorips.runtime.xml
Interface IXmlBindingSupport<JAXBContext>
- Type Parameters:
JAXBContext- theJAXBContextimplementation with the packagejavax.xml.bindorjakarta.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 TypeMethodDescriptionstatic <JAXBContext>
IXmlBindingSupport<JAXBContext>get()Returns theIXmlBindingSupportimplementation matching the expectedJAXBContext.newJAXBContext(JAXBContext ctx, IRuntimeRepository repository) Creates aJAXBContextthat wraps the provided context and extends the marshaling methods to provide marshaling of Faktor-IPS enumerations and model objects configured by product components.newJAXBContext(IRuntimeRepository repository) Creates a newJAXBContextthat can marshal / unmarshal all model classes defined in the given repository.
-
Method Details
-
newJAXBContext
Creates a newJAXBContextthat 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
Creates aJAXBContextthat wraps the provided context and extends the marshaling methods to provide marshaling of Faktor-IPS enumerations and model objects configured by product components. -
get
Returns theIXmlBindingSupportimplementation matching the expectedJAXBContext.- Type Parameters:
JAXBContext- theJAXBContextimplementation with the packagejavax.xml.bindorjakarta.xml.bind
-