com.solidstategroup.cms.utils
Class RequestUtils

java.lang.Object
  extended by com.solidstategroup.cms.utils.RequestUtils

public class RequestUtils
extends java.lang.Object

Class to try and take the brunt of the all request based code. For example, pulling parameters off a request reguardless if its MultiPart or not. Also, in future, any class that wants to pull the articleType out of the request should use getArticleType. just keeps the code a lot neater. User: Phil Date: 29-Mar-2005 Time: 10:25:34


Constructor Summary
RequestUtils()
           
 
Method Summary
static void clearCache()
           
static Article getArticle(javax.servlet.http.HttpServletRequest thiRequest)
           
static Article getArticle(javax.servlet.http.HttpServletRequest thisRequest, int sessionType)
           
static ArticleType getArticleType(javax.servlet.http.HttpServletRequest thisRequest)
           
static ArticleType getArticleType(javax.servlet.http.HttpServletRequest thisRequest, int sessionType)
          Attempts to pull the articleType out of a request object
static java.util.Map getParameters(javax.servlet.http.HttpServletRequest thisRequest)
          will split a request into a Map of Parameters
static boolean ipAddressMatches(java.lang.String allIpAddresses, java.lang.String ip)
           
static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request)
          Rebuild Query String
static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request, boolean includeDomain)
           
static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request, java.lang.String excludes)
           
static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request, java.lang.String excludes, boolean includeDomain)
          Rebuild Query String without the excluded comma sep params will optionaly include the domain
static boolean userAllowed(java.lang.String ip, WebUser webUser)
          ******************************************************************************************* Public Methods ********************************************************************************************
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestUtils

public RequestUtils()
Method Detail

userAllowed

public static boolean userAllowed(java.lang.String ip,
                                  WebUser webUser)
******************************************************************************************* Public Methods ********************************************************************************************


getArticle

public static Article getArticle(javax.servlet.http.HttpServletRequest thiRequest)

getArticle

public static Article getArticle(javax.servlet.http.HttpServletRequest thisRequest,
                                 int sessionType)

getArticleType

public static ArticleType getArticleType(javax.servlet.http.HttpServletRequest thisRequest)

ipAddressMatches

public static boolean ipAddressMatches(java.lang.String allIpAddresses,
                                       java.lang.String ip)

clearCache

public static void clearCache()

getArticleType

public static ArticleType getArticleType(javax.servlet.http.HttpServletRequest thisRequest,
                                         int sessionType)
Attempts to pull the articleType out of a request object

Parameters:
thisRequest -
sessionType -

getParameters

public static java.util.Map getParameters(javax.servlet.http.HttpServletRequest thisRequest)
will split a request into a Map of Parameters

Parameters:
thisRequest -

rebulidQueryString

public static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request)
Rebuild Query String


rebulidQueryString

public static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request,
                                                  boolean includeDomain)

rebulidQueryString

public static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request,
                                                  java.lang.String excludes)

rebulidQueryString

public static java.lang.String rebulidQueryString(javax.servlet.http.HttpServletRequest request,
                                                  java.lang.String excludes,
                                                  boolean includeDomain)
Rebuild Query String without the excluded comma sep params will optionaly include the domain