Files
alfresco-community-repo/source/java/org/alfresco/repo/transfer/AlienProcessor.java
Alan Davis a4a7c5f8e7 Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
99981: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) (PARTIAL MERGE)
      99482: Merged DEV to 5.0.N (5.0.1)
         99198 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc typo in project alfresco-jlan
         99413 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project alfresco-jlan
         99205 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project core
         99415 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project data-model
         99227 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project file-transfer-receiver
         99416 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project legacy-lucene
         99417 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project qa-share
         99418 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project remote-api
         99427 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc in project Repository, letters S..Z
         99433 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc in project Repository, letters A..R
         99421 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project share-po
         99247 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc typo in project slingshot
         99248 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project slingshot
         99424 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project solr
         99426 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project solr4
         99253 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project solr-client
         99259 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project web-client
         99260 : MNT-13545: JavaDoc : Inconsistencies between the Java doc and the actual code
            - Changed Javadoc parameters inconsistence in project web-framework-commons


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@100501 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2015-03-27 23:00:01 +00:00

72 lines
2.6 KiB
Java

package org.alfresco.repo.transfer;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* This class groups together the business logic for alien nodes which are
* transferred nodes that contain children from another repository.
* <p>
* Alien nodes cannot be deleted through the transfer service, instead they are
* "pruned"
*
* <p>
* This class owns the aspect trx:alien (TransferModel.ASPECT_ALIEN)
*/
public interface AlienProcessor
{
/**
* 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.
*/
public void pruneNode(NodeRef parentNodeRef, String fromRepositoryId);
/**
* Has the node been invaded by aliens ?
* @param nodeRef the node to check
* @return true the node has been invaded by aliens.
*/
public boolean isAlien(NodeRef nodeRef);
/**
* 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.
*
* @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, 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 deletedNodeRef 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);
}