Java Doc for AbstractContext.java in  » Template-Engine » Velocity » org » apache » velocity » context » 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 » Template Engine » Velocity » org.apache.velocity.context 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.velocity.context.InternalContextBase
      org.apache.velocity.context.AbstractContext

All known Subclasses:   org.apache.velocity.VelocityContext,
AbstractContext
abstract public class AbstractContext extends InternalContextBase implements Context(Code)
This class is the abstract base class for all conventional Velocity Context implementations. Simply extend this class and implement the abstract routines that access your preferred storage method. Takes care of context chaining. Also handles / enforces policy on null keys and values :
  • Null keys and values are accepted and basically dropped.
  • If you place an object into the context with a null key, it will be ignored and logged.
  • If you try to place a null into the context with any key, it will be dropped and logged.
The default implementation of this for application use is org.apache.velocity.VelocityContext. All thanks to Fedor for the chaining idea.
author:
   Geir Magnusson Jr.
author:
   Fedor Karpelevitch
author:
   Jason van Zyl
version:
   $Id: AbstractContext.java 463298 2006-10-12 16:10:32Z henning $



Constructor Summary
public  AbstractContext()
    
public  AbstractContext(Context inner)
     Chaining constructor accepts a Context argument.

Method Summary
public  booleancontainsKey(Object key)
     Indicates whether the specified key is in the context.
public  Objectget(String key)
     Gets the value corresponding to the provided key from the context. Supports the chaining context mechanism.
public  ContextgetChainedContext()
    
public  Object[]getKeys()
     Get all the keys for the values in the context Object[] of keys in the Context.
abstract public  booleaninternalContainsKey(Object key)
     Implement to determine if a key is in the storage.
abstract public  ObjectinternalGet(String key)
     Implement to return a value from the context storage.
abstract public  Object[]internalGetKeys()
     Implement to return an object array of key strings from your storage.
abstract public  ObjectinternalPut(String key, Object value)
     Implement to put a value into the context storage.
abstract public  ObjectinternalRemove(Object key)
     I mplement to remove an item from your storage.
public  Objectput(String key, Object value)
     Adds a name/value pair to the context.
Parameters:
  key - The name to key the provided value with.
Parameters:
  value - The corresponding value.
public  Objectremove(Object key)
     Removes the value associated with the specified key from the context.
Parameters:
  key - The name of the value to remove.


Constructor Detail
AbstractContext
public AbstractContext()(Code)
default CTOR



AbstractContext
public AbstractContext(Context inner)(Code)
Chaining constructor accepts a Context argument. It will relay get() operations into this Context in the even the 'local' get() returns null.
Parameters:
  inner - context to be chained




Method Detail
containsKey
public boolean containsKey(Object key)(Code)
Indicates whether the specified key is in the context. Provided for debugging purposes.
Parameters:
  key - The key to look for. true if the key is in the context, false if not.



get
public Object get(String key)(Code)
Gets the value corresponding to the provided key from the context. Supports the chaining context mechanism. If the 'local' context doesn't have the value, we try to get it from the chained context.
Parameters:
  key - The name of the desired value. The value corresponding to the provided key or null ifthe key param is null.



getChainedContext
public Context getChainedContext()(Code)
returns innerContext if one is chained Context if chained, null if not



getKeys
public Object[] getKeys()(Code)
Get all the keys for the values in the context Object[] of keys in the Context. Does not returnkeys in chained context.



internalContainsKey
abstract public boolean internalContainsKey(Object key)(Code)
Implement to determine if a key is in the storage.

Currently, this method is not used internally by the Velocity engine.
Parameters:
  key - key to test for existance true if found, false if not



internalGet
abstract public Object internalGet(String key)(Code)
Implement to return a value from the context storage.

The implementation of this method is required for proper operation of a Context implementation in general Velocity use.
Parameters:
  key - key whose associated value is to be returned object stored in the context



internalGetKeys
abstract public Object[] internalGetKeys()(Code)
Implement to return an object array of key strings from your storage.

Currently, this method is not used internally by the Velocity engine. array of keys



internalPut
abstract public Object internalPut(String key, Object value)(Code)
Implement to put a value into the context storage.

The implementation of this method is required for proper operation of a Context implementation in general Velocity use.
Parameters:
  key - key with which to associate the value
Parameters:
  value - value to be associated with the key previously stored value if exists, or null



internalRemove
abstract public Object internalRemove(Object key)(Code)
I mplement to remove an item from your storage.

Currently, this method is not used internally by the Velocity engine.
Parameters:
  key - key to remove object removed if exists, else null



put
public Object put(String key, Object value)(Code)
Adds a name/value pair to the context.
Parameters:
  key - The name to key the provided value with.
Parameters:
  value - The corresponding value. Object that was replaced in the the Context ifapplicable or null if not.



remove
public Object remove(Object key)(Code)
Removes the value associated with the specified key from the context.
Parameters:
  key - The name of the value to remove. The value that the key was mapped to, or nullif unmapped.



Methods inherited from org.apache.velocity.context.InternalContextBase
public EventCartridge attachEventCartridge(EventCartridge ec)(Code)(Java Doc)
public boolean getAllowRendering()(Code)(Java Doc)
public Resource getCurrentResource()(Code)(Java Doc)
public String getCurrentTemplateName()(Code)(Java Doc)
public EventCartridge getEventCartridge()(Code)(Java Doc)
public Object[] getTemplateNameStack()(Code)(Java Doc)
public IntrospectionCacheData icacheGet(Object key)(Code)(Java Doc)
public void icachePut(Object key, IntrospectionCacheData o)(Code)(Java Doc)
public void popCurrentTemplateName()(Code)(Java Doc)
public void pushCurrentTemplateName(String s)(Code)(Java Doc)
public void setAllowRendering(boolean v)(Code)(Java Doc)
public void setCurrentResource(Resource r)(Code)(Java Doc)

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.