org.alfresco.repo.copy
Class DoNothingCopyBehaviourCallback

java.lang.Object
  extended by org.alfresco.repo.copy.AbstractCopyBehaviourCallback
      extended by org.alfresco.repo.copy.DoNothingCopyBehaviourCallback
All Implemented Interfaces:
CopyBehaviourCallback

public class DoNothingCopyBehaviourCallback
extends AbstractCopyBehaviourCallback

Simple copy behaviour to prevent any copying.

This implementation is stateless and therefore thread-safe.

Since:
3.2

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
DoNothingCopyBehaviourCallback()
           
 
Method Summary
 CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
          Determine if a copy should copy the child, the association only or do nothing with the given association.
 java.util.Map getCopyProperties(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails, java.util.Map properties)
          Modify the properties that are copied across.
static CopyBehaviourCallback getInstance()
           
 boolean getMustCopy(org.alfresco.service.namespace.QName classQName, CopyDetails copyDetails)
          Determine if this type or aspect must be copied.
 
Methods inherited from class org.alfresco.repo.copy.AbstractCopyBehaviourCallback
getAssociationCopyAction, getChildAssociationRecurseAction, recordNodeRefsForRepointing, repointNodeRefs, throwExceptionForUnexpectedBehaviour
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoNothingCopyBehaviourCallback

public DoNothingCopyBehaviourCallback()
Method Detail

getInstance

public static CopyBehaviourCallback getInstance()
Returns:
Returns a stateless singleton

getMustCopy

public boolean getMustCopy(org.alfresco.service.namespace.QName classQName,
                           CopyDetails copyDetails)
Description copied from interface: CopyBehaviourCallback
Determine if this type or aspect must be copied. If the callback is for a type (not aspect) then this determines if the node is copied at all. If the callback is for an aspect, then this determines if the aspect is copied.

Parameters:
classQName - the name of the class that this is being invoked for
copyDetails - the source node's copy details for quick reference
Returns:
Returns false always

getChildAssociationCopyAction

public CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(org.alfresco.service.namespace.QName classQName,
                                                                                CopyDetails copyDetails,
                                                                                CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
Description copied from interface: CopyBehaviourCallback
Determine if a copy should copy the child, the association only or do nothing with the given association.

This is called regardless of whether 'cascade' copy has been selected by the client of the copy. Some type and aspect behaviour will mandate a copy of the child associations regardless of whether recursion is on.

Parameters:
classQName - the name of the class that this is being invoked for
copyDetails - the source node's copy details for quick reference
childAssocCopyDetails - all other details relating to the child association
Returns:
Returns false always

getCopyProperties

public java.util.Map getCopyProperties(org.alfresco.service.namespace.QName classQName,
                                       CopyDetails copyDetails,
                                       java.util.Map properties)
Description copied from interface: CopyBehaviourCallback
Modify the properties that are copied across.

Parameters:
classQName - the name of the class that this is being invoked for
copyDetails - the source node's copy details for quick reference
properties - the type- or aspect-specific properties that can be copied. The map can be manipulated and returned as required.
Returns:
Returns an empty map always


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.