Java Doc for WikiContext.java in  » Portal » Open-Portal » com » ecyrd » jspwiki » 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 » Portal » Open Portal » com.ecyrd.jspwiki 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ecyrd.jspwiki.WikiContext

WikiContext
public class WikiContext implements Cloneable(Code)
Provides state information throughout the processing of a page. A WikiContext is born when the JSP pages that are the main entry points, are invoked. The JSPWiki engine creates the new WikiContext, which basically holds information about the page, the handling engine, and in which context (view, edit, etc) the call was done.

A WikiContext also provides request-specific variables, which can be used to communicate between plugins on the same page, or between different instances of the same plugin. A WikiContext variable is valid until the processing of the page has ended. For an example, please see the Counter plugin.
See Also:   com.ecyrd.jspwiki.plugin.Counter
author:
   Janne Jalkanen



Field Summary
final public static  StringATTACH
    
final public static  StringCOMMENT
    
final public static  StringCONFLICT
     User has an internal conflict, and does quite not know what to do.
final public static  StringDELETE
    
final public static  StringDIFF
     User is viewing a DIFF between the two versions of the page.
final public static  StringEDIT
     The EDIT context - the user is editing the page.
final public static  StringERROR
     An error has been encountered and the user needs to be informed.
final public static  StringFIND
    
final public static  StringINFO
     User is viewing page history.
final public static  StringLOGIN
     User is preparing for a login/authentication.
final public static  StringNONE
    
final public static  StringPREFS
    
final public static  StringPREVIEW
     User is previewing the changes he just made.
final public static  StringRSS
    
final public static  StringUPLOAD
    
final public static  StringVIEW
     The VIEW context - the user just wants to view the page contents.
 UserProfilem_currentUser
    
 WikiEnginem_engine
    
 Stringm_namespace
    
 WikiPagem_page
    
static  ThreadLocalm_req_tl
    
 HttpServletRequestm_request
    
 Stringm_requestContext
    
 HttpServletResponsem_response
    
 Stringm_template
    
 ResourceBundlem_templateBundle
    
 Mapm_variableMap
    
static  ThreadLocalm_wikiNameTL
    

Constructor Summary
public  WikiContext(WikiEngine engine, WikiPage page)
     Create a new WikiContext for the given WikiPage.
Parameters:
  engine - The WikiEngine that is handling the request.
Parameters:
  page - The WikiPage.

Method Summary
public  Objectclone()
     Returns a shallow clone of the WikiContext.
public  UserProfilegetCurrentUser()
     Gets the current user.
public  WikiEnginegetEngine()
     Returns the handling engine.
public  StringgetHttpParameter(String paramName)
     This method will safely return any HTTP parameters that might have been defined.
public  HttpServletRequestgetHttpRequest()
     If the request did originate from a HTTP request, then the HTTP request can be fetched here.
public static  HttpServletRequestgetHttpRequestForThread()
    
public  HttpServletResponsegetHttpResponse()
    
public  StringgetNamespace()
     Gets the wiki instance namespace for this wiki context.
public  WikiPagegetPage()
     Returns the page that is being handled.
public  ObjectgetPrivateSessionAttribute(String key)
     Gets a previously set private session attribute. Private attributes are visible to the current wiki context only.
Parameters:
  key - The attribute name.
public  StringgetRequestContext()
     Returns the request context.
public  StringgetTemplate()
     Gets the template that is to be used throughout this request.
public  ResourceBundlegetTemplateBundle()
     Gets the template resourece bundle that is to be used throughout this request.
public  StringgetURL(String context, String page)
    
public  StringgetURL(String context, String page, String params)
    
public  StringgetUserCommonName(String userid)
    
public  ObjectgetVariable(String key)
     Gets a previously set variable.
Parameters:
  key - The variable name.
public  StringgetViewURL(String page)
    
public static  StringgetWikiName()
    
public  voidsendRedirect(String location)
    
public  voidsetCurrentUser(UserProfile wup)
     Sets the current user.
public  voidsetHttpRequest(HttpServletRequest req)
     If the request originated from a HTTP server, the HTTP request is stored here.
public static  voidsetHttpRequestForThread(HttpServletRequest req)
    
public  voidsetHttpResponse(HttpServletResponse res)
    
public  voidsetNamespace(String namespace)
     Sets an optional wiki instance namespace for this wiki context.
public  voidsetPage(WikiPage page)
     Sets the page that is being handled.
public  voidsetPrivateSessionAttribute(String key, Object data)
     Sets a private session attribute.
public  voidsetRequestContext(String arg)
     Sets the request context.
public  voidsetTemplate(String dir)
     Sets the template to be used for this request.
public  voidsetTemplateBundle(ResourceBundle rb)
     Sets the template resourece bundle that is to be used throughout this request.
public  voidsetVariable(String key, Object data)
     Sets a variable.
public static  voidsetWikiName(String ps)
    
public  Stringtranslate(String key)
     Translates key using the current template's resourece bundle.

Field Detail
ATTACH
final public static String ATTACH(Code)



COMMENT
final public static String COMMENT(Code)



CONFLICT
final public static String CONFLICT(Code)
User has an internal conflict, and does quite not know what to do. Please provide some counseling.



DELETE
final public static String DELETE(Code)



DIFF
final public static String DIFF(Code)
User is viewing a DIFF between the two versions of the page.



EDIT
final public static String EDIT(Code)
The EDIT context - the user is editing the page.



ERROR
final public static String ERROR(Code)
An error has been encountered and the user needs to be informed.



FIND
final public static String FIND(Code)



INFO
final public static String INFO(Code)
User is viewing page history.



LOGIN
final public static String LOGIN(Code)
User is preparing for a login/authentication.



NONE
final public static String NONE(Code)



PREFS
final public static String PREFS(Code)



PREVIEW
final public static String PREVIEW(Code)
User is previewing the changes he just made.



RSS
final public static String RSS(Code)



UPLOAD
final public static String UPLOAD(Code)



VIEW
final public static String VIEW(Code)
The VIEW context - the user just wants to view the page contents.



m_currentUser
UserProfile m_currentUser(Code)



m_engine
WikiEngine m_engine(Code)



m_namespace
String m_namespace(Code)



m_page
WikiPage m_page(Code)



m_req_tl
static ThreadLocal m_req_tl(Code)



m_request
HttpServletRequest m_request(Code)



m_requestContext
String m_requestContext(Code)



m_response
HttpServletResponse m_response(Code)



m_template
String m_template(Code)



m_templateBundle
ResourceBundle m_templateBundle(Code)



m_variableMap
Map m_variableMap(Code)



m_wikiNameTL
static ThreadLocal m_wikiNameTL(Code)




Constructor Detail
WikiContext
public WikiContext(WikiEngine engine, WikiPage page)(Code)
Create a new WikiContext for the given WikiPage.
Parameters:
  engine - The WikiEngine that is handling the request.
Parameters:
  page - The WikiPage. If you want to create aWikiContext for an older version of a page, you must use thisconstructor.




Method Detail
clone
public Object clone()(Code)
Returns a shallow clone of the WikiContext.
since:
   2.1.37.



getCurrentUser
public UserProfile getCurrentUser()(Code)
Gets the current user. May return null, in case the current user has not yet been determined; or this is an internal system.



getEngine
public WikiEngine getEngine()(Code)
Returns the handling engine.



getHttpParameter
public String getHttpParameter(String paramName)(Code)
This method will safely return any HTTP parameters that might have been defined. You should use this method instead of peeking directly into the result of getHttpRequest(), since this method is smart enough to do all of the right things, figure out UTF-8 encoded parameters, etc.
since:
   2.0.13.
Parameters:
  paramName - Parameter name to look for. HTTP parameter, or null, if no such parameter existed.



getHttpRequest
public HttpServletRequest getHttpRequest()(Code)
If the request did originate from a HTTP request, then the HTTP request can be fetched here. However, it the request did NOT originate from a HTTP request, then this method will return null, and YOU SHOULD CHECK FOR IT! Null, if no HTTP request was done.
since:
   2.0.13.



getHttpRequestForThread
public static HttpServletRequest getHttpRequestForThread()(Code)



getHttpResponse
public HttpServletResponse getHttpResponse()(Code)



getNamespace
public String getNamespace()(Code)
Gets the wiki instance namespace for this wiki context. The wiki instance namespace.



getPage
public WikiPage getPage()(Code)
Returns the page that is being handled.



getPrivateSessionAttribute
public Object getPrivateSessionAttribute(String key)(Code)
Gets a previously set private session attribute. Private attributes are visible to the current wiki context only.
Parameters:
  key - The attribute name. The attribute value.



getRequestContext
public String getRequestContext()(Code)
Returns the request context.



getTemplate
public String getTemplate()(Code)
Gets the template that is to be used throughout this request.
since:
   2.1.15.



getTemplateBundle
public ResourceBundle getTemplateBundle()(Code)
Gets the template resourece bundle that is to be used throughout this request.



getURL
public String getURL(String context, String page)(Code)



getURL
public String getURL(String context, String page, String params)(Code)
Returns an URL from a page



getUserCommonName
public String getUserCommonName(String userid)(Code)



getVariable
public Object getVariable(String key)(Code)
Gets a previously set variable.
Parameters:
  key - The variable name. The variable contents.



getViewURL
public String getViewURL(String page)(Code)



getWikiName
public static String getWikiName()(Code)



sendRedirect
public void sendRedirect(String location) throws java.io.IOException(Code)



setCurrentUser
public void setCurrentUser(UserProfile wup)(Code)
Sets the current user.



setHttpRequest
public void setHttpRequest(HttpServletRequest req)(Code)
If the request originated from a HTTP server, the HTTP request is stored here.
Parameters:
  req - The HTTP servlet request.
since:
   2.0.13.



setHttpRequestForThread
public static void setHttpRequestForThread(HttpServletRequest req)(Code)



setHttpResponse
public void setHttpResponse(HttpServletResponse res)(Code)



setNamespace
public void setNamespace(String namespace)(Code)
Sets an optional wiki instance namespace for this wiki context. The data is discarded once the context is finished.
Parameters:
  namespace - The namespace.



setPage
public void setPage(WikiPage page)(Code)
Sets the page that is being handled.
since:
   2.1.37.



setPrivateSessionAttribute
public void setPrivateSessionAttribute(String key, Object data)(Code)
Sets a private session attribute. Private attributes are visible to the current wiki context only. The attribute is valid while the HttpSession is valid, The attribute data is discarded once the session is finished.
Parameters:
  key - The attribute name.
Parameters:
  data - The attribute value.



setRequestContext
public void setRequestContext(String arg)(Code)
Sets the request context. See above for the different request contexts (VIEW, EDIT, etc.)
Parameters:
  arg - The request context (one of the predefined contexts.)



setTemplate
public void setTemplate(String dir)(Code)
Sets the template to be used for this request.
since:
   2.1.15.



setTemplateBundle
public void setTemplateBundle(ResourceBundle rb)(Code)
Sets the template resourece bundle that is to be used throughout this request.



setVariable
public void setVariable(String key, Object data)(Code)
Sets a variable. The variable is valid while the WikiContext is valid, i.e. while page processing continues. The variable data is discarded once the page processing is finished.
Parameters:
  key - The variable name.
Parameters:
  data - The variable value.



setWikiName
public static void setWikiName(String ps)(Code)



translate
public String translate(String key)(Code)
Translates key using the current template's resourece bundle.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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