return trees.get(treeUuid);
}
+ @Override
+ public void setTreeDtoForUuid(TermTreeDto tree){
+ trees.put(tree.getUuid(), tree);
+ }
+
+ @Override
+ public void setNodeDtoForUuid(TermNodeDto node){
+ this.uuidTermMap.put(node.getUuid(), node);
+ }
+
@Override
public void addOperation(AbstractPostOperation operation) {
operationList.add(operation);
return false;
}
}
- TermNodeDto droppedNode = (TermNodeDto) droppedObject;
+ TermNodeDto droppedNode = editor.getNodeDtoForUuid(((TermNodeDto) droppedObject).getUuid());
TermNodeDto oldParent = editor.getNodeDtoForUuid(droppedNode.getParentUuid());
int currentPosition = oldParent.getIndex(droppedNode);
Object o = oldParent.getChildren().remove(currentPosition);
target.getChildren().add(position, droppedNode);
droppedNode.setParentUuid(target.getUuid());
+ editor.setNodeDtoForUuid(droppedNode);
+ editor.setNodeDtoForUuid(target);
+ editor.setNodeDtoForUuid(oldParent);
editor.setDirty();
editor.addOperation(operation);
}
public TermNodeDto getNodeDtoForUuid(UUID nodeUuid);
public TermTreeDto getTreeDtoForUuid(UUID treeUuid);
+ public void setNodeDtoForUuid(TermNodeDto node);
+ public void setTreeDtoForUuid(TermTreeDto tree);
public boolean checkDuplicates(UUID termUuid, UUID treeUuid) ;