public class OpenLibertyHelpers extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.opensaml.core.xml.XMLObjectBuilderFactory |
builderFactory
XMLObject builder factory
|
private static String |
defaultDateFormat |
private static DateTimeFormatter |
defaultDateFormatter |
static String |
FALSE_STR |
private static Logger |
log |
protected static org.opensaml.core.xml.io.MarshallerFactory |
marshallerFactory
XMLObject marshaller factory.
|
protected static net.shibboleth.utilities.java.support.xml.BasicParserPool |
parserPool
Parser pool
|
static String |
TRUE_STR |
protected static org.opensaml.core.xml.io.UnmarshallerFactory |
unmarshallerFactory
XMLObject marshaller factory.
|
| Constructor and Description |
|---|
OpenLibertyHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
booleanFromString(String booleanString)
Safely create a Boolean from a String
|
static org.opensaml.core.xml.XMLObject |
cloneXMLObject(org.opensaml.core.xml.XMLObject xmlObject)
Clone an XMLObject
|
static org.opensaml.core.xml.XMLObject |
createXMLObjectForQName(QName qname) |
static DateTime |
dateTimeForString(String dateTimeString)
Attempt to convert a String into a DateTime object
|
static DateTimeFormatter |
getDefaultDateFormatter()
Returns a joda DateTimeFormatter for parsing and printing a DateTime
|
static Integer |
integerFromString(String integerString)
Safely create an Integer from a String
|
static Integer |
positiveIntegerFromString(String integerString,
Integer defaultValue)
Safely create a positive Integer from a String
|
static DateTime |
prepareForAssignment(DateTime oldValue,
DateTime newValue,
DateTimeFormatter formatter,
org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
Compares DateTime objects looking for change, using the specified DateTimeFormatter.
|
static Integer |
prepareForAssignment(Integer oldValue,
Integer newValue,
org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
Compares Integer values, releasing the DOM when oldValue and newValue
are not equivalent
|
static String |
prepareForAssignment(String oldStringValue,
String newStringValue,
org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
Use this utility method to reset the DOM if required based on a
change to the objects (element value or attribute value)
|
static <T> T |
prepareForAssignment(T oldValue,
T newValue,
org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
Compares two objects.
|
static String |
prettyPrintXMLObject(org.opensaml.core.xml.XMLObject xmlObject)
Takes an XMLObject as a parameter, marshalls it, and returns a
pretty printed version of the generated XML.
|
static <E> E |
selectFromAList(E[] list,
String name)
Takes a list of objects and allows the user to specify a
selection by number.
|
static String |
stringForDateTime(DateTime dateTime)
Attempt to convert a DateTime object into a String
|
static String |
stringFromBoolean(Boolean b,
String defaultString) |
static org.opensaml.core.xml.XMLObject |
unmarshallElementFromFile(File elementFile)
Unmarshalls an element file into its XMLObject.
|
protected static org.opensaml.core.xml.XMLObject |
unmarshallElementFromFile(String elementFileName)
Unmarshalls an element file into its XMLObject.
|
static org.opensaml.core.xml.XMLObject |
unmarshallElementFromString(String inputString) |
private static Logger log
public static String FALSE_STR
public static String TRUE_STR
private static String defaultDateFormat
private static DateTimeFormatter defaultDateFormatter
protected static org.opensaml.core.xml.io.MarshallerFactory marshallerFactory
protected static org.opensaml.core.xml.io.UnmarshallerFactory unmarshallerFactory
protected static net.shibboleth.utilities.java.support.xml.BasicParserPool parserPool
protected static org.opensaml.core.xml.XMLObjectBuilderFactory builderFactory
public static org.opensaml.core.xml.XMLObject createXMLObjectForQName(QName qname)
public static String stringForDateTime(DateTime dateTime)
dateTime - public static DateTime dateTimeForString(String dateTimeString)
dateTimeString - public static Integer integerFromString(String integerString)
integerString - public static Integer positiveIntegerFromString(String integerString, Integer defaultValue)
integerString - public static Boolean booleanFromString(String booleanString)
booleanString - public static String prepareForAssignment(String oldStringValue, String newStringValue, org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
oldValue - newValue - abstractXMLObject - public static <T> T prepareForAssignment(T oldValue,
T newValue,
org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
oldValue - newValue - abstractXMLObject - public static DateTime prepareForAssignment(DateTime oldValue, DateTime newValue, DateTimeFormatter formatter, org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
oldValue - newValue - formatter - optional, used to compare the eventual xml output based on formattingabstractXMLObject - required and must be Non nullpublic static Integer prepareForAssignment(Integer oldValue, Integer newValue, org.opensaml.core.xml.AbstractXMLObject abstractXMLObject)
oldValue - newValue - abstractXMLObject - public static DateTimeFormatter getDefaultDateFormatter()
public static org.opensaml.core.xml.XMLObject cloneXMLObject(org.opensaml.core.xml.XMLObject xmlObject)
xmlObject - public static String prettyPrintXMLObject(org.opensaml.core.xml.XMLObject xmlObject)
xmlObject - public static <E> E selectFromAList(E[] list,
String name)
list - name - public static org.opensaml.core.xml.XMLObject unmarshallElementFromString(String inputString)
public static org.opensaml.core.xml.XMLObject unmarshallElementFromFile(File elementFile)
protected static org.opensaml.core.xml.XMLObject unmarshallElementFromFile(String elementFileName)
Copyright © 1999–2015. All rights reserved.