- void paramValueUpdater() {\r
- for (Parameter command : cbuilder.getCommandList()) {\r
- if (command.value == null) {\r
- continue;\r
- }\r
- String propertyPath = compbio.engine.client.Util.getExecProperty(\r
- command.name + ".path", getType());\r
- if (Util.isEmpty(propertyPath)) {\r
- continue;\r
- }\r
- if (new File(command.value).isAbsolute()) {\r
- // Matrix can be found so no actions necessary\r
- // This method has been called already and the matrix name\r
- // is modified to contain full path // no further actions is\r
- // necessary\r
- continue;\r
- }\r
- String absMatrixPath = compbio.engine.client.Util\r
- .convertToAbsolute(propertyPath);\r
- command.value = absMatrixPath + File.separator + command.value;\r
- cbuilder.setParam(command);\r
- }\r
+ paramValueUpdater();\r
+ return cbuilder;\r
+ }\r
+\r
+ @Override\r
+ public Executable<T> addParameters(List<String> parameters) {\r
+ cbuilder.addParams(parameters);\r
+ return this;\r
+ }\r
+\r
+ public Executable<T> setParameter(String parameter) {\r
+ cbuilder.setParam(parameter);\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * This is a generic method of changing values of the parameters with\r
+ * properties\r
+ * \r
+ * This method iterates via commands for an executable finding matches from\r
+ * the Executable.properties file and replacing values in CommandBuilder\r
+ * with a combination of value from CommandBuilder to merge path from\r
+ * properties\r
+ */\r
+ void paramValueUpdater() {\r
+ for (Parameter command : cbuilder.getCommandList()) {\r
+ if (command.value == null) {\r
+ continue;\r
+ }\r
+ String propertyPath = compbio.engine.client.Util.getExecProperty(\r
+ command.name + ".path", getType());\r
+ if (Util.isEmpty(propertyPath)) {\r
+ continue;\r
+ }\r
+ if (new File(command.value).isAbsolute()) {\r
+ // Matrix can be found so no actions necessary\r
+ // This method has been called already and the matrix name\r
+ // is modified to contain full path // no further actions is\r
+ // necessary\r
+ continue;\r
+ }\r
+ String absMatrixPath = compbio.engine.client.Util\r
+ .convertToAbsolute(propertyPath);\r
+ command.value = absMatrixPath + File.separator + command.value;\r
+ cbuilder.setParam(command);\r