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.ExpressionFactoryEXPRESSION_FACTORYprotected javax.el.ExpressionFactoryexpressionFactoryprotected javax.el.ELContextoriginalContext-
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 booleancheckCondition(String expression)Returns true if given expression resolves to true in this context.<T> TevalExpression(String expression, Class<T> expectedType)Evaluates the givenexpressionand 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:ActionContextEvaluates the givenexpressionand returns the result cast to the givenexpectedType.- Specified by:
evalExpressionin 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:ActionContextReturns true if given expression resolves to true in this context.Returns false if expression is blank (null or empty).
- Specified by:
checkConditionin interfaceActionContext- Specified by:
checkConditionin classAbstractActionContext- Throws:
javax.el.ELException
-
-