Package org.nuxeo.ecm.platform.actions
Interface ActionContext
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractActionContext
,ELActionContext
Interface for action context evaluation
- Since:
- 5.7.3
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkCondition
(String expression) Returns true if given expression resolves to true in this context.boolean
Returns true if expressions evaluation should not be cached globally<T> T
evalExpression
(String expression, Class<T> expectedType) Evaluates the givenexpression
and returns the result cast to the givenexpectedType
.Returns the current document to use for filter evaluationReturns the current principal to use for filter evaluationReturns the core session to use for filter evaluationgetLocalVariable
(String key) Returns a local variable put in the contextvoid
putAllLocalVariables
(Map<String, Object> vars) Sets local variables, to put in the context so that expressions can reference them.putLocalVariable
(String key, Object value) Sets a local variable, to put in the context so that expressions can reference it.void
Sets the current document to use for filter evaluationvoid
setCurrentPrincipal
(NuxeoPrincipal currentPrincipal) Sets the current principal to use for filter evaluationvoid
setDocumentManager
(CoreSession docMgr) Sets the core session to use for filter evaluationint
size()
Returns the number of local variables
-
Method Details
-
setCurrentDocument
Sets the current document to use for filter evaluation -
getCurrentDocument
DocumentModel getCurrentDocument()Returns the current document to use for filter evaluation -
setDocumentManager
Sets the core session to use for filter evaluation -
getDocumentManager
CoreSession getDocumentManager()Returns the core session to use for filter evaluation -
setCurrentPrincipal
Sets the current principal to use for filter evaluation -
getCurrentPrincipal
NuxeoPrincipal getCurrentPrincipal()Returns the current principal to use for filter evaluation -
putLocalVariable
Sets a local variable, to put in the context so that expressions can reference it. -
putAllLocalVariables
Sets local variables, to put in the context so that expressions can reference them. -
getLocalVariable
Returns a local variable put in the context -
size
int size()Returns the number of local variables -
checkCondition
Returns true if given expression resolves to true in this context.Returns false if expression is blank (null or empty).
- Throws:
javax.el.ELException
-
evalExpression
Evaluates the givenexpression
and returns the result cast to the givenexpectedType
.- Returns:
- the result of the expression evaluation
- Throws:
javax.el.ELException
- Since:
- 10.2
-
disableGlobalCaching
boolean disableGlobalCaching()Returns true if expressions evaluation should not be cached globally
-