|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LoomServletRequest
An enhanced implementation of the HttpServletRequest interface
| Field Summary |
|---|
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Method Summary | |
|---|---|
void |
addFileParameter(java.lang.String name,
FileParameter item)
Add an uploaded file parameter |
void |
addStringParameter(java.lang.String name,
java.lang.String value)
Add a String parameter |
UrlBuilder |
createUrl()
Creates a new empty UrlBuilder |
UrlBuilder |
createUrl(java.lang.Class<? extends Action> actionClass,
java.lang.String event)
Creates a new UrlBuilder pointing to the provided action and event |
UrlBuilder |
createUrl(java.lang.String url)
Creates a new UrlBuilder pointing to the provided raw url |
java.lang.String |
generateId(java.lang.String prefix)
Generates a valid HTML id starting with prefix. |
java.lang.String |
generateIndex(java.lang.String name)
Generate a correlative index for the field passed as argument, in the form: field[0], field[1], etc. |
ActionMappingRepository |
getActionMappingRepository()
|
boolean |
getAttributeAsBoolean(java.lang.String attributeName)
|
BrowserData |
getBrowserData()
|
javax.servlet.http.Cookie |
getCookie(java.lang.String cookieName)
|
FormTag |
getCurrentForm()
TODO: this method should be moved elsewhere |
FileParameter |
getFileParameter(java.lang.String name)
|
HttpMethod |
getHttpMethod()
|
MessagesRepository |
getMessagesRepository()
|
FlashContext |
getNextFlashContext(boolean create)
Return the flash-scoped context with objects persisted for the NEXT browser request. |
ParsedAction |
getParsedAction()
|
FlashContext |
getPreviousFlashContext()
Return the flash-scoped context with objects persisted from the PREVIOUS browser request. |
ServletRequestParameters |
getRequestParameters()
|
java.lang.String |
getRequestUrlWithParameters()
Deprecated. use toUrlBuilder().getURL() instead |
java.lang.Object |
getScopedAttribute(java.lang.String name,
Scope... scopes)
Get a scoped attribute |
java.lang.String |
getStringParameter(java.lang.String name)
|
boolean |
isAjax()
Return true if the current request has been launched using Ajax. |
void |
removeScopedAttribute(java.lang.String name,
Scope scope)
Remove a scoped atribute |
void |
setCurrentForm(FormTag currentForm)
|
void |
setScopedAttribute(java.lang.String name,
java.lang.Object value,
Scope scope)
Create a scoped atribute |
UrlBuilder |
toUrlBuilder()
Create a UrlBuilder instance with the same action/event/rawUrl and all the parameters
included in this request instance. |
| 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, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
| Method Detail |
|---|
MessagesRepository getMessagesRepository()
ParsedAction getParsedAction()
FormTag getCurrentForm()
void setCurrentForm(FormTag currentForm)
java.lang.String generateId(java.lang.String prefix)
prefix - the prefix to use to generate the id
java.lang.String generateIndex(java.lang.String name)
void addFileParameter(java.lang.String name,
FileParameter item)
name - the file parameter nameitem - the uploaded file to add to this request
void addStringParameter(java.lang.String name,
java.lang.String value)
name - the name of the parametervalue - the value of the parameterServletRequestParameters getRequestParameters()
ServletRequestParameters instance with all file upload parameters and
plain parameters in a single map.java.lang.String getStringParameter(java.lang.String name)
FileParameter getFileParameter(java.lang.String name)
javax.servlet.http.Cookie getCookie(java.lang.String cookieName)
cookieName - the name of the cookie
java.lang.String getRequestUrlWithParameters()
java.lang.RuntimeException - if the request include any uploaded files.boolean isAjax()
boolean getAttributeAsBoolean(java.lang.String attributeName)
BrowserData getBrowserData()
void setScopedAttribute(java.lang.String name,
java.lang.Object value,
Scope scope)
name - the attribute namevalue - the valuescope - the scope of the attribute. Scope.PAGE is not allowed.
java.lang.Object getScopedAttribute(java.lang.String name,
Scope... scopes)
name - the attribute namescopes - the list of scopes to inspect, null for all. Scope.PAGE is not allowed.
void removeScopedAttribute(java.lang.String name,
Scope scope)
name - the attribute namescope - the scope of the attribute. Scope.PAGE is not allowed.HttpMethod getHttpMethod()
UrlBuilder toUrlBuilder()
UrlBuilder instance with the same action/event/rawUrl and all the parameters
included in this request instance. Any file parameters will be lost.
UrlBuilder instance.UrlBuilder createUrl()
UrlBuilder
UrlBuilder createUrl(java.lang.Class<? extends Action> actionClass,
java.lang.String event)
UrlBuilder pointing to the provided action and event
UrlBuilder createUrl(java.lang.String url)
UrlBuilder pointing to the provided raw url
FlashContext getNextFlashContext(boolean create)
create - if true, create the flash context if it does not yet exist.FlashContext getPreviousFlashContext()
ActionMappingRepository getActionMappingRepository()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||