Class RequestUtil


  • @Deprecated
    public class RequestUtil
    extends Object
    Deprecated.
    use RequestUtil. This utility class does not belong in the api package; an equivalent now lives in connector-sdk-util. This copy remains to avoid breaking existing connectors.
    Utility methods for handling requests.
    • Field Detail

      • ATOM_DATE_FORMAT

        public static final String ATOM_DATE_FORMAT
        Deprecated.
        date format used internally by the Boomi Atom
        See Also:
        Constant Field Values
    • Method Detail

      • parseAtomDateString

        public static Date parseAtomDateString​(String dateStr)
                                        throws ParseException
        Deprecated.
        Returns a Date parsed from a date string formatted using the Boomi Atom internal date format "yyyyMMdd HHmmss.SSS". Useful for handling date strings passed into a connector as query parameters.
        Parameters:
        dateStr - the date string to parse, may be null
        Returns:
        a valid Date, or null if the given date string was blank or null
        Throws:
        ParseException
      • setCurrentContextClassLoader

        public static void setCurrentContextClassLoader​(ClassLoader loader)
        Deprecated.
        Sets the context ClassLoader of the current thread (calls 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.
        Parameters:
        loader - the new context ClassLoader for the current thread
      • getCurrentContextClassLoader

        public static ClassLoader getCurrentContextClassLoader()
        Deprecated.
        Returns the ClassLoader for the current thread (calls Thread.getContextClassLoader()).
        Returns:
        the context ClassLoader for the current thread
      • pageIterable

        public static <T> Iterable<List<T>> pageIterable​(Iterable<T> iterable,
                                                         int connectorMaxPageSize,
                                                         AtomConfig config)
        Deprecated.
        Returns an Iterable which generates "pages" of elements from the given Iterable. The pageSize is the minimum of the given connectorPageSize and the AtomConfig maximum page size.
        Parameters:
        iterable - source Iterable of elements
        connectorMaxPageSize - max connector page size
        config - atom configuration
        Returns:
        Iterable which generates pages of elements
      • pageIterable

        public static <T> Iterable<List<T>> pageIterable​(Iterable<T> iterable,
                                                         AtomConfig config)
        Deprecated.
        Returns an Iterable which generates "pages" of elements from the given Iterable. The pageSize is the AtomConfig maximum page size.
        Parameters:
        iterable - source Iterable of elements
        config - atom configuration
        Returns:
        Iterable which generates pages of elements