org.squashtest.tm.service.internal.library
Class FirstLayerTreeNodeMover

java.lang.Object
  extended by org.squashtest.tm.service.internal.library.FirstLayerTreeNodeMover
All Implemented Interfaces:
PasteOperation

@Component
@Scope(value="prototype")
public class FirstLayerTreeNodeMover
extends Object
implements PasteOperation

This class is called when moving nodes to another one, it is called only for the first nodes of moved hierarchies. If the move changes project, next layer nodes will be updated (not need to move them) with the NextLayersTreeNodeMover.

Author:
mpagnon

Constructor Summary
FirstLayerTreeNodeMover()
           
 
Method Summary
 boolean isOkToGoDeeper()
          will say if the operation allows to go process node's childrens after operation.
 org.squashtest.tm.domain.library.TreeNode performOperation(org.squashtest.tm.domain.library.TreeNode toMove, org.squashtest.tm.domain.library.NodeContainer<org.squashtest.tm.domain.library.TreeNode> destination)
          Some operation involving a node and another node will happen, ie the source will be copied or moved to the destination.
protected  void processNodes(org.squashtest.tm.domain.library.TreeNode toMove)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstLayerTreeNodeMover

public FirstLayerTreeNodeMover()
Method Detail

performOperation

public org.squashtest.tm.domain.library.TreeNode performOperation(org.squashtest.tm.domain.library.TreeNode toMove,
                                                                  org.squashtest.tm.domain.library.NodeContainer<org.squashtest.tm.domain.library.TreeNode> destination)
Description copied from interface: PasteOperation
Some operation involving a node and another node will happen, ie the source will be copied or moved to the destination. Also returns a TreeNode resulting from this operation, that will be either the copy of the source or the source itself.

Specified by:
performOperation in interface PasteOperation

isOkToGoDeeper

public boolean isOkToGoDeeper()
Description copied from interface: PasteOperation
will say if the operation allows to go process node's childrens after operation. see TreeNodeCopier.visit(org.squashtest.tm.domain.campaign.Iteration) for an example of when it is not ok.

Specified by:
isOkToGoDeeper in interface PasteOperation
Returns:

processNodes

protected void processNodes(org.squashtest.tm.domain.library.TreeNode toMove)


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.