1452: Implement a GUI for StatMan Algorithms Importer
Task-Url: https://support.d4science.org/issues/1452 Added some log git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@124750 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ffe2c85472
commit
627c4df36e
|
@ -212,7 +212,7 @@ public class StatAlgoImporterServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getAslSession(session);
|
||||
logger.debug("createProjectOnWorkspace()");
|
||||
logger.debug("createProjectOnWorkspace(): "+newProjectFolder);
|
||||
if (ProjectArchiver.existProjectInFolder(newProjectFolder,
|
||||
aslSession)) {
|
||||
throw new StatAlgoImporterServiceException(
|
||||
|
@ -222,7 +222,9 @@ public class StatAlgoImporterServiceImpl extends RemoteServiceServlet implements
|
|||
newProjectFolder);
|
||||
Project projectSession = new Project(projectFolder);
|
||||
SessionUtil.setProjectSession(session, projectSession);
|
||||
logger.debug("Create Project: "+projectSession);
|
||||
}
|
||||
|
||||
return;
|
||||
} catch (StatAlgoImporterServiceException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -266,7 +268,7 @@ public class StatAlgoImporterServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession=SessionUtil.getAslSession(session);
|
||||
logger.debug("SetMainCode()");
|
||||
logger.debug("SetMainCode(): "+itemDescription);
|
||||
Project project = SessionUtil.getProjectSession(session);
|
||||
if (project != null) {
|
||||
project.setMainCode(new MainCode(itemDescription));
|
||||
|
@ -275,6 +277,7 @@ public class StatAlgoImporterServiceImpl extends RemoteServiceServlet implements
|
|||
WPS4RParser wps4Parser=new WPS4RParser(project, aslSession);
|
||||
project=wps4Parser.parse();
|
||||
SessionUtil.setProjectSession(session, project);
|
||||
logger.debug("Project: "+project);
|
||||
} else {
|
||||
throw new StatAlgoImporterServiceException("No project open!");
|
||||
}
|
||||
|
|
|
@ -474,12 +474,16 @@ public class AlgorithmGenerator {
|
|||
}
|
||||
|
||||
private String retrieveMainScriptRelativePath() {
|
||||
logger.debug("ProjectInfo: "+project);
|
||||
String projectPath = project.getProjectFolder().getFolder().getPath();
|
||||
String mainCodePath = project.getMainCode().getItemDescription()
|
||||
.getPath();
|
||||
|
||||
logger.debug("ProjectPath: "+projectPath);
|
||||
logger.debug("MainCodePath: "+mainCodePath);
|
||||
|
||||
String relativePath = project.getProjectFolder().getFolder().getName()
|
||||
+ mainCodePath.substring(projectPath.length());
|
||||
logger.debug("RelativePath:"+relativePath);
|
||||
return relativePath;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue