diff --git a/gcube/extra-resources/META-INF/plugin.properties b/gcube/extra-resources/META-INF/plugin.properties new file mode 100644 index 0000000..27b1aba --- /dev/null +++ b/gcube/extra-resources/META-INF/plugin.properties @@ -0,0 +1,4 @@ +groupId=${groupId} +artifactId=${artifactId} +version=${version} +description=${description} \ No newline at end of file diff --git a/src/main/java/org/gcube/accounting/aggregator/directory/DirectoryStructure.java b/src/main/java/org/gcube/accounting/aggregator/directory/DirectoryStructure.java index c35a146..f127714 100644 --- a/src/main/java/org/gcube/accounting/aggregator/directory/DirectoryStructure.java +++ b/src/main/java/org/gcube/accounting/aggregator/directory/DirectoryStructure.java @@ -4,7 +4,7 @@ import java.text.DateFormat; import java.util.Date; import org.gcube.accounting.aggregator.aggregation.AggregationType; -import org.gcube.accounting.aggregator.plugin.AccountingAggregatorPluginDeclaration; +import org.gcube.accounting.aggregator.plugin.AccountingAggregatorPlugin; /** * @author Luca Frosini (ISTI - CNR) @@ -13,7 +13,7 @@ public abstract class DirectoryStructure { public D getTargetFolder(AggregationType aggregationType, Date aggregationStartDate) throws Exception { D root = getRoot(); - D aggregatorPluginDirectory = createDirectory(root, AccountingAggregatorPluginDeclaration.NAME); + D aggregatorPluginDirectory = createDirectory(root, AccountingAggregatorPlugin.NAME); D aggregationTypeDirectory = createDirectory(aggregatorPluginDirectory, aggregationType.name()); DateFormat dateFormat = aggregationType.getDateFormat(); String dateString = dateFormat.format(aggregationStartDate); diff --git a/src/main/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPlugin.java b/src/main/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPlugin.java index f9c3bf0..27ccd74 100644 --- a/src/main/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPlugin.java +++ b/src/main/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPlugin.java @@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory; * @author Alessandro Pieve (ISTI - CNR) * @author Luca Frosini (ISTI - CNR) */ -public class AccountingAggregatorPlugin extends Plugin { +public class AccountingAggregatorPlugin extends Plugin { private static Logger logger = LoggerFactory.getLogger(AccountingAggregatorPlugin.class); @@ -34,6 +34,8 @@ public class AccountingAggregatorPlugin extends Plugin getSupportedCapabilities() { - Map discoveredCapabilities = new HashMap(); - return discoveredCapabilities; - } - - /**{@inheritDoc}*/ - @Override - public Class> getPluginImplementation() { - return AccountingAggregatorPlugin.class; - } - - @Override - public String toString() { - return "AccountingAggregatorPluginDeclaration [getName()=" + getName() - + ", getDescription()=" + getDescription() + ", getVersion()=" - + getVersion() + ", getSupportedCapabilities()=" - + getSupportedCapabilities() + ", getPluginImplementation()=" - + getPluginImplementation() + "]"; - } - - -} diff --git a/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration b/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.Plugin similarity index 84% rename from src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration rename to src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.Plugin index 2e0f366..042870b 100644 --- a/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.PluginDeclaration +++ b/src/main/resources/META-INF/services/org.gcube.vremanagement.executor.plugin.Plugin @@ -1 +1 @@ -org.gcube.accounting.aggregator.plugin.AccountingAggregatorPluginDeclaration \ No newline at end of file +org.gcube.accounting.aggregator.plugin.AccountingAggregatorPlugin \ No newline at end of file diff --git a/src/test/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPluginTest.java b/src/test/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPluginTest.java index e594a08..7c88dd7 100644 --- a/src/test/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPluginTest.java +++ b/src/test/java/org/gcube/accounting/aggregator/plugin/AccountingAggregatorPluginTest.java @@ -60,8 +60,8 @@ public class AccountingAggregatorPluginTest extends ContextTest { inputs.put(AccountingAggregatorPlugin.AGGREGATION_END_DATE_INPUT_PARAMETER, aggregationEndDate); */ - AccountingAggregatorPlugin plugin = new AccountingAggregatorPlugin(null); - logger.debug("Going to launch {} with inputs {}", AccountingAggregatorPluginDeclaration.NAME, inputs); + AccountingAggregatorPlugin plugin = new AccountingAggregatorPlugin(); + logger.debug("Going to launch {} with inputs {}", plugin.getName(), inputs); @@ -111,8 +111,8 @@ public class AccountingAggregatorPluginTest extends ContextTest { logger.trace("{} : {}", AccountingAggregatorPlugin.AGGREGATION_START_DATE_INPUT_PARAMETER, aggregationEndDate); inputs.put(AccountingAggregatorPlugin.AGGREGATION_END_DATE_INPUT_PARAMETER, aggregationEndDate); - AccountingAggregatorPlugin plugin = new AccountingAggregatorPlugin(null); - logger.debug("Going to launch {} with inputs {}", AccountingAggregatorPluginDeclaration.NAME, inputs); + AccountingAggregatorPlugin plugin = new AccountingAggregatorPlugin(); + logger.debug("Going to launch {} with inputs {}",plugin.getName(), inputs);