private Map<String, String> variables = new HashMap<String, String>();
private Executor executor = new DefaultExecutor();
+ private Map<String, String> environment = new HashMap<String, String>();
+
public OsCallBackup() {
}
ExecuteStreamHandler streamHandler = new PumpStreamHandler(
targetContent.getOutputStream(), errBos);
executor.setStreamHandler(streamHandler);
- executor.execute(commandLine);
+ executor.execute(commandLine, environment);
} catch (ExecuteException e) {
byte[] err = errBos.toByteArray();
String errStr = new String(err);
return command;
}
+ /**
+ * A reference to the environment variables that will be passed to the
+ * process. Empty by default.
+ */
+ protected Map<String, String> getEnvironment() {
+ return environment;
+ }
+
protected Map<String, String> getVariables() {
return variables;
}