Class CopyPathEntityListener

java.lang.Object
ch.tocco.nice2.persist.core.api.util.CollectingEntityListener
ch.tocco.nice2.dms.impl.entitylistener.copypath.CopyPathEntityListener
All Implemented Interfaces:
ContextListener, EntityFacadeListener, CommitListener, EventListener

public class CopyPathEntityListener extends CollectingEntityListener
Copies the old path to the alias field, so that the node can still be reached with the old path. Domain: If the URL of a domain is changed, the URL is copied to the alias field. Since aliases of a domain apply recursively, there is no need to copy any paths of the child nodes. Folder: Folders don't have aliases. But the resources below a folder do. If the name of a folder is changed, the old paths of all resources below this folder have to be copied to their alias field. Resource: If the name of a resource is changed, the old path has to be copied to the alias field. That's it, there are no child nodes. Page: If the name of a page is changed, the old path has to be copied to the alias field. Also the old paths of all child pages have to be copied to their alias field, because the alias of page doesn't apply recursively.