Class Utils
- java.lang.Object
-
- com.sun.identity.liberty.ws.soapbinding.Utils
-
@Supported public class Utils extends Object
This class contains utility methods.
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceBundle
bundle
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
BooleanToString(Boolean bool)
Converts a Boolean object to a String representing XML boolean.static QName
convertStringToQName(String str, Element element)
Converts a string value to a QName.static String
getNamespaceForPrefix(String prefix, Element e)
Gets the XML namespace URI that is mapped to the specified prefix, in the context of the DOM element estatic 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.
-
-
-
Field Detail
-
bundle
public static ResourceBundle bundle
-
-
Method Detail
-
StringToBoolean
@Supported public static Boolean StringToBoolean(String str) throws Exception
Converts a value of XML boolean type to Boolean object.- Parameters:
str
- a value of XML boolean type- Returns:
- a Boolean object
- Throws:
Exception
- if there is a syntax error
-
BooleanToString
@Supported public static String BooleanToString(Boolean bool)
Converts a Boolean object to a String representing XML boolean.- Parameters:
bool
- a Boolean object.- Returns:
- a String representing the boolean value.
-
convertStringToQName
@Supported public static QName convertStringToQName(String str, Element element)
Converts a string value to a QName. The prefix of the string value is resolved to a namespace relative to the element.- Parameters:
str
- the String to be converted.element
- the Element object.- Returns:
- the QName Object.
-
getNamespaceForPrefix
public static String getNamespaceForPrefix(String prefix, Element e)
Gets the XML namespace URI that is mapped to the specified prefix, in the context of the DOM element e- Parameters:
prefix
- The namespace prefix to mape
- The DOM element in which to calculate the prefix binding- Returns:
- The XML namespace URI mapped to prefix in the context of e
-
getString
@Supported public static String getString(String key, Object[] params)
Gets localized string from resource bundle.- Parameters:
key
- a key to a resource bundleparams
- parameters to MessageFormat- Returns:
- a localized string.
-
-