Package org.alfresco.repo.transfer
Interface AlienProcessor
- All Known Implementing Classes:
AlienProcessorImpl
public interface AlienProcessor
This class groups together the business logic for alien nodes which are
transferred nodes that contain children from another repository.
Alien nodes cannot be deleted through the transfer service, instead they are "pruned"
This class owns the aspect trx:alien (TransferModel.ASPECT_ALIEN)
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterMoveAlien(ChildAssociationRef newAssocRef) Called when an alien node has been moved from one parent to another.voidbeforeDeleteAlien(NodeRef deletedNodeRef, ChildAssociationRef oldRef) Called before deleting an alien node.booleanHas the node been invaded by aliens ?voidonCreateChild(ChildAssociationRef childAssocRef, String repositoryId, boolean isNewNode) Called before creating a child of a transferred node.voidPrune the given node of aliens from the specified repositoryId.
-
Method Details
-
pruneNode
Prune the given node of aliens from the specified repositoryId.So any children that are only invaded by the specified repository are deleted.
Folders which are invaded by more than one repository will remain.
- Parameters:
parentNodeRef- the root to prunefromRepositoryId- the repositoryId to prune.
-
isAlien
Has the node been invaded by aliens ?- Parameters:
nodeRef- the node to check- Returns:
- true the node has been invaded by aliens.
-
onCreateChild
Called before creating a child of a transferred node.When a new node is created as a child of a Transferred or Alien node then the new node needs to be marked as an alien.
Then the tree needs to be walked upwards to mark all parent transferred nodes as alien.
- Parameters:
childAssocRef- the association ref to the new noderepositoryId- - the repositoryId of the system who owns the new node.isNewNode- - is this a new nide
-
afterMoveAlien
Called when an alien node has been moved from one parent to another.If the new parent is transferred or alien may make the new parent an alien.
The alien node may also stop being an alien node.
-
beforeDeleteAlien
Called before deleting an alien node.The tree needs to be walked upwards to take account of the removed alien node.
- Parameters:
deletedNodeRef- node about to be deletedoldRef- null if the deleted node is still "in place" and readable else the old ref prior to the node being moved.
-