org.alfresco.repo.copy
Class DefaultCopyBehaviourCallback
java.lang.Object
org.alfresco.repo.copy.AbstractCopyBehaviourCallback
org.alfresco.repo.copy.DefaultCopyBehaviourCallback
- All Implemented Interfaces:
- CopyBehaviourCallback
public class DefaultCopyBehaviourCallback
- extends AbstractCopyBehaviourCallback
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCopyBehaviourCallback
public DefaultCopyBehaviourCallback()
getInstance
public static CopyBehaviourCallback getInstance()
- Returns:
- Returns a stateless singleton
getMustCopy
public boolean getMustCopy(QName classQName,
CopyDetails copyDetails)
- Default behaviour: Always copy
- Parameters:
classQName
- the name of the class that this is being invoked forcopyDetails
- the source node's copy details for quick reference
- Returns:
- Returns true always
getChildAssociationCopyAction
public CopyBehaviourCallback.ChildAssocCopyAction getChildAssociationCopyAction(QName classQName,
CopyDetails copyDetails,
CopyBehaviourCallback.CopyChildAssociationDetails childAssocCopyDetails)
- Default behaviour: Cascade if we are copying children AND the association is primary
- Parameters:
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
- Returns:
- Returns true if the association is primary and
copyChildren == true
getCopyProperties
public java.util.Map getCopyProperties(QName classQName,
CopyDetails copyDetails,
java.util.Map properties)
- Default behaviour: Copy all associated properties
- Parameters:
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.
- Returns:
- Returns all the properties passes in
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.