Skip to content

Commit

Permalink
Split long method (fixes checkstyle issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Jun 2, 2021
1 parent 41e9308 commit d470f3d
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ private boolean executeScript(List<Process> processes, String script)
case "doit2":
exportDms(processes, String.valueOf(Boolean.FALSE));
break;
default:
return executeOtherScript(processes, script);
}
return true;
}

private boolean executeOtherScript(List<Process> processes, String script)
throws DataException, IOException, InvalidImagesException {
// call the correct method via the parameter
switch (this.parameters.get("action")) {
case "runscript":
String taskName = this.parameters.get("stepname");
String scriptName = this.parameters.get(SCRIPT);
Expand Down Expand Up @@ -166,6 +176,16 @@ private boolean executeScript(List<Process> processes, String script)
case "copyDataToChildren":
copyDataToChildren(processes, script);
break;
default:
return executeRemainingScript(processes, script);
}
return true;
}

private boolean executeRemainingScript(List<Process> processes, String script)
throws DataException, IOException, InvalidImagesException {
// call the correct method via the parameter
switch (this.parameters.get("action")) {
case "generateImages":
String folders = parameters.get("folders");
List<String> foldersList = Arrays.asList("all");
Expand Down

0 comments on commit d470f3d

Please sign in to comment.