Project

General

Profile

Revision 63e69bf5

ID63e69bf59058dfced0832aaa92ba8e888da55478
Parent a8e21522
Child 1385d1b6

Added by Katja Luther over 3 years ago

ref #7463: add only moved nodes to resultSet of moveTaxonNodes

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
680 680
    public UpdateResult moveTaxonNode(UUID taxonNodeUuid, UUID targetNodeUuid, int movingType){
681 681
        TaxonNode taxonNode = HibernateProxyHelper.deproxy(dao.load(taxonNodeUuid), TaxonNode.class);
682 682
    	TaxonNode targetNode = HibernateProxyHelper.deproxy(dao.load(targetNodeUuid), TaxonNode.class);
683
    	return moveTaxonNode(taxonNode, targetNode, movingType);
683
    	UpdateResult result = moveTaxonNode(taxonNode, targetNode, movingType);
684
    	return result;
684 685
    }
685 686

  
686 687
    @Override
......
706 707

  
707 708

  
708 709
        taxonNode = newParent.addChildNode(taxonNode, sortIndex, taxonNode.getReference(),  taxonNode.getMicroReference());
709
        result.addUpdatedObject(newParent);
710
        result.addUpdatedObject(oldParent);
711
        result.setCdmEntity(taxonNode);
710
//        result.addUpdatedObject(newParent);
711
        result.addUpdatedObject(taxonNode);
712
//        result.setCdmEntity(taxonNode);
712 713

  
713 714

  
714 715

  
......
729 730

  
730 731
        TaxonNode targetNode = dao.load(newParentNodeUuid);
731 732
        List<TaxonNode> nodes = dao.list(taxonNodeUuids, null, null, null, null);
732
        monitor.beginTask("Move Taxonnodes", nodes.size());
733
        monitor.beginTask("Move Taxonnodes", nodes.size() +1);
733 734
        ((IRemotingProgressMonitor)monitor).setResult(result);
734 735

  
735 736
        for (TaxonNode node: nodes){
736

  
737 737
            result.includeResult(moveTaxonNode(node,targetNode, movingType));
738 738
            monitor.worked(1);
739 739
        }
740 740
        dao.saveOrUpdateAll(nodes);
741 741

  
742
        monitor.done();
742
//        monitor.done();
743 743
        return result;
744 744
    }
745 745

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)