From d5cdc307481cd7b5317f1b11dfeb4aeadd1c7d3a Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Fri, 18 May 2018 12:24:27 +0000 Subject: [PATCH] Code redesign Refs #11756: Refactor DataHArvesterPlugin to support scheduled execution from smart-executor Task-Url: https://support.d4science.org/issues/11756 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-dashboard-harvester-se-plugin@167598 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../gcube/dataharvest/AccountingDataHarvesterPlugin.java | 4 ++-- .../{VreUsersHarvester.java => VREUsersHarvester.java} | 6 +++--- src/test/java/org/gcube/dataharvest/Harvester.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/main/java/org/gcube/dataharvest/harvester/{VreUsersHarvester.java => VREUsersHarvester.java} (90%) diff --git a/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java b/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java index 7256da0..0367065 100644 --- a/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java +++ b/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java @@ -12,7 +12,7 @@ import java.util.SortedSet; import org.gcube.dataharvest.dao.DatabaseManager; import org.gcube.dataharvest.datamodel.HarvestedData; import org.gcube.dataharvest.harvester.SocialHarvester; -import org.gcube.dataharvest.harvester.VreUsersHarvester; +import org.gcube.dataharvest.harvester.VREUsersHarvester; import org.gcube.dataharvest.harvester.sobigdata.DataMethodDownloadHarvester; import org.gcube.dataharvest.harvester.sobigdata.MethodInvocationHarvester; import org.gcube.dataharvest.harvester.sobigdata.ResourceCatalogueHarvester; @@ -147,7 +147,7 @@ public class AccountingDataHarvesterPlugin extends Plugin harvested = vreUsersHarvester.getData(); data.addAll(harvested); } catch(Exception e) { diff --git a/src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java b/src/main/java/org/gcube/dataharvest/harvester/VREUsersHarvester.java similarity index 90% rename from src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java rename to src/main/java/org/gcube/dataharvest/harvester/VREUsersHarvester.java index 6f762cd..ef40e56 100644 --- a/src/main/java/org/gcube/dataharvest/harvester/VreUsersHarvester.java +++ b/src/main/java/org/gcube/dataharvest/harvester/VREUsersHarvester.java @@ -18,11 +18,11 @@ import org.slf4j.LoggerFactory; * @author Eric Perrone (ISTI - CNR) * @author Luca Frosini (ISTI - CNR) */ -public class VreUsersHarvester extends BasicHarvester { +public class VREUsersHarvester extends BasicHarvester { - private static Logger logger = LoggerFactory.getLogger(VreUsersHarvester.class); + private static Logger logger = LoggerFactory.getLogger(VREUsersHarvester.class); - public VreUsersHarvester(Date start, Date end) throws ParseException { + public VREUsersHarvester(Date start, Date end) throws ParseException { super(start, end); } diff --git a/src/test/java/org/gcube/dataharvest/Harvester.java b/src/test/java/org/gcube/dataharvest/Harvester.java index 3f73cbd..7668c35 100644 --- a/src/test/java/org/gcube/dataharvest/Harvester.java +++ b/src/test/java/org/gcube/dataharvest/Harvester.java @@ -12,7 +12,7 @@ import org.gcube.dataharvest.dao.DatabaseParameterRetriever; import org.gcube.dataharvest.datamodel.HarvestedData; import org.gcube.dataharvest.harvester.BasicHarvester; import org.gcube.dataharvest.harvester.SocialHarvester; -import org.gcube.dataharvest.harvester.VreUsersHarvester; +import org.gcube.dataharvest.harvester.VREUsersHarvester; import org.gcube.dataharvest.harvester.sobigdata.DataMethodDownloadHarvester; import org.gcube.dataharvest.harvester.sobigdata.MethodInvocationHarvester; import org.gcube.dataharvest.harvester.sobigdata.ResourceCatalogueHarvester; @@ -88,7 +88,7 @@ public class Harvester { public void runAll() { try { // collecting info on VRE users - VreUsersHarvester vreUsersHarvester = new VreUsersHarvester(dateFrom, dateTo); + VREUsersHarvester vreUsersHarvester = new VREUsersHarvester(dateFrom, dateTo); List users = vreUsersHarvester.getData(); insertMonthlyData((Date) dateFrom, (Date) dateTo, users); } catch(Exception x) {