public class RequestUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ATOM_DATE_FORMAT
date format used internally by the Boomi Atom
|
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
getCurrentContextClassLoader()
Returns the ClassLoader for the current thread (calls
Thread.getContextClassLoader() ). |
static <T> Iterable<List<T>> |
pageIterable(Iterable<T> iterable,
AtomConfig config)
Returns an Iterable which generates "pages" of elements from the given Iterable.
|
static <T> Iterable<List<T>> |
pageIterable(Iterable<T> iterable,
int connectorMaxPageSize,
AtomConfig config)
Returns an Iterable which generates "pages" of elements from the given Iterable.
|
static Date |
parseAtomDateString(String dateStr)
Returns a Date parsed from a date string formatted using the Boomi Atom internal date format
"yyyyMMdd HHmmss.SSS".
|
static void |
setCurrentContextClassLoader(ClassLoader loader)
Sets the context ClassLoader of the current thread (calls
Thread.setContextClassLoader(java.lang.ClassLoader) ). |
public static final String ATOM_DATE_FORMAT
public static Date parseAtomDateString(String dateStr) throws ParseException
dateStr
- the date string to parse, may be null
null
if the given date string was blank or null
ParseException
public static void setCurrentContextClassLoader(ClassLoader loader)
Thread.setContextClassLoader(java.lang.ClassLoader)
). Note, however,
that this call is made with the security context of the Connector SDK only, and therefore will succeed when a
direct call to will fail.loader
- the new context ClassLoader for the current threadpublic static ClassLoader getCurrentContextClassLoader()
Thread.getContextClassLoader()
).public static <T> Iterable<List<T>> pageIterable(Iterable<T> iterable, int connectorMaxPageSize, AtomConfig config)
iterable
- source Iterable of elementsconnectorMaxPageSize
- max connector page sizeconfig
- atom configurationpublic static <T> Iterable<List<T>> pageIterable(Iterable<T> iterable, AtomConfig config)
iterable
- source Iterable of elementsconfig
- atom configuration