public abstract class AbstractCopyBehaviourCallback extends Object implements CopyBehaviourCallback
CopyBehaviourCallback.AssocCopySourceAction, CopyBehaviourCallback.AssocCopyTargetAction, CopyBehaviourCallback.ChildAssocCopyAction, CopyBehaviourCallback.ChildAssocRecurseAction, CopyBehaviourCallback.CopyAssociationDetails, CopyBehaviourCallback.CopyChildAssociationDetails| Constructor and Description |
|---|
AbstractCopyBehaviourCallback() |
| Modifier and Type | Method and Description |
|---|---|
org.alfresco.util.Pair<CopyBehaviourCallback.AssocCopySourceAction,CopyBehaviourCallback.AssocCopyTargetAction> |
getAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
Determine the copy behaviour associated with a given peer association.
|
CopyBehaviourCallback.ChildAssocRecurseAction |
getChildAssociationRecurseAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
Once the child association copy action has been chosen, the policy callback can
dictate whether or not to force further recursion.
|
boolean |
isTopLevelCanBeRenamed(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails)
By default it is forbidden for top-level nodes to be renamed
|
void |
recordNodeRefsForRepointing(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
Map<org.alfresco.service.namespace.QName,Serializable> properties,
org.alfresco.service.namespace.QName propertyQName)
Helper method to transactionally record
NodeRef properties so that they
can later be fixed up to point to the relative, after-copy locations. |
void |
repointNodeRefs(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef targetNodeRef,
org.alfresco.service.namespace.QName propertyQName,
Map<org.alfresco.service.cmr.repository.NodeRef,org.alfresco.service.cmr.repository.NodeRef> copyMap,
org.alfresco.service.cmr.repository.NodeService nodeService)
The second stage of the
NodeRef repointing. |
protected void |
throwExceptionForUnexpectedBehaviour(CopyDetails copyDetails,
String... otherDetails) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildAssociationCopyAction, getCopyProperties, getMustCopypublic org.alfresco.util.Pair<CopyBehaviourCallback.AssocCopySourceAction,CopyBehaviourCallback.AssocCopyTargetAction> getAssociationCopyAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
CopyBehaviourCallbackgetAssociationCopyAction in interface CopyBehaviourCallbackclassQName - 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.ChildAssocRecurseAction getChildAssociationRecurseAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
CopyBehaviourCallbackgetChildAssociationRecurseAction in interface CopyBehaviourCallbackclassQName - 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 associationCopyBehaviourCallback.getChildAssociationCopyAction(QName, CopyDetails, CopyChildAssociationDetails)protected void throwExceptionForUnexpectedBehaviour(CopyDetails copyDetails, String... otherDetails)
IllegalStateException - alwayspublic void recordNodeRefsForRepointing(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
Map<org.alfresco.service.namespace.QName,Serializable> properties,
org.alfresco.service.namespace.QName propertyQName)
NodeRef properties so that they
can later be fixed up to point to the relative, after-copy locations.
When the copy has been completed, the second stage of the process can be applied.
sourceNodeRef - the node that is being copiedproperties - the node properties being copiedpropertyQName - the qualified name of the property to checkrepointNodeRefs(NodeRef, NodeRef, QName, Map, NodeService)public void repointNodeRefs(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
org.alfresco.service.cmr.repository.NodeRef targetNodeRef,
org.alfresco.service.namespace.QName propertyQName,
Map<org.alfresco.service.cmr.repository.NodeRef,org.alfresco.service.cmr.repository.NodeRef> copyMap,
org.alfresco.service.cmr.repository.NodeService nodeService)
NodeRef repointing. Call this method to have
any NodeRef properties readjusted to reflect the copied node hierarchy.
Only use this method if it a requirement for the particular type or aspect that you
are coding for.sourceNodeRef - the source nodepropertyQName - the target node i.e. the copy of the source nodecopyMap - the full hierarchy copy map of source to copiesrecordNodeRefsForRepointing(NodeRef, Map, QName)public boolean isTopLevelCanBeRenamed(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails)
isTopLevelCanBeRenamed in interface CopyBehaviourCallbackclassQName - the name of the class that this is being invoked forcopyDetails - the source node's copy details for quick referenceCopyright © 2005–2018 Alfresco Software. All rights reserved.