Package org.nuxeo.ecm.platform.actions
Class ELActionContext
java.lang.Object
org.nuxeo.ecm.platform.actions.AbstractActionContext
org.nuxeo.ecm.platform.actions.ELActionContext
- All Implemented Interfaces:
Serializable
,ActionContext
Default EL action context
- Since:
- 5.7.3
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final javax.el.ExpressionFactory
protected final javax.el.ExpressionFactory
protected final javax.el.ELContext
Fields inherited from class org.nuxeo.ecm.platform.actions.AbstractActionContext
currentDocument, currentPrincipal, docMgr, localVariables
-
Constructor Summary
ConstructorDescriptionELActionContext
(javax.el.ELContext originalContext, javax.el.ExpressionFactory expressionFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkCondition
(String expression) Returns true if given expression resolves to true in this context.<T> T
evalExpression
(String expression, Class<T> expectedType) Evaluates the givenexpression
and returns the result cast to the givenexpectedType
.Methods inherited from class org.nuxeo.ecm.platform.actions.AbstractActionContext
disableGlobalCaching, getCurrentDocument, getCurrentPrincipal, getDocumentManager, getLocalVariable, putAllLocalVariables, putLocalVariable, setCurrentDocument, setCurrentPrincipal, setDocumentManager, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.platform.actions.ActionContext
disableGlobalCaching, getCurrentDocument, getCurrentPrincipal, getDocumentManager, getLocalVariable, putAllLocalVariables, putLocalVariable, setCurrentDocument, setCurrentPrincipal, setDocumentManager, size
-
Field Details
-
originalContext
protected final javax.el.ELContext originalContext -
expressionFactory
protected final javax.el.ExpressionFactory expressionFactory -
EXPRESSION_FACTORY
public static final javax.el.ExpressionFactory EXPRESSION_FACTORY
-
-
Constructor Details
-
ELActionContext
public ELActionContext() -
ELActionContext
public ELActionContext(javax.el.ELContext originalContext, javax.el.ExpressionFactory expressionFactory)
-
-
Method Details
-
evalExpression
Description copied from interface:ActionContext
Evaluates the givenexpression
and returns the result cast to the givenexpectedType
.- Specified by:
evalExpression
in interfaceActionContext
- Returns:
- the result of the expression evaluation
- Throws:
javax.el.ELException
-
checkCondition
Description copied from interface:ActionContext
Returns true if given expression resolves to true in this context.Returns false if expression is blank (null or empty).
- Specified by:
checkCondition
in interfaceActionContext
- Specified by:
checkCondition
in classAbstractActionContext
- Throws:
javax.el.ELException
-