org.alfresco.repo.copy
Class DefaultCopyBehaviourCallback
org.alfresco.repo.copy.AbstractCopyBehaviourCallback org.alfresco.repo.copy.DefaultCopyBehaviourCallback All Implemented Interfaces:
-
org.alfresco.traitextender.Extensible, org.alfresco.repo.copy.CopyBehaviourCallback
@org.alfresco.api.AlfrescoPublicApi
public class DefaultCopyBehaviourCallback
extends org.alfresco.repo.copy.AbstractCopyBehaviourCallback
implements org.alfresco.traitextender.Extensible
The default behaviour that a type of aspect implements if there is no associated
<
behaviour.
This implementation is stateless and therefore thread-safe.
The default behaviour is:
- Must Copy: YES
- Must Cascade: YES, if cascade is on
- Properties to Copy:ALL
Since:
-
3.2
Author:
-
Derek Hulley
Nested classes/interfaces inherited from interface org.alfresco.repo.copy.CopyBehaviourCallback |
CopyBehaviourCallback.AssocCopySourceAction, CopyBehaviourCallback.AssocCopyTargetAction, CopyBehaviourCallback.ChildAssocCopyAction, CopyBehaviourCallback.ChildAssocRecurseAction, CopyBehaviourCallback.CopyAssociationDetails, CopyBehaviourCallback.CopyChildAssociationDetails |
Method Summary |
Pair<org.alfresco.repo.copy.CopyBehaviourCallback.AssocCopySourceAction,org.alfresco.repo.copy.CopyBehaviourCallback.AssocCopyTargetAction> |
getAssociationCopyAction(QName classQName, CopyDetails copyDetails, org.alfresco.repo.copy.CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails) Default behaviour: * AssocCopySourceAction.COPY_REMOVE_EXISTING * AssocCopyTargetAction.USE_COPIED_OTHERWISE_ORIGINAL_TARGET |
org.alfresco.repo.copy.CopyBehaviourCallback.ChildAssocCopyAction |
getChildAssociationCopyAction(QName classQName, CopyDetails copyDetails, org.alfresco.repo.copy.CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails) Default behaviour: Cascade if we are copying children AND the association is primary |
|
getCopyProperties(QName classQName, CopyDetails copyDetails, Map<QName,Serializable> properties) Default behaviour: Copy all associated properties |
static org.alfresco.repo.copy.CopyBehaviourCallback |
getInstance() |
boolean |
getMustCopy(QName classQName, CopyDetails copyDetails) Default behaviour: Always copy |
<T extends org.alfresco.traitextender.Trait> org.alfresco.traitextender.ExtendedTrait<T> |
getTrait(Class<? extends T> traitAPI) |
Methods inherited from class org.alfresco.repo.copy.AbstractCopyBehaviourCallback |
getChildAssociationRecurseAction, isTopLevelCanBeRenamed, recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviour |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCopyBehaviourCallback
public DefaultCopyBehaviourCallback()
getInstance
public static org.alfresco.repo.copy.CopyBehaviourCallback getInstance()
-
Returns:
-
Returns a stateless singleton
getMustCopy
-
Default behaviour: Always copy
Specified by:
-
getMustCopy in interface org.alfresco.repo.copy.CopyBehaviourCallback
-
Returns:
-
Returns true always
getAssociationCopyAction
public Pair<org.alfresco.repo.copy.CopyBehaviourCallback.AssocCopySourceAction,org.alfresco.repo.copy.CopyBehaviourCallback.AssocCopyTargetAction> getAssociationCopyAction(QName classQName, CopyDetails copyDetails, org.alfresco.repo.copy.CopyBehaviourCallback.CopyAssociationDetails assocCopyDetails) -
Default behaviour:
* AssocCopySourceAction.COPY_REMOVE_EXISTING
* AssocCopyTargetAction.USE_COPIED_OTHERWISE_ORIGINAL_TARGET
Specified by:
-
getAssociationCopyAction in interface org.alfresco.repo.copy.CopyBehaviourCallback
Overrides:
-
getAssociationCopyAction in class org.alfresco.repo.copy.AbstractCopyBehaviourCallback
getChildAssociationCopyAction
public org.alfresco.repo.copy.CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(QName classQName, CopyDetails copyDetails, org.alfresco.repo.copy.CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails) -
Default behaviour: Cascade if we are copying children AND the association is primary
Specified by:
-
getChildAssociationCopyAction in interface org.alfresco.repo.copy.CopyBehaviourCallback
-
Returns:
-
Returns true if the association is primary and copyChildren == true
getCopyProperties
-
Default behaviour: Copy all associated properties
Specified by:
-
getCopyProperties in interface org.alfresco.repo.copy.CopyBehaviourCallback
-
Returns:
-
Returns all the properties passes in
getTrait
public <T extends org.alfresco.traitextender.Trait> org.alfresco.traitextender.ExtendedTrait<T> getTrait(Class<? extends T> traitAPI) -
Specified by:
-
getTrait in interface org.alfresco.traitextender.Extensible