|
Weaver 3.1.0a1-D1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oldlight.weaver.interpreter.WeaverRequestContextImpl
Representation of a request (GET/POST) in Weaver.
Field Summary | |
private Map |
cookiesMap
|
private Map |
headerMap
|
private Map |
headerValuesMap
|
private Map |
parameterMap
|
private Map |
parameterValuesMap
|
private HttpServletRequest |
request
|
private HashMap |
uploadedFiles
|
Constructor Summary | |
WeaverRequestContextImpl(HttpServletRequest theRequest)
Create a new WeaverRequestContextImpl. |
Method Summary | |
void |
addUploadedFile(WeaverUploadedFileImpl uploadedFile)
|
void |
cleanUpUploadedFiles()
|
Object |
getAttribute(String name)
Get a request scoped attribute. |
Map |
getAttributeMap()
Get a map of request scoped attribute names to values. |
String |
getCharacterEncoding()
Returns the character encoding associated with the request. |
int |
getContentLength()
Get the length of the request. |
String |
getContentType()
Returns the content type (MIME type) associated with the request. |
Cookie[] |
getCookies()
Returns the Cookies associated with the request. |
Map |
getCookiesMap()
|
long |
getDateHeader(String name)
Gets a named request header as a Date. |
String |
getHeader(String name)
Gets a named request header as a String. |
Map |
getHeaderMap()
Get a map of header names to single values. |
Enumeration |
getHeaderNames()
Gets an Enumeration of the names of all header associated with the request. |
Enumeration |
getHeaders(String name)
Get an Enumeration of all the headers with a given name associated with the requested. |
Map |
getHeaderValuesMap()
Get a map of header names to values. |
InputStream |
getInputStream()
Returns an InputStream on to the request contents. |
int |
getIntHeader(String name)
Gets a name request header as an int. |
Locale |
getLocale()
Retruns the orimary locale associated with the request. |
Enumeration |
getLocales()
Returns all locales associated with the request. |
String |
getParameter(String theName)
Get a request parameter. |
Map |
getParameterMap()
Get a map of parameter names to single values. |
String[] |
getParameterValues(String theName)
Get a request parameter. |
Map |
getParameterValuesMap()
Get a map of parameter names to multiple values. |
Reader |
getReader()
Returns a Reader on to the request contents. |
WeaverUploadedFile |
getUploadedFile(String name)
Get an uploaded file |
Map |
getUploadedFilesMap()
|
void |
removeAttribute(String name)
Remove a scoped attribute. |
void |
setAttribute(String name,
Object value)
Set a request scoped attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private HttpServletRequest request
private HashMap uploadedFiles
private Map parameterMap
private Map parameterValuesMap
private Map headerMap
private Map headerValuesMap
private Map cookiesMap
Constructor Detail |
public WeaverRequestContextImpl(HttpServletRequest theRequest)
theRequest
- The servlet request to wrap.Method Detail |
public void addUploadedFile(WeaverUploadedFileImpl uploadedFile)
public Map getUploadedFilesMap()
public void cleanUpUploadedFiles()
public WeaverUploadedFile getUploadedFile(String name)
WeaverRequestContext
getUploadedFile
in interface WeaverRequestContext
name
- The name of the parameter that contains the uploaded file.
public String getParameter(String theName)
getParameter
in interface WeaverRequestContext
theName
- The name of the parameter.
public String[] getParameterValues(String theName)
getParameterValues
in interface WeaverRequestContext
theName
- The name of the parameter to retrieve.
public Map getParameterMap()
public Map getParameterValuesMap()
public void setAttribute(String name, Object value)
setAttribute
in interface WeaverRequestContext
name
- The name of the attribute to set.value
- The value to set the attribute to.public Object getAttribute(String name)
getAttribute
in interface WeaverRequestContext
name
- The name of the attribute to retrieve.
public void removeAttribute(String name)
removeAttribute
in interface WeaverRequestContext
name
- The name of the attribute to remove.public Map getAttributeMap()
public String getContentType()
getContentType
in interface WeaverRequestContext
public String getCharacterEncoding()
getCharacterEncoding
in interface WeaverRequestContext
public Locale getLocale()
getLocale
in interface WeaverRequestContext
public Enumeration getLocales()
getLocales
in interface WeaverRequestContext
public Reader getReader() throws WeaverException
WeaverException
public InputStream getInputStream() throws WeaverException
WeaverException
public Cookie[] getCookies()
getCookies
in interface WeaverRequestContext
public long getDateHeader(String name)
getDateHeader
in interface WeaverRequestContext
name
- The name of the header to retrieve.
public String getHeader(String name)
getHeader
in interface WeaverRequestContext
name
- The name of the header to retrieve.
public int getIntHeader(String name)
getIntHeader
in interface WeaverRequestContext
name
- The name of the header to retrieve.
public Enumeration getHeaderNames()
getHeaderNames
in interface WeaverRequestContext
public Enumeration getHeaders(String name)
getHeaders
in interface WeaverRequestContext
name
- Name of the headers to retrieve.
public Map getHeaderMap()
public Map getHeaderValuesMap()
public int getContentLength()
getContentLength
in interface WeaverRequestContext
public Map getCookiesMap()
|
Copyright ©Paul Harvey | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |