Java Doc for RunData.java in  » Web-Framework » TURBINE » org » apache » turbine » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » TURBINE » org.apache.turbine.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.turbine.util.RunData

RunData
public interface RunData (Code)
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.
author:
   Ilkka Priha
author:
   Jon S. Stevens
author:
   Bernie Hoeneisen
author:
   Daniel Rall
author:
   Quinton McCombs
version:
   $Id: RunData.java 534527 2007-05-02 16:10:59Z tv $




Method Summary
 voidaddMessage(String msg)
     Adds the string to message.
 voidaddMessage(Element msg)
     Adds the ECS element to message.
 voiddeclareDirectResponse()
     Declares that output will be direct to the response stream, even though getOut() may never be called.
 AccessControlListgetACL()
     Gets the access control list.
 StringgetAction()
     Gets the action.
 StringgetCharSet()
     Gets the charset.
 StringgetContentType()
     Gets the HTTP content type to return.
 StringgetContextPath()
     Gets the cached context path.
 CookieParsergetCookies()
     Gets the cookies.
 MapgetDebugVariables()
     Gets a Map of debug variables.
 MapgetJNDIContexts()
     Gets JNDI Contexts.
 StringgetLayout()
     If the Layout has not been defined by the screen then set the layout to be "DefaultLayout".
 StringgetLayoutTemplate()
     Convenience method for a template info that returns the layout template being used.
 LocalegetLocale()
     Gets the locale.
 StringgetMessage()
     Gets the results of an action or another message to be displayed as a string.
 StringElementgetMessageAsHTML()
     Gets the results of an action or another message to be displayed as an ECS string element.
 FormMessagesgetMessages()
     Gets a FormMessages object where all the messages to the user should be stored.
 PrintWritergetOut()
     Gets the print writer.
 DocumentgetPage()
     Gets the page.
 ParameterParsergetParameters()
     Gets the parameters.
 StringgetRedirectURI()
     Gets the redirect URI.
 StringgetRemoteAddr()
     Gets the IP address of the client that sent the request.
 StringgetRemoteHost()
     Gets the qualified name of the client that sent the request.
 HttpServletRequestgetRequest()
     Gets the servlet request.
 HttpServletResponsegetResponse()
     Gets the servlet response.
 StringgetScreen()
     Gets the screen to execute.
 StringgetScreenTemplate()
     Convenience method for a template info that returns the name of the template being used.
 StringgetScriptName()
     Gets the cached script name.
 ServerDatagetServerData()
     Gets the server data used by the request.
 StringgetServerName()
     Gets the cached server name.
 intgetServerPort()
     Gets the cached server port.
 StringgetServerScheme()
     Gets the cached server scheme.
 ServletConfiggetServletConfig()
     Gets the servlet configuration used during servlet init.
 ServletContextgetServletContext()
     Gets the servlet context used during servlet init.
 HttpSessiongetSession()
     Gets the servlet session information.
 StringgetStackTrace()
     Gets the stack trace if set.
 ThrowablegetStackTraceException()
     Gets the stack trace exception if set.
 intgetStatusCode()
     Gets the HTTP status code to return.
 SystemError[]getSystemErrors()
     Gets an array of system errors.
 StringgetTemplateEncoding()
     Gets the character encoding to use for reading template files.
 TemplateInfogetTemplateInfo()
     Gets the template info.
 StringgetTitle()
     Gets the title of the page.
 UsergetUser()
     Gets the user.
 StringgetUserAgent()
     Get the user agent for the request.
 UsergetUserFromSession()
     Attempts to get the user from the session.
 MapgetVarDebug()
     Gets a table of debug variables.
 booleanhasAction()
     Whether or not an action has been defined.
 booleanhasMessage()
     Whether or not a message has been defined.
 booleanhasScreen()
     Whether or not a screen has been defined.
 booleanisOutSet()
     Checks to see if out is set.
 booleanisPageSet()
     Checks to see if the page is set.
 voidpopulate()
     Pulls a user object from the session and increments the access counter and sets the last access date for the object.
 booleanremoveUserFromSession()
     Allows one to invalidate the user in the default session.
 voidsave()
     Saves a user object into the session.
 voidsetACL(AccessControlList acl)
     Sets the access control list.
 voidsetAction(String action)
     Sets the action for the request.
 voidsetCharSet(String charset)
     Sets the charset.
 voidsetContentType(String ct)
     Sets the HTTP content type to return.
 voidsetDebugVariable(String name, Object value)
     Sets a name/value pair in an internal Map that is accessible from the Error screen.
 voidsetJNDIContexts(Map contexts)
     Sets JNDI Contexts.
 voidsetLayout(String layout)
     Set the layout for the request.
 voidsetLayoutTemplate(String layout)
     Modifies the layout template for the screen.
 voidsetLocale(Locale locale)
     Sets the locale.
 voidsetMessage(String msg)
     Sets the message for the request as a string.
 voidsetMessage(Element msg)
     Sets the message for the request as an ECS element.
 voidsetMessages(FormMessages msgs)
     Sets the FormMessages object for the request.
 voidsetRedirectURI(String ruri)
     Sets the redirect uri.
 voidsetScreen(String screen)
     Sets the screen for the request.
 voidsetScreenTemplate(String screen)
     Sets the screen template for the request.
 voidsetStackTrace(String trace, Throwable exp)
     Sets the stack trace.
 voidsetStatusCode(int sc)
     Sets the HTTP status code to return.
 voidsetSystemError(SystemError err)
     Adds a critical system error.
 voidsetTemplateEncoding(String encoding)
     Sets the character encoding to use for reading template files.
 voidsetTitle(String title)
     Sets the title of the page.
 voidsetUser(User user)
     Sets the user.
 voidunsetMessage()
     Unsets the message for the request.
 booleanuserExists()
     Checks if a user exists in this session.



