Class GenericResourcePublishEntityListener

java.lang.Object
ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener
ch.tocco.nice2.dms.impl.entitylistener.publishresource.GenericResourcePublishEntityListener
All Implemented Interfaces:
EntityFacadeListener, CommitListener, EventListener

public class GenericResourcePublishEntityListener extends CollectingAfterFlushEntityListener
Generic listener that publishes Resources satisfying any of the contributed GenericResourcePublishPredicateSuppliers' Predicate Must run after EntityDocumentsPropagateRelationEntityListener which is ensured by implementing this listener as CollectingAfterFlushEntityListener (EntityDocumentsPropagateRelationEntityListener is a normal CollectingEntityListener and runs before the after flush listeners). However the stuff here should happen in the same transaction and not as an after task as other code might rely on the entity documents being already published (so no CollectingAfterCommitListener can be used here).