minor renaming
authorAndreas Müller <a.mueller@bgbm.org>
Thu, 19 Mar 2015 21:56:55 +0000 (21:56 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Thu, 19 Mar 2015 21:56:55 +0000 (21:56 +0000)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/validation/ValidationDaemon.java

index 1a22142ea99725561f98b3bd51ae3763559df0b4..0d0a52a3d15647837a1888d68b71f3a4058b6058 100644 (file)
@@ -21,26 +21,26 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  *\r
  */\r
 public class ValidationDaemon extends Job {\r
-\r
        @SuppressWarnings("unused")\r
        private static final Logger logger = Logger.getLogger(ValidationDaemon.class);\r
 \r
-       private final IEntityValidationService validationResultService;\r
+       private final IEntityValidationService entityValidationService;\r
 \r
+       // Might want to make this configurable:\r
+       private int SLEEP_TIME = 5000;\r
+       \r
        private boolean cancelRequested = false;\r
 \r
 \r
 \r
-       public ValidationDaemon()\r
-       {\r
+       public ValidationDaemon(){\r
                super("Running validation daemon");\r
-               validationResultService = CdmStore.getService(IEntityValidationService.class);\r
+               entityValidationService = CdmStore.getService(IEntityValidationService.class);\r
        }\r
 \r
 \r
        @Override\r
-       protected void canceling()\r
-       {\r
+       protected void canceling(){\r
                cancelRequested = true;\r
        }\r
 \r
@@ -50,25 +50,22 @@ public class ValidationDaemon extends Job {
         * {@link Job#cancel()}, because that method does not have the desired\r
         * effect.\r
         */\r
-       public void setCancelRequested()\r
-       {\r
+       public void setCancelRequested(){\r
                cancelRequested = true;\r
        }\r
 \r
 \r
        @Override\r
-       protected IStatus run(IProgressMonitor monitor)\r
-       {\r
+       protected IStatus run(IProgressMonitor monitor){\r
                MarkerManager markerManager;\r
                List<EntityValidation> results;\r
                try {\r
                        while (!cancelRequested) {\r
-                               results = validationResultService.getValidationResults();\r
+                               results = entityValidationService.getValidationResults();\r
                                markerManager = new MarkerManager(results);\r
                                markerManager.deleteObsoleteMarkers();\r
                                markerManager.createMarkers();\r
-                               // Might want to make this configurable:\r
-                               Thread.sleep(5000);\r
+                               Thread.sleep(SLEEP_TIME);\r
                        }\r
                        MessagingUtils.info("Validation module stopped");\r
                        return Status.OK_STATUS;\r