Java Doc for ELContext.java in  » Scripting » JUEL » javax » el » 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 » Scripting » JUEL » javax.el 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.el.ELContext

All known Subclasses:   de.odysseus.el.util.SimpleContext,
ELContext
abstract public class ELContext (Code)
Context information for expression evaluation.

To evaluate an Expression , an ELContext must be provided. The ELContext holds:

  • a reference to the base ELResolver that will be consulted to resolve model objects and their properties
  • a reference to FunctionMapper that will be used to resolve EL Functions.
  • a reference to VariableMapper that will be used to resolve EL Variables.
  • a collection of all the relevant context objects for use by ELResolvers
  • state information during the evaluation of an expression, such as whether a property has been resolved yet

The collection of context objects is necessary because each ELResolver may need access to a different context object. For example, JSP and Faces resolvers need access to a javax.servlet.jsp.JspContext and a javax.faces.context.FacesContext , respectively.

Creation of ELContext objects is controlled through the underlying technology. For example, in JSP the JspContext.getELContext() factory method is used. Some technologies provide the ability to add an ELContextListener so that applications and frameworks can ensure their own context objects are attached to any newly created ELContext.

Because it stores state during expression evaluation, an ELContext object is not thread-safe. Care should be taken to never share an ELContext instance between two or more threads.


See Also:   ELContextListener
See Also:   ELContextEvent
See Also:   ELResolver
See Also:   FunctionMapper
See Also:   VariableMapper
See Also:   javax.servlet.jsp.JspContext
since:
   JSP 2.1




Method Summary
public  ObjectgetContext(Class key)
     Returns the context object associated with the given key.

The ELContext maintains a collection of context objects relevant to the evaluation of an expression.

abstract public  ELResolvergetELResolver()
     Retrieves the ELResolver associated with this context.

The ELContext maintains a reference to the ELResolver that will be consulted to resolve variables and properties during an expression evaluation.

abstract public  FunctionMappergetFunctionMapper()
     Retrieves the FunctionMapper associated with this ELContext.
public  LocalegetLocale()
     Get the Locale stored by a previous invocation to ELContext.setLocale .
abstract public  VariableMappergetVariableMapper()
     Retrieves the VariableMapper associated with this ELContext.
public  booleanisPropertyResolved()
     Returns whether an ELResolver has successfully resolved a given (base, property) pair.
public  voidputContext(Class key, Object contextObject)
     Associates a context object with this ELContext.

The ELContext maintains a collection of context objects relevant to the evaluation of an expression.

public  voidsetLocale(Locale locale)
     Set the Locale for this instance.
public  voidsetPropertyResolved(boolean resolved)
     Called to indicate that a ELResolver has successfully resolved a given (base, property) pair.



Method Detail
getContext
public Object getContext(Class key)(Code)
Returns the context object associated with the given key.

The ELContext maintains a collection of context objects relevant to the evaluation of an expression. These context objects are used by ELResolvers. This method is used to retrieve the context with the given key from the collection.

By convention, the object returned will be of the type specified by the key. However, this is not required and the key is used strictly as a unique identifier.


Parameters:
  key - The unique identifier that was used to associate thecontext object with this ELContext. The context object associated with the given key, or nullif no such context was found.
throws:
  NullPointerException - if key is null.



getELResolver
abstract public ELResolver getELResolver()(Code)
Retrieves the ELResolver associated with this context.

The ELContext maintains a reference to the ELResolver that will be consulted to resolve variables and properties during an expression evaluation. This method retrieves the reference to the resolver.

Once an ELContext is constructed, the reference to the ELResolver associated with the context cannot be changed.

The resolver to be consulted for variable andproperty resolution during expression evaluation.



getFunctionMapper
abstract public FunctionMapper getFunctionMapper()(Code)
Retrieves the FunctionMapper associated with this ELContext. The function mapper to be consulted for the resolution ofEL functions.



getLocale
public Locale getLocale()(Code)
Get the Locale stored by a previous invocation to ELContext.setLocale . If this method returns non null, this Locale must be used for all localization needs in the implementation. The Locale must not be cached to allow for applications that change Locale dynamically. The Locale in which this instance is operating.Used primarily for message localization.



getVariableMapper
abstract public VariableMapper getVariableMapper()(Code)
Retrieves the VariableMapper associated with this ELContext. The variable mapper to be consulted for the resolution ofEL variables.



isPropertyResolved
public boolean isPropertyResolved()(Code)
Returns whether an ELResolver has successfully resolved a given (base, property) pair.

The CompositeELResolver checks this property to determine whether it should consider or skip other component resolvers.


See Also:   CompositeELResolver true if the property has been resolved, or false if not.



putContext
public void putContext(Class key, Object contextObject)(Code)
Associates a context object with this ELContext.

The ELContext maintains a collection of context objects relevant to the evaluation of an expression. These context objects are used by ELResolvers. This method is used to add a context object to that collection.

By convention, the contextObject will be of the type specified by the key. However, this is not required and the key is used strictly as a unique identifier.


Parameters:
  key - The key used by an @{link ELResolver} to identify thiscontext object.
Parameters:
  contextObject - The context object to add to the collection.
throws:
  NullPointerException - if key is null or contextObject is null.



setLocale
public void setLocale(Locale locale)(Code)
Set the Locale for this instance. This method may be called by the party creating the instance, such as JavaServer Faces or JSP, to enable the EL implementation to provide localized messages to the user. If no Locale is set, the implementation must use the locale returned by Locale.getDefault( ).



setPropertyResolved
public void setPropertyResolved(boolean resolved)(Code)
Called to indicate that a ELResolver has successfully resolved a given (base, property) pair.

The CompositeELResolver checks this property to determine whether it should consider or skip other component resolvers.


See Also:   CompositeELResolver
Parameters:
  resolved - true if the property has been resolved, or false ifnot.



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.