|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.transfer.AlienProcessorImpl
public class AlienProcessorImpl
Class to encapsulate the behaviour of "Alien" nodes.
Constructor Summary | |
---|---|
AlienProcessorImpl()
|
Method Summary | |
---|---|
void |
afterMoveAlien(org.alfresco.service.cmr.repository.ChildAssociationRef newAssocRef)
Called when an alien node has been moved from one parent to another. |
void |
beforeDeleteAlien(org.alfresco.service.cmr.repository.NodeRef deletedNodeRef,
org.alfresco.service.cmr.repository.ChildAssociationRef oldAssoc)
Called before deleting an alien node. |
BehaviourFilter |
getBehaviourFilter()
|
DescriptorService |
getDescriptorService()
|
org.alfresco.service.cmr.dictionary.DictionaryService |
getDictionaryService()
|
org.alfresco.service.cmr.repository.NodeService |
getNodeService()
|
void |
init()
|
boolean |
isAlien(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Has the node been invaded by aliens ? |
void |
onCreateChild(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
java.lang.String repositoryId,
boolean isNewNode)
Called before creating a child of a transferred node. |
void |
pruneNode(org.alfresco.service.cmr.repository.NodeRef nodeToPrune,
java.lang.String fromRepositoryId)
Prune the given node of aliens from the specified repositoryId. |
void |
setBehaviourFilter(BehaviourFilter behaviourFilter)
|
void |
setDescriptorService(DescriptorService descriptorService)
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlienProcessorImpl()
Method Detail |
---|
public void init()
public void onCreateChild(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef, java.lang.String repositoryId, boolean isNewNode)
AlienProcessor
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.
onCreateChild
in interface AlienProcessor
childAssocRef
- the association ref to the new noderepositoryId
- - the repositoryId of the system who owns the new node.isNewNode
- - is this a new nidepublic void beforeDeleteAlien(org.alfresco.service.cmr.repository.NodeRef deletedNodeRef, org.alfresco.service.cmr.repository.ChildAssociationRef oldAssoc)
AlienProcessor
The tree needs to be walked upwards to take account of the removed alien node.
beforeDeleteAlien
in interface AlienProcessor
oldAssoc
- null if the deleted node is still "in place" and readable else the old ref prior to
the node being moved.public void afterMoveAlien(org.alfresco.service.cmr.repository.ChildAssociationRef newAssocRef)
AlienProcessor
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.
afterMoveAlien
in interface AlienProcessor
public boolean isAlien(org.alfresco.service.cmr.repository.NodeRef nodeRef)
AlienProcessor
isAlien
in interface AlienProcessor
nodeRef
- the node to check
public void pruneNode(org.alfresco.service.cmr.repository.NodeRef nodeToPrune, java.lang.String fromRepositoryId)
AlienProcessor
So any children that are only invaded by the specified repository are deleted.
Folders which are invaded by more than one repository will remain.
pruneNode
in interface AlienProcessor
nodeToPrune
- the root to prunefromRepositoryId
- the repositoryId to prune.public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public org.alfresco.service.cmr.repository.NodeService getNodeService()
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
public BehaviourFilter getBehaviourFilter()
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()
public void setDescriptorService(DescriptorService descriptorService)
public DescriptorService getDescriptorService()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |