package de.jk.upload.command;

import org.springframework.stereotype.Component;

@Component
public class ExternalCommandFactory {

    private int sequence = 0;

    public ExternalCommand create(String... commandStr) {
        ExternalCommand command = new ExternalCommand(commandStr);
        command.setId(sequence++);

        return command;
    }

}

@@ -24,16 +24,97 @@
 mmand;%0A%0A
+import java.io.File;%0A%0Aimport org.springframework.beans.factory.annotation.Value;%0A
 import o
@@ -234,16 +234,184 @@
 nce = 0;
+%0A    private File workingDirectory;%0A%0A    @Value(%22$%7BuploadPath%7D%22)%0A    public void setWorkingDirectoryPath(String path) %7B%0A        workingDirectory = new File(path);%0A    %7D
 %0A%0A    pu
@@ -563,16 +563,71 @@
 ence++);
+%0A        command.setWorkingDirectory(workingDirectory);
 %0A%0A      

Set working dir for processes