Package org.nuxeo.ecm.platform.actions
Interface ActionContext
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractActionContext
,ELActionContext
public interface ActionContext extends Serializable
Interface for action context evaluation- Since:
- 5.7.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkCondition(String expression)
Returns true if given expression resolves to true in this context.boolean
disableGlobalCaching()
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
.DocumentModel
getCurrentDocument()
Returns the current document to use for filter evaluationNuxeoPrincipal
getCurrentPrincipal()
Returns the current principal to use for filter evaluationCoreSession
getDocumentManager()
Returns the core session to use for filter evaluationObject
getLocalVariable(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.Object
putLocalVariable(String key, Object value)
Sets a local variable, to put in the context so that expressions can reference it.void
setCurrentDocument(DocumentModel doc)
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 Detail
-
setCurrentDocument
void setCurrentDocument(DocumentModel doc)
Sets the current document to use for filter evaluation
-
getCurrentDocument
DocumentModel getCurrentDocument()
Returns the current document to use for filter evaluation
-
setDocumentManager
void setDocumentManager(CoreSession docMgr)
Sets the core session to use for filter evaluation
-
getDocumentManager
CoreSession getDocumentManager()
Returns the core session to use for filter evaluation
-
setCurrentPrincipal
void setCurrentPrincipal(NuxeoPrincipal currentPrincipal)
Sets the current principal to use for filter evaluation
-
getCurrentPrincipal
NuxeoPrincipal getCurrentPrincipal()
Returns the current principal to use for filter evaluation
-
putLocalVariable
Object putLocalVariable(String key, Object value)
Sets a local variable, to put in the context so that expressions can reference it.
-
putAllLocalVariables
void putAllLocalVariables(Map<String,Object> vars)
Sets local variables, to put in the context so that expressions can reference them.
-
size
int size()
Returns the number of local variables
-
checkCondition
boolean checkCondition(String expression) throws javax.el.ELException
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
<T> T evalExpression(String expression, Class<T> expectedType) throws javax.el.ELException
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
-
-