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 DocumentModelcurrentDocumentprotected NuxeoPrincipalcurrentPrincipalprotected CoreSessiondocMgrprotected 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 booleancheckCondition(String expression)Returns true if given expression resolves to true in this context.booleandisableGlobalCaching()Returns true if expressions evaluation should not be cached globallyDocumentModelgetCurrentDocument()Returns the current document to use for filter evaluationNuxeoPrincipalgetCurrentPrincipal()Returns the current principal to use for filter evaluationCoreSessiongetDocumentManager()Returns the core session to use for filter evaluationObjectgetLocalVariable(String key)Returns a local variable put in the contextvoidputAllLocalVariables(Map<String,Object> vars)Sets local variables, to put in the context so that expressions can reference them.ObjectputLocalVariable(String key, Object value)Sets a local variable, to put in the context so that expressions can reference it.voidsetCurrentDocument(DocumentModel doc)Sets the current document to use for filter evaluationvoidsetCurrentPrincipal(NuxeoPrincipal currentPrincipal)Sets the current principal to use for filter evaluationvoidsetDocumentManager(CoreSession docMgr)Sets the core session to use for filter evaluationintsize()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:ActionContextReturns true if given expression resolves to true in this context.Returns false if expression is blank (null or empty).
- Specified by:
checkConditionin interfaceActionContext- Throws:
javax.el.ELException
-
setCurrentDocument
public final void setCurrentDocument(DocumentModel doc)
Description copied from interface:ActionContextSets the current document to use for filter evaluation- Specified by:
setCurrentDocumentin interfaceActionContext
-
getCurrentDocument
public final DocumentModel getCurrentDocument()
Description copied from interface:ActionContextReturns the current document to use for filter evaluation- Specified by:
getCurrentDocumentin interfaceActionContext
-
getDocumentManager
public final CoreSession getDocumentManager()
Description copied from interface:ActionContextReturns the core session to use for filter evaluation- Specified by:
getDocumentManagerin interfaceActionContext
-
setDocumentManager
public final void setDocumentManager(CoreSession docMgr)
Description copied from interface:ActionContextSets the core session to use for filter evaluation- Specified by:
setDocumentManagerin interfaceActionContext
-
getCurrentPrincipal
public final NuxeoPrincipal getCurrentPrincipal()
Description copied from interface:ActionContextReturns the current principal to use for filter evaluation- Specified by:
getCurrentPrincipalin interfaceActionContext
-
setCurrentPrincipal
public final void setCurrentPrincipal(NuxeoPrincipal currentPrincipal)
Description copied from interface:ActionContextSets the current principal to use for filter evaluation- Specified by:
setCurrentPrincipalin interfaceActionContext
-
getLocalVariable
public Object getLocalVariable(String key)
Description copied from interface:ActionContextReturns a local variable put in the context- Specified by:
getLocalVariablein interfaceActionContext
-
putLocalVariable
public Object putLocalVariable(String key, Object value)
Description copied from interface:ActionContextSets a local variable, to put in the context so that expressions can reference it.- Specified by:
putLocalVariablein interfaceActionContext
-
putAllLocalVariables
public void putAllLocalVariables(Map<String,Object> vars)
Description copied from interface:ActionContextSets local variables, to put in the context so that expressions can reference them.- Specified by:
putAllLocalVariablesin interfaceActionContext
-
size
public int size()
Description copied from interface:ActionContextReturns the number of local variables- Specified by:
sizein interfaceActionContext
-
disableGlobalCaching
public boolean disableGlobalCaching()
Description copied from interface:ActionContextReturns true if expressions evaluation should not be cached globally- Specified by:
disableGlobalCachingin interfaceActionContext
-
-