org.apache.chemistry.opencmis.server.shared
Class HttpUtils

java.lang.Object
  extended by org.apache.chemistry.opencmis.server.shared.HttpUtils

public class HttpUtils
extends Object

Utility methods that are used by the AtomPub and Browser binding.


Method Summary
static CallContext createContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext, String binding, CallContextHandler callContextHandler, File tempDir, int memoryThreshold)
          Creates a CallContext object from a servlet request.
static BigInteger getBigIntegerParameter(javax.servlet.http.HttpServletRequest request, String name)
          Extracts an integer parameter.
static BigInteger getBigIntegerParameter(javax.servlet.http.HttpServletRequest request, String name, long def)
          Extracts an integer parameter (with default).
static Boolean getBooleanParameter(javax.servlet.http.HttpServletRequest request, String name)
          Extracts a boolean parameter.
static boolean getBooleanParameter(javax.servlet.http.HttpServletRequest request, String name, boolean def)
          Extracts a boolean parameter (with default).
static
<T> T
getEnumParameter(javax.servlet.http.HttpServletRequest request, String name, Class<T> clazz)
          Extracts an enum parameter.
static String getStringParameter(javax.servlet.http.HttpServletRequest request, String name)
          Extracts a string parameter.
static String[] splitPath(javax.servlet.http.HttpServletRequest request)
          Splits the path into its fragments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createContext

public static CallContext createContext(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        javax.servlet.ServletContext servletContext,
                                        String binding,
                                        CallContextHandler callContextHandler,
                                        File tempDir,
                                        int memoryThreshold)
Creates a CallContext object from a servlet request.


splitPath

public static String[] splitPath(javax.servlet.http.HttpServletRequest request)
Splits the path into its fragments.


getStringParameter

public static String getStringParameter(javax.servlet.http.HttpServletRequest request,
                                        String name)
Extracts a string parameter.


getBooleanParameter

public static boolean getBooleanParameter(javax.servlet.http.HttpServletRequest request,
                                          String name,
                                          boolean def)
Extracts a boolean parameter (with default).


getBooleanParameter

public static Boolean getBooleanParameter(javax.servlet.http.HttpServletRequest request,
                                          String name)
Extracts a boolean parameter.


getBigIntegerParameter

public static BigInteger getBigIntegerParameter(javax.servlet.http.HttpServletRequest request,
                                                String name,
                                                long def)
Extracts an integer parameter (with default).


getBigIntegerParameter

public static BigInteger getBigIntegerParameter(javax.servlet.http.HttpServletRequest request,
                                                String name)
Extracts an integer parameter.


getEnumParameter

public static <T> T getEnumParameter(javax.servlet.http.HttpServletRequest request,
                                     String name,
                                     Class<T> clazz)
Extracts an enum parameter.



Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.