PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.util
Class JAXBUtil

java.lang.Object
  extended by org.picketlink.identity.federation.core.util.JAXBUtil

public class JAXBUtil
extends Object

Utility to obtain JAXB2 marshaller/unmarshaller etc

Since:
May 26, 2009
Author:
Anil.Saldhana@redhat.com

Field Summary
static String W3C_XML_SCHEMA_NS_URI
           
 
Constructor Summary
JAXBUtil()
           
 
Method Summary
static JAXBContext getJAXBContext(Class<?> clazz)
           
static JAXBContext getJAXBContext(String... paths)
           
static JAXBContext getJAXBContext(String path)
           
static Marshaller getMarshaller(String pkgName)
          Get the JAXB Marshaller
static Unmarshaller getUnmarshaller(String... pkgNames)
          Get the JAXB Unmarshaller for a selected set of package names
static Unmarshaller getUnmarshaller(String pkgName)
          Get the JAXB Unmarshaller
static Marshaller getValidatingMarshaller(String pkgName, String schemaLocation)
          Get the JAXB Marshaller
static Unmarshaller getValidatingUnmarshaller(String[] pkgNames, String[] schemaLocations)
           
static Unmarshaller getValidatingUnmarshaller(String pkgName, String schemaLocation)
          Get the JAXB Unmarshaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

W3C_XML_SCHEMA_NS_URI

public static final String W3C_XML_SCHEMA_NS_URI
See Also:
Constant Field Values
Constructor Detail

JAXBUtil

public JAXBUtil()
Method Detail

getValidatingMarshaller

public static Marshaller getValidatingMarshaller(String pkgName,
                                                 String schemaLocation)
                                          throws 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:
JAXBException
SAXException

getMarshaller

public static Marshaller getMarshaller(String pkgName)
                                throws JAXBException
Get the JAXB Marshaller

Parameters:
pkgName - The package name for the jaxb context
Returns:
Marshaller
Throws:
JAXBException

getUnmarshaller

public static Unmarshaller getUnmarshaller(String pkgName)
                                    throws JAXBException
Get the JAXB Unmarshaller

Parameters:
pkgName - The package name for the jaxb context
Returns:
unmarshaller
Throws:
JAXBException

getUnmarshaller

public static Unmarshaller getUnmarshaller(String... pkgNames)
                                    throws JAXBException
Get the JAXB Unmarshaller for a selected set of package names

Parameters:
pkgNames -
Returns:
Throws:
JAXBException

getValidatingUnmarshaller

public static Unmarshaller getValidatingUnmarshaller(String pkgName,
                                                     String schemaLocation)
                                              throws 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:
JAXBException
SAXException

getValidatingUnmarshaller

public static Unmarshaller getValidatingUnmarshaller(String[] pkgNames,
                                                     String[] schemaLocations)
                                              throws JAXBException,
                                                     SAXException,
                                                     IOException
Throws:
JAXBException
SAXException
IOException

getJAXBContext

public static JAXBContext getJAXBContext(String path)
                                  throws JAXBException
Throws:
JAXBException

getJAXBContext

public static JAXBContext getJAXBContext(String... paths)
                                  throws JAXBException
Throws:
JAXBException

getJAXBContext

public static JAXBContext getJAXBContext(Class<?> clazz)
                                  throws JAXBException
Throws:
JAXBException

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.