ref #7597 Use UUID for service call
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 13 Aug 2019 07:12:26 +0000 (09:12 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 13 Aug 2019 07:12:26 +0000 (09:12 +0200)
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/longrunningService/ILongRunningTasksService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/longrunningService/LongRunningTasksServiceImpl.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptiveDataSetService.java

index 663b9c357ae17b2ab3058fc48b1ad8d1179c0d3c..69a5c2e4826aac8d95ee21342ddc35ec87c96f22 100755 (executable)
@@ -59,10 +59,10 @@ public interface ILongRunningTasksService {
 
     /**
      * Monitored invocation of {@link IDescriptiveDataSetService#getRowWrapper(DescriptiveDataSet, IProgressMonitor)}
-     * @param descriptiveDataSet the working set for which getRowWrapper() is invoked
+     * @param descriptiveDataSetUuid the working set for which getRowWrapper() is invoked
      * @return the uuid of the monitor
      */
-    public UUID monitGetRowWrapper(DescriptiveDataSet descriptiveDataSet);
+    public UUID monitGetRowWrapper(UUID descriptiveDataSetUuid);
 
     /**
      * @param configurator
index da4933e2902cd404cf375748a26aa2f1d55540da..63a58b5ba1a56d18d66a57e812a134b12635dfa3 100755 (executable)
@@ -30,7 +30,6 @@ import eu.etaxonomy.cdm.api.service.util.CacheUpdater;
 import eu.etaxonomy.cdm.api.service.util.SortIndexUpdaterWrapper;
 import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
 import eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread;
-import eu.etaxonomy.cdm.model.description.DescriptiveDataSet;
 
 /**
  * @author k.luther
@@ -56,11 +55,11 @@ public class LongRunningTasksServiceImpl implements ILongRunningTasksService{
     SortIndexUpdaterWrapper sortIndexUpdater;
 
     @Override
-    public UUID monitGetRowWrapper(DescriptiveDataSet descriptiveDataSet) {
+    public UUID monitGetRowWrapper(UUID descriptiveDataSetUuid) {
         RemotingProgressMonitorThread monitorThread = new RemotingProgressMonitorThread() {
             @Override
             public Serializable doRun(IRemotingProgressMonitor monitor) {
-                return descriptiveDataSetService.getRowWrapper(descriptiveDataSet, monitor);
+                return descriptiveDataSetService.getRowWrapper(descriptiveDataSetUuid, monitor);
             }
         };
         UUID uuid = progressMonitorService.registerNewRemotingMonitor(monitorThread);
index d169415e6a1cd1ee73eac9fd440a33637db1fa75..9551504afbb61208abd563dbebdd77725b761782 100644 (file)
@@ -109,7 +109,8 @@ public class DescriptiveDataSetService
     }
 
        @Override
-       public ArrayList<RowWrapperDTO> getRowWrapper(DescriptiveDataSet descriptiveDataSet, IProgressMonitor monitor) {
+       public ArrayList<RowWrapperDTO> getRowWrapper(UUID descriptiveDataSetUuid, IProgressMonitor monitor) {
+           DescriptiveDataSet descriptiveDataSet = load(descriptiveDataSetUuid);
            monitor.beginTask("Load row wrapper", descriptiveDataSet.getDescriptions().size());
            ArrayList<RowWrapperDTO> wrappers = new ArrayList<>();
            Set<DescriptionBase> descriptions = descriptiveDataSet.getDescriptions();
index a3b5652a0007f0bdeee592d6634956a79c5e8d6e..3bec959c15439c8f90b1f82eb459dfa2aba88b07 100644 (file)
@@ -53,11 +53,11 @@ public interface IDescriptiveDataSetService extends IIdentifiableEntityService<D
     /**
      * Returns a collection of {@link RowWrapperDTO} objects for the given {@link DescriptiveDataSet}.<br>
      * A RowWrapper represents on row in the character matrix.
-     * @param descriptiveDataSet the working set for which the row wrapper objects should be fetched
+     * @param descriptiveDataSetUuid the working set for which the row wrapper objects should be fetched
      * @param the progress monitor
      * @return a list of row wrapper objects
      */
-    public ArrayList<RowWrapperDTO> getRowWrapper(DescriptiveDataSet descriptiveDataSet, IProgressMonitor monitor);
+    public ArrayList<RowWrapperDTO> getRowWrapper(UUID descriptiveDataSetUuid, IProgressMonitor monitor);
 
     /**
      * Loads all available specimens wrapped in a {@link SpecimenNodeWrapper} object for