public class DefaultCopyBehaviourCallback extends AbstractCopyBehaviourCallback
behaviour.
This implementation is stateless and therefore thread-safe.
The default behaviour is:
CopyBehaviourCallback.AssocCopySourceAction, CopyBehaviourCallback.AssocCopyTargetAction, CopyBehaviourCallback.ChildAssocCopyAction, CopyBehaviourCallback.ChildAssocRecurseAction, CopyBehaviourCallback.CopyAssociationDetails, CopyBehaviourCallback.CopyChildAssociationDetails| Constructor and Description |
|---|
DefaultCopyBehaviourCallback() |
| Modifier and Type | Method and Description |
|---|---|
org.alfresco.util.Pair |
getAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
Default behaviour:
* AssocCopySourceAction#COPY_REMOVE_EXISTING* AssocCopyTargetAction#USE_COPIED_OTHERWISE_ORIGINAL_TARGET |
CopyBehaviourCallback.ChildAssocCopyAction |
getChildAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
Default behaviour: Cascade if we are copying children AND the association is primary
|
java.util.Map |
getCopyProperties(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
java.util.Map properties)
Default behaviour: Copy all associated properties
|
static CopyBehaviourCallback |
getInstance() |
boolean |
getMustCopy(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails)
Default behaviour: Always copy
|
getChildAssociationRecurseAction, recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviourpublic static CopyBehaviourCallback getInstance()
public boolean getMustCopy(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails)
classQName - the name of the class that this is being invoked forcopyDetails - the source node's copy details for quick referencepublic org.alfresco.util.Pair getAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
AssocCopySourceAction#COPY_REMOVE_EXISTINGAssocCopyTargetAction#USE_COPIED_OTHERWISE_ORIGINAL_TARGETgetAssociationCopyAction in interface CopyBehaviourCallbackgetAssociationCopyAction in class AbstractCopyBehaviourCallbackclassQName - 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 associationCopyBehaviourCallback.AssocCopySourceAction.COPY_REMOVE_EXISTING and
CopyBehaviourCallback.AssocCopyTargetAction.USE_COPIED_TARGETpublic CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
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 associationcopyChildren == truepublic java.util.Map getCopyProperties(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
java.util.Map properties)
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.Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.