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
public class ELActionContext extends AbstractActionContext implements ActionContext
Default EL action context- Since:
- 5.7.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static javax.el.ExpressionFactory
EXPRESSION_FACTORY
protected javax.el.ExpressionFactory
expressionFactory
protected javax.el.ELContext
originalContext
-
Fields inherited from class org.nuxeo.ecm.platform.actions.AbstractActionContext
currentDocument, currentPrincipal, docMgr, localVariables
-
-
Constructor Summary
Constructors Constructor Description ELActionContext()
ELActionContext(javax.el.ELContext originalContext, javax.el.ExpressionFactory expressionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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
-
-
-
-
Method Detail
-
evalExpression
public <T> T evalExpression(String expression, Class<T> expectedType) throws javax.el.ELException
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
public boolean checkCondition(String expression) throws javax.el.ELException
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
-
-