mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4128 : transfer service.
alien nodes : restore and move implementation and unit test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21744 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,7 +16,12 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
public interface AlienProcessor
|
||||
{
|
||||
/**
|
||||
* Prune the given node of aliens from the specified repositoryId
|
||||
* Prune the given node of aliens from the specified repositoryId.
|
||||
* <p>
|
||||
* So any children that are only invaded by the specified repository are deleted.
|
||||
* <p>
|
||||
* Folders which are invaded by more than one repository will remain.
|
||||
*
|
||||
* @param parentNodeRef the root to prune
|
||||
* @param fromRepositoryId the repositoryId to prune.
|
||||
*/
|
||||
@@ -29,25 +34,38 @@ public interface AlienProcessor
|
||||
*/
|
||||
public boolean isAlien(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Called before deleting an alien node.
|
||||
*
|
||||
* @param nodeBeingDeleted node about to be deleted
|
||||
*/
|
||||
public void beforeDeleteAlien(NodeRef deletedNodeRef);
|
||||
|
||||
/**
|
||||
* Called before creating a child of a transferred node.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* Then the tree needs to be walked upwards to mark all parent
|
||||
* transferred nodes as alien.
|
||||
* transferred nodes as alien.
|
||||
*
|
||||
* @param childAssocRef the association ref to the new node
|
||||
* @param repositoryId - the repositoryId of the system who owns the new node.
|
||||
* @param isNewNode - is this a new nide
|
||||
*/
|
||||
public void onCreateChild(ChildAssociationRef childAssocRef, String repositoryId);
|
||||
|
||||
public void onCreateChild(ChildAssociationRef childAssocRef, String repositoryId, boolean isNewNode);
|
||||
|
||||
/**
|
||||
* Called when an alien node has been moved from one parent to another.
|
||||
* <p>
|
||||
* If the new parent is transferred or alien may make the new parent an alien.
|
||||
* <p>
|
||||
* The alien node may also stop being an alien node.
|
||||
*/
|
||||
public void afterMoveAlien(ChildAssociationRef newAssocRef);
|
||||
|
||||
/**
|
||||
* Called before deleting an alien node.
|
||||
* <p>
|
||||
* The tree needs to be walked upwards to take account of the removed alien node.
|
||||
*
|
||||
* @param nodeBeingDeleted node about to be deleted
|
||||
* @param oldRef null if the deleted node is still "in place" and readable else the old ref prior to
|
||||
* the node being moved.
|
||||
*/
|
||||
public void beforeDeleteAlien(NodeRef deletedNodeRef, ChildAssociationRef oldRef);
|
||||
}
|
||||
|
Reference in New Issue
Block a user