Package org.alfresco.repo.copy
Class DoNothingCopyBehaviourCallback
java.lang.Object
org.alfresco.repo.copy.AbstractCopyBehaviourCallback
org.alfresco.repo.copy.DoNothingCopyBehaviourCallback
- All Implemented Interfaces:
CopyBehaviourCallback
Simple copy behaviour to prevent any copying.
This implementation is stateless and therefore thread-safe.
- Since:
- 3.2
- Author:
- Derek Hulley
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.copy.CopyBehaviourCallback
CopyBehaviourCallback.AssocCopySourceAction, CopyBehaviourCallback.AssocCopyTargetAction, CopyBehaviourCallback.ChildAssocCopyAction, CopyBehaviourCallback.ChildAssocRecurseAction, CopyBehaviourCallback.CopyAssociationDetails, CopyBehaviourCallback.CopyChildAssociationDetails -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAssociationCopyAction(QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails) Determine the copy behaviour associated with a given peer association.getChildAssociationCopyAction(QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails) Determine if a copy should copy the child, the association only or do nothing with the given association.getCopyProperties(QName classQName, CopyDetails copyDetails, Map<QName, Serializable> properties) Modify the properties that are copied across.static CopyBehaviourCallbackbooleangetMustCopy(QName classQName, CopyDetails copyDetails) Determine if this type or aspect must be copied.Methods inherited from class org.alfresco.repo.copy.AbstractCopyBehaviourCallback
getChildAssociationRecurseAction, isTopLevelCanBeRenamed, recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviour
-
Constructor Details
-
DoNothingCopyBehaviourCallback
public DoNothingCopyBehaviourCallback()
-
-
Method Details
-
getInstance
- Returns:
- Returns a stateless singleton
-
getMustCopy
Description copied from interface:CopyBehaviourCallbackDetermine if this type or aspect must be copied. If the callback is for a type (not aspect) then this determines if the node is copied at all. If the callback is for an aspect, then this determines if the aspect is copied.- Parameters:
classQName- the name of the class that this is being invoked forcopyDetails- the source node's copy details for quick reference- Returns:
- Returns false always
-
getChildAssociationCopyAction
public CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails) Description copied from interface:CopyBehaviourCallbackDetermine if a copy should copy the child, the association only or do nothing with the given association.This is called regardless of whether 'cascade' copy has been selected by the client of the copy. Some type and aspect behaviour will mandate a copy of the child associations regardless of whether recursion is on.
- Parameters:
classQName- the name of the class that this is being invoked forcopyDetails- the source node's copy details for quick referencechildAssocCopyDetails- all other details relating to the child association- Returns:
- Returns false always
-
getCopyProperties
public Map<QName,Serializable> getCopyProperties(QName classQName, CopyDetails copyDetails, Map<QName, Serializable> properties) Description copied from interface:CopyBehaviourCallbackModify the properties that are copied across.- Parameters:
classQName- the name of the class that this is being invoked forcopyDetails- the source node's copy details for quick referenceproperties- the type- or aspect-specific properties that can be copied. The map can be manipulated and returned as required.- Returns:
- Returns an empty map always
-
getAssociationCopyAction
public Pair<CopyBehaviourCallback.AssocCopySourceAction,CopyBehaviourCallback.AssocCopyTargetAction> getAssociationCopyAction(QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails) Description copied from interface:CopyBehaviourCallbackDetermine the copy behaviour associated with a given peer association.- Specified by:
getAssociationCopyActionin interfaceCopyBehaviourCallback- Overrides:
getAssociationCopyActionin classAbstractCopyBehaviourCallback- Parameters:
classQName- the name of the class that this is being invoked forcopyDetails- the source node's copy details for quick referenceassocCopyDetails- all other details relating to the association- Returns:
- Returns
CopyBehaviourCallback.AssocCopySourceAction.COPY_REMOVE_EXISTINGandCopyBehaviourCallback.AssocCopyTargetAction.USE_COPIED_TARGET
-