|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.cetia4.controller.rest.AbstractServletRequestContext
public abstract class AbstractServletRequestContext
Web implementation of a servlet request context. Provides the common methods for both web and web service request contexts.
| Field Summary |
|---|
| Fields inherited from interface com.acsinet_solutions.cetia4.controller.ControllerConstants |
|---|
_METHOD_PARAM, _PAGE_PARAM, _ROOT_PARAM, DEFAULT_VIEW, ERROR_URL, ERROR_VIEW, LOAD_CANCEL, LOAD_CURRENT, LOAD_DEFAULT, LOAD_ERROR, LOAD_PREVIOUS |
| Fields inherited from interface com.acsinet_solutions.cetia4.controller.AttributeKeys |
|---|
_BUNDLE_KEY, _CONFIGURATION_KEY, _DEFAULT_CONTROLLER_KEY, _FORM_ACTION_KEY, _FORM_ATTRIBUTE_KEY, _LOCALE_KEY, _MESSAGE_KEY, _NAVIGATION_FLOW_KEY, _PORTAL_PATH_KEY, _RENDER_PARAMETERS_KEY, _SERVICE_LOCATOR_KEY, _SESSION_KEY, _SYSTEM_EXCEPTION_KEY, _VALIDATION_EXCEPTION_KEY |
| Constructor Summary | |
|---|---|
protected |
AbstractServletRequestContext(java.lang.String requestType,
javax.servlet.ServletConfig config,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Configuration configuration)
Protected constructor, for use by implementations. |
| Method Summary | |
|---|---|
void |
display(java.lang.String view)
This implementation sets headers to prevent caching of dynamic responses, and performs a forward to the provided view. |
java.lang.Object |
getAttribute(Scope scope,
java.lang.String key)
Get an attribute from the given scope. |
Configuration |
getConfiguration()
Get a reference to the not-null configuration of the current module |
java.lang.Object |
getContextAttribute(java.lang.String key)
Get an application attribute |
java.lang.String |
getContextPath()
Convenience method for obtaining the context path. |
java.util.List<org.apache.commons.fileupload.FileItem> |
getItems()
This method throws an exception if called on a not-multipart request. |
java.lang.String |
getMethod()
Get the not null String method to be executed by the current call. |
Link |
getNavigationLink()
Obtain a link to the current render request, including all paramters provided. |
java.lang.String |
getParameter(java.lang.String param)
Get a parameter for the given source |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap()
Obtain the parameter map associated to a parameter request. |
java.util.List<java.lang.String> |
getPathInfo()
Get the path info as a list of Strings. |
java.lang.Object |
getRequestAttribute(java.lang.String key)
Get a request attribute |
java.lang.String |
getRequestedController()
Get the requested controller with path info, not containing context path nor query String. |
java.lang.String |
getRequestedPage()
Get the requested page, containing all request string with path info and query string. |
java.lang.String |
getRequestedURI()
Get the requested page, containing all request string with path info but no query string. |
java.lang.String |
getRequestType()
Get the request type; it may be any constant of the RequestType interface or a custom request type ( although extensibility mechanisms are still not provided in this version ). |
SecurityContext |
getSecurityContext()
Get the security context associated to the current request. |
javax.servlet.ServletConfig |
getServletConfig()
Get a reference to the servlet config |
javax.servlet.ServletContext |
getServletContext()
Get a reference to the servlet context |
javax.servlet.http.HttpServletRequest |
getServletRequest()
Get a reference to the servlet request. |
javax.servlet.http.HttpServletResponse |
getServletResponse()
Get a reference to the servlet response. |
javax.servlet.http.HttpSession |
getServletSession()
Get a reference to the servlet session |
void |
invalidateSession()
Invalidate the current session. |
boolean |
isMultipart()
Check if the current request is multipart or not. |
void |
redirectTo(java.lang.String url)
Perform a redirection. |
void |
removeAttribute(Scope scope,
java.lang.String key)
Remove an attribute on the given scope. |
void |
removeContextAttribute(java.lang.String key)
Remove an application attribute |
void |
removeRequestAttribute(java.lang.String key)
Remove a request attribute |
boolean |
sessionExists()
Check if the session exists or not. |
void |
setAttribute(Scope scope,
java.lang.String key,
java.lang.Object value)
Set an attribute on the given scope. |
void |
setContextAttribute(java.lang.String key,
java.lang.Object attribute)
Set an application attribute |
void |
setFormAttribute(java.lang.Object bean)
Sets the FORM_ATTRIBUTE object. |
void |
setMessage(java.lang.String message)
Set a message in portlet or session level. |
void |
setRenderParameter(java.lang.String name,
java.lang.Object value)
Set a render parameter. |
void |
setRequestAttribute(java.lang.String key,
java.lang.Object attribute)
Set a request attribute |
void |
setSystemException(java.lang.Exception exception)
Set a system exception in portlet or session level. |
void |
setValidationException(java.lang.Exception exception)
Set a validation exception in portlet or session level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.acsinet_solutions.cetia4.controller.RenderContext |
|---|
isNewForm |
| Constructor Detail |
|---|
protected AbstractServletRequestContext(java.lang.String requestType,
javax.servlet.ServletConfig config,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Configuration configuration)
| Method Detail |
|---|
public Configuration getConfiguration()
RequestContext
getConfiguration in interface RequestContextpublic java.lang.String getRequestType()
RequestContext
getRequestType in interface RequestContextRequestTypepublic final java.util.List<java.lang.String> getPathInfo()
RequestContext
getPathInfo in interface RequestContextpublic final java.lang.String getRequestedPage()
RequestContext
getRequestedPage in interface RequestContextControllerTools.getRequestedPage(HttpServletRequest)public final java.lang.String getRequestedURI()
RequestContext
getRequestedURI in interface RequestContextHttpServletRequest.getRequestURI()public final java.lang.String getRequestedController()
RequestContext
getRequestedController in interface RequestContextControllerTools.getRequestedController(HttpServletRequest)public final java.lang.String getContextPath()
RequestContext
getContextPath in interface RequestContext
public final void setContextAttribute(java.lang.String key,
java.lang.Object attribute)
RequestContext
setContextAttribute in interface RequestContext
public void setRequestAttribute(java.lang.String key,
java.lang.Object attribute)
RequestContext
setRequestAttribute in interface RequestContextpublic final void removeContextAttribute(java.lang.String key)
RequestContext
removeContextAttribute in interface RequestContextpublic final void removeRequestAttribute(java.lang.String key)
RequestContext
removeRequestAttribute in interface RequestContextpublic final java.lang.Object getContextAttribute(java.lang.String key)
RequestContext
getContextAttribute in interface RequestContextpublic final java.lang.Object getRequestAttribute(java.lang.String key)
RequestContext
getRequestAttribute in interface RequestContextpublic final void setSystemException(java.lang.Exception exception)
RequestContext
setSystemException in interface RequestContextAttributeKeys._SYSTEM_EXCEPTION_KEYpublic final void setValidationException(java.lang.Exception exception)
RequestContext
setValidationException in interface RequestContextAttributeKeys._VALIDATION_EXCEPTION_KEYpublic final void setMessage(java.lang.String message)
RequestContext
setMessage in interface RequestContextAttributeKeys._MESSAGE_KEY,
CompoundMessagepublic final java.lang.String getParameter(java.lang.String param)
ParameterAccessor
getParameter in interface ParameterAccessorpublic final java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
ParameterAccessor
getParameterMap in interface ParameterAccessorpublic final void setFormAttribute(java.lang.Object bean)
RequestContext
setFormAttribute in interface RequestContextAttributeKeys._FORM_ATTRIBUTE_KEY,
FormAttribute
public final java.lang.Object getAttribute(Scope scope,
java.lang.String key)
RequestContext
getAttribute in interface RequestContext
public final void setAttribute(Scope scope,
java.lang.String key,
java.lang.Object value)
RequestContext
setAttribute in interface RequestContext
public final void removeAttribute(Scope scope,
java.lang.String key)
RequestContext
removeAttribute in interface RequestContextpublic final java.lang.String getMethod()
RequestContext
getMethod in interface RequestContextControllerConstants._METHOD_PARAM,
METHOD_PREFIX
public final void redirectTo(java.lang.String url)
throws java.io.IOException
RequestContext
redirectTo in interface RequestContextjava.io.IOExceptionpublic boolean sessionExists()
RequestContext
sessionExists in interface RequestContextpublic void invalidateSession()
RequestContext
invalidateSession in interface RequestContextpublic final SecurityContext getSecurityContext()
RequestContext
getSecurityContext in interface RequestContextpublic final Link getNavigationLink()
RenderContext
getNavigationLink in interface RenderContextNavigationStage
public final void display(java.lang.String view)
throws java.io.IOException,
SystemException
display in interface RenderContextjava.io.IOException
SystemException
public final void setRenderParameter(java.lang.String name,
java.lang.Object value)
ActionContext
setRenderParameter in interface ActionContextpublic final boolean isMultipart()
ActionContext
isMultipart in interface ActionContextpublic java.util.List<org.apache.commons.fileupload.FileItem> getItems()
getItems in interface MultipartContextpublic final javax.servlet.ServletConfig getServletConfig()
ServletRequestContext
getServletConfig in interface ServletRequestContextpublic final javax.servlet.ServletContext getServletContext()
ServletRequestContext
getServletContext in interface ServletRequestContextpublic final javax.servlet.http.HttpSession getServletSession()
ServletRequestContext
getServletSession in interface ServletRequestContextpublic final javax.servlet.http.HttpServletRequest getServletRequest()
ServletRequestContext
getServletRequest in interface ServletRequestContextpublic final javax.servlet.http.HttpServletResponse getServletResponse()
ServletRequestContext
getServletResponse in interface ServletRequestContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||