Enhancement on Project Activity #11690

Updated set method

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/workspace-task-executor-library@167324 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-05-04 12:44:41 +00:00
parent 23a7289c78
commit d9b9bd9ac6
2 changed files with 3 additions and 5 deletions

View File

@ -257,7 +257,7 @@ public class WorkspaceDataMinerTaskExecutor implements ExecutableTask<TaskConfig
* @see org.gcube.common.workspacetaskexecutor.ConfigurableTask#addTaskConfig(java.lang.Object) * @see org.gcube.common.workspacetaskexecutor.ConfigurableTask#addTaskConfig(java.lang.Object)
*/ */
@Override @Override
public Boolean setTaskConfiguration(TaskConfiguration taskConfiguration) throws Exception { public void setTaskConfiguration(TaskConfiguration taskConfiguration) throws Exception {
logger.debug("Set task configuration "+taskConfiguration+" starts..."); logger.debug("Set task configuration "+taskConfiguration+" starts...");
ValidateTaskConfiguration(taskConfiguration); ValidateTaskConfiguration(taskConfiguration);
checkOwner(); checkOwner();
@ -267,7 +267,7 @@ public class WorkspaceDataMinerTaskExecutor implements ExecutableTask<TaskConfig
List<TaskConfiguration> configurations = getListOfTaskConfigurations(taskConfiguration.getWorkspaceItemId()); List<TaskConfiguration> configurations = getListOfTaskConfigurations(taskConfiguration.getWorkspaceItemId());
if(configurations==null) if(configurations==null)
configurations = new ArrayList<TaskConfiguration>(1); //It is the first configuration servert-side configurations = new ArrayList<TaskConfiguration>(1); //It is the first configuration server-side
List<TaskConfiguration> newConfigurations = new ArrayList<TaskConfiguration>(configurations.size()); List<TaskConfiguration> newConfigurations = new ArrayList<TaskConfiguration>(configurations.size());
@ -295,8 +295,6 @@ public class WorkspaceDataMinerTaskExecutor implements ExecutableTask<TaskConfig
logger.error("Error on saving Task Configuration: "+taskConfiguration, e); logger.error("Error on saving Task Configuration: "+taskConfiguration, e);
throw new Exception("Error on saving Task Configuration: "+taskConfiguration+", Please retry"); throw new Exception("Error on saving Task Configuration: "+taskConfiguration+", Please retry");
} }
return true;
} }
/* (non-Javadoc) /* (non-Javadoc)

View File

@ -38,7 +38,7 @@ public interface ExecutableItem<T extends BaseTaskConfiguration> {
* @throws ItemNotExecutableException the item not executable exception * @throws ItemNotExecutableException the item not executable exception
* @throws Exception the exception * @throws Exception the exception
*/ */
Boolean setTaskConfiguration(T config) throws ItemNotExecutableException, Exception; void setTaskConfiguration(T config) throws ItemNotExecutableException, Exception;
/** /**