Package org.alfresco.repo.copy
Interface CopyServicePolicies.OnCopyNodePolicy
-
- All Superinterfaces:
ClassPolicy,Policy
- All Known Implementing Classes:
ActionsAspect,ActionServiceImpl,AliasableAspect,CommentsRollupAspect,DiscussableAspect,EmptyTranslationAspect,LockServiceImpl,MultilingualDocumentAspect,PendingDeleteAspect,QuickShareServiceImpl,RateableAspect,RatingsRelatedAspectBehaviours,ReferenceableAspect,RenditionedAspect,RulesAspect,TemporaryAspect,UndeletableAspect,VersionableAspect,WorkingCopyAspect
- Enclosing interface:
- CopyServicePolicies
@AlfrescoPublicApi public static interface CopyServicePolicies.OnCopyNodePolicy extends ClassPolicy
Policy invoked when a node is copied.Note: Copy policies are used to modify the copy behaviour. Rather than attempt to determine, up front, the behaviour that applies for all types and aspects, the callbacks are used to lazily adjust the behaviour.
Implementing this policy is particularly important if aspects want to partake in the copy process. The behaviour can change whether or not the aspect is copied and which of the properties to carry to the new node.
If no behaviour is registered or no callback is given, then the
default behaviouris assumed. Several pre-defined behaviours exist to simplify the callbacks, including:- Do nothing:
DoNothingCopyBehaviourCallback - Default:
DefaultCopyBehaviourCallback
DefaultCopyBehaviourCallbackis probably the best starting point for further callback implementations; overriding the class allows the behaviour to be overridden, provided that this policy method is implemented.Note: A 'class' is either a type or an aspect.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
Fields Modifier and Type Field Description static Policy.ArgARG_0static Policy.ArgARG_1static org.alfresco.service.namespace.QNameQNAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CopyBehaviourCallbackgetCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)Called for all types and aspects before copying a node.
-
-
-
Field Detail
-
QNAME
static final org.alfresco.service.namespace.QName QNAME
-
ARG_0
static final Policy.Arg ARG_0
-
ARG_1
static final Policy.Arg ARG_1
-
-
Method Detail
-
getCopyCallback
CopyBehaviourCallback getCopyCallback(org.alfresco.service.namespace.QName classRef, CopyDetails copyDetails)
Called for all types and aspects before copying a node.- Parameters:
classRef- the type or aspect qualified namecopyDetails- the details of the impending copy- Returns:
- Return the callback that will be used to modify the copy behaviour for this dictionary class. Return null to assume the default.
- Since:
- V3.2
- See Also:
CopyServicePolicies
-
-