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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.persist.core.api.util.CollectingEntityListener
CollectingEntityListener.EntityModelNamePredicate, CollectingEntityListener.FieldTouchedPredicate, CollectingEntityListener.RelationTouchedPredicate
-
Constructor Summary
ConstructorDescriptionCopyPathEntityListener
(ContentTreeService contentTreeService, ClientQuestionService clientQuestionService, EntityDocumentsService entityDocumentsService, TextResources textResources, BusinessUnitManager businessUnitManager, SecurityManager securityManager) -
Method Summary
Methods inherited from class ch.tocco.nice2.persist.core.api.util.CollectingEntityListener
afterCommit, beforeCommit, contextDestroying, entityChanging, entityCreating, entityDeleting, entityModel, entityRelationChanging, fieldTouched, fieldTouched, getAddedRelationChanges, getAddedRelationChangesFor, getAffectedEntities, getAffectedEntities, getAllAffectedEntities, getAllAffectedEntities, getAllRelationChanges, getCreatedEntities, getCreatedEntities, getDeletedEntities, getDeletedEntities, getKey, getOldValues, getRelationChanges, getRelationChangesFor, getRelationChangesFor, getRemovedRelationChanges, getRemovedRelationChangesFor, getUpdatedEntities, getUpdatedEntities, isValidTx, onEntityChanging, onEntityCreating, onEntityDeleting, onEntityRelationChanging, relationTouched, relationTouched, transactionStarted, withAffectedEntities, withAffectedEntities, withAllAffectedEntities, withAllAffectedEntities, withCreatedEntities, withCreatedEntities, withDeletedEntities, withDeletedEntities, withUpdatedEntities, withUpdatedEntities
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.util.CommitListener
afterFlush, priority
Methods inherited from interface ch.tocco.nice2.persist.core.api.entity.events.EntityFacadeListener
entityReceivedValues, handleSessionOnlyEntity
-
Constructor Details
-
CopyPathEntityListener
public CopyPathEntityListener(ContentTreeService contentTreeService, ClientQuestionService clientQuestionService, EntityDocumentsService entityDocumentsService, TextResources textResources, BusinessUnitManager businessUnitManager, SecurityManager securityManager)
-
-
Method Details
-
onBeforeCommit
- Specified by:
onBeforeCommit
in classCollectingEntityListener
-