Class EventHandler
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.events.EventHandler
-
public class EventHandler extends Object
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected Filter
attribute
protected String
chainId
protected String
condition
protected Set<String>
doctypes
protected Set<String>
events
protected String
facet
protected Boolean
isAdministrator
protected boolean
isPostCommit
protected String[]
lifeCycle
protected List<String>
memberOf
the principal should be member of at least one of the groups.protected String
pathStartsWith
-
Constructor Summary
Constructors Constructor Description EventHandler()
EventHandler(String eventId, String chainId)
EventHandler(Set<String> eventId, String chainId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_setCondition(String expr)
protected String
convertExpr(String expr)
Filter
getAttribute()
String
getChainId()
String
getCondition()
Condition to define on event handlerSet<String>
getDoctypes()
Set<String>
getEvents()
String
getFacet()
Boolean
getIsAdministrator()
String[]
getLifeCycle()
List<String>
getMemberOf()
String
getPathStartsWith()
boolean
isEnabled(OperationContext ctx, EventContext eventCtx, boolean quick)
Checks if this handler should run for the event and operation context.boolean
isPostCommit()
void
setAttribute(String attribute)
void
setAttributeFilter(Filter attribute)
void
setChainId(String chainId)
void
setCondition(String condition)
void
setDoctypes(Set<String> doctypes)
void
setFacet(String facet)
void
setIsAdministrator(Boolean isAdministrator)
void
setLifeCycle(String[] lifeCycle)
protected void
setLifeCycleExpr(String lifeCycles)
void
setMemberOf(List<String> groups)
void
setPathStartsWith(String pathStartsWith)
void
setPostCommit(boolean isPostCommit)
-
-
-
Field Detail
-
isPostCommit
protected boolean isPostCommit
-
pathStartsWith
protected String pathStartsWith
-
memberOf
protected List<String> memberOf
the principal should be member of at least one of the groups. OR is used
-
isAdministrator
protected Boolean isAdministrator
-
-
Constructor Detail
-
EventHandler
public EventHandler()
-
EventHandler
public EventHandler(String eventId, String chainId)
-
EventHandler
public EventHandler(Set<String> eventId, String chainId)
-
-
Method Detail
-
setLifeCycleExpr
protected void setLifeCycleExpr(String lifeCycles)
-
setAttribute
public void setAttribute(String attribute)
-
_setCondition
protected void _setCondition(String expr)
-
convertExpr
protected String convertExpr(String expr)
-
getChainId
public String getChainId()
-
setPostCommit
public void setPostCommit(boolean isPostCommit)
-
isPostCommit
public boolean isPostCommit()
-
setAttributeFilter
public void setAttributeFilter(Filter attribute)
-
setIsAdministrator
public void setIsAdministrator(Boolean isAdministrator)
-
setMemberOf
public void setMemberOf(List<String> groups)
-
setPathStartsWith
public void setPathStartsWith(String pathStartsWith)
-
setDoctypes
public void setDoctypes(Set<String> doctypes)
-
setLifeCycle
public void setLifeCycle(String[] lifeCycle)
-
setChainId
public void setChainId(String chainId)
-
getCondition
public String getCondition()
Condition to define on event handler- Since:
- 5.7
-
setCondition
public void setCondition(String condition)
- Since:
- 5.9.1
-
getAttribute
public Filter getAttribute()
-
getLifeCycle
public String[] getLifeCycle()
-
getMemberOf
public List<String> getMemberOf()
-
getIsAdministrator
public Boolean getIsAdministrator()
-
getPathStartsWith
public String getPathStartsWith()
-
getDoctypes
public Set<String> getDoctypes()
-
isEnabled
public boolean isEnabled(OperationContext ctx, EventContext eventCtx, boolean quick)
Checks if this handler should run for the event and operation context.- Parameters:
quick
- Iftrue
, then this method may not check all filter parameters likefilter/expression
and just returntrue
to avoid costly evaluations onShallowDocumentModel
instances
-
-