Method Detail
addMessage
void addMessage(String msg)(Code)
Adds the string to message. If message has prior messages from other actions or screens, this method can be used to chain them.
Parameters:
  msg - a string.



addMessage
void addMessage(Element msg)(Code)
Adds the ECS element to message. If message has prior messages from other actions or screens, this method can be used to chain them.
Parameters:
  msg - an element.



declareDirectResponse
void declareDirectResponse()(Code)
Declares that output will be direct to the response stream, even though getOut() may never be called. Useful for response mechanisms that may call res.getWriter() themselves (such as JSP.)



getACL
AccessControlList getACL()(Code)
Gets the access control list. the access control list.



getAction
String getAction()(Code)
Gets the action. It returns an empty string if null so that it is easy to do conditionals on it based on the equalsIgnoreCase() method. a string, "" if null.



getCharSet
String getCharSet()(Code)
Gets the charset. If it has not already been defined with setCharSet(), then a property named "locale.default.charset" is checked from the Resource Service and returned. If this property is undefined, the default charset of the locale is returned. If the locale is undefined, null is returned. the name of the charset or null.



getContentType
String getContentType()(Code)
Gets the HTTP content type to return. If a charset has been specified, it is included in the content type. If the charset has not been specified and the main type of the content type is "text", the default charset is included. If the default charset is undefined, but the default locale is defined and it is not the US locale, a locale specific charset is included. the content type or an empty string.



getContextPath
String getContextPath()(Code)
Gets the cached context path. a string.



getCookies
CookieParser getCookies()(Code)
Gets the cookies. a cookie parser.



getDebugVariables
Map getDebugVariables()(Code)
Gets a Map of debug variables. a Map of debug variables.



getJNDIContexts
Map getJNDIContexts()(Code)
Gets JNDI Contexts. a hashtable.



getLayout
String getLayout()(Code)
If the Layout has not been defined by the screen then set the layout to be "DefaultLayout". The screen object can also override this method to provide intelligent determination of the Layout to execute. You can also define that logic here as well if you want it to apply on a global scale. For example, if you wanted to allow someone to define layout "preferences" where they could dynamicially change the layout for the entire site. a string.



getLayoutTemplate
String getLayoutTemplate()(Code)
Convenience method for a template info that returns the layout template being used. a string.



getLocale
Locale getLocale()(Code)
Gets the locale. If it has not already been defined with setLocale(), then properties named "locale.default.lang" and "locale.default.country" are checked from the Resource Service and the corresponding locale is returned. If these properties are undefined, JVM's default locale is returned. the locale.



getMessage
String getMessage()(Code)
Gets the results of an action or another message to be displayed as a string. a string.



getMessageAsHTML
StringElement getMessageAsHTML()(Code)
Gets the results of an action or another message to be displayed as an ECS string element. a string element.



getMessages
FormMessages getMessages()(Code)
Gets a FormMessages object where all the messages to the user should be stored. a FormMessages.



getOut
PrintWriter getOut() throws IOException(Code)
Gets the print writer. First time calling this will set the print writer via the response. a print writer.
throws:
  IOException -



getPage
Document getPage()(Code)
Gets the page. a document.



getParameters
ParameterParser getParameters()(Code)
Gets the parameters. a parameter parser.



getRedirectURI
String getRedirectURI()(Code)
Gets the redirect URI. If this is set, also make sure to set the status code to 302. a string, "" if null.



getRemoteAddr
String getRemoteAddr()(Code)
Gets the IP address of the client that sent the request. a string.



getRemoteHost
String getRemoteHost()(Code)
Gets the qualified name of the client that sent the request. a string.



getRequest
HttpServletRequest getRequest()(Code)
Gets the servlet request. the request.



getResponse
HttpServletResponse getResponse()(Code)
Gets the servlet response. the resposne.



getScreen
String getScreen()(Code)
Gets the screen to execute. a string.



getScreenTemplate
String getScreenTemplate()(Code)
Convenience method for a template info that returns the name of the template being used. a string.



getScriptName
String getScriptName()(Code)
Gets the cached script name. a string.



getServerData
ServerData getServerData()(Code)
Gets the server data used by the request. server data.



getServerName
String getServerName()(Code)
Gets the cached server name. a string.



getServerPort
int getServerPort()(Code)
Gets the cached server port. an int.



getServerScheme
String getServerScheme()(Code)
Gets the cached server scheme. a string.



getServletConfig
ServletConfig getServletConfig()(Code)
Gets the servlet configuration used during servlet init. the configuration.



getServletContext
ServletContext getServletContext()(Code)
Gets the servlet context used during servlet init. the context.



getSession
HttpSession getSession()(Code)
Gets the servlet session information. the session.



getStackTrace
String getStackTrace()(Code)
Gets the stack trace if set. the stack trace.



getStackTraceException
Throwable getStackTraceException()(Code)
Gets the stack trace exception if set. the stack exception.



getStatusCode
int getStatusCode()(Code)
Gets the HTTP status code to return. the status.



getSystemErrors
SystemError[] getSystemErrors()(Code)
Gets an array of system errors. a SystemError[].



getTemplateEncoding
String getTemplateEncoding()(Code)
Gets the character encoding to use for reading template files. the template encoding or null if not specified.



getTemplateInfo
TemplateInfo getTemplateInfo()(Code)
Gets the template info. Creates a new one if needed. a template info.



getTitle
String getTitle()(Code)
Gets the title of the page. a string.



getUser
User getUser()(Code)
Gets the user. a user.



getUserAgent
String getUserAgent()(Code)
Get the user agent for the request. a string.



getUserFromSession
User getUserFromSession()(Code)
Attempts to get the user from the session. If it does not exist, it returns null. a user.



getVarDebug
Map getVarDebug()(Code)
Gets a table of debug variables. a Map of debug variables.RunData.getDebugVariables



hasAction
boolean hasAction()(Code)
Whether or not an action has been defined. true if an action has been defined.



