Class SInvokeHelper


  • public class SInvokeHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SInvokeHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.Object> convertMultiMap​(java.util.Map<java.lang.String,​java.lang.String[]> vals)
      Convert a map with arrays to normal map where single values are flattened.
      static java.util.Map<java.lang.String,​java.lang.Object> convertMultiMap​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> vals)
      Convert a multimap to normal map, flattening single values, if any.
      static javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> convertToMultiMap​(java.util.Map<java.lang.String,​java.lang.String[]> vals)
      Convert a map with arrays to normal map when no multi values exist.
      static void debug​(java.lang.Object req)  
      static java.util.Map<java.lang.String,​java.lang.String> extractCallerValues​(java.lang.Object request)
      Extract caller values like ip and browser.
      protected static java.lang.Object getFieldValue​(java.lang.String name, java.lang.Object object)  
      static java.lang.Object invoke​(java.lang.Object[] params, java.lang.String sig, java.lang.Object object)
      Method that is invoked when rest service is called.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SInvokeHelper

        public SInvokeHelper()
    • Method Detail

      • convertMultiMap

        public static java.util.Map<java.lang.String,​java.lang.Object> convertMultiMap​(javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> vals)
        Convert a multimap to normal map, flattening single values, if any.
      • convertMultiMap

        public static java.util.Map<java.lang.String,​java.lang.Object> convertMultiMap​(java.util.Map<java.lang.String,​java.lang.String[]> vals)
        Convert a map with arrays to normal map where single values are flattened.
      • convertToMultiMap

        public static javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> convertToMultiMap​(java.util.Map<java.lang.String,​java.lang.String[]> vals)
        Convert a map with arrays to normal map when no multi values exist.
      • extractCallerValues

        public static java.util.Map<java.lang.String,​java.lang.String> extractCallerValues​(java.lang.Object request)
        Extract caller values like ip and browser.
        Parameters:
        request - The requrest.
        vals - The values.
      • invoke

        public static java.lang.Object invoke​(java.lang.Object[] params,
                                              java.lang.String sig,
                                              java.lang.Object object)
        Method that is invoked when rest service is called. Functionality blueprint for all service methods.
        Parameters:
        params - The parameters.
        Returns:
        The result.
      • getFieldValue

        protected static java.lang.Object getFieldValue​(java.lang.String name,
                                                        java.lang.Object object)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • debug

        public static void debug​(java.lang.Object req)