/** Copy the aspect over only if the source document has also been checked out */ @Override public boolean getMustCopy(QName classQName, CopyDetails copyDetails) { if (copyDetails.getSourceNodeAspectQNames().contains(ContentModel.ASPECT_WORKING_COPY) && !copyDetails.isTargetNodeIsNew()) { // We are copying back from a working copy to the original node (probably) // We need to do a full merge of the discussions. Keep track of the nodes // that need this behaviour and complete the copy after the copy completes. Set<NodeRef> nodeRefs = TransactionalResourceHelper.getSet(KEY_WORKING_COPIES); nodeRefs.add(copyDetails.getSourceNodeRef()); } return false; }
/** * Disables the aspect behaviour for this node * * @return Returns <tt>true</tt> */ @Override public boolean getMustCopy(QName classQName, CopyDetails copyDetails) { NodeRef targetNodeRef = copyDetails.getTargetNodeRef(); behaviourFilter.disableBehaviour(targetNodeRef, RuleModel.ASPECT_RULES); // Always copy return true; }