public class CompoundCopyBehaviourCallback extends AbstractCopyBehaviourCallback
When multiple policy handlers register callback for the same model class, an instance of this class is used to resolve the calls. The behaviour is sometimes able to resolve conflicts and sometimes not. Look at the individual callback methods to see how conflicts are handled.
CopyBehaviourCallback.AssocCopySourceAction, CopyBehaviourCallback.AssocCopyTargetAction, CopyBehaviourCallback.ChildAssocCopyAction, CopyBehaviourCallback.ChildAssocRecurseAction, CopyBehaviourCallback.CopyAssociationDetails, CopyBehaviourCallback.CopyChildAssociationDetails| Constructor and Description |
|---|
CompoundCopyBehaviourCallback(org.alfresco.service.namespace.QName classQName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBehaviour(CopyBehaviourCallback callback) |
org.alfresco.util.Pair |
getAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
Determine the copy behaviour associated with a given peer association.
|
CopyBehaviourCallback.ChildAssocCopyAction |
getChildAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
Uses the
ChildAssocCopyAction ordering to drive priority i.e. |
CopyBehaviourCallback.ChildAssocRecurseAction |
getChildAssociationRecurseAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
Uses the
ChildAssocRecurseAction ordering to drive recursive copy behaviour. |
java.util.Map |
getCopyProperties(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
java.util.Map properties)
The lowest common denominator applies here.
|
boolean |
getMustCopy(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails)
Individual callbacks effectively have a veto on the copy i.e.
|
java.lang.String |
toString() |
recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviourpublic CompoundCopyBehaviourCallback(org.alfresco.service.namespace.QName classQName)
classQName - thepublic void addBehaviour(CopyBehaviourCallback callback)
public java.lang.String toString()
toString in class java.lang.Objectpublic org.alfresco.util.Pair getAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
CopyBehaviourCallbackgetAssociationCopyAction 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 boolean getMustCopy(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails)
CopyBehaviourCallback#mustCopy(NodeRef),
then the copy will NOT proceed. However, a warning is generated indicating that
there is a conflict in the defined behaviour.classQName - the name of the class that this is being invoked forcopyDetails - the source node's copy details for quick referencepublic CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
ChildAssocCopyAction ordering to drive priority i.e. a vote
to copy will override a vote NOT to copy.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 associationpublic CopyBehaviourCallback.ChildAssocRecurseAction getChildAssociationRecurseAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
ChildAssocRecurseAction ordering to drive recursive copy behaviour.getChildAssociationRecurseAction in interface CopyBehaviourCallbackgetChildAssociationRecurseAction in class AbstractCopyBehaviourCallbackclassQName - 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#getChildAssociationCopyAction(QName, CopyDetails, ChildAssociationRef, boolean)public 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.