Interface CopyBehaviourCallback

    • Method Detail

      • getMustCopy

        boolean getMustCopy​(org.alfresco.service.namespace.QName classQName,
                            CopyDetails copyDetails)
        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:
        true if the type or aspect that this behaviour represents must be copied.
      • isTopLevelCanBeRenamed

        boolean isTopLevelCanBeRenamed​(org.alfresco.service.namespace.QName classQName,
                                       CopyDetails copyDetails)
        Determine if this top-level node with type or aspect can be renamed during copy.
        Parameters:
        classQName - the name of the class that this is being invoked for
        copyDetails - the source node's copy details for quick reference
        Returns:
        true if the top-level node with type or aspect can be renamed during copy.
      • getChildAssociationCopyAction

        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.

        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 the copy action to take with the given child association
      • getCopyProperties

        java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> getCopyProperties​(org.alfresco.service.namespace.QName classQName,
                                                                                                         CopyDetails copyDetails,
                                                                                                         java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> properties)
        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 the type or aspect properties that should be copied.