diff --git a/pom.xml b/pom.xml
index c816360..371582a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
org.gcube.vremanagement
smart-executor-api
- 1.8.0-SNAPSHOT
+ 2.0.0-SNAPSHOT
Smart Executor Service API Library
jar
diff --git a/src/main/java/org/gcube/vremanagement/executor/api/SmartExecutor.java b/src/main/java/org/gcube/vremanagement/executor/api/SmartExecutor.java
deleted file mode 100644
index 0bf63d4..0000000
--- a/src/main/java/org/gcube/vremanagement/executor/api/SmartExecutor.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package org.gcube.vremanagement.executor.api;
-
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.jws.soap.SOAPBinding.Style;
-import javax.jws.soap.SOAPBinding.Use;
-
-import org.gcube.vremanagement.executor.api.types.LaunchParameter;
-import org.gcube.vremanagement.executor.exception.ExecutorException;
-import org.gcube.vremanagement.executor.exception.InputsNullException;
-import org.gcube.vremanagement.executor.exception.LaunchException;
-import org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException;
-import org.gcube.vremanagement.executor.exception.PluginNotFoundException;
-import org.gcube.vremanagement.executor.plugin.PluginState;
-import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
-
-/**
- * Service Endpoint Interface
- * @author Luca Frosini (ISTI - CNR)
- */
-@WebService(serviceName = SmartExecutor.WEB_SERVICE_SERVICE_NAME, targetNamespace=SmartExecutor.TARGET_NAMESPACE)
-@SOAPBinding(style = Style.DOCUMENT, use=Use.LITERAL)
-public interface SmartExecutor {
-
- public static final String TARGET_NAMESPACE = "http://gcube-system.org/";
- public static final String WEB_SERVICE_SERVICE_NAME =
- "gcube/vremanagement/smart-executor";
-
- /**
- * Launch the plugin identified by the name provided as parameters
- * with the provided inputs. Inputs cannot be null. If you need to launch
- * an execution with no inputs provide an empty Map.
- * This method return as soon as the plugin has been launched.
- * The execution is made in a separated Thread.
- * @param launchParameter which contains the name of the plugin to launch
- * and the input to be provided to plugin to run and the scheduling
- * strategy.
- * @return the UUID execution identifier as String which identify the
- * execution of the plugin.
- * @throws InputsNullException if {@link LaunchParameter} contains null
- * inputs.
- * @throws PluginNotFoundException if {@link LaunchParameter} contains a
- * name of a plugin which is not available on classpath
- * @throws LaunchException if an error occurs trying to instantiate and/or
- * launch the plugin execution
- * @throws ExecutorException if any other undefined error occur
- */
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- public String launch(LaunchParameter launchParameter) throws
- InputsNullException, PluginNotFoundException,
- LaunchException, ExecutorException;
-
- /**
- * The method use the provided UUID execution identifier as String to
- * stop the last running execution of a Task (if any).
- * If the Task is a scheduled Task the current execution is stopped but the
- * next one will occur. To remove the
- * @param executionIdentifier UUID as String which identify the execution
- * @return return true if the current execution has been correctly
- * stopped. False otherwise.
- * @throws Exception if there is no Task identified by the
- * provided UUID execution identifier as String
- */
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- public boolean stop(String executionIdentifier) throws ExecutorException;
-
- /**
- * The method use the provided UUID execution identifier as String to
- * stop the last running execution of a Task (if any) and release the
- * the scheduling if the Task is a Scheduled Task.
- * If the identified Task is not a Scheduled Task, the only effect is
- * stopping the current execution. In other word has the same side effect
- * of invoking {@link SmartExecutor#stop(String)} method.
- * @param executionIdentifier UUID as String which identify the execution
- * @param globally a boolean which when true indicate if releasing the
- * Scheduled Task globally, so that no other SmartExecutor instance will
- * take in charge the scheduling. When false this invocation has the same
- * side effect of invoking {@link SmartExecutor#unSchedule(String, boolean)}.
- * @return return true if the current execution has been correctly
- * stopped and the Task was unscheduled. False otherwise.
- * @throws Exception if there is no Task identified by the
- * provided UUID execution identifier as String
- */
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- public boolean unSchedule(String executionIdentifier, boolean globally)
- throws ExecutorException;
-
- /**
- * Deprecated Use {@link SmartExecutor#getStateEvolution(String)} instead
- * The method use the provided UUID as String to retrieve the status of the
- * associated execution
- * @param executionIdentifier UUID as String which identify the execution
- * @return {@link PluginState} which contains the state of the execution
- * @throws Exception if there is no execution identified by the provided
- * UUID execution identifier as String
- */
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- @Deprecated
- public PluginState getState(String executionIdentifier)
- throws PluginInstanceNotFoundException, ExecutorException;
-
- /**
- * The method use the provided UUID as String to retrieve the status of the
- * associated execution
- * @param executionIdentifier UUID as String which identify the execution
- * @return {@link PluginState} which contains the state of the execution
- * @throws Exception if there is no execution identified by the provided
- * UUID execution identifier as String
- */
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- public PluginStateEvolution getStateEvolution(String executionIdentifier)
- throws PluginInstanceNotFoundException, ExecutorException;
-
- /**
- * Deprecated Use {@link SmartExecutor#getIterationStateEvolution(String, int)} instead
- * The method use the provided UUID as String and the iteration number
- * to retrieve the status of the associated execution
- * @param executionIdentifier UUID as String which identify the execution
- * @param iterationNumber iteration number
- * @return {@link PluginState} which contains the state of the execution
- * @throws Exception if there is no execution identified by the provided
- * UUID execution identifier as String
- */
- @Deprecated
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- public PluginState getIterationState(
- String executionIdentifier, int iterationNumber)
- throws PluginInstanceNotFoundException, ExecutorException;
-
-
- /**
- * The method use the provided UUID as String and the iteration number
- * to retrieve the status of the associated execution
- * @param executionIdentifier UUID as String which identify the execution
- * @param iterationNumber iteration number
- * @return {@link PluginStateEvolution} which contains the state of the execution
- * @throws Exception if there is no execution identified by the provided
- * UUID execution identifier as String
- */
- @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED)
- public PluginStateEvolution getIterationStateEvolution(
- String executionIdentifier, int iterationNumber)
- throws PluginInstanceNotFoundException, ExecutorException;
-}
diff --git a/src/main/java/org/gcube/vremanagement/executor/api/rest/RestConstants.java b/src/main/java/org/gcube/vremanagement/executor/api/rest/RestConstants.java
index 1306991..ed17019 100644
--- a/src/main/java/org/gcube/vremanagement/executor/api/rest/RestConstants.java
+++ b/src/main/java/org/gcube/vremanagement/executor/api/rest/RestConstants.java
@@ -2,10 +2,6 @@ package org.gcube.vremanagement.executor.api.rest;
public class RestConstants {
-
-
- public static final String REST_PATH_PART = "rest";
-
public static final String PLUGINS_PATH_PART = "plugins";
public static final String SCHEDULED_PATH_PART = "scheduled";
diff --git a/src/main/java/org/gcube/vremanagement/executor/api/types/LaunchParameter.java b/src/main/java/org/gcube/vremanagement/executor/api/types/LaunchParameter.java
index efdba4b..a2bf264 100644
--- a/src/main/java/org/gcube/vremanagement/executor/api/types/LaunchParameter.java
+++ b/src/main/java/org/gcube/vremanagement/executor/api/types/LaunchParameter.java
@@ -6,13 +6,6 @@ package org.gcube.vremanagement.executor.api.types;
import java.util.HashMap;
import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.gcube.vremanagement.executor.api.types.adapter.MapAdapter;
import org.gcube.vremanagement.executor.json.SEMapper;
import org.gcube.vremanagement.executor.plugin.PluginStateNotification;
import org.gcube.vremanagement.executor.utils.MapCompare;
@@ -24,8 +17,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* @author Luca Frosini (ISTI - CNR)
*/
-@XmlRootElement()
-@XmlAccessorType(XmlAccessType.FIELD)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property=SEMapper.CLASS_PROPERTY)
public class LaunchParameter implements Comparable {
@@ -35,7 +26,6 @@ public class LaunchParameter implements Comparable {
/**
* The name of the plugin to launch
*/
- @XmlElement
@JsonProperty(value=PLUGIN_NAME)
protected String pluginName;
@@ -45,7 +35,6 @@ public class LaunchParameter implements Comparable {
* that no specific version is required. In other words, null means any
* version.
*/
- @XmlElement
@JsonProperty(value=PLUGIN_VERSION)
protected String pluginVersion;
@@ -59,26 +48,22 @@ public class LaunchParameter implements Comparable {
* be satisfied. In other words, null means that no constraint are required
* to launch the execution
*/
- @XmlJavaTypeAdapter(MapAdapter.class)
protected Map pluginCapabilities;
/**
* Inputs to provide to the plugin instance which have to be executed.
*/
- @XmlJavaTypeAdapter(MapAdapter.class)
protected Map inputs;
/**
* Plugin State Notification to be used and inputs to be provided
* when instantiated
*/
- @XmlJavaTypeAdapter(MapAdapter.class)
protected Map> pluginStateNotifications;
/**
* Scheduling parameters. See {#Scheduling} for further details
*/
- @XmlElement
protected Scheduling scheduling;
protected LaunchParameter(){}
diff --git a/src/main/java/org/gcube/vremanagement/executor/api/types/adapter/MapAdapter.java b/src/main/java/org/gcube/vremanagement/executor/api/types/adapter/MapAdapter.java
deleted file mode 100644
index ba7cc1d..0000000
--- a/src/main/java/org/gcube/vremanagement/executor/api/types/adapter/MapAdapter.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.gcube.vremanagement.executor.api.types.adapter;
-
-import java.util.Map;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import com.thoughtworks.xstream.XStream;
-
-/**
- * @author Lucio Leii (ISTI - CNR)
- */
-public class MapAdapter extends XmlAdapter>{
-
- private static XStream xstream = new XStream();
-
- @Override
- public String marshal(Map oi) throws Exception {
- return xstream.toXML(oi);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Map unmarshal(String oi) throws Exception {
- return (Map) xstream.fromXML(oi);
- }
-
-}
diff --git a/src/main/java/org/gcube/vremanagement/executor/api/types/adapter/ThrowableAdapter.java b/src/main/java/org/gcube/vremanagement/executor/api/types/adapter/ThrowableAdapter.java
deleted file mode 100644
index c884fa6..0000000
--- a/src/main/java/org/gcube/vremanagement/executor/api/types/adapter/ThrowableAdapter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.gcube.vremanagement.executor.api.types.adapter;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-/**
- * @author Lucio Lelii (ISTI - CNR)
- */
-public class ThrowableAdapter extends XmlAdapter {
-
- private HexBinaryAdapter hexAdapter = new HexBinaryAdapter();
-
- @Override
- public String marshal(Throwable v) throws Exception {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(v);
- oos.close();
- byte[] serializedBytes = baos.toByteArray();
- return hexAdapter.marshal(serializedBytes);
- }
-
- @Override
- public Throwable unmarshal(String v) throws Exception {
- byte[] serializedBytes = hexAdapter.unmarshal(v);
- ByteArrayInputStream bais = new ByteArrayInputStream(serializedBytes);
- ObjectInputStream ois = new ObjectInputStream(bais);
- Throwable result = (Throwable) ois.readObject();
- return result;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/ExecutorException.java b/src/main/java/org/gcube/vremanagement/executor/exception/ExecutorException.java
index 3496d97..e1f921c 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/ExecutorException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/ExecutorException.java
@@ -3,19 +3,14 @@
*/
package org.gcube.vremanagement.executor.exception;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
import org.gcube.vremanagement.executor.json.SEMapper;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* @author Luca Frosini (ISTI - CNR)
*
*/
-@WebFault
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = SEMapper.CLASS_PROPERTY)
public class ExecutorException extends Exception {
@@ -26,11 +21,8 @@ public class ExecutorException extends Exception {
private static final String DEFAULT_MESSAGE = "Executor Exception";
- protected ExceptionBean faultInfo;
-
public ExecutorException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
}
public ExecutorException(Throwable cause) {
@@ -39,32 +31,10 @@ public class ExecutorException extends Exception {
public ExecutorException(String message) {
super(message);
- this.faultInfo = new ExceptionBean(message);
- }
-
- public ExecutorException(ExceptionBean faultInfo){
- super(faultInfo.getMessage(), faultInfo.getCause());
- this.faultInfo = faultInfo;
}
public ExecutorException(String message, Throwable cause){
super(message, cause);
- this.faultInfo = new ExceptionBean(message, cause);
- }
-
- public ExecutorException(String message, ExceptionBean faultInfo){
- super(message);
- this.faultInfo = faultInfo;
- }
-
- public ExecutorException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, cause);
- this.faultInfo = faultInfo;
- }
-
- @JsonIgnore
- public ExceptionBean getFaultInfo(){
- return faultInfo;
}
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/InputsNullException.java b/src/main/java/org/gcube/vremanagement/executor/exception/InputsNullException.java
index 552ac30..5608bf0 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/InputsNullException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/InputsNullException.java
@@ -3,16 +3,9 @@
*/
package org.gcube.vremanagement.executor.exception;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class InputsNullException extends ExecutorException {
/**
@@ -22,39 +15,21 @@ public class InputsNullException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "Inputs cannot be null. Use an Empty Map instead.";
- public InputsNullException(){
- super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
- public InputsNullException(String message) {
- super(message);
+ public InputsNullException() {
+ super(DEFAULT_MESSAGE);
}
public InputsNullException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public InputsNullException(ExceptionBean faultInfo){
- super(faultInfo);
+ public InputsNullException(String message) {
+ super(message);
}
public InputsNullException(String message, Throwable cause){
super(message, cause);
}
-
- public InputsNullException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
- }
-
- public InputsNullException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
-
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/InvalidInputsException.java b/src/main/java/org/gcube/vremanagement/executor/exception/InvalidInputsException.java
index b1ab295..c2ce11b 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/InvalidInputsException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/InvalidInputsException.java
@@ -3,16 +3,9 @@
*/
package org.gcube.vremanagement.executor.exception;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class InvalidInputsException extends ExecutorException {
/**
@@ -22,39 +15,20 @@ public class InvalidInputsException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "Inputs cannot be null. Use an Empty Map instead.";
- public InvalidInputsException(){
+ public InvalidInputsException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
-
- public InvalidInputsException(String message) {
- super(message);
}
public InvalidInputsException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public InvalidInputsException(ExceptionBean faultInfo){
- super(faultInfo);
+ public InvalidInputsException(String message) {
+ super(message);
}
public InvalidInputsException(String message, Throwable cause){
super(message, cause);
}
- public InvalidInputsException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
-
- }
-
- public InvalidInputsException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
-
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/LaunchException.java b/src/main/java/org/gcube/vremanagement/executor/exception/LaunchException.java
index 61d9dab..52705f6 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/LaunchException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/LaunchException.java
@@ -3,16 +3,9 @@
*/
package org.gcube.vremanagement.executor.exception;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class LaunchException extends ExecutorException {
/**
@@ -22,38 +15,20 @@ public class LaunchException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "Error trying to launch the plugin execution";
- public LaunchException(){
+ public LaunchException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
-
- public LaunchException(String message) {
- super(message);
}
public LaunchException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public LaunchException(ExceptionBean faultInfo){
- super(faultInfo);
+ public LaunchException(String message) {
+ super(message);
}
public LaunchException(String message, Throwable cause){
super(message, cause);
}
- public LaunchException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
-
- }
-
- public LaunchException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/PluginInstanceNotFoundException.java b/src/main/java/org/gcube/vremanagement/executor/exception/PluginInstanceNotFoundException.java
index 4b377c2..8aa23fc 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/PluginInstanceNotFoundException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/PluginInstanceNotFoundException.java
@@ -3,16 +3,9 @@
*/
package org.gcube.vremanagement.executor.exception;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class PluginInstanceNotFoundException extends ExecutorException {
/**
@@ -22,39 +15,20 @@ public class PluginInstanceNotFoundException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "The requested plugin instance does not exists";
- public PluginInstanceNotFoundException(){
+ public PluginInstanceNotFoundException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
-
- public PluginInstanceNotFoundException(String message) {
- super(message);
}
public PluginInstanceNotFoundException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public PluginInstanceNotFoundException(ExceptionBean faultInfo){
- super(faultInfo);
+ public PluginInstanceNotFoundException(String message) {
+ super(message);
}
public PluginInstanceNotFoundException(String message, Throwable cause){
super(message, cause);
}
- public PluginInstanceNotFoundException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
-
- }
-
- public PluginInstanceNotFoundException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
-
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/PluginNotFoundException.java b/src/main/java/org/gcube/vremanagement/executor/exception/PluginNotFoundException.java
index 409c372..67be629 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/PluginNotFoundException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/PluginNotFoundException.java
@@ -3,16 +3,9 @@
*/
package org.gcube.vremanagement.executor.exception;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class PluginNotFoundException extends ExecutorException {
/**
@@ -22,39 +15,20 @@ public class PluginNotFoundException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "The requested plugin does not exist on container";
- public PluginNotFoundException(){
+ public PluginNotFoundException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
-
- public PluginNotFoundException(String message) {
- super(message);
}
public PluginNotFoundException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public PluginNotFoundException(ExceptionBean faultInfo){
- super(faultInfo);
+ public PluginNotFoundException(String message) {
+ super(message);
}
public PluginNotFoundException(String message, Throwable cause){
super(message, cause);
}
- public PluginNotFoundException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
-
- }
-
- public PluginNotFoundException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
-
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/SchedulerRemoveException.java b/src/main/java/org/gcube/vremanagement/executor/exception/SchedulerRemoveException.java
index 151def9..51db7df 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/SchedulerRemoveException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/SchedulerRemoveException.java
@@ -3,18 +3,9 @@
*/
package org.gcube.vremanagement.executor.exception;
-import java.util.UUID;
-
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class SchedulerRemoveException extends ExecutorException {
/**
@@ -24,55 +15,20 @@ public class SchedulerRemoveException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "Unable to delete SmartExecutor Scheduled Task";
- public SchedulerRemoveException(){
+ public SchedulerRemoveException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
-
- public SchedulerRemoveException(UUID taskUUID) {
- super(DEFAULT_MESSAGE + " " + taskUUID.toString());
- }
-
- public SchedulerRemoveException(String message) {
- super(message);
}
public SchedulerRemoveException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public SchedulerRemoveException(ExceptionBean faultInfo){
- super(faultInfo);
- }
-
- public SchedulerRemoveException(UUID taskUUID, Throwable cause) {
- this(DEFAULT_MESSAGE + " " + taskUUID.toString(), cause);
+ public SchedulerRemoveException(String message) {
+ super(message);
}
public SchedulerRemoveException(String message, Throwable cause){
super(message, cause);
}
- public SchedulerRemoveException(UUID taskUUID, ExceptionBean faultInfo) {
- this(DEFAULT_MESSAGE + " " + taskUUID.toString(), faultInfo);
- }
-
- public SchedulerRemoveException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
-
- }
-
- public SchedulerRemoveException(UUID taskUUID, ExceptionBean faultInfo, Throwable cause) {
- this(DEFAULT_MESSAGE + " " + taskUUID.toString(), faultInfo, cause);
- }
-
- public SchedulerRemoveException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
-
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/UnableToInterruptTaskException.java b/src/main/java/org/gcube/vremanagement/executor/exception/UnableToInterruptTaskException.java
index d430b0d..81bed4a 100644
--- a/src/main/java/org/gcube/vremanagement/executor/exception/UnableToInterruptTaskException.java
+++ b/src/main/java/org/gcube/vremanagement/executor/exception/UnableToInterruptTaskException.java
@@ -5,16 +5,9 @@ package org.gcube.vremanagement.executor.exception;
import java.util.UUID;
-import javax.xml.ws.WebFault;
-
-import org.gcube.vremanagement.executor.exception.beans.ExceptionBean;
-
-
/**
* @author Luca Frosini (ISTI - CNR)
- *
*/
-@WebFault
public class UnableToInterruptTaskException extends ExecutorException {
/**
@@ -24,55 +17,23 @@ public class UnableToInterruptTaskException extends ExecutorException {
private static final String DEFAULT_MESSAGE = "Unable to interrupt SmartExecutor Task";
- public UnableToInterruptTaskException(){
+ public UnableToInterruptTaskException() {
super(DEFAULT_MESSAGE);
- this.faultInfo = new ExceptionBean(DEFAULT_MESSAGE);
- }
-
- public UnableToInterruptTaskException(UUID taskUUID) {
- super(DEFAULT_MESSAGE + " " + taskUUID.toString());
- }
-
- public UnableToInterruptTaskException(String message) {
- super(message);
}
public UnableToInterruptTaskException(Throwable cause) {
this(DEFAULT_MESSAGE, cause);
}
- public UnableToInterruptTaskException(ExceptionBean faultInfo){
- super(faultInfo);
- }
-
- public UnableToInterruptTaskException(UUID taskUUID, Throwable cause) {
- this(DEFAULT_MESSAGE + " " + taskUUID.toString(), cause);
+ public UnableToInterruptTaskException(String message) {
+ super(message);
}
public UnableToInterruptTaskException(String message, Throwable cause){
super(message, cause);
}
- public UnableToInterruptTaskException(UUID taskUUID, ExceptionBean faultInfo) {
- this(DEFAULT_MESSAGE + " " + taskUUID.toString(), faultInfo);
+ public UnableToInterruptTaskException(UUID taskUUID, Throwable cause) {
+ this(DEFAULT_MESSAGE + " with UUID " + taskUUID.toString(), cause);
}
-
- public UnableToInterruptTaskException(String message, ExceptionBean faultInfo){
- super(message, faultInfo);
-
- }
-
- public UnableToInterruptTaskException(UUID taskUUID, ExceptionBean faultInfo, Throwable cause) {
- this(DEFAULT_MESSAGE + " " + taskUUID.toString(), faultInfo, cause);
- }
-
- public UnableToInterruptTaskException(String message, ExceptionBean faultInfo, Throwable cause){
- super(message, faultInfo, cause);
- }
-
- @Override
- public ExceptionBean getFaultInfo(){
- return faultInfo;
- }
-
}
diff --git a/src/main/java/org/gcube/vremanagement/executor/exception/beans/ExceptionBean.java b/src/main/java/org/gcube/vremanagement/executor/exception/beans/ExceptionBean.java
deleted file mode 100644
index 3fe6ad2..0000000
--- a/src/main/java/org/gcube/vremanagement/executor/exception/beans/ExceptionBean.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.gcube.vremanagement.executor.exception.beans;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.gcube.vremanagement.executor.api.types.adapter.ThrowableAdapter;
-
-
-/**
- * @author Lucio Leii (ISTI - CNR)
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ExceptionBean {
-
- protected String message;
-
- @XmlJavaTypeAdapter(ThrowableAdapter.class)
- protected Throwable cause;
-
- protected ExceptionBean(){}
-
- public ExceptionBean(String message){
- this.message = message;
- }
-
- public ExceptionBean(String message, Throwable cause){
- this.message = message;
- this.cause = cause;
- }
-
- /**
- * @return the message
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * @return the cause
- */
- public Throwable getCause() {
- return cause;
- }
-
-}
diff --git a/src/main/java/org/gcube/vremanagement/executor/plugin/PluginDeclaration.java b/src/main/java/org/gcube/vremanagement/executor/plugin/PluginDeclaration.java
index 52c9595..7c77977 100644
--- a/src/main/java/org/gcube/vremanagement/executor/plugin/PluginDeclaration.java
+++ b/src/main/java/org/gcube/vremanagement/executor/plugin/PluginDeclaration.java
@@ -5,13 +5,6 @@ package org.gcube.vremanagement.executor.plugin;
import java.util.Map;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.gcube.vremanagement.executor.api.types.adapter.MapAdapter;
import org.gcube.vremanagement.executor.json.SEMapper;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -23,8 +16,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
* @author Luca Frosini (ISTI - CNR)
*
*/
-@XmlRootElement()
-@XmlAccessorType(XmlAccessType.FIELD)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property=SEMapper.CLASS_PROPERTY)
@JsonDeserialize(as=PluginDeclarationImpl.class)
@JsonTypeName(value="PluginDeclaration")
@@ -42,7 +33,6 @@ public interface PluginDeclaration {
* @return the name of the plugin used by the Executor to refer to the
* plugin implementation class.
*/
- @XmlElement
public String getName();
/**
@@ -50,7 +40,6 @@ public interface PluginDeclaration {
* and it will be published on the ServiceEndpoint created by the executor
* @return the plugin description.
*/
- @XmlElement
public String getDescription();
/**
@@ -58,7 +47,6 @@ public interface PluginDeclaration {
* It will be published on the ServiceEndpoint created by the executor
* @return the plugin version
*/
- @XmlElement
public String getVersion();
/**
@@ -68,7 +56,6 @@ public interface PluginDeclaration {
* Resource in the proper way to obtain its own filtered list.
* @return the {@link Map} with the supported capabilities
*/
- @XmlJavaTypeAdapter(MapAdapter.class)
public Map getSupportedCapabilities();
/**
@@ -78,13 +65,4 @@ public interface PluginDeclaration {
@JsonIgnore
public Class extends Plugin extends PluginDeclaration>> getPluginImplementation();
- /* Waiting for Java 8 where this method should be declarable
- public String toString(){
- return String.format("%s : %s - %s - %s - %s - %s",
- this.getClass().getSimpleName(),
- getName(), getVersion(), getDescription(),
- getSupportedCapabilities(),
- getPluginImplementation().getClass().getSimpleName());
- }
- */
}