Class JAXBUtil

java.lang.Object
org.keycloak.saml.processing.core.util.JAXBUtil

public class JAXBUtil extends Object
Utility to obtain JAXB2 marshaller/unmarshaller etc
Since:
May 26, 2009
Author:
[email protected]
  • Field Details

  • Constructor Details

    • JAXBUtil

      public JAXBUtil()
  • Method Details

    • getValidatingMarshaller

      public static jakarta.xml.bind.Marshaller getValidatingMarshaller(String pkgName, String schemaLocation) throws jakarta.xml.bind.JAXBException, SAXException
      Get the JAXB Marshaller
      Parameters:
      pkgName - The package name for the jaxb context
      schemaLocation - location of the schema to validate against
      Returns:
      Marshaller
      Throws:
      jakarta.xml.bind.JAXBException
      SAXException
    • getMarshaller

      public static jakarta.xml.bind.Marshaller getMarshaller(String pkgName) throws jakarta.xml.bind.JAXBException
      Get the JAXB Marshaller
      Parameters:
      pkgName - The package name for the jaxb context
      Returns:
      Marshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • getUnmarshaller

      public static jakarta.xml.bind.Unmarshaller getUnmarshaller(String pkgName) throws jakarta.xml.bind.JAXBException
      Get the JAXB Unmarshaller
      Parameters:
      pkgName - The package name for the jaxb context
      Returns:
      unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
    • getUnmarshaller

      public static jakarta.xml.bind.Unmarshaller getUnmarshaller(String... pkgNames) throws jakarta.xml.bind.JAXBException
      Get the JAXB Unmarshaller for a selected set of package names
      Parameters:
      pkgNames -
      Returns:
      Throws:
      jakarta.xml.bind.JAXBException
    • getValidatingUnmarshaller

      public static jakarta.xml.bind.Unmarshaller getValidatingUnmarshaller(String pkgName, String schemaLocation) throws jakarta.xml.bind.JAXBException, SAXException
      Get the JAXB Unmarshaller
      Parameters:
      pkgName - The package name for the jaxb context
      schemaLocation - location of the schema to validate against
      Returns:
      unmarshaller
      Throws:
      jakarta.xml.bind.JAXBException
      SAXException
    • getValidatingUnmarshaller

      public static jakarta.xml.bind.Unmarshaller getValidatingUnmarshaller(String[] pkgNames, String[] schemaLocations) throws jakarta.xml.bind.JAXBException, SAXException, IOException
      Throws:
      jakarta.xml.bind.JAXBException
      SAXException
      IOException
    • getJAXBContext

      public static jakarta.xml.bind.JAXBContext getJAXBContext(String path) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • getJAXBContext

      public static jakarta.xml.bind.JAXBContext getJAXBContext(String... paths) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • getJAXBContext

      public static jakarta.xml.bind.JAXBContext getJAXBContext(Class<?> clazz) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException