Oracle Fusion Middleware Java API Reference for Oracle Mobile Application Framework
2.0.0.0.0

E36392-01

oracle.adfmf.framework.model
Class AdfELContext

Object
  extended by javax.el.ELContext
      extended by oracle.adfmf.framework.model.AdfELContext

public class AdfELContext
extends ELContext


Constructor Summary
AdfELContext(AdfELContext parent)
           
 
Method Summary
 void clearCurrentELResolutionPath()
          Clear the current EL resolution path
 boolean containsVariable(String variable)
          Determine if the variable exists in this context
 Object evaluateVariable(String variable)
          Convenience method to evaluate a variable through the VariableResolver.
 String getCurrentELResolutionPath()
          Get the current EL resoultion path
 String getCurrentExpression()
          Returns the expression string that is currently being resolved in this context.
 ELResolver getELResolver()
          Get our resolver.
 ExpressionFactory getExpressionFactory()
          Get an expression factory
 FunctionMapper getFunctionMapper()
          Get our function mapper.
 AdfELContext getParent()
          Get the context's parent
 VariableMapper getVariableMapper()
          Get our variable mapper.
 String[] getVariableNames()
          Get the list of variable names defined in the this context.
 boolean isCurrentExpressionVolatile()
          Determine if the current expression is volatile
 boolean isResolvingBeanId()
          Internal.
 boolean isResolvingSetValue()
          Objects that lazy load and build up a tree as they resolve can use this method to determine whether they are resolving in the context of a getValue or a setValue operation.
 void registerCurrentExpressionAsVolatile()
          If the current expression being resolved includes a method execution, this marks that expression as volatile so that the response returned to the Container containing its value is flagged not to be cached.
 void release()
          Clear the root variables
 void setCurrentExpression(String value)
          Sets the expression string that is currently being resolved in this context.
 void setResolvingSetValue(boolean value)
          Callers should always set the value back to false in a finally block that guards the preceding setValue operation:
 void setVariable(String variable, Object value, Class type)
          Convenience method to set a variable through the VariableResolver.
 ValueExpression setVariable(String name, ValueExpression expression)
          Define a variable.
 String updateCurrentELResolutionPath(String property, boolean root)
          Augment the current EL resolution path with the given property
 
Methods inherited from class javax.el.ELContext
getContext, getLocale, isPropertyResolved, putContext, setLocale, setPropertyResolved
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdfELContext

public AdfELContext(AdfELContext parent)
Method Detail

release

public void release()
Clear the root variables


getParent

public AdfELContext getParent()
Get the context's parent


setVariable

public ValueExpression setVariable(String name,
                                   ValueExpression expression)
Define a variable.


setVariable

public void setVariable(String variable,
                        Object value,
                        Class type)
Convenience method to set a variable through the VariableResolver. just wraps the ValueExpression creation call.


evaluateVariable

public Object evaluateVariable(String variable)
Convenience method to evaluate a variable through the VariableResolver. just wraps the ValueExpression eval call.

Returns:
the value of the variable

getFunctionMapper

public FunctionMapper getFunctionMapper()
Get our function mapper.

Specified by:
getFunctionMapper in class ELContext
Returns:
The function mapper to be consulted for the resolution of EL functions.

getVariableMapper

public VariableMapper getVariableMapper()
Get our variable mapper.

Specified by:
getVariableMapper in class ELContext
Returns:
The variable mapper to be consulted for the resolution of EL variables.

getELResolver

public ELResolver getELResolver()
Get our resolver. Lazy initialize to a SimpleResolver if necessary.

Specified by:
getELResolver in class ELContext
Returns:
The resolver to be consulted for variable and property resolution during expression evaluation.

containsVariable

public boolean containsVariable(String variable)
Determine if the variable exists in this context


getVariableNames

public String[] getVariableNames()
Get the list of variable names defined in the this context.


getExpressionFactory

public ExpressionFactory getExpressionFactory()
Get an expression factory


isResolvingSetValue

public boolean isResolvingSetValue()
Objects that lazy load and build up a tree as they resolve can use this method to determine whether they are resolving in the context of a getValue or a setValue operation. The lazy loading object structure may need to add intermediate backing nodes while resolving during a setValue, with the knowledge that a new value will be added at a terminal node to the backing structure, while erroring out on a miss on an intermediate node while resolving a getValue. See the Preferences scope for an example of this.

Returns:
true, if objects are resolving in the context of a setValue

isResolvingBeanId

public boolean isResolvingBeanId()
Internal. Used to suppress 'unable to locate identifier' warnings from managed bean scopes when we are looking for an implicit scoped bean ID in the known scopes


setResolvingSetValue

public void setResolvingSetValue(boolean value)
Callers should always set the value back to false in a finally block that guards the preceding setValue operation:
 try 
 {
   context.setResolvingSetValue(true); 
   vex.setValue(context, value);
 } 
 finally
 {
   context.setResolvingSetValue(false);
 }
 

Parameters:
value -
See Also:
isResolvingSetValue()

getCurrentExpression

public String getCurrentExpression()
Returns the expression string that is currently being resolved in this context.


setCurrentExpression

public void setCurrentExpression(String value)
Sets the expression string that is currently being resolved in this context. Should be set back to null when eval is complete.

Parameters:
value -

registerCurrentExpressionAsVolatile

public void registerCurrentExpressionAsVolatile()
If the current expression being resolved includes a method execution, this marks that expression as volatile so that the response returned to the Container containing its value is flagged not to be cached. Assumes the object that is resolved that performs the execution can access the context and call this method.


isCurrentExpressionVolatile

public boolean isCurrentExpressionVolatile()
Determine if the current expression is volatile


getCurrentELResolutionPath

public String getCurrentELResolutionPath()
Get the current EL resoultion path


clearCurrentELResolutionPath

public void clearCurrentELResolutionPath()
Clear the current EL resolution path


updateCurrentELResolutionPath

public String updateCurrentELResolutionPath(String property,
                                            boolean root)
Augment the current EL resolution path with the given property


Oracle Fusion Middleware Java API Reference for Oracle Mobile Application Framework
2.0.0.0.0

E36392-01

Copyright © 2014 Oracle. All Rights Reserved.