hasMessage
boolean hasMessage()(Code)
Whether or not a message has been defined. true if a message has been defined.



hasScreen
boolean hasScreen()(Code)
Whether or not a screen has been defined. true if a screen has been defined.



isOutSet
boolean isOutSet()(Code)
Checks to see if out is set. true if out is set.



isPageSet
boolean isPageSet()(Code)
Checks to see if the page is set. true if the page is set.



populate
void populate()(Code)
Pulls a user object from the session and increments the access counter and sets the last access date for the object.



removeUserFromSession
boolean removeUserFromSession()(Code)
Allows one to invalidate the user in the default session. true if user was invalidated.



save
void save()(Code)
Saves a user object into the session.



setACL
void setACL(AccessControlList acl)(Code)
Sets the access control list.
Parameters:
  acl - an access control list.



setAction
void setAction(String action)(Code)
Sets the action for the request.
Parameters:
  action - a atring.



setCharSet
void setCharSet(String charset)(Code)
Sets the charset.
Parameters:
  charset - the name of the new charset.



setContentType
void setContentType(String ct)(Code)
Sets the HTTP content type to return.
Parameters:
  ct - the new content type.



setDebugVariable
void setDebugVariable(String name, Object value)(Code)
Sets a name/value pair in an internal Map that is accessible from the Error screen. This is a good way to get debugging information when an exception is thrown.
Parameters:
  name - name of the variable
Parameters:
  value - value of the variable.



setJNDIContexts
void setJNDIContexts(Map contexts)(Code)
Sets JNDI Contexts.
Parameters:
  contexts - a hashtable.



setLayout
void setLayout(String layout)(Code)
Set the layout for the request.
Parameters:
  layout - a string.



setLayoutTemplate
void setLayoutTemplate(String layout)(Code)
Modifies the layout template for the screen. This convenience method allows for a layout to be modified from within a template. For example; $data.setLayoutTemplate("NewLayout.vm")
Parameters:
  layout - a layout template.



setLocale
void setLocale(Locale locale)(Code)
Sets the locale.
Parameters:
  locale - the new locale.



setMessage
void setMessage(String msg)(Code)
Sets the message for the request as a string.
Parameters:
  msg - a string.



setMessage
void setMessage(Element msg)(Code)
Sets the message for the request as an ECS element.
Parameters:
  msg - an element.



setMessages
void setMessages(FormMessages msgs)(Code)
Sets the FormMessages object for the request.
Parameters:
  msgs - A FormMessages.



setRedirectURI
void setRedirectURI(String ruri)(Code)
Sets the redirect uri. If this is set, also make sure to set the status code to 302.
Parameters:
  ruri - a string.



setScreen
void setScreen(String screen)(Code)
Sets the screen for the request.
Parameters:
  screen - a string.



setScreenTemplate
void setScreenTemplate(String screen)(Code)
Sets the screen template for the request. For example; $data.setScreenTemplate("NewScreen.vm")
Parameters:
  screen - a screen template.



setStackTrace
void setStackTrace(String trace, Throwable exp)(Code)
Sets the stack trace.
Parameters:
  trace - the stack trace.
Parameters:
  exp - the exception.



setStatusCode
void setStatusCode(int sc)(Code)
Sets the HTTP status code to return.
Parameters:
  sc - the status.



setSystemError
void setSystemError(SystemError err)(Code)
Adds a critical system error.
Parameters:
  err - a system error.



setTemplateEncoding
void setTemplateEncoding(String encoding)(Code)
Sets the character encoding to use for reading template files.
Parameters:
  encoding - the template encoding.



setTitle
void setTitle(String title)(Code)
Sets the title of the page.
Parameters:
  title - a string.



setUser
void setUser(User user)(Code)
Sets the user.
Parameters:
  user - a user.



unsetMessage
void unsetMessage()(Code)
Unsets the message for the request.



userExists
boolean userExists()(Code)
Checks if a user exists in this session. true if a user exists in this session.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.