org.hippoecm.hst.core.component
Class HstRequestImpl

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.hippoecm.hst.core.component.HstRequestImpl
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, HstRequest

public class HstRequestImpl
extends javax.servlet.http.HttpServletRequestWrapper
implements HstRequest

HstRequestImpl

Version:
$Id: HstRequestImpl.java 32953 2012-02-14 21:44:26Z wko $

Field Summary
protected  HstComponentWindow componentWindow
           
static String CONTAINER_ATTR_NAME_PREFIXES_PROP_KEY
           
static String CONTAINER_ROLE_PRINCIPAL_CLASSNAME_PROP_KEY
           
static String CONTAINER_USER_PRINCIPAL_CLASSNAME_PROP_KEY
           
protected  String lifecyclePhase
           
protected  Map<String,Map<String,Object>> namespaceAttributesMap
           
protected  Map<String,Map<String,String[]>> namespaceParametersMap
           
protected  String parameterNameComponentSeparator
           
protected  boolean referenceNamespaceIgnored
           
protected  HstRequestContext requestContext
           
 
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
HstRequestImpl(javax.servlet.http.HttpServletRequest servletRequest, HstRequestContext requestContext, HstComponentWindow componentWindow, String lifecyclePhase)
           
 
Method Summary
 Object getAttribute(String name)
           
 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.
 Enumeration getAttributeNames()
           
 HstComponentWindow getComponentWindow()
           
protected  String getFullNamespacePrefix(String referenceNamespace)
           
protected  String getFullNamespacePrefix(String referenceNamespace, boolean noSeparatorForEmpty)
           
 String getLifecyclePhase()
          Returns the lifecycle phase of the current HST request.
 Locale getLocale()
           
 Enumeration getLocales()
           
 String getParameter(String name)
           
 Map<String,String[]> getParameterMap()
          Returns the parameter map of this component window.
 Map<String,String[]> getParameterMap(String referencePath)
          Returns the parameter map of the specified reference namespace component window.
 Enumeration getParameterNames()
           
 String[] getParameterValues(String name)
           
 String getReferenceNamespace()
          The reference namespace of the component window.
protected  String getReferenceNamespacePath(String referencePath)
           
 HstRequestContext getRequestContext()
          Returns the current request context
 String getResourceID()
          Returns the resource ID which was set by the resource HST URL.
protected  boolean isContainerAttributeName(String attrName)
           
 void removeAttribute(String name)
           
 void setAttribute(String name, Object value)
           
 void setRequest(javax.servlet.http.HttpServletRequest servletRequest)
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
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 class javax.servlet.ServletRequestWrapper
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding
 

Field Detail

CONTAINER_ATTR_NAME_PREFIXES_PROP_KEY

public static final String CONTAINER_ATTR_NAME_PREFIXES_PROP_KEY

CONTAINER_USER_PRINCIPAL_CLASSNAME_PROP_KEY

public static final String CONTAINER_USER_PRINCIPAL_CLASSNAME_PROP_KEY

CONTAINER_ROLE_PRINCIPAL_CLASSNAME_PROP_KEY

public static final String CONTAINER_ROLE_PRINCIPAL_CLASSNAME_PROP_KEY

lifecyclePhase

protected String lifecyclePhase

requestContext

protected HstRequestContext requestContext

namespaceParametersMap

protected Map<String,Map<String,String[]>> namespaceParametersMap

namespaceAttributesMap

protected Map<String,Map<String,Object>> namespaceAttributesMap

componentWindow

protected HstComponentWindow componentWindow

parameterNameComponentSeparator

protected String parameterNameComponentSeparator

referenceNamespaceIgnored

protected boolean referenceNamespaceIgnored
Constructor Detail

HstRequestImpl

public HstRequestImpl(javax.servlet.http.HttpServletRequest servletRequest,
                      HstRequestContext requestContext,
                      HstComponentWindow componentWindow,
                      String lifecyclePhase)
Method Detail

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest servletRequest)

getParameterMap

public Map<String,String[]> getParameterMap()
Description copied from interface: HstRequest
Returns the parameter map of this component window. If the request is in the action lifecycle, then only action parameters can be accessible. Otherwise, then only render parameters can be accessible.

Specified by:
getParameterMap in interface javax.servlet.ServletRequest
Specified by:
getParameterMap in interface HstRequest
Overrides:
getParameterMap in class javax.servlet.ServletRequestWrapper
Returns:
an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.

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:

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:

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

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:

getParameter

public String getParameter(String name)
Specified by:
getParameter in interface javax.servlet.ServletRequest
Overrides:
getParameter in class javax.servlet.ServletRequestWrapper

getParameterNames

public Enumeration getParameterNames()
Specified by:
getParameterNames in interface javax.servlet.ServletRequest
Overrides:
getParameterNames in class javax.servlet.ServletRequestWrapper

getParameterValues

public String[] getParameterValues(String name)
Specified by:
getParameterValues in interface javax.servlet.ServletRequest
Overrides:
getParameterValues in class javax.servlet.ServletRequestWrapper

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface javax.servlet.ServletRequest
Overrides:
getAttributeNames in class javax.servlet.ServletRequestWrapper

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface javax.servlet.ServletRequest
Overrides:
getAttribute in class javax.servlet.ServletRequestWrapper

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface javax.servlet.ServletRequest
Overrides:
setAttribute in class javax.servlet.ServletRequestWrapper

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface javax.servlet.ServletRequest
Overrides:
removeAttribute in class javax.servlet.ServletRequestWrapper

getLocale

public Locale getLocale()
Specified by:
getLocale in interface javax.servlet.ServletRequest
Overrides:
getLocale in class javax.servlet.ServletRequestWrapper

getLocales

public Enumeration getLocales()
Specified by:
getLocales in interface javax.servlet.ServletRequest
Overrides:
getLocales in class javax.servlet.ServletRequestWrapper

getRequestContext

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

Specified by:
getRequestContext in interface HstRequest
Returns:

getComponentWindow

public HstComponentWindow getComponentWindow()

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:

getReferenceNamespacePath

protected String getReferenceNamespacePath(String referencePath)

getFullNamespacePrefix

protected String getFullNamespacePrefix(String referenceNamespace)

getFullNamespacePrefix

protected String getFullNamespacePrefix(String referenceNamespace,
                                        boolean noSeparatorForEmpty)

isContainerAttributeName

protected boolean isContainerAttributeName(String attrName)

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}.


Copyright © 2008-2012 Hippo. All Rights Reserved.