Package org.alfresco.repo.event2
Class EventConsolidator<REF extends EntityRef,RES extends org.alfresco.repo.event.v1.model.Resource>
java.lang.Object
org.alfresco.repo.event2.EventConsolidator<REF,RES>
- Type Parameters:
REF- entity (e.g. node, child association, peer association) reference typeRES- entity resource type
- Direct Known Subclasses:
ChildAssociationEventConsolidator,NodeEventConsolidator,PeerAssociationEventConsolidator
public abstract class EventConsolidator<REF extends EntityRef,RES extends org.alfresco.repo.event.v1.model.Resource>
extends Object
Encapsulates events occurred in a single transaction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected REFprotected final Deque<org.alfresco.repo.event.v1.model.EventType>protected final NodeResourceHelperprotected RES -
Constructor Summary
ConstructorsConstructorDescriptionEventConsolidator(REF entityReference, NodeResourceHelper nodeResourceHelper) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.alfresco.repo.event.v1.model.DataAttributes<RES>buildEventData(EventInfo eventInfo, RES resource, org.alfresco.repo.event.v1.model.EventType eventType) Provides primary event data.protected abstract org.alfresco.repo.event.v1.model.EventTypeGet a derived event for a transaction.abstract QNameGet entity (e.g.Deque<org.alfresco.repo.event.v1.model.EventType>Get event types.org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<RES>>getRepoEvent(EventInfo eventInfo) Builds and returns theRepoEventinstance.abstract booleanWhether the entity has been created and then deleted, e.g.
-
Field Details
-
eventTypes
-
helper
-
entityReference
-
resource
-
-
Constructor Details
-
EventConsolidator
-
-
Method Details
-
getEntityType
Get entity (e.g. node, peer association, child association) type.- Returns:
- QName the peer association type
-
isTemporaryEntity
public abstract boolean isTemporaryEntity()Whether the entity has been created and then deleted, e.g. a temporary node.- Returns:
trueif the node has been created and then deleted, otherwise false
-
getDerivedEvent
protected abstract org.alfresco.repo.event.v1.model.EventType getDerivedEvent()Get a derived event for a transaction.- Returns:
- a derived event type
-
getEventTypes
Get event types.- Returns:
- Deque
queue of event types
-
getRepoEvent
public org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<RES>> getRepoEvent(EventInfo eventInfo) Builds and returns theRepoEventinstance.- Parameters:
eventInfo- the object holding the event information- Returns:
- the
RepoEventinstance
-
buildEventData
protected org.alfresco.repo.event.v1.model.DataAttributes<RES> buildEventData(EventInfo eventInfo, RES resource, org.alfresco.repo.event.v1.model.EventType eventType) Provides primary event data.
-