Removed PluginDeclaration class according to the new APis version
This commit is contained in:
parent
f245458aad
commit
26bb859e9e
|
@ -0,0 +1,4 @@
|
||||||
|
groupId=${groupId}
|
||||||
|
artifactId=${artifactId}
|
||||||
|
version=${version}
|
||||||
|
description=${description}
|
|
@ -1,2 +1,3 @@
|
||||||
/org.eclipse.jdt.core.prefs
|
/org.eclipse.jdt.core.prefs
|
||||||
/org.eclipse.core.resources.prefs
|
/org.eclipse.core.resources.prefs
|
||||||
|
/org.eclipse.m2e.core.prefs
|
||||||
|
|
12
pom.xml
12
pom.xml
|
@ -45,6 +45,18 @@
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- Test Dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.11</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
* @author Luca Frosini (ISTI - CNR)
|
||||||
*/
|
*/
|
||||||
public class HelloWorldPlugin extends Plugin<HelloWorldPluginDeclaration> {
|
public class HelloWorldPlugin extends Plugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger
|
* Logger
|
||||||
|
@ -20,9 +20,9 @@ public class HelloWorldPlugin extends Plugin<HelloWorldPluginDeclaration> {
|
||||||
|
|
||||||
public static final String SLEEP_TIME = "sleepTime";
|
public static final String SLEEP_TIME = "sleepTime";
|
||||||
|
|
||||||
public HelloWorldPlugin(HelloWorldPluginDeclaration pluginDeclaration) {
|
public HelloWorldPlugin() {
|
||||||
super(pluginDeclaration);
|
super();
|
||||||
logger.debug("contructor");
|
logger.debug("{} contructor", this.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
/**{@inheritDoc}*/
|
||||||
|
@ -66,5 +66,10 @@ public class HelloWorldPlugin extends Plugin<HelloWorldPluginDeclaration> {
|
||||||
logger.debug("onStop()");
|
logger.debug("onStop()");
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String,String> getSupportedCapabilities() {
|
||||||
|
logger.debug("getSupportedCapabilities() {}", HelloWorldPlugin.class.getSimpleName());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.vremanagement.helloworld;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.gcube.vremanagement.executor.plugin.Plugin;
|
|
||||||
import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Luca Frosini (ISTI - CNR)
|
|
||||||
*/
|
|
||||||
public class HelloWorldPluginDeclaration implements PluginDeclaration {
|
|
||||||
/**
|
|
||||||
* Logger
|
|
||||||
*/
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(HelloWorldPlugin.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Plugin name used by the Executor to retrieve this class
|
|
||||||
*/
|
|
||||||
public static final String NAME = "HelloWorld";
|
|
||||||
|
|
||||||
public static final String DESCRIPTION = "Hello World Smart Executor Plugin";
|
|
||||||
|
|
||||||
public static final String VERSION = "1.0.0";
|
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
|
||||||
@Override
|
|
||||||
public void init() {
|
|
||||||
logger.debug(String.format("%s initialized", HelloWorldPlugin.class.getSimpleName()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
|
||||||
@Override
|
|
||||||
public String getName() {
|
|
||||||
return NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
|
||||||
@Override
|
|
||||||
public String getDescription() {
|
|
||||||
return DESCRIPTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
|
||||||
@Override
|
|
||||||
public Map<String, String> getSupportedCapabilities() {
|
|
||||||
Map<String, String> discoveredCapabilities = new HashMap<String, String>();
|
|
||||||
discoveredCapabilities.put("HelloKey", "HelloValue");
|
|
||||||
return discoveredCapabilities;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**{@inheritDoc}*/
|
|
||||||
@Override
|
|
||||||
public Class<? extends Plugin<? extends PluginDeclaration>> getPluginImplementation() {
|
|
||||||
return HelloWorldPlugin.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString(){
|
|
||||||
return String.format("{"
|
|
||||||
+ "name:%s,"
|
|
||||||
+ "version:%s,"
|
|
||||||
+ "description:%s,"
|
|
||||||
+ "pluginImplementation:%s,"
|
|
||||||
+ "}",
|
|
||||||
getName(),
|
|
||||||
getVersion(),
|
|
||||||
getDescription(),
|
|
||||||
getPluginImplementation().getClass().getSimpleName());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue