public class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
BooleanToString(Boolean bool)
Converts a Boolean object to a String representing XML boolean.
|
static Object |
convertElementToJAXB(Element element)
Converts a
org.w3c.dom.Element to a JAXB object. |
static List |
convertElementToJAXB(List elements)
Converts a list of
org.w3c.dom.Element to a list of
JAXB objects. |
static List |
convertJAXBToElement(List jaxbObjs)
Converts a list of JAXB objects to a list of
org.w3c.dom.Element |
static Element |
convertJAXBToElement(Object jaxbObj)
Converts a JAXB object to a
org.w3c.dom.Element . |
static Element |
convertJAXBToElement(Object jaxbObj,
boolean checkIdref)
Converts a JAXB object to a
org.w3c.dom.Element . |
static QName |
convertStringToQName(String str,
Element element)
Converts a string value to a QName.
|
static SOAPMessage |
DocumentToSOAPMessage(Document doc)
Converts Document to SOAPMessage
|
static String |
getJAXBPackages()
Returns a String of JAXB packages seperated by ":".
|
static Map |
getNamespacePrefixMapping()
Returns JAXB namespace prefix mapping.
|
static String |
getString(String key,
Object[] params)
Gets localized string from resource bundle.
|
static Boolean |
StringToBoolean(String str)
Converts a value of XML boolean type to Boolean object.
|
public static Map getNamespacePrefixMapping()
public static String getJAXBPackages()
public static SOAPMessage DocumentToSOAPMessage(Document doc) throws SOAPBindingException
doc
- the source DocumentSOAPBindingException
- if an error occurs while converting
the documentpublic static List convertJAXBToElement(List jaxbObjs) throws JAXBException
org.w3c.dom.Element
jaxbObjs
- a list of JAXB objectsorg.w3c.dom.Element
JAXBException
- if an error occurs while converting JAXB objects.public static Element convertJAXBToElement(Object jaxbObj) throws JAXBException
org.w3c.dom.Element
.jaxbObj
- a JAXB objectorg.w3c.dom.Element
JAXBException
- if an error occurs while converting JAXB object.public static Element convertJAXBToElement(Object jaxbObj, boolean checkIdref) throws JAXBException
org.w3c.dom.Element
.jaxbObj
- a JAXB objectorg.w3c.dom.Element
JAXBException
- if an error occurs while converting JAXB object.public static List convertElementToJAXB(List elements) throws JAXBException
org.w3c.dom.Element
to a list of
JAXB objects.elements
- a list of org.w3c.dom.Element
JAXBException
- if an error occurs while converting
org.w3c.dom.Element
.public static Object convertElementToJAXB(Element element) throws JAXBException
org.w3c.dom.Element
to a JAXB object.element
- a org.w3c.dom.Element
.JAXBException
- if an error occurs while converting
org.w3c.dom.Element
public static Boolean StringToBoolean(String str) throws Exception
str
- a value of XML boolean typeException
- if there is a syntax errorpublic static String BooleanToString(Boolean bool)
bool
- a Boolean object.public static QName convertStringToQName(String str, Element element)
str
- the String to be converted.element
- the Element object.Copyright © 2010-2018, ForgeRock All Rights Reserved.