Class UpdatePublishStatusEntityListener

java.lang.Object
ch.tocco.nice2.dms.impl.entitylistener.status.UpdatePublishStatusEntityListener
All Implemented Interfaces:
EntityFacadeListener, EventListener

public class UpdatePublishStatusEntityListener extends Object implements EntityFacadeListener
This EntityFacadeListener sets the publish status on a given entity. You have to provide the information which entity should be updated on which event by contributing UpdateStatusContributions. The following information is needed: + event: The event to listen on ("changing", "creating", "deleting" or "relationChanging") + entityName: The name of the entity where the change is captured + mainEntityRelationPath: The relation path to the entity which owns the publish status + contentService: The ContentService to use for updating the status. Example for Resource: + event: "changing" + entityName: "Resource_content" + mainEntityRelationPath: "relContent_resource" + contentService: "service:ResourceContentService" This means: We listen on the "changing" event on the entity "Resource_content" and then follow the relation "relContent_resource" to the "Resource" entity whose status is set to "changed" by using the "ResourceContentService".