|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
RunData is an interface to run-time information that is passed within Turbine. This provides the threading mechanism for the entire system because multiple requests can potentially come in at the same time. Thus, there is only one RunData implementation for each request that is being serviced.
Method Summary | |
void |
addMessage(org.apache.ecs.Element msg)
Adds the ECS element to message. |
void |
addMessage(java.lang.String msg)
Adds the string to message. |
void |
declareDirectResponse()
Declares that output will be direct to the response stream, even though getOut() may never be called. |
AccessControlList |
getACL()
Gets the access control list. |
java.lang.String |
getAction()
Gets the action. |
java.lang.String |
getCharSet()
Gets the charset. |
java.lang.String |
getContentType()
Gets the HTTP content type to return. |
java.lang.String |
getContextPath()
Gets the cached context path. |
CookieParser |
getCookies()
Gets the cookies. |
java.util.Map |
getDebugVariables()
Gets a Map of debug variables. |
java.util.Map |
getJNDIContexts()
Gets JNDI Contexts. |
java.lang.String |
getLayout()
If the Layout has not been defined by the screen then set the layout to be "DefaultLayout". |
java.lang.String |
getLayoutTemplate()
Convenience method for a template info that returns the layout template being used. |
java.util.Locale |
getLocale()
Gets the locale. |
java.lang.String |
getMessage()
Gets the results of an action or another message to be displayed as a string. |
org.apache.ecs.StringElement |
getMessageAsHTML()
Gets the results of an action or another message to be displayed as an ECS string element. |
FormMessages |
getMessages()
Gets a FormMessages object where all the messages to the user should be stored. |
java.io.PrintWriter |
getOut()
Deprecated. no replacement planned, response writer will not be cached |
org.apache.ecs.Document |
getPage()
Deprecated. no replacement planned, ECS is no longer a requirement |
ParameterParser |
getParameters()
Gets the parameters. |
java.lang.String |
getRedirectURI()
Gets the redirect URI. |
java.lang.String |
getRemoteAddr()
Gets the IP address of the client that sent the request. |
java.lang.String |
getRemoteHost()
Gets the qualified name of the client that sent the request. |
javax.servlet.http.HttpServletRequest |
getRequest()
Gets the servlet request. |
javax.servlet.http.HttpServletResponse |
getResponse()
Gets the servlet response. |
java.lang.String |
getScreen()
Gets the screen to execute. |
java.lang.String |
getScreenTemplate()
Convenience method for a template info that returns the name of the template being used. |
java.lang.String |
getScriptName()
Gets the cached script name. |
ServerData |
getServerData()
Gets the server data used by the request. |
java.lang.String |
getServerName()
Gets the cached server name. |
int |
getServerPort()
Gets the cached server port. |
java.lang.String |
getServerScheme()
Gets the cached server scheme. |
javax.servlet.ServletConfig |
getServletConfig()
Gets the servlet configuration used during servlet init. |
javax.servlet.ServletContext |
getServletContext()
Gets the servlet context used during servlet init. |
javax.servlet.http.HttpSession |
getSession()
Gets the servlet session information. |
java.lang.String |
getStackTrace()
Gets the stack trace if set. |
java.lang.Throwable |
getStackTraceException()
Gets the stack trace exception if set. |
int |
getStatusCode()
Gets the HTTP status code to return. |
SystemError[] |
getSystemErrors()
Gets an array of system errors. |
java.lang.String |
getTemplateEncoding()
Gets the character encoding to use for reading template files. |
TemplateInfo |
getTemplateInfo()
Gets the template info. |
java.lang.String |
getTitle()
Gets the title of the page. |
User |
getUser()
Gets the user. |
java.lang.String |
getUserAgent()
Get the user agent for the request. |
User |
getUserFromSession()
Attempts to get the user from the session. |
java.util.Map |
getVarDebug()
Deprecated. use getDebugVariables() instead |
boolean |
hasAction()
Whether or not an action has been defined. |
boolean |
hasMessage()
Whether or not a message has been defined. |
boolean |
hasScreen()
Whether or not a screen has been defined. |
boolean |
isOutSet()
Deprecated. no replacement planned, response writer will not be cached |
boolean |
isPageSet()
Deprecated. no replacement planned, ECS is no longer a requirement |
void |
populate()
Pulls a user object from the session and increments the access counter and sets the last access date for the object. |
boolean |
removeUserFromSession()
Allows one to invalidate the user in the default session. |
void |
save()
Saves a user object into the session. |
void |
setACL(AccessControlList acl)
Sets the access control list. |
void |
setAction(java.lang.String action)
Sets the action for the request. |
void |
setCharSet(java.lang.String charset)
Sets the charset. |
void |
setContentType(java.lang.String ct)
Sets the HTTP content type to return. |
void |
setDebugVariable(java.lang.String name,
java.lang.Object value)
Sets a name/value pair in an internal Map that is accessible from the Error screen. |
void |
setJNDIContexts(java.util.Map contexts)
Sets JNDI Contexts. |
void |
setLayout(java.lang.String layout)
Set the layout for the request. |
void |
setLayoutTemplate(java.lang.String layout)
Modifies the layout template for the screen. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setMessage(org.apache.ecs.Element msg)
Sets the message for the request as an ECS element. |
void |
setMessage(java.lang.String msg)
Sets the message for the request as a string. |
void |
setMessages(FormMessages msgs)
Sets the FormMessages object for the request. |
void |
setRedirectURI(java.lang.String ruri)
Sets the redirect uri. |
void |
setScreen(java.lang.String screen)
Sets the screen for the request. |
void |
setScreenTemplate(java.lang.String screen)
Sets the screen template for the request. |
void |
setStackTrace(java.lang.String trace,
java.lang.Throwable exp)
Sets the stack trace. |
void |
setStatusCode(int sc)
Sets the HTTP status code to return. |
void |
setSystemError(SystemError err)
Adds a critical system error. |
void |
setTemplateEncoding(java.lang.String encoding)
Sets the character encoding to use for reading template files. |
void |
setTitle(java.lang.String title)
Sets the title of the page. |
void |
setUser(User user)
Sets the user. |
void |
unsetMessage()
Unsets the message for the request. |
boolean |
userExists()
Checks if a user exists in this session. |
Method Detail |
public ParameterParser getParameters()
public CookieParser getCookies()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpSession getSession()
public javax.servlet.ServletConfig getServletConfig()
public javax.servlet.ServletContext getServletContext()
public AccessControlList getACL()
public void setACL(AccessControlList acl)
acl
- an access control list.public boolean isPageSet()
public org.apache.ecs.Document getPage()
public boolean hasAction()
public java.lang.String getAction()
public void setAction(java.lang.String action)
action
- a atring.public java.lang.String getLayout()
public void setLayout(java.lang.String layout)
layout
- a string.public java.lang.String getLayoutTemplate()
public void setLayoutTemplate(java.lang.String layout)
layout
- a layout template.public boolean hasScreen()
public java.lang.String getScreen()
public void setScreen(java.lang.String screen)
screen
- a string.public java.lang.String getScreenTemplate()
public void setScreenTemplate(java.lang.String screen)
screen
- a screen template.public java.lang.String getTemplateEncoding()
public void setTemplateEncoding(java.lang.String encoding)
encoding
- the template encoding.public TemplateInfo getTemplateInfo()
public boolean hasMessage()
public java.lang.String getMessage()
public void setMessage(java.lang.String msg)
msg
- a string.public void addMessage(java.lang.String msg)
msg
- a string.public org.apache.ecs.StringElement getMessageAsHTML()
public void setMessage(org.apache.ecs.Element msg)
msg
- an element.public void addMessage(org.apache.ecs.Element msg)
msg
- an element.public void unsetMessage()
public FormMessages getMessages()
public void setMessages(FormMessages msgs)
msgs
- A FormMessages.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- a string.public boolean userExists()
public User getUser()
public void setUser(User user)
user
- a user.public User getUserFromSession()
public boolean removeUserFromSession()
public boolean isOutSet()
public java.io.PrintWriter getOut() throws java.io.IOException
java.io.IOException
public void declareDirectResponse()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
locale
- the new locale.public java.lang.String getCharSet()
public void setCharSet(java.lang.String charset)
charset
- the name of the new charset.public java.lang.String getContentType()
public void setContentType(java.lang.String ct)
ct
- the new content type.public java.lang.String getRedirectURI()
public void setRedirectURI(java.lang.String ruri)
ruri
- a string.public int getStatusCode()
public void setStatusCode(int sc)
sc
- the status.public SystemError[] getSystemErrors()
public void setSystemError(SystemError err)
err
- a system error.public java.util.Map getJNDIContexts()
public void setJNDIContexts(java.util.Map contexts)
contexts
- a hashtable.public java.lang.String getServerScheme()
public java.lang.String getServerName()
public int getServerPort()
public java.lang.String getContextPath()
public java.lang.String getScriptName()
public ServerData getServerData()
public java.lang.String getRemoteAddr()
public java.lang.String getRemoteHost()
public java.lang.String getUserAgent()
public void populate()
public void save()
public java.lang.String getStackTrace()
public java.lang.Throwable getStackTraceException()
public void setStackTrace(java.lang.String trace, java.lang.Throwable exp)
trace
- the stack trace.exp
- the exception.public java.util.Map getVarDebug()
getDebugVariables()
instead
public void setDebugVariable(java.lang.String name, java.lang.Object value)
name
- name of the variablevalue
- value of the variable.public java.util.Map getDebugVariables()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |