package user.jobengine.server.ast;\r
\r
+import java.io.Serializable;\r
import java.util.ArrayList;\r
import java.util.HashMap;\r
import java.util.List;\r
/**\r
* Gyökér osztály.\r
*/\r
-public class JobTemplate extends AST {\r
+public class JobTemplate extends AST implements Serializable {\r
private static final Logger logger = LogManager.getLogger(JobTemplate.class);\r
\r
private CommandSequence commandSequence = null;\r
\r
Element root = document.createElement("jobtemplate");\r
document.appendChild(root);\r
- root.setAttribute("name", getName());\r
+ if (getName() != null) {\r
+ root.setAttribute("name", getName());\r
+ }\r
root.setAttribute("useSessionLog", Boolean.toString(isUseSessionLog()));\r
\r
if (getDeclarationSequence() != null) {\r
command.appendChild(inputs);\r
\r
OutputParameterSequence ops = (OutputParameterSequence) cjs.getOutputParameterSequence();\r
- Element outputs = document.createElement("outputs");\r
-\r
- for (int j = 0; j < ops.getParameters().size(); j++) {\r
- OutputParameter op = (OutputParameter) (ops.getParameters().get(j));\r
- Element output = document.createElement("output");\r
- Element variable = document.createElement("variable");\r
- variable.setAttribute("name", op.getVariableName().getName());\r
- output.appendChild(variable);\r
- outputs.appendChild(output);\r
+ if (ops != null) {\r
+ Element outputs = document.createElement("outputs");\r
+ for (int j = 0; j < ops.getParameters().size(); j++) {\r
+ OutputParameter op = (OutputParameter) (ops.getParameters().get(j));\r
+ Element output = document.createElement("output");\r
+ Element variable = document.createElement("variable");\r
+ variable.setAttribute("name", op.getVariableName().getName());\r
+ output.appendChild(variable);\r
+ outputs.appendChild(output);\r
+ }\r
+ command.appendChild(outputs);\r
}\r
- command.appendChild(outputs);\r
}\r
}\r
} catch (ParserConfigurationException e) {\r