Skip to content
Snippets Groups Projects
Commit 06995392 authored by Till Josef Brinkhus's avatar Till Josef Brinkhus
Browse files
parents 55c4c05c cea36b3e
No related branches found
No related tags found
No related merge requests found
......@@ -52,9 +52,14 @@ public class FileController {
String rootPath = projectForId.getProjectDirectories().getProjectRootPath(); // D:\Eclipse orkspace\bpmn-testgenerator-tool-master\OnlineSchuhDemo
// Hardcoded, die Funktion getBpmnFiles() findet nicht mehrere bpmn dateien sonder nur eine
String bpmnPath = "src\\main\\resources\\backup\\diagram.bpmn";
Path bpmn = Paths.get(rootPath, bpmnPath);
File bpmnFile = new File(bpmn.toString());
//String bpmnPath = "src\\main\\resources\\backup\\diagram.bpmn";
Path pathToBpmnFile = Paths.get(projectForId.getBpmnFiles().get(0).getPath());
Path bpmnPath = Paths.get(rootPath,
projectForId.getProjectDirectories().getModelPath(), this.projectService.getBackupFolderName(),
pathToBpmnFile.getFileName().toString());
//Path bpmn = Paths.get(rootPath, bpmnPath);
File bpmnFile = new File(bpmnPath.toString());
String bpmnContent = readFile(bpmnFile);
return bpmnContent;
......
......@@ -42,6 +42,8 @@ public class ProjectService {
@Value("${testgenerator.projects}")
private String projectsPath;
private String backupFolderName = "backup";
private Path projectConfigPath;
......@@ -321,7 +323,8 @@ public class ProjectService {
LOGGER.info("starting copy process to backup folder");
Project project = getProjectForId(projectId);
//project.getProjectDirectories().getProjectRootPath().conc
Path p = Paths.get(project.getProjectDirectories().getProjectRootPath().toString(), project.getProjectDirectories().getModelPath(), "backup");
Path p = Paths.get(project.getProjectDirectories().getProjectRootPath().toString(),
project.getProjectDirectories().getModelPath(), this.backupFolderName);
File directory = new File(p.toUri());
if(!directory.exists()) {
directory.mkdir();
......@@ -405,4 +408,8 @@ public class ProjectService {
}
*/
}
public String getBackupFolderName() {
return this.backupFolderName;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment