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

View File

@ -1,5 +1,8 @@
package org.gcube.vremanagement.executor.api.rest;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class RestConstants {
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 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;
import java.util.UUID;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@ -13,14 +15,14 @@ public class PluginInstanceNotFoundException extends ExecutorException {
*/
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() {
super(DEFAULT_MESSAGE);
public PluginInstanceNotFoundException(UUID uuid) {
super(String.format(DEFAULT_MESSAGE,uuid.toString()));
}
public PluginInstanceNotFoundException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
public PluginInstanceNotFoundException(UUID uuid, Throwable cause) {
this(String.format(DEFAULT_MESSAGE,uuid.toString()), cause);
}
public PluginInstanceNotFoundException(String message) {