it.eng.spagobi.rest.interceptors
Class InterceptorUtilities

java.lang.Object
  extended by it.eng.spagobi.rest.interceptors.InterceptorUtilities

public class InterceptorUtilities
extends java.lang.Object

Author:
Alberto Ghedin (alberto.ghedin@eng.it)

Constructor Summary
InterceptorUtilities()
           
 
Method Summary
static void addGenericMap(java.util.Map<java.lang.String,java.lang.String> stringMap, java.util.Map genericMap)
          Get the content of a map of object and for every value apply the toString.
static java.util.HashMap<java.lang.String,java.lang.String> fromMultivaluedMapToHashMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> multiMap)
          Trasforms a MultivaluedMap in a HashMap
static java.util.HashMap<java.lang.String,java.lang.String> getPathParameters(org.jboss.resteasy.spi.HttpRequest req)
          Get the url of the services.
static java.util.HashMap getRequestParameters(org.jboss.resteasy.spi.HttpRequest request, javax.servlet.http.HttpServletRequest servletRequest)
           
static java.lang.String getServiceUrl(org.jboss.resteasy.spi.HttpRequest req)
          Get the url of the services.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterceptorUtilities

public InterceptorUtilities()
Method Detail

getServiceUrl

public static java.lang.String getServiceUrl(org.jboss.resteasy.spi.HttpRequest req)
Get the url of the services. It removes the path parameters from the url

Parameters:
req -
Returns:
the url of the service

getPathParameters

public static java.util.HashMap<java.lang.String,java.lang.String> getPathParameters(org.jboss.resteasy.spi.HttpRequest req)
Get the url of the services. It removes the path parameters from the url

Parameters:
req -
Returns:
the url of the service

fromMultivaluedMapToHashMap

public static java.util.HashMap<java.lang.String,java.lang.String> fromMultivaluedMapToHashMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> multiMap)
Trasforms a MultivaluedMap in a HashMap

Parameters:
multiMap -
Returns:

addGenericMap

public static void addGenericMap(java.util.Map<java.lang.String,java.lang.String> stringMap,
                                 java.util.Map genericMap)
Get the content of a map of object and for every value apply the toString. If the value is an array it iterate in all the entries

Parameters:
stringMap -
genericMap -

getRequestParameters

public static java.util.HashMap getRequestParameters(org.jboss.resteasy.spi.HttpRequest request,
                                                     javax.servlet.http.HttpServletRequest servletRequest)