public abstract class WebContextImpl extends UserContextImpl implements WebContext
Modifier and Type | Field and Description |
---|---|
protected AggregationState |
aggregationState |
locale
ATTRIBUTE_REQUEST_CHARACTER_ENCODING, ATTRIBUTE_REQUEST_URI
APPLICATION_SCOPE, ATTRIBUTE_COMMENT, ATTRIBUTE_EXCEPTION, ATTRIBUTE_MESSAGE, ATTRIBUTE_PATH, ATTRIBUTE_RECURSIVE, ATTRIBUTE_REPOSITORY, ATTRIBUTE_UUID, ATTRIBUTE_VERSION, ATTRIBUTE_VERSION_MAP, LOCAL_SCOPE, SESSION_SCOPE
Constructor and Description |
---|
WebContextImpl()
Use init to initialize the object.
|
Modifier and Type | Method and Description |
---|---|
AggregationState |
getAggregationState()
Retrieves the Aggregator instance, which gathers all info regarding the current request (paths, etc).
|
String |
getContextPath()
Get the current context path.
|
javax.servlet.jsp.PageContext |
getPageContext()
Returns the current jsp page context, if any.
|
String |
getParameter(String name)
Get parameter value as string.
|
Map<String,String> |
getParameters()
Get parameter values as a Map
|
String[] |
getParameterValues(String name)
Get parameter values as string[].
|
MultipartForm |
getPostedForm()
Get form object assembled by
MultipartRequestFilter . |
javax.servlet.http.HttpServletRequest |
getRequest()
Avoid the call to this method where ever possible.
|
javax.servlet.http.HttpServletResponse |
getResponse()
Avoid depending on this as much as possible.
|
javax.servlet.ServletContext |
getServletContext()
Returns the current servlet context.
|
void |
include(String path,
Writer out)
Does an include using the request that was set when setting up this context, or using the
request wrapped by the pageContext if existing.
|
void |
init(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext)
Method used to initialize the context.
|
void |
login() |
void |
logout()
Closes opened JCR sessions and invalidates the current HttpSession.
|
protected abstract AggregationState |
newAggregationState() |
void |
pop() |
void |
push(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
release()
Closes opened JCR sessions.
|
protected void |
releaseJCRSessions() |
void |
resetAggregationState()
This will only reset the original URI/URL by calling
AggregationState.resetURIs() . |
void |
setPageContext(javax.servlet.jsp.PageContext pageContext)
Sets the current jsp page context.
|
getLocale, getSubject, getUser, login, setLocaleFor
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getAttributeStrategy, getHierarchyManager, getJCRSession, getMessages, getMessages, getQueryManager, getRepositoryStrategy, isEmpty, keySet, put, putAll, remove, removeAttribute, setAttribute, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getHierarchyManager, getJCRSession, getLocale, getMessages, getMessages, getQueryManager, getSubject, getUser, removeAttribute, setAttribute, setLocale
protected AggregationState aggregationState
public void init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)
WebContext
init
in interface WebContext
public AggregationState getAggregationState()
WebContext
getAggregationState
in interface WebContext
protected abstract AggregationState newAggregationState()
public void resetAggregationState()
AggregationState.resetURIs()
.resetAggregationState
in interface WebContext
public MultipartForm getPostedForm()
MultipartRequestFilter
.getPostedForm
in interface WebContext
public String getParameter(String name)
getParameter
in interface WebContext
public String[] getParameterValues(String name)
getParameterValues
in interface WebContext
public Map<String,String> getParameters()
getParameters
in interface WebContext
public javax.servlet.http.HttpServletRequest getRequest()
getRequest
in interface WebContext
public javax.servlet.http.HttpServletResponse getResponse()
WebContext
getResponse
in interface WebContext
public String getContextPath()
WebContext
getContextPath
in interface WebContext
public void include(String path, Writer out) throws javax.servlet.ServletException, IOException
include
in interface WebContext
javax.servlet.ServletException
IOException
ServletRequest.getRequestDispatcher(String)
,
RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
public javax.servlet.jsp.PageContext getPageContext()
getPageContext
in interface WebContext
public void setPageContext(javax.servlet.jsp.PageContext pageContext)
setPageContext
in interface WebContext
pageContext
- jsp page contextpublic javax.servlet.ServletContext getServletContext()
getServletContext
in interface WebContext
public void login()
public void logout()
logout
in interface UserContext
logout
in class UserContextImpl
release()
public void release()
release
in class AbstractContext
protected void releaseJCRSessions()
public void pop()
pop
in interface WebContext
public void push(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
push
in interface WebContext
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.