|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ooweb.http.ResponseState
public class ResponseState
ResponseState can be returned by any controller method in order to have the framework set cookies, update or invalidate a session and take advantage of the inbuilt templating support (depending on the version of Ooweb in use)
Constructor Summary | |
---|---|
ResponseState()
|
Method Summary | |
---|---|
void |
addCookie(Cookie cookie)
|
void |
addCookie(java.lang.String name,
java.lang.String value)
convenience cookie creation method that uses default values for the expires, path, secure and domain values |
void |
deleteCookie(java.lang.String cookieName)
|
java.util.List<java.lang.Object> |
getBody()
|
java.util.List<Cookie> |
getCookies()
|
java.lang.String |
getMimeType()
|
java.lang.String |
getNextLocation()
|
int |
getNumCookies()
|
void |
invalidateSession()
deletes the session cookie from the next response - effectively invalidating the session |
boolean |
isRedirect()
|
void |
sendRedirect(java.lang.String nextLocation)
creates a response that instructs the client to request a new page from the site |
void |
setBody(java.lang.Object body)
adds to the list of body sections that will eventually be streamed as a whole |
void |
setMimeType(java.lang.String mimeType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResponseState()
Method Detail |
---|
public void addCookie(Cookie cookie)
cookie
- the cookie to add to the outgoing responsepublic void addCookie(java.lang.String name, java.lang.String value)
name
- the name of the cookie to addvalue
- the value of the cookie to place in the responsepublic void deleteCookie(java.lang.String cookieName)
cookieName
- the name of the cookie to remove from the clientpublic void invalidateSession()
public void setBody(java.lang.Object body)
body
- the output of the responsepublic void setMimeType(java.lang.String mimeType)
mimeType
- override the default mime type of the responsepublic void sendRedirect(java.lang.String nextLocation)
nextLocation
- the URL to request. Should be fully qualifiedpublic java.util.List<java.lang.Object> getBody()
public java.lang.String getMimeType()
public int getNumCookies()
public java.util.List<Cookie> getCookies()
public java.lang.String getNextLocation()
public boolean isRedirect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |