|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.framework.ResponseBean
public class ResponseBean
Constructor Summary | |
---|---|
ResponseBean(ResponseTrans res)
Creates a new ResponseBean object. |
Method Summary | |
---|---|
void |
abort()
Rollback the current database transaction and abort execution. |
void |
addDateHeader(java.lang.String name,
java.util.Date value)
Proxy to HttpServletResponse.addDateHeader() |
void |
addHeader(java.lang.String name,
java.lang.String value)
Proxy to HttpServletResponse.addHeader() |
void |
commit()
Commit changes made during the course of the current transaction and start a new one |
void |
debug(java.lang.String message)
add an HTML formatted debug message to the end of the page. |
void |
dependsOn(java.lang.String what)
Add an item to this response's dependencies. |
void |
digest()
Digest this response's dependencies to conditionally create a HTTP not-modified response |
void |
encode(java.lang.Object obj)
Write an object to the response buffer by converting it to a string and then HTML-encoding it. |
void |
encodeForm(java.lang.Object obj)
Write an object to the response buffer by converting it to a string and then encoding it for form/text area content use. |
void |
encodeXml(java.lang.Object obj)
Write an object to the response buffer by converting it to a string and then XML-encoding it. |
void |
format(java.lang.Object obj)
Write an object to the response buffer by converting it to a string and then HTML-formatting it. |
void |
forward(java.lang.String url)
Internally forward the request to a different URL |
java.lang.String |
getBuffer()
Returns the current response buffer as string. |
boolean |
getCache()
Return the current cachability setting for this response |
java.lang.String |
getCharset()
Get the current charset/encoding name for the response |
java.lang.String |
getContentType()
Get the current content type name for the response |
java.util.Map |
getData()
Get the data map for the response |
java.lang.String |
getError()
Get the current error message for the response, if any |
java.lang.String |
getETag()
Get the ETag for this response |
java.lang.Throwable |
getException()
Get the uncaught exception for the response, if any |
java.util.Map |
getHandlers()
Get the macro handlers map for the response |
java.lang.String |
getJavaStack()
Get the Java stack trace of an uncaught exception. |
java.util.Date |
getLastModified()
Get the last modified date for this response |
java.lang.String |
getMessage()
Get the current message for the response, if set |
java.util.Map |
getMeta()
Get the meta map for the response |
java.lang.String |
getRealm()
Get the HTTP authentication realm for the response |
java.lang.String |
getScriptStack()
Return the Javascript stack trace of an uncought exception. |
javax.servlet.http.HttpServletResponse |
getServletResponse()
Returns the ServletResponse instance for this Response. |
java.lang.Object[] |
getSkinpath()
Get the skin search path for the response |
int |
getStatus()
Get the HTTP status code for this response |
java.lang.String |
pop()
Pop a string buffer from the response object containing all the writes since the last pushBuffer |
java.lang.StringBuffer |
popBuffer()
Pops the current response buffer without converting it to a string |
java.lang.String |
popStringBuffer()
Deprecated. |
void |
push()
Push a string buffer on the response object. |
java.lang.StringBuffer |
pushBuffer()
Push a string buffer on the response object. |
java.lang.StringBuffer |
pushBuffer(java.lang.StringBuffer buffer)
Push a string buffer on the response object. |
void |
pushStringBuffer()
Deprecated. |
void |
redirect(java.lang.String url)
Redirect the request to a different URL |
void |
reset()
Reset the response object, clearing all content previously written to it |
void |
resetBuffer()
Reset the response buffer, clearing all content previously written to it |
void |
rollback()
Rollback the current transaction and start a new one. |
void |
setCache(boolean cache)
Set true cachability setting for this response |
void |
setCharset(java.lang.String charset)
Set the charset/encoding name for the response |
void |
setContentType(java.lang.String contentType)
Set the content type for the response |
void |
setCookie(java.lang.String key,
java.lang.String value)
Set a HTTP cookie with the name and value that is discarded when the HTTP client is closed |
void |
setCookie(java.lang.String key,
java.lang.String value,
int days)
Set a HTTP cookie with the name and value that is stored by the HTTP client for the given number of days. |
void |
setCookie(java.lang.String key,
java.lang.String value,
int days,
java.lang.String path)
Set a HTTP cookie with the name and value that is only applied to the URLs matching the given path and is stored by the HTTP client for the given number of days. |
void |
setCookie(java.lang.String key,
java.lang.String value,
int days,
java.lang.String path,
java.lang.String domain)
Set a HTTP cookie with the name and value that is only applied to the URLs matching the given path and is stored by the HTTP client for the given number of days. |
void |
setDateHeader(java.lang.String name,
java.util.Date value)
Proxy to HttpServletResponse.setDateHeader() |
void |
setETag(java.lang.String etag)
Set the HTTP Etag for this response |
void |
setHeader(java.lang.String name,
java.lang.String value)
Proxy to HttpServletResponse.setHeader() |
void |
setLastModified(java.util.Date date)
Set the last modified date for this response |
void |
setMessage(java.lang.String message)
Set the message property for the response |
void |
setRealm(java.lang.String realm)
Set the HTTP authentication realm for the response |
void |
setSkinpath(java.lang.Object[] arr)
Set the skin search path for the response |
void |
setStatus(int status)
Set the HTTP status code for this response |
void |
stop()
Immediately stop processing the current request |
java.lang.String |
toString()
Return a string representation for this object |
void |
unsetCookie(java.lang.String key)
Unset a previously set HTTP cookie, causing it to be discarded immedialtely by the HTTP client. |
void |
write(java.lang.String str)
Directly write a string to the response buffer without any transformation. |
void |
writeBinary(byte[] bytes)
Directly write a byte array to the response buffer without any transformation. |
void |
writeln()
Write a platform dependent newline sequence to response buffer. |
void |
writeln(java.lang.String str)
Write string to response buffer and append a platform dependent newline sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResponseBean(ResponseTrans res)
res
- the wrapped ResponseTransMethod Detail |
---|
public void encode(java.lang.Object obj)
obj
- the object to write to the response bufferpublic void encodeXml(java.lang.Object obj)
obj
- the object to write to the response bufferpublic void encodeForm(java.lang.Object obj)
obj
- the object to write to the response bufferpublic void format(java.lang.Object obj)
obj
- the object to write to the response bufferpublic void redirect(java.lang.String url) throws RedirectException
url
- the URL to redirect to
RedirectException
- to immediately terminate the requestpublic void forward(java.lang.String url) throws RedirectException
url
- the URL to forward to
RedirectException
- to immediately terminate the requestpublic void stop() throws RedirectException
RedirectException
- to immediately terminate the requestpublic void reset()
public void resetBuffer()
public javax.servlet.http.HttpServletResponse getServletResponse()
public void setCookie(java.lang.String key, java.lang.String value)
key
- the cookie namevalue
- the cookie valuepublic void setCookie(java.lang.String key, java.lang.String value, int days)
key
- the cookie namevalue
- the cookie valuedays
- number of days the cookie should be storedpublic void setCookie(java.lang.String key, java.lang.String value, int days, java.lang.String path)
key
- the cookie namevalue
- the cookie valuedays
- number of days the cookie should be storedpath
- the URL path to apply the cookie topublic void setCookie(java.lang.String key, java.lang.String value, int days, java.lang.String path, java.lang.String domain)
key
- the cookie namevalue
- the cookie valuedays
- number of days the cookie should be storedpath
- the URL path to apply the cookie todomain
- domainpublic void unsetCookie(java.lang.String key)
key
- the name of the cookie to be discardedpublic void write(java.lang.String str)
str
- the string to write to the response bufferpublic void writeln(java.lang.String str)
str
- the string to write to the response bufferpublic void writeln()
public void writeBinary(byte[] bytes)
bytes
- the string to write to the response bufferpublic void debug(java.lang.String message)
message
- the messagepublic java.lang.String toString()
toString
in class java.lang.Object
public boolean getCache()
public void setCache(boolean cache)
cache
- true if the response may be cached by the HTTP client, false otherwisepublic java.lang.String getCharset()
public void setCharset(java.lang.String charset)
charset
- The charset namepublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType
- The charset namepublic void addHeader(java.lang.String name, java.lang.String value)
name
- the header namevalue
- the header valuepublic void addDateHeader(java.lang.String name, java.util.Date value)
name
- the header namevalue
- the header valuepublic void setHeader(java.lang.String name, java.lang.String value)
name
- the header namevalue
- the header valuepublic void setDateHeader(java.lang.String name, java.util.Date value)
name
- the header namevalue
- the header valuepublic java.util.Map getData()
public java.util.Map getHandlers()
public java.util.Map getMeta()
public java.lang.String getError()
public java.lang.Throwable getException()
public java.lang.String getScriptStack()
public java.lang.String getJavaStack()
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the message propertypublic java.lang.String getRealm()
public void setRealm(java.lang.String realm)
realm
- the HTTP authentication realmpublic void setSkinpath(java.lang.Object[] arr)
arr
- an array containing files or nodes containing skinspublic java.lang.Object[] getSkinpath()
public int getStatus()
public void setStatus(int status)
status
- the HTTP status codepublic java.util.Date getLastModified()
public void setLastModified(java.util.Date date)
date
- the last modified datepublic java.lang.String getETag()
public void setETag(java.lang.String etag)
etag
- the HTTP ETagpublic void dependsOn(java.lang.String what)
what
- a string item this response depends onpublic void digest()
public void push()
public java.lang.String pop()
public void pushStringBuffer()
public java.lang.String popStringBuffer()
public java.lang.StringBuffer pushBuffer(java.lang.StringBuffer buffer)
buffer
- the string buffer
public java.lang.StringBuffer pushBuffer()
public java.lang.StringBuffer popBuffer()
public java.lang.String getBuffer()
public void commit() throws java.lang.Exception
java.lang.Exception
- thrown if commit failspublic void rollback() throws java.lang.Exception
java.lang.Exception
- thrown if rollback failspublic void abort() throws AbortException
AbortException
- thrown to exit the the current execution
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |