Java Doc for WikiContext.java in  » Wiki-Engine » JSPWiki » 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 » Wiki Engine » JSPWiki » 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,Command(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.

When a WikiContext is created, it automatically associates a WikiSession object with the user's HttpSession. The WikiSession contains information about the user's authentication status, and is consulted by WikiContext.getCurrentUser() . object

Do not cache the page object that you get from the WikiContext; always use getPage()!


See Also:   com.ecyrd.jspwiki.plugin.Counter
author:
   Janne Jalkanen
author:
   Andrew R. Jaquith


Field Summary
final public static  StringADMIN
     User is doing administrative things.
final public static  StringATTACH
     User is downloading an attachment.
final public static  StringCOMMENT
     User is commenting something.
final public static  StringCONFLICT
     User has an internal conflict, and does quite not know what to do.
final public static  StringCREATE_GROUP
    
final public static  StringDELETE
     User is deleting a page or an attachment.
final public static  StringDELETE_GROUP
     User is deleting an existing group.
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  StringEDIT_GROUP
     User is editing an existing group.
final public static  StringERROR
     An error has been encountered and the user needs to be informed.
final public static  StringFIND
     User is searching for content.
final public static  StringINFO
     User is viewing page history.
final public static  StringINSTALL
     User is administering JSPWiki (Install, SecurityConfig).
final public static  StringLOGIN
     User is preparing for a login/authentication.
final public static  StringLOGOUT
     User is preparing to log out.
final public static  StringMESSAGE
     JSPWiki wants to display a message.
final public static  StringNONE
     This is not a JSPWiki context, use it to access static files.
final public static  StringOTHER
     Same as NONE; this is just a clarification.
final public static  StringPREFS
    
final public static  StringPREVIEW
     User is previewing the changes he just made.
final public static  StringRENAME
     User is renaming a page.
final public static  StringRSS
     RSS feed is being generated.
final public static  StringUPLOAD
     User is uploading something.
final public static  StringVIEW
     The VIEW context - the user just wants to view the page contents.
final public static  StringVIEW_GROUP
    
final public static  StringWORKFLOW
     User wants to view or administer workflows.
protected  HttpServletRequestm_request
     Stores the HttpServletRequest.

Constructor Summary
public  WikiContext(WikiEngine engine, WikiPage page)
     Create a new WikiContext for the given WikiPage.
public  WikiContext(WikiEngine engine, HttpServletRequest request, Command command)
    

Creates a new WikiContext for the given WikiEngine, Command and HttpServletRequest.

This constructor will also look up the HttpSession associated with the request, and determine if a WikiSession object is present.

public  WikiContext(WikiEngine engine, HttpServletRequest request, WikiPage page)
     Creates a new WikiContext for the given WikiEngine, WikiPage and HttpServletRequest.

Method Summary
public  Objectclone()
     Returns a shallow clone of the WikiContext.
since:
   2.1.37.
protected static  CommandfindCommand(WikiEngine engine, HttpServletRequest request, WikiPage page)
     Looks up and returns a PageCommand based on a supplied WikiPage and HTTP request.
public static  WikiContextfindContext(PageContext pageContext)
     This method can be used to find the WikiContext programmatically from a JSP PageContext.
public  ResourceBundlegetBundle(String bundle)
     Locates the i18n ResourceBundle given.
public  CommandgetCommand()
     Returns the Command associated with this WikiContext.
public  StringgetContentTemplate()
    
public  PrincipalgetCurrentUser()
     Convenience method that 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  StringgetJSP()
    
public static  LocalegetLocale(WikiContext context)
     Returns the locale of the HTTP request if available, otherwise returns the default Locale of the server.
public  StringgetName()
     Returns the target of this wiki context: a page, group name or JSP.
public  WikiPagegetPage()
     Returns the page that is being handled.
public  WikiPagegetRealPage()
     Gets a reference to the real page whose content is currently being rendered. If your plugin e.g.
public  StringgetRedirectURL()
     Figure out to which page we are really going to.
public  StringgetRequestContext()
     Returns the request context. The name of the request context (e.g.
public  ObjectgetTarget()
    
public  StringgetTemplate()
     Gets the template that is to be used throughout this request.
since:
   2.1.15.
public  StringgetURL(String context, String page)
     Creates an URL for the given request context.
Parameters:
  context - e.g.
public  StringgetURL(String context, String page, String params)
     Returns an URL from a page.
public  StringgetURLPattern()
    
public  ObjectgetVariable(String key)
     Gets a previously set variable.
Parameters:
  key - The variable name.
public  StringgetViewURL(String page)
     A shortcut to generate a VIEW url.
Parameters:
  page - The page to which to link.
public  WikiSessiongetWikiSession()
     Returns the WikiSession associated with the context.
public  booleanhasAccess(HttpServletResponse response)
     Checks whether the current user has access to this wiki context, by obtaining the required Permission ( WikiContext.requiredPermission() ) and delegating the access check to com.ecyrd.jspwiki.auth.AuthorizationManager.checkPermission(WikiSessionPermission) . If the user is allowed, this method returns true; false otherwise.
public  booleanhasAccess(HttpServletResponse response, boolean redirect)
     Checks whether the current user has access to this wiki context (and optionally redirects if not), by obtaining the required Permission ( WikiContext.requiredPermission() ) and delegating the access check to com.ecyrd.jspwiki.auth.AuthorizationManager.checkPermission(WikiSessionPermission) . If the user is allowed, this method returns true; false otherwise.
public  booleanhasAdminPermissions()
     Returns true, if the current user has administrative permissions (i.e.
public  PermissionrequiredPermission()
     Returns the permission required to successfully execute this context. For example, the a wiki context of VIEW for a certain page means that the PagePermission "view" is required for the page.
protected  voidsetDefaultTemplate(HttpServletRequest request)
     Figures out which template a new WikiContext should be using.
public  voidsetPage(WikiPage page)
     Sets the page that is being handled.
public  WikiPagesetRealPage(WikiPage page)
     Sets a reference to the real page whose content is currently being rendered.

Sometimes you may want to render the page using some other page's context. In those cases, it is highly recommended that you set the setRealPage() to point at the real page you are rendering.

public  voidsetRequestContext(String arg)
     Sets the request context.
public  voidsetTemplate(String dir)
     Sets the template to be used for this request.
public  voidsetVariable(String key, Object data)
     Sets a variable.
public  CommandtargetedCommand(Object target)
     Associates a target with the current Command and returns the new targeted Command.
protected  voidupdateCommand(String requestContext)
     Protected method that updates the internally cached Command.

Field Detail
ADMIN
final public static String ADMIN(Code)
User is doing administrative things.



ATTACH
final public static String ATTACH(Code)
User is downloading an attachment.



COMMENT
final public static String COMMENT(Code)
User is commenting something.



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



CREATE_GROUP
final public static String CREATE_GROUP(Code)
User wishes to create a new group



DELETE
final public static String DELETE(Code)
User is deleting a page or an attachment.



DELETE_GROUP
final public static String DELETE_GROUP(Code)
User is deleting an existing group.



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.



EDIT_GROUP
final public static String EDIT_GROUP(Code)
User is editing an existing group.



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)
User is searching for content.



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



INSTALL
final public static String INSTALL(Code)
User is administering JSPWiki (Install, SecurityConfig).



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



LOGOUT
final public static String LOGOUT(Code)
User is preparing to log out.



MESSAGE
final public static String MESSAGE(Code)
JSPWiki wants to display a message.



NONE
final public static String NONE(Code)
This is not a JSPWiki context, use it to access static files.



OTHER
final public static String OTHER(Code)
Same as NONE; this is just a clarification.



PREFS
final public static String PREFS(Code)
User is editing preferences



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



RENAME
final public static String RENAME(Code)
User is renaming a page.



RSS
final public static String RSS(Code)
RSS feed is being generated.



UPLOAD
final public static String UPLOAD(Code)
User is uploading something.



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



VIEW_GROUP
final public static String VIEW_GROUP(Code)
User is viewing an existing group



WORKFLOW
final public static String WORKFLOW(Code)
User wants to view or administer workflows.



m_request
protected HttpServletRequest m_request(Code)
Stores the HttpServletRequest. May be null, if the request did not come from a servlet.




Constructor Detail
WikiContext
public WikiContext(WikiEngine engine, WikiPage page)(Code)
Create a new WikiContext for the given WikiPage. Delegates to WikiContext.WikiContext(WikiEngine,HttpServletRequest,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.



WikiContext
public WikiContext(WikiEngine engine, HttpServletRequest request, Command command) throws IllegalArgumentException(Code)

Creates a new WikiContext for the given WikiEngine, Command and HttpServletRequest.

This constructor will also look up the HttpSession associated with the request, and determine if a WikiSession object is present. If not, a new one is created.

After the WikiSession object is obtained, the current authentication status is checked. If not authenticated, or if the login status reported by the container has changed, the constructor attempts to log in the user with com.ecyrd.jspwiki.auth.AuthenticationManager.login(HttpServletRequest) . If an login process throws an exception, this method logs the error but does not re-throw it.


Parameters:
  engine - The WikiEngine that is handling the request
Parameters:
  request - The HttpServletRequest that should be associated with thiscontext. This parameter may be null.
Parameters:
  command - the command
throws:
  IllegalArgumentException - if engine orcommand are null



WikiContext
public WikiContext(WikiEngine engine, HttpServletRequest request, WikiPage page)(Code)
Creates a new WikiContext for the given WikiEngine, WikiPage and HttpServletRequest. This method simply looks up the appropriate Command using WikiContext.findCommand(WikiEngine,HttpServletRequest,WikiPage) and delegates to WikiContext.WikiContext(WikiEngine,HttpServletRequest,Command) .
Parameters:
  engine - The WikiEngine that is handling the request
Parameters:
  request - The HttpServletRequest that should be associated with thiscontext. This parameter may be null.
Parameters:
  page - The WikiPage. If you want to create a WikiContext for anolder version of a page, you must supply this parameter




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



findCommand
protected static Command findCommand(WikiEngine engine, HttpServletRequest request, WikiPage page)(Code)
Looks up and returns a PageCommand based on a supplied WikiPage and HTTP request. First, the appropriate Command is obtained by examining the HTTP request; the default is PageCommand.VIEW . If the Command is a PageCommand (and it should be, in most cases), a targeted Command is created using the (non-null) WikiPage as target.
Parameters:
  engine - the wiki engine
Parameters:
  request - the HTTP request
Parameters:
  page - the wiki page the correct command



findContext
public static WikiContext findContext(PageContext pageContext)(Code)
This method can be used to find the WikiContext programmatically from a JSP PageContext. We check the request context. The wiki context, if it exists, is looked up using the key com.ecyrd.jspwiki.tags.WikiTagBase.ATTR_CONTEXT .
since:
   2.4
Parameters:
  pageContext - the JSP page context Current WikiContext, or null, of no context exists.



getBundle
public ResourceBundle getBundle(String bundle) throws MissingResourceException(Code)
Locates the i18n ResourceBundle given. This method interprets the request locale, and uses that to figure out which language the user wants.
See Also:   com.ecyrd.jspwiki.i18n.InternationalizationManager
Parameters:
  bundle - The name of the bundle you are looking for. A resource bundle object
throws:
  MissingResourceException - If the bundle cannot be found



getCommand
public Command getCommand()(Code)
Returns the Command associated with this WikiContext. the command



getContentTemplate
public String getContentTemplate()(Code)

See Also:   com.ecyrd.jspwiki.ui.Command.getContentTemplate



getCurrentUser
public Principal getCurrentUser()(Code)
Convenience method that gets the current user. Delegates the lookup to the WikiSession associated with this WikiContect. May return null, in case the current user has not yet been determined; or this is an internal system. If the WikiSession has not been set, always returns null. The current user; or maybe null in case of internal calls.



getEngine
public WikiEngine getEngine()(Code)
Returns the handling engine. The wikiengine owning this context.



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.



getJSP
public String getJSP()(Code)

See Also:   com.ecyrd.jspwiki.ui.Command.getJSP



getLocale
public static Locale getLocale(WikiContext context)(Code)
Returns the locale of the HTTP request if available, otherwise returns the default Locale of the server. A valid locale object
Parameters:
  context - The WikiContext



getName
public String getName()(Code)
Returns the target of this wiki context: a page, group name or JSP. If the associated Command is a PageCommand, this method returns the page's name. Otherwise, this method delegates to the associated Command's com.ecyrd.jspwiki.ui.Command.getName method. Calling classes can rely on the results of this method for looking up canonically-correct page or group names. Because it does not automatically assume that the wiki context is a PageCommand, calling this method is inherently safer than calling getPage().getName(). the name of the target of this wiki context
See Also:   com.ecyrd.jspwiki.ui.PageCommand.getName
See Also:   com.ecyrd.jspwiki.ui.GroupCommand.getName



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



getRealPage
public WikiPage getRealPage()(Code)
Gets a reference to the real page whose content is currently being rendered. If your plugin e.g. does some variable setting, be aware that if it is embedded in the LeftMenu or some other page added with InsertPageTag, you should consider what you want to do - do you wish to really reference the "master" page or the included page.

For example, in the default template, there is a page called "LeftMenu". Whenever you access a page, e.g. "Main", the master page will be Main, and that's what the getPage() will return - regardless of whether your plugin resides on the LeftMenu or on the Main page. However, getRealPage() will return "LeftMenu". A reference to the real page.
See Also:   com.ecyrd.jspwiki.tags.InsertPageTag
See Also:   com.ecyrd.jspwiki.parser.JSPWikiMarkupParser




getRedirectURL
public String getRedirectURL()(Code)
Figure out to which page we are really going to. Considers special page names from the jspwiki.properties, and possible aliases. This method forwards requests to com.ecyrd.jspwiki.ui.CommandResolver.getSpecialPageReference(String) . A complete URL to the new page to redirect to
since:
   2.2



getRequestContext
public String getRequestContext()(Code)
Returns the request context. The name of the request context (e.g. VIEW).



getTarget
public Object getTarget()(Code)

See Also:   com.ecyrd.jspwiki.ui.Command.getTarget



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



getURL
public String getURL(String context, String page)(Code)
Creates an URL for the given request context.
Parameters:
  context - e.g. WikiContext.EDIT
Parameters:
  page - The page to which to link An URL to the page, honours the absolute/relative setting in jspwiki.properties



getURL
public String getURL(String context, String page, String params)(Code)
Returns an URL from a page. It this WikiContext instance was constructed with an actual HttpServletRequest, we will attempt to construct the URL using HttpUtil, which preserves the HTTPS portion if it was used.
Parameters:
  context - The request context (e.g. WikiContext.UPLOAD)
Parameters:
  page - The page to which to link
Parameters:
  params - A list of parameters, separated with "&" An URL to the given context and page.



getURLPattern
public String getURLPattern()(Code)

See Also:   com.ecyrd.jspwiki.ui.Command.getURLPattern



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)
A shortcut to generate a VIEW url.
Parameters:
  page - The page to which to link. An URL to the page. This honours the current absolute/relative setting.



getWikiSession
public WikiSession getWikiSession()(Code)
Returns the WikiSession associated with the context. This method is guaranteed to always return a valid WikiSession. If this context was constructed without an associated HttpServletRequest, it will return WikiSession.guestSession(WikiEngine) . The WikiSession associate with this context.



hasAccess
public boolean hasAccess(HttpServletResponse response) throws IOException(Code)
Checks whether the current user has access to this wiki context, by obtaining the required Permission ( WikiContext.requiredPermission() ) and delegating the access check to com.ecyrd.jspwiki.auth.AuthorizationManager.checkPermission(WikiSessionPermission) . If the user is allowed, this method returns true; false otherwise. If access is allowed, the wiki context will be added to the request as an attribute with the key name com.ecyrd.jspwiki.tags.WikiTagBase.ATTR_CONTEXT . Note that this method will automatically redirect the user to a login or error page, as appropriate, if access fails. This is NOT guaranteed to be default behavior in the future.
Parameters:
  response - the http response the result of the access check
throws:
  IOException - In case something goes wrong



hasAccess
public boolean hasAccess(HttpServletResponse response, boolean redirect) throws IOException(Code)
Checks whether the current user has access to this wiki context (and optionally redirects if not), by obtaining the required Permission ( WikiContext.requiredPermission() ) and delegating the access check to com.ecyrd.jspwiki.auth.AuthorizationManager.checkPermission(WikiSessionPermission) . If the user is allowed, this method returns true; false otherwise. If access is allowed, the wiki context will be added to the request as attribute with the key name com.ecyrd.jspwiki.tags.WikiTagBase.ATTR_CONTEXT . the result of the access check
Parameters:
  response - The servlet response object
Parameters:
  redirect - If true, makes an automatic redirect to the response
throws:
  IOException - If something goes wrong



hasAdminPermissions
public boolean hasAdminPermissions()(Code)
Returns true, if the current user has administrative permissions (i.e. the omnipotent AllPermission).
since:
   2.4.46 true, if the user has all permissions.



requiredPermission
public Permission requiredPermission()(Code)
Returns the permission required to successfully execute this context. For example, the a wiki context of VIEW for a certain page means that the PagePermission "view" is required for the page. In some cases, no particular permission is required, in which case a dummy permission will be returned ( java.util.PropertyPermission "os.name", "read"). This method is guaranteed to always return a valid, non-null permission. the permission
since:
   2.4



setDefaultTemplate
protected void setDefaultTemplate(HttpServletRequest request)(Code)
Figures out which template a new WikiContext should be using.
Parameters:
  request - the HTTP request



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



setRealPage
public WikiPage setRealPage(WikiPage page)(Code)
Sets a reference to the real page whose content is currently being rendered.

Sometimes you may want to render the page using some other page's context. In those cases, it is highly recommended that you set the setRealPage() to point at the real page you are rendering. Please see InsertPageTag for an example.

Also, if your plugin e.g. does some variable setting, be aware that if it is embedded in the LeftMenu or some other page added with InsertPageTag, you should consider what you want to do - do you wish to really reference the "master" page or the included page.
Parameters:
  page - The real page which is being rendered. The previous real page
since:
   2.3.14
See Also:   com.ecyrd.jspwiki.tags.InsertPageTag




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.
Parameters:
  dir - The template name
since:
   2.1.15.



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.



targetedCommand
public Command targetedCommand(Object target)(Code)
Associates a target with the current Command and returns the new targeted Command. If the Command associated with this WikiContext is already "targeted", it is returned instead.
See Also:   com.ecyrd.jspwiki.ui.Command.targetedCommand(java.lang.Object)



updateCommand
protected void updateCommand(String requestContext)(Code)
Protected method that updates the internally cached Command. Will always be called when the page name, request context, or variable changes.
Parameters:
  requestContext - the desired request context
since:
   2.4



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.