org.hippoecm.hst.mock.core.component
Class MockHstRequest

java.lang.Object
  extended by org.hippoecm.hst.mock.core.component.MockHstRequestBase
      extended by org.hippoecm.hst.mock.core.component.MockHstRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, HstRequest

public class MockHstRequest
extends MockHstRequestBase
implements HstRequest


Field Summary
 
Fields inherited from interface org.hippoecm.hst.core.component.HstRequest
ACTION_PHASE, RENDER_PHASE, RESOURCE_PHASE
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
MockHstRequest()
           
 
Method Summary
 Map<String,Object> getAttributeMap()
          Returns the attribute map of this component window.
 Map<String,Object> getAttributeMap(String referencePath)
          Returns the attribute map of the specified reference namespace component window.
 String getLifecyclePhase()
          Returns the lifecycle phase of the current HST request.
 Map<String,String[]> getParameterMap(String referencePath)
          Returns the parameter map of the specified reference namespace component window.
 String getReferenceNamespace()
          The reference namespace of the component window.
 HstRequestContext getRequestContext()
          Returns the current request context
 String getResourceID()
          Returns the resource ID which was set by the resource HST URL.
 void setAttributeMap(String referencePath, Map<String,Object> attrMap)
           
 void setLifecyclePhase(String lifecyclePhase)
           
 void setParameterMap(String referencePath, Map<String,String[]> paramMap)
           
 void setReferenceNamespace(String referenceNamespace)
           
 void setReferencePath(String referencePath)
           
 void setRequestContext(HstRequestContext requestContext)
           
 void setResourceID(String resourceId)
           
 
Methods inherited from class org.hippoecm.hst.mock.core.component.MockHstRequestBase
addHeader, addParameter, getAttribute, getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMethod, getParameter, getParameterMap, getParameterNames, getParameterValues, getPathInfo, getPathTranslated, getProtocol, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequestDispatcher, getRequestedSessionId, getRequestURI, getRequestURL, getScheme, getServerName, getServerPort, getServletPath, getSession, getSession, getUserPrincipal, getUserRoleNames, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isUserInRole, removeAttribute, removeParameter, setAttribute, setAuthType, setCharacterEncoding, setContextPath, setCookies, setHeader, setLocalAddr, setLocale, setLocales, setLocalName, setLocalPort, setMethod, setPathInfo, setPathTranslated, setProtocol, setQueryString, setRemoteAddr, setRemoteHost, setRemoteUser, setRequestedSessionId, setRequestedSessionIdFromCookie, setRequestedSessionIdFromUrl, setRequestedSessionIdFromURL, setRequestedSessionIdValid, setRequestURI, setRequestURL, setScheme, setServerName, setServletPath, setSession, setUserPrincipal, setUserRoleNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hippoecm.hst.core.component.HstRequest
getParameterMap
 
Methods inherited from interface javax.servlet.http.HttpServletRequest
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

MockHstRequest

public MockHstRequest()
Method Detail

setReferencePath

public void setReferencePath(String referencePath)

getAttributeMap

public Map<String,Object> getAttributeMap()
Description copied from interface: HstRequest
Returns the attribute map of this component window.

Specified by:
getAttributeMap in interface HstRequest
Returns:

setAttributeMap

public void setAttributeMap(String referencePath,
                            Map<String,Object> attrMap)

getAttributeMap

public Map<String,Object> getAttributeMap(String referencePath)
Description copied from interface: HstRequest
Returns the attribute map of the specified reference namespace component window.

Specified by:
getAttributeMap in interface HstRequest
Returns:

setParameterMap

public void setParameterMap(String referencePath,
                            Map<String,String[]> paramMap)

getParameterMap

public Map<String,String[]> getParameterMap(String referencePath)
Description copied from interface: HstRequest
Returns the parameter map of the specified reference namespace component window. If the request type is in the action lifecycle, the reference namespace parameter will be just ignored and the operation will be equivalent to HstRequest.getParameterMap().

Specified by:
getParameterMap in interface HstRequest
Returns:

setRequestContext

public void setRequestContext(HstRequestContext requestContext)

getRequestContext

public HstRequestContext getRequestContext()
Description copied from interface: HstRequest
Returns the current request context

Specified by:
getRequestContext in interface HstRequest
Returns:

setResourceID

public void setResourceID(String resourceId)

getResourceID

public String getResourceID()
Description copied from interface: HstRequest
Returns the resource ID which was set by the resource HST URL.

Specified by:
getResourceID in interface HstRequest
Returns:

getReferenceNamespace

public String getReferenceNamespace()
Description copied from interface: HstRequest
The reference namespace of the component window.

Specified by:
getReferenceNamespace in interface HstRequest
Returns:
the reference namespace of the component window

setReferenceNamespace

public void setReferenceNamespace(String referenceNamespace)

getLifecyclePhase

public String getLifecyclePhase()
Description copied from interface: HstRequest
Returns the lifecycle phase of the current HST request.

Specified by:
getLifecyclePhase in interface HstRequest
Returns:
See Also:
#ACTION_PHASE}, {@link #RENDER_PHASE}, and {@link #RESOURCE_PHASE}.

setLifecyclePhase

public void setLifecyclePhase(String lifecyclePhase)


Copyright © 2008-2012 Hippo. All Rights Reserved.