cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 24 Jun 2020 23:56:43 +0000 (01:56 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 24 Jun 2020 23:56:43 +0000 (01:56 +0200)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/springframework/remoting/httpinvoker/CachingHttpInvokerProxyFactoryBean.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperation.java
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/RemotingTestUpdateOperation.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.java

index cd00008cd5cee3199142841c446126217664fd3a..1ea5c4d72813fbeab01470a1dd8d39003b42ebe6 100644 (file)
@@ -26,9 +26,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.IdentifiableEntitySo
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.ReferenceSortProvider;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
-
 /**
- *
  * @author p.ciardelli
  * @created 25.06.2009
  */
@@ -137,7 +135,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
                return BulkEditorInputType.REFERENCE.label;
        }
 
-       public static AbstractBulkEditorInput getInstance() {
+       public static AbstractBulkEditorInput<Reference> getInstance() {
                if (instance == null) {
                        instance = new ReferenceEditorInput();
                }
@@ -163,11 +161,11 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
     }
 
        @Override
-       public List listEntities(IIdentifiableEntityServiceConfigurator configurator) {
+       public List<Reference> listEntities(IIdentifiableEntityServiceConfigurator configurator) {
                return CdmStore.getSearchManager().findReferences(configurator);
        }
 
-       // Entity persistence
+       //entity persistence
 
        @Override
        public Reference loadEntity(UUID entityUuid) {
index fdf7f1acc8d106867d76ddcdc5557233e3c0e6bb..3004b7f0d0334e83cfa85ceb82f23daa8d880765 100644 (file)
@@ -82,12 +82,6 @@ public class CachingHttpInvokerProxyFactoryBean extends HttpInvokerProxyFactoryB
         }
     }
 
-    /**
-     * @param invocation
-     * @param originalInvocation
-     * @return
-     * @throws Exception
-     */
     private RemoteInvocationResult handleGeneralRequest(RemoteInvocation invocation,
             MethodInvocation originalInvocation) throws Exception {
         RemoteInvocationResult invocationResult = doExecuteRequest(invocation, originalInvocation);
@@ -106,7 +100,6 @@ public class CachingHttpInvokerProxyFactoryBean extends HttpInvokerProxyFactoryB
                 invocationResult = new RemoteInvocationResult(cdmEntitySessionManager().load(invocationResult.getValue(), false));
                 logger.debug("Entity cached without updating cached data" );
             }
-
         }
         cache(invocation, invocationResult);
         return  invocationResult;
@@ -116,12 +109,6 @@ public class CachingHttpInvokerProxyFactoryBean extends HttpInvokerProxyFactoryB
 
     }
 
-    /**
-     * @param invocation
-     * @param originalInvocation
-     * @return
-     * @throws Exception
-     */
     private RemoteInvocationResult handleTermRequest(RemoteInvocation invocation, MethodInvocation originalInvocation)
             throws Exception {
         RemoteInvocationResult invocationResult = null;
@@ -141,12 +128,6 @@ public class CachingHttpInvokerProxyFactoryBean extends HttpInvokerProxyFactoryB
         return invocationResult;
     }
 
-    /**
-     * @param invocation
-     * @param originalInvocation
-     * @return
-     * @throws Exception
-     */
     private RemoteInvocationResult doExecuteRequest(RemoteInvocation invocation, MethodInvocation originalInvocation)
             throws Exception {
 
index baa8461cb65e1fc2dc99af377bf4000993337417..9b180ceaa2e58bce0f87d04d5f0cf45d863b288c 100644 (file)
@@ -24,11 +24,9 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
 import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 
-
 /**
  * @author cmathew
  * @date 16 Jun 2015
- *
  */
 public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
 
@@ -39,9 +37,6 @@ public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
     protected MPart activePart = null;
     protected MApplication application = null;
 
-    /**
-     * @param label
-     */
     public RemotingCdmUpdateOperation(String label, Action action, Object source, boolean async,
                EPartService partService,
                MPart activePart,
@@ -57,9 +52,6 @@ public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
 
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#doExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     @Override
     protected boolean doExecute(IProgressMonitor monitor, IAdaptable info) {
         updateResult = new UpdateResult();
@@ -85,12 +77,8 @@ public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
         if(success && updateResult != null) {
             fireDataChangeEvent(updateResult);
         }
-
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#onComplete(boolean)
-     */
     @Override
     protected IStatus onComplete(boolean success) {
 
@@ -139,6 +127,4 @@ public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
         }
         return null;
     }
-
-
 }
index 8bde5267f285d2e19a30811bf73c32c74016edc6..1233bb086e19e5001e1df8e8f2eadf1d74cb8a2b 100644 (file)
@@ -21,7 +21,6 @@ import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
 /**
  * @author cmathew
  * @date 26 Jun 2015
- *
  */
 public class RemotingTestUpdateOperation extends RemotingCdmUpdateOperation {
 
@@ -31,13 +30,6 @@ public class RemotingTestUpdateOperation extends RemotingCdmUpdateOperation {
     private Exception exception;
     private CdmEntityIdentifier cei;
 
-
-    /**
-     * @param label
-     * @param action
-     * @param source
-     * @param async
-     */
     public RemotingTestUpdateOperation(UpdateResult result,
             Object source,
             boolean async) {
@@ -59,9 +51,6 @@ public class RemotingTestUpdateOperation extends RemotingCdmUpdateOperation {
         this.cei = cei;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     @Override
     protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
         ITestService testService = CdmApplicationState.getTestService();
index 60a47be168496b6c0a61658030c0914d6ba96abc..4bc3affc2816109b12a2b3b59e6e4dae7232c61d 100644 (file)
@@ -68,7 +68,7 @@ public class RemotingCdmUpdateOperationTest extends BaseOperationTest {
         TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
         TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
 
-        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes = new HashSet<>();
         taxonNodes.add(taxonNode1);
         taxonNodes.add(taxonNode2);
         taxonNodes.add(taxonNode3);
@@ -95,14 +95,14 @@ public class RemotingCdmUpdateOperationTest extends BaseOperationTest {
         TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
         TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
 
-        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes = new HashSet<>();
         taxonNodes.add(taxonNode1);
         taxonNodes.add(taxonNode2);
         taxonNodes.add(taxonNode3);
         taxonNodes.add(taxonNode4);
         taxonNodes.add(taxonNode5);
 
-        ceis = new HashSet<CdmEntityIdentifier>();
+        ceis = new HashSet<>();
         ceis.add(new CdmEntityIdentifier(taxonNode3.getId(),TaxonNode.class));
         ceis.add(new CdmEntityIdentifier(taxonNode4.getId(),TaxonNode.class));
         ceis.add(new CdmEntityIdentifier(taxonNode5.getId(),TaxonNode.class));
@@ -128,14 +128,14 @@ public class RemotingCdmUpdateOperationTest extends BaseOperationTest {
         TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
         TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
 
-        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes = new HashSet<>();
         taxonNodes.add(taxonNode1);
         taxonNodes.add(taxonNode2);
         taxonNodes.add(taxonNode3);
         taxonNodes.add(taxonNode4);
         taxonNodes.add(taxonNode5);
 
-        ceis = new HashSet<CdmEntityIdentifier>();
+        ceis = new HashSet<>();
         ceis.add(new CdmEntityIdentifier(taxonNode3.getId(),TaxonNode.class));
         ceis.add(new CdmEntityIdentifier(taxonNode4.getId(),TaxonNode.class));
         ceis.add(new CdmEntityIdentifier(taxonNode5.getId(),TaxonNode.class));
@@ -160,7 +160,7 @@ public class RemotingCdmUpdateOperationTest extends BaseOperationTest {
         TaxonNode taxonNode = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid1));
         CdmEntityIdentifier cei = new CdmEntityIdentifier(taxonNode.getId(), TaxonNode.class);
 
-        taxonNodes = new HashSet<TaxonNode>();
+        taxonNodes = new HashSet<>();
         taxonNodes.add(taxonNode);
 
         int taxonNodeCountChildren = taxonNode.getCountChildren();