Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.copy
Class DefaultCopyBehaviourCallback
java.lang.Object
  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:

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
Constructor Summary
DefaultCopyBehaviourCallback()
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
Constructor Detail
DefaultCopyBehaviourCallback
public DefaultCopyBehaviourCallback()
Method Detail
getInstance
public static org.alfresco.repo.copy.CopyBehaviourCallback getInstance()
Returns:
Returns a stateless singleton

getMustCopy
public boolean getMustCopy(QName classQName,
                           CopyDetails copyDetails)
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
public Map<QName,SerializablegetCopyProperties(QName classQName,
                                                 CopyDetails copyDetails,
                                                 Map<QName,Serializable> properties)
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

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.