Package org.nuxeo.ecm.platform.actions
Class AbstractActionContext
- java.lang.Object
-
- org.nuxeo.ecm.platform.actions.AbstractActionContext
-
- All Implemented Interfaces:
Serializable
,ActionContext
- Direct Known Subclasses:
ELActionContext
public abstract class AbstractActionContext extends Object implements ActionContext
- Since:
- 5.7.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModel
currentDocument
protected NuxeoPrincipal
currentPrincipal
protected CoreSession
docMgr
protected Map<String,Object>
localVariables
-
Constructor Summary
Constructors Constructor Description AbstractActionContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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 globallyDocumentModel
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-
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
evalExpression
-
-
-
-
Field Detail
-
currentDocument
protected DocumentModel currentDocument
-
docMgr
protected CoreSession docMgr
-
currentPrincipal
protected NuxeoPrincipal currentPrincipal
-
-
Method Detail
-
checkCondition
public abstract 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
- Throws:
javax.el.ELException
-
setCurrentDocument
public final void setCurrentDocument(DocumentModel doc)
Description copied from interface:ActionContext
Sets the current document to use for filter evaluation- Specified by:
setCurrentDocument
in interfaceActionContext
-
getCurrentDocument
public final DocumentModel getCurrentDocument()
Description copied from interface:ActionContext
Returns the current document to use for filter evaluation- Specified by:
getCurrentDocument
in interfaceActionContext
-
getDocumentManager
public final CoreSession getDocumentManager()
Description copied from interface:ActionContext
Returns the core session to use for filter evaluation- Specified by:
getDocumentManager
in interfaceActionContext
-
setDocumentManager
public final void setDocumentManager(CoreSession docMgr)
Description copied from interface:ActionContext
Sets the core session to use for filter evaluation- Specified by:
setDocumentManager
in interfaceActionContext
-
getCurrentPrincipal
public final NuxeoPrincipal getCurrentPrincipal()
Description copied from interface:ActionContext
Returns the current principal to use for filter evaluation- Specified by:
getCurrentPrincipal
in interfaceActionContext
-
setCurrentPrincipal
public final void setCurrentPrincipal(NuxeoPrincipal currentPrincipal)
Description copied from interface:ActionContext
Sets the current principal to use for filter evaluation- Specified by:
setCurrentPrincipal
in interfaceActionContext
-
getLocalVariable
public Object getLocalVariable(String key)
Description copied from interface:ActionContext
Returns a local variable put in the context- Specified by:
getLocalVariable
in interfaceActionContext
-
putLocalVariable
public Object putLocalVariable(String key, Object value)
Description copied from interface:ActionContext
Sets a local variable, to put in the context so that expressions can reference it.- Specified by:
putLocalVariable
in interfaceActionContext
-
putAllLocalVariables
public void putAllLocalVariables(Map<String,Object> vars)
Description copied from interface:ActionContext
Sets local variables, to put in the context so that expressions can reference them.- Specified by:
putAllLocalVariables
in interfaceActionContext
-
size
public int size()
Description copied from interface:ActionContext
Returns the number of local variables- Specified by:
size
in interfaceActionContext
-
disableGlobalCaching
public boolean disableGlobalCaching()
Description copied from interface:ActionContext
Returns true if expressions evaluation should not be cached globally- Specified by:
disableGlobalCaching
in interfaceActionContext
-
-