ref 16157: Select button does not seem to work in SAI - Select a Resource window
https://support.d4science.org/issues/16157 Created a workaround to fix WorkspaceExplorer files support git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@178375 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0a2ee31c72
commit
28e34e9b7d
|
@ -1,9 +1,5 @@
|
|||
package org.gcube.portlets.user.statisticalalgorithmsimporter.client.project;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.create.ProjectCreateWizard;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.event.NewCodeEvent;
|
||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.event.ProjectStatusEvent;
|
||||
|
|
|
@ -61,8 +61,6 @@ public class ProjectBuilder {
|
|||
private static final String LOG_TXT = "log.txt";
|
||||
private static final String LOG_JAR_TXT = "logjar.txt";
|
||||
private static final String ECOLOGICAL_ENGINE_JAR = "ecological-engine.jar";
|
||||
private static final String ECOLOGICAL_ENGINE_JAR_URL = "http://data.d4science.org/id?fileName=ecological-engine.jar&smp-id=56952e9ce4b0e2fd6457272c&contentType=application%2Fjava-archive";
|
||||
private static final String ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR_URL = "http://data.d4science.org/id?fileName=ecological-engine-smart-executor.jar&smp-id=56952e9ce4b0e2fd6457272e&contentType=application%2Fjava-archive";
|
||||
private static final String ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR = "ecological-engine-smart-executor.jar";
|
||||
|
||||
private static final String CODE_JAR_MIMETYPE = "application/java-archive";
|
||||
|
@ -616,10 +614,11 @@ public class ProjectBuilder {
|
|||
Path packageHomeDir = packageHome.toPath();
|
||||
|
||||
Path ecologicalEngineJar = new File(tempDirectory.toFile(), ECOLOGICAL_ENGINE_JAR).toPath();
|
||||
storage.downloadExternalInputFile(ECOLOGICAL_ENGINE_JAR_URL, ecologicalEngineJar);
|
||||
|
||||
storage.downloadExternalInputFile(saiDescriptor.getEcologicalEngineJarUrl(), ecologicalEngineJar);
|
||||
Path ecologicalEngineSmartExecutorJar = new File(tempDirectory.toFile(), ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR)
|
||||
.toPath();
|
||||
storage.downloadExternalInputFile(ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR_URL, ecologicalEngineSmartExecutorJar);
|
||||
storage.downloadExternalInputFile(saiDescriptor.getEcologicalEngineSmartExecutorJarUrl(), ecologicalEngineSmartExecutorJar);
|
||||
|
||||
Path algorithmTempFile = new File(packageHomeDir.toFile(),
|
||||
project.getInputData().getProjectInfo().getAlgorithmNameToClassName() + ALGORITHM_EXTENTION).toPath();
|
||||
|
|
|
@ -54,6 +54,7 @@ public class BuildSAIDescriptor {
|
|||
ProjectSupportType.BASHEDIT);
|
||||
availableProjectConfigurations.add(preInstalled);
|
||||
saiDescriptor = new SAIDescriptor(poolManagerConfig, Constants.REMOTE_TEMPLATE_FILE,
|
||||
Constants.ECOLOGICAL_ENGINE_JAR_URL, Constants.ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR_URL,
|
||||
availableProjectConfigurations);
|
||||
} else {
|
||||
logger.info("Production Mode");
|
||||
|
@ -65,6 +66,8 @@ public class BuildSAIDescriptor {
|
|||
}
|
||||
PoolManagerConfig poolManagerConfig;
|
||||
String remoteTemplateFile;
|
||||
String ecologicalEngineJarUrl;
|
||||
String ecologicalEngineSmartExecutorJarUrl;
|
||||
ArrayList<ProjectSetup> availableProjectConfigurations = new ArrayList<>();
|
||||
|
||||
logger.debug("SAIDescriptorJAXB: " + saiDescriptorJAXB);
|
||||
|
@ -77,12 +80,27 @@ public class BuildSAIDescriptor {
|
|||
poolManagerConfig = new PoolManagerConfig(false);
|
||||
}
|
||||
|
||||
if(saiDescriptorJAXB.getRemotetemplatefile()!=null&&!saiDescriptorJAXB.getRemotetemplatefile().isEmpty()){
|
||||
if (saiDescriptorJAXB.getRemotetemplatefile() != null
|
||||
&& !saiDescriptorJAXB.getRemotetemplatefile().isEmpty()) {
|
||||
remoteTemplateFile = saiDescriptorJAXB.getRemotetemplatefile();
|
||||
} else {
|
||||
remoteTemplateFile = Constants.REMOTE_TEMPLATE_FILE;
|
||||
}
|
||||
|
||||
if (saiDescriptorJAXB.getEcologicalenginejarurl() != null
|
||||
&& !saiDescriptorJAXB.getEcologicalenginejarurl().isEmpty()) {
|
||||
ecologicalEngineJarUrl = saiDescriptorJAXB.getEcologicalenginejarurl();
|
||||
} else {
|
||||
ecologicalEngineJarUrl = Constants.ECOLOGICAL_ENGINE_JAR_URL;
|
||||
}
|
||||
|
||||
if (saiDescriptorJAXB.getEcologicalenginesmartexecutorjarurl() != null
|
||||
&& !saiDescriptorJAXB.getEcologicalenginesmartexecutorjarurl().isEmpty()) {
|
||||
ecologicalEngineSmartExecutorJarUrl = saiDescriptorJAXB.getEcologicalenginesmartexecutorjarurl();
|
||||
} else {
|
||||
ecologicalEngineSmartExecutorJarUrl = Constants.ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR_URL;
|
||||
}
|
||||
|
||||
if (saiDescriptorJAXB.getAvailableprojectconfiguration() != null
|
||||
&& !saiDescriptorJAXB.getAvailableprojectconfiguration().isEmpty()) {
|
||||
|
||||
|
@ -133,7 +151,9 @@ public class BuildSAIDescriptor {
|
|||
logger.info("SAIDescriptorJAXB use default configuration for scope: " + scope);
|
||||
poolManagerConfig = new PoolManagerConfig(false);
|
||||
remoteTemplateFile = Constants.REMOTE_TEMPLATE_FILE;
|
||||
|
||||
ecologicalEngineJarUrl = Constants.ECOLOGICAL_ENGINE_JAR_URL;
|
||||
ecologicalEngineSmartExecutorJarUrl = Constants.ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR_URL;
|
||||
|
||||
ProjectSetup r = new ProjectSetup(ProjectLanguageType.R.getId(), ProjectSupportType.REDIT);
|
||||
availableProjectConfigurations.add(r);
|
||||
ProjectSetup rBlackBox = new ProjectSetup(ProjectLanguageType.R_BLACKBOX.getId(),
|
||||
|
@ -160,7 +180,8 @@ public class BuildSAIDescriptor {
|
|||
|
||||
}
|
||||
|
||||
saiDescriptor = new SAIDescriptor(poolManagerConfig, remoteTemplateFile, availableProjectConfigurations);
|
||||
saiDescriptor = new SAIDescriptor(poolManagerConfig, remoteTemplateFile, ecologicalEngineJarUrl,
|
||||
ecologicalEngineSmartExecutorJarUrl, availableProjectConfigurations);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,12 @@ public class SAIDescriptorJAXB {
|
|||
@XmlElement(name = "remotetemplatefile")
|
||||
private String remotetemplatefile;
|
||||
|
||||
@XmlElement(name = "ecologicalenginejarurl")
|
||||
private String ecologicalenginejarurl;
|
||||
|
||||
@XmlElement(name = "ecologicalenginesmartexecutorjarurl")
|
||||
private String ecologicalenginesmartexecutorjarurl;
|
||||
|
||||
@XmlElement(name = "availableprojectconfiguration")
|
||||
private List<AvailableProjectConfigJAXB> availableprojectconfiguration = new ArrayList<>();
|
||||
|
||||
|
@ -35,6 +41,22 @@ public class SAIDescriptorJAXB {
|
|||
public void setPoolmanager(PoolManagerJAXB poolmanager) {
|
||||
this.poolmanager = poolmanager;
|
||||
}
|
||||
|
||||
public String getEcologicalenginejarurl() {
|
||||
return ecologicalenginejarurl;
|
||||
}
|
||||
|
||||
public void setEcologicalenginejarurl(String ecologicalenginejarurl) {
|
||||
this.ecologicalenginejarurl = ecologicalenginejarurl;
|
||||
}
|
||||
|
||||
public String getEcologicalenginesmartexecutorjarurl() {
|
||||
return ecologicalenginesmartexecutorjarurl;
|
||||
}
|
||||
|
||||
public void setEcologicalenginesmartexecutorjarurl(String ecologicalenginesmartexecutorjarurl) {
|
||||
this.ecologicalenginesmartexecutorjarurl = ecologicalenginesmartexecutorjarurl;
|
||||
}
|
||||
|
||||
public String getRemotetemplatefile() {
|
||||
return remotetemplatefile;
|
||||
|
|
|
@ -51,7 +51,9 @@ public class Constants {
|
|||
// Main Generator
|
||||
public static final String PRE_INSTALLED = "Pre-Installed";
|
||||
public static final String REMOTE_TEMPLATE_FILE = "http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/RConfiguration/RD4SFunctions/SAITemplateForExternalInvocation.R";
|
||||
|
||||
public static final String ECOLOGICAL_ENGINE_JAR_URL = "http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-staging/org/gcube/dataanalysis/ecological-engine/1.12.0-4.13.1-154785/ecological-engine-1.12.0-4.13.1-154785.jar";
|
||||
public static final String ECOLOGICAL_ENGINE_SMART_EXECUTOR_JAR_URL = "http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-staging/org/gcube/dataanalysis/ecological-engine-smart-executor/1.6.2-4.13.1-167535/ecological-engine-smart-executor-1.6.2-4.13.1-167535.jar";
|
||||
|
||||
// DataMiner Pool Manager
|
||||
public static final int CLIENT_MONITOR_PERIODMILLIS = 2000;
|
||||
|
||||
|
|
|
@ -14,19 +14,23 @@ public class SAIDescriptor implements Serializable {
|
|||
private static final long serialVersionUID = 8083363401840308985L;
|
||||
private PoolManagerConfig poolManagerConfig;
|
||||
private String remoteTemplateFile;
|
||||
private String ecologicalEngineJarUrl;
|
||||
private String ecologicalEngineSmartExecutorJarUrl;
|
||||
|
||||
private ArrayList<ProjectSetup> availableProjectConfigurations;
|
||||
|
||||
public SAIDescriptor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public SAIDescriptor(PoolManagerConfig poolManagerConfig, String remoteTemplateFile,
|
||||
ArrayList<ProjectSetup> availableProjectConfigurations) {
|
||||
public SAIDescriptor(PoolManagerConfig poolManagerConfig, String remoteTemplateFile, String ecologicalEngineJarUrl,
|
||||
String ecologicalEngineSmartExecutorJarUrl, ArrayList<ProjectSetup> availableProjectConfigurations) {
|
||||
super();
|
||||
this.poolManagerConfig = poolManagerConfig;
|
||||
this.remoteTemplateFile = remoteTemplateFile;
|
||||
this.ecologicalEngineJarUrl = ecologicalEngineJarUrl;
|
||||
this.ecologicalEngineSmartExecutorJarUrl = ecologicalEngineSmartExecutorJarUrl;
|
||||
this.availableProjectConfigurations = availableProjectConfigurations;
|
||||
|
||||
}
|
||||
|
||||
public PoolManagerConfig getPoolManagerConfig() {
|
||||
|
@ -45,6 +49,22 @@ public class SAIDescriptor implements Serializable {
|
|||
this.remoteTemplateFile = remoteTemplateFile;
|
||||
}
|
||||
|
||||
public String getEcologicalEngineJarUrl() {
|
||||
return ecologicalEngineJarUrl;
|
||||
}
|
||||
|
||||
public void setEcologicalEngineJarUrl(String ecologicalEngineJarUrl) {
|
||||
this.ecologicalEngineJarUrl = ecologicalEngineJarUrl;
|
||||
}
|
||||
|
||||
public String getEcologicalEngineSmartExecutorJarUrl() {
|
||||
return ecologicalEngineSmartExecutorJarUrl;
|
||||
}
|
||||
|
||||
public void setEcologicalEngineSmartExecutorJarUrl(String ecologicalEngineSmartExecutorJarUrl) {
|
||||
this.ecologicalEngineSmartExecutorJarUrl = ecologicalEngineSmartExecutorJarUrl;
|
||||
}
|
||||
|
||||
public ArrayList<ProjectSetup> getAvailableProjectConfigurations() {
|
||||
return availableProjectConfigurations;
|
||||
}
|
||||
|
@ -56,7 +76,9 @@ public class SAIDescriptor implements Serializable {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "SAIDescriptor [poolManagerConfig=" + poolManagerConfig + ", remoteTemplateFile=" + remoteTemplateFile
|
||||
+ ", availableProjectConfigurations=" + availableProjectConfigurations + "]";
|
||||
+ ", ecologicalEngineJarUrl=" + ecologicalEngineJarUrl + ", ecologicalEngineSmartExecutorJarUrl="
|
||||
+ ecologicalEngineSmartExecutorJarUrl + ", availableProjectConfigurations="
|
||||
+ availableProjectConfigurations + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue