Package org.alfresco.repo.transfer
Class AlienProcessorImpl
java.lang.Object
org.alfresco.repo.transfer.AlienProcessorImpl
- All Implemented Interfaces:
AlienProcessor
Class to encapsulate the behaviour of "Alien" nodes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterMoveAlien(ChildAssociationRef newAssocRef) Called when an alien node has been moved from one parent to another.voidbeforeDeleteAlien(NodeRef deletedNodeRef, ChildAssociationRef oldAssoc) Called before deleting an alien node.voidinit()booleanHas the node been invaded by aliens ?protected voidlogInvasionHierarchy(NodeRef parentRef, NodeRef childRef) Puts information about currentchildRefand itsparentRefinto log in TRACE level.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.voidsetBehaviourFilter(BehaviourFilter behaviourFilter) voidsetDescriptorService(DescriptorService descriptorService) voidsetDictionaryService(DictionaryService dictionaryService) voidsetNodeService(NodeService nodeService)
-
Constructor Details
-
AlienProcessorImpl
public AlienProcessorImpl()
-
-
Method Details
-
init
public void init() -
onCreateChild
public void onCreateChild(ChildAssociationRef childAssocRef, String repositoryId, boolean isNewNode) Description copied from interface:AlienProcessorCalled 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.
- Specified by:
onCreateChildin interfaceAlienProcessor- 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
-
logInvasionHierarchy
Puts information about currentchildRefand itsparentRefinto log in TRACE level. Information includes 'name', 'fromRepositoryId', 'aliened' and 'invadedBy' properties. Additionally, collects the same information for children ofchildRef -
beforeDeleteAlien
Description copied from interface:AlienProcessorCalled before deleting an alien node.The tree needs to be walked upwards to take account of the removed alien node.
- Specified by:
beforeDeleteAlienin interfaceAlienProcessor- Parameters:
deletedNodeRef- node about to be deletedoldAssoc- null if the deleted node is still "in place" and readable else the old ref prior to the node being moved.
-
afterMoveAlien
Description copied from interface:AlienProcessorCalled 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.
- Specified by:
afterMoveAlienin interfaceAlienProcessor
-
isAlien
Description copied from interface:AlienProcessorHas the node been invaded by aliens ?- Specified by:
isAlienin interfaceAlienProcessor- Parameters:
nodeRef- the node to check- Returns:
- true the node has been invaded by aliens.
-
pruneNode
Description copied from interface:AlienProcessorPrune 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.
- Specified by:
pruneNodein interfaceAlienProcessor- Parameters:
nodeToPrune- the root to prunefromRepositoryId- the repositoryId to prune.
-
setNodeService
-
getNodeService
-
setBehaviourFilter
-
getBehaviourFilter
-
setDictionaryService
-
getDictionaryService
-
setDescriptorService
-
getDescriptorService
-