Version 2.0.0

This commit is contained in:
Luca Frosini 2019-12-04 09:57:20 +01:00
parent 37dd4b1c9a
commit 5fd295e937
4 changed files with 14 additions and 31 deletions

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.vremanagement</groupId> <groupId>org.gcube.vremanagement</groupId>
<artifactId>smart-executor-api</artifactId> <artifactId>smart-executor-api</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.0.0</version>
<description>Smart Executor Service API Library</description> <description>Smart Executor Service API Library</description>
<packaging>jar</packaging> <packaging>jar</packaging>
@ -31,7 +31,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId> <artifactId>gcube-bom</artifactId>
<version>LATEST</version> <version>1.4.0</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -82,7 +82,6 @@
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>1.0.13</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -1,5 +1,8 @@
package org.gcube.vremanagement.executor.api.rest; package org.gcube.vremanagement.executor.api.rest;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class RestConstants { public class RestConstants {
public static final String PLUGINS_PATH_PART = "plugins"; public static final String PLUGINS_PATH_PART = "plugins";
@ -10,4 +13,6 @@ public class RestConstants {
public static final String UNSCHEDULE_PARAM = "unschedule"; public static final String UNSCHEDULE_PARAM = "unschedule";
public static final String ORPHAN_PATH_PARAM = "ORPHAN";
} }

View File

@ -1,23 +0,0 @@
package org.gcube.vremanagement.executor.api.rest;
import org.gcube.vremanagement.executor.exception.ExecutorException;
import org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException;
public interface SmartExecutor {
public static final String ORPHAN_PATH_PARAM = "ORPHAN";
public String getAvailablePlugins() throws ExecutorException;
public String getScheduled(String pluginName) throws ExecutorException;
public String launch(String pluginName, String launchParameterString) throws ExecutorException;
public String getLaunchState(String pluginName, String executionIdentifier, Integer iteration)
throws PluginInstanceNotFoundException, ExecutorException;
public boolean delete(String pluginName, String executionIdentifier, Boolean unschedule) throws ExecutorException;
public boolean purge(String pluginName, String executionIdentifier) throws ExecutorException;
}

View File

@ -3,6 +3,8 @@
*/ */
package org.gcube.vremanagement.executor.exception; package org.gcube.vremanagement.executor.exception;
import java.util.UUID;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@ -13,14 +15,14 @@ public class PluginInstanceNotFoundException extends ExecutorException {
*/ */
private static final long serialVersionUID = -7609491801703267843L; private static final long serialVersionUID = -7609491801703267843L;
private static final String DEFAULT_MESSAGE = "The requested plugin instance does not exists"; private static final String DEFAULT_MESSAGE = "No plugin instance with UUID %s found";
public PluginInstanceNotFoundException() { public PluginInstanceNotFoundException(UUID uuid) {
super(DEFAULT_MESSAGE); super(String.format(DEFAULT_MESSAGE,uuid.toString()));
} }
public PluginInstanceNotFoundException(Throwable cause) { public PluginInstanceNotFoundException(UUID uuid, Throwable cause) {
this(DEFAULT_MESSAGE, cause); this(String.format(DEFAULT_MESSAGE,uuid.toString()), cause);
} }
public PluginInstanceNotFoundException(String message) { public PluginInstanceNotFoundException(String message) {