|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.copy.AbstractCopyBehaviourCallback
org.alfresco.repo.copy.CompoundCopyBehaviourCallback
public class CompoundCopyBehaviourCallback
Handles compound behavioural callbacks for the same dictionary class (type or aspect).
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.
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 | |
---|---|
CompoundCopyBehaviourCallback(org.alfresco.service.namespace.QName classQName)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class org.alfresco.repo.copy.AbstractCopyBehaviourCallback |
---|
recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviour |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompoundCopyBehaviourCallback(org.alfresco.service.namespace.QName classQName)
classQName
- theMethod Detail |
---|
public void addBehaviour(CopyBehaviourCallback callback)
public java.lang.String toString()
toString
in class java.lang.Object
public org.alfresco.util.Pair 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 association
CopyBehaviourCallback.AssocCopySourceAction.COPY_REMOVE_EXISTING
and
CopyBehaviourCallback.AssocCopyTargetAction.USE_COPIED_TARGET
public 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 reference
public 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 association
public CopyBehaviourCallback.ChildAssocRecurseAction getChildAssociationRecurseAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
ChildAssocRecurseAction
ordering to drive recursive copy behaviour.
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 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |