ref 8819: Extend The Algorithms Importer to Manage Many Processes as Black Boxes

https://support.d4science.org/issues/8819

Updated the support for Processes as Black Boxes

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@150456 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-06-21 10:01:54 +00:00
parent 7a61bafdcf
commit ecbf7a137d
1 changed files with 10 additions and 7 deletions

View File

@ -132,16 +132,19 @@ public class ProjectBuilder {
}
private void createMainCodeIfRequest() throws StatAlgoImporterServiceException {
if (project.getMainCode() != null && project.getMainCode().getItemDescription() != null) {
ItemDescription mainCodeItemDescription = project.getMainCode().getItemDescription();
if (mainCodeItemDescription.getId() != null && !mainCodeItemDescription.getId().isEmpty()) {
FilesStorage filesStorage = new FilesStorage();
filesStorage.deleteItemOnFolder(serviceCredentials.getUserName(), mainCodeItemDescription.getId());
if (project.getProjectConfig() != null && project.getProjectConfig().getProjectSupport() != null
&& project.getProjectConfig().getProjectSupport() instanceof ProjectSupportBlackBox) {
if (project.getMainCode() != null && project.getMainCode().getItemDescription() != null) {
ItemDescription mainCodeItemDescription = project.getMainCode().getItemDescription();
if (mainCodeItemDescription.getId() != null && !mainCodeItemDescription.getId().isEmpty()) {
FilesStorage filesStorage = new FilesStorage();
filesStorage.deleteItemOnFolder(serviceCredentials.getUserName(), mainCodeItemDescription.getId());
}
}
MainGenerator mainGenerator = new MainGenerator();
mainGenerator.createMain(serviceCredentials, project);
}
MainGenerator mainGenerator = new MainGenerator();
mainGenerator.createMain(serviceCredentials, project);
}
private void repackageProjectPackage() throws StatAlgoImporterServiceException {