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<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.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.
|
Map<org.alfresco.service.namespace.QName,Serializable> |
getCopyProperties(org.alfresco.service.namespace.QName classQName,
CopyDetails copyDetails,
Map<org.alfresco.service.namespace.QName,Serializable> 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.
|
String |
toString() |
isTopLevelCanBeRenamed, recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviour
public CompoundCopyBehaviourCallback(org.alfresco.service.namespace.QName classQName)
classQName
- thepublic void addBehaviour(CopyBehaviourCallback callback)
public org.alfresco.util.Pair<CopyBehaviourCallback.AssocCopySourceAction,CopyBehaviourCallback.AssocCopyTargetAction> getAssociationCopyAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails)
CopyBehaviourCallback
getAssociationCopyAction
in interface CopyBehaviourCallback
getAssociationCopyAction
in class AbstractCopyBehaviourCallback
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 associationCopyBehaviourCallback.AssocCopySourceAction.COPY_REMOVE_EXISTING
and
CopyBehaviourCallback.AssocCopyTargetAction.USE_COPIED_TARGET
public boolean getMustCopy(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails)
CopyBehaviourCallback.getMustCopy(org.alfresco.service.namespace.QName, org.alfresco.repo.copy.CopyDetails)
,
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)
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)
getChildAssociationRecurseAction
in interface CopyBehaviourCallback
getChildAssociationRecurseAction
in class AbstractCopyBehaviourCallback
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 associationCopyBehaviourCallback.getChildAssociationCopyAction(QName, CopyDetails, CopyChildAssociationDetails)
public Map<org.alfresco.service.namespace.QName,Serializable> getCopyProperties(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, Map<org.alfresco.service.namespace.QName,Serializable> 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–2017 Alfresco Software. All rights reserved.