Interface DroolsJaxbHelperProvider


  • public interface DroolsJaxbHelperProvider
    DroolsJaxbHelperProvider is used by the DroolsJaxbHelperFactory to "provide" it's concrete implementation. This class is not considered stable and may change, the user is protected from this change by using the Factory api, which is considered stable.

    This api is experimental and thus the classes and the interfaces returned are subject to change.

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String[] addXsdModel​(org.kie.api.io.Resource resource, KnowledgeBuilder kbuilder, com.sun.tools.xjc.Options xjcOpts, java.lang.String systemId)
      Deprecated.
      This is now deprecated, as we now support XSD as a standard ResourceType.
      javax.xml.bind.JAXBContext newJAXBContext​(java.lang.String[] classNames, java.util.Map<java.lang.String,​?> properties, org.kie.api.KieBase kbase)
      Creates a new JAXBContext, from which the Marshaller and Unmarshaller can be created, which are used by the Transformer pipeline stage.
    • Method Detail

      • addXsdModel

        java.lang.String[] addXsdModel​(org.kie.api.io.Resource resource,
                                       KnowledgeBuilder kbuilder,
                                       com.sun.tools.xjc.Options xjcOpts,
                                       java.lang.String systemId)
                                throws java.io.IOException
        Deprecated.
        This is now deprecated, as we now support XSD as a standard ResourceType. Although you'll still need the newJAXBContext method to create a JAXBContext from the KnowledgeBase.
        Generates pojos for a given XSD using XJC and adds them to the specified KnowlegeBase.
        Parameters:
        resource - The resource to the XSD model
        kbuilder - the KnowledgeBuilder where the generated .class files will be placed
        xjcOpts - XJC Options
        systemId - XJC systemId
        Returns:
        Returns an array of class names that where generated by the XSD.
        Throws:
        java.io.IOException
      • newJAXBContext

        javax.xml.bind.JAXBContext newJAXBContext​(java.lang.String[] classNames,
                                                  java.util.Map<java.lang.String,​?> properties,
                                                  org.kie.api.KieBase kbase)
                                           throws javax.xml.bind.JAXBException
        Creates a new JAXBContext, from which the Marshaller and Unmarshaller can be created, which are used by the Transformer pipeline stage.
        Parameters:
        classNames - An array of class names that can be resolved by this JAXBContext
        properties - JAXB properties
        kbase - The KnowledgeBase
        Returns:
        The JAXB Context
        Throws:
        javax.xml.bind.JAXBException