|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.context.AbstractContext info.magnolia.context.UserContextImpl info.magnolia.context.WebContextImpl
public class WebContextImpl
Context implementation keeping track of the current request, response, servletContext and pageContext.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
protected AggregationState |
aggregationState
|
Fields inherited from class info.magnolia.context.AbstractContext |
---|
locale |
Fields inherited from interface info.magnolia.context.WebContext |
---|
ATTRIBUTE_REQUEST_CHARACTER_ENCODING, ATTRIBUTE_REQUEST_URI |
Fields inherited from interface info.magnolia.context.Context |
---|
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 Summary | |
---|---|
WebContextImpl()
Use init to initialize the object. |
Method Summary | |
---|---|
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. |
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. |
Methods inherited from class info.magnolia.context.UserContextImpl |
---|
getLocale, getUser, login, setLocaleFor |
Methods inherited from class info.magnolia.context.AbstractContext |
---|
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getAttributeStrategy, getHierarchyManager, getHierarchyManager, getMessages, getMessages, getQueryManager, getQueryManager, getRepositoryStrategy, isEmpty, keySet, put, putAll, remove, removeAttribute, setAttribute, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface info.magnolia.context.Context |
---|
getAccessManager, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getHierarchyManager, getHierarchyManager, getLocale, getMessages, getMessages, getQueryManager, getQueryManager, getUser, removeAttribute, setAttribute, setLocale |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Field Detail |
---|
protected AggregationState aggregationState
Constructor Detail |
---|
public WebContextImpl()
Method Detail |
---|
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
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |