* Gyökér osztály.\r
*/\r
public class JobTemplate extends AST implements Serializable {\r
+ /**\r
+ * \r
+ */\r
+ private static final long serialVersionUID = 1L;\r
+\r
private static final Logger logger = LogManager.getLogger(JobTemplate.class);\r
\r
private CommandSequence commandSequence = null;\r
this.useSessionLog = useSessionLog;\r
}\r
\r
- // TODO foreach ellenorzes\r
public List<String> validate() throws Exception {\r
Map<String, String> parameters = new HashMap<>();\r
Map<String, String> variables = new HashMap<>();\r
Element variables = document.createElement("variables");\r
declarations.appendChild(parameters);\r
declarations.appendChild(variables);\r
-\r
- for (int i = 0; i < getDeclarationSequence().getDeclarations().size(); i++) {\r
+ \r
+ List<Declaration> declarationsList = getDeclarationSequence().getDeclarations();\r
+ for (int i = 0; i < declarationsList.size(); i++) {\r
Element declarationElement = null;\r
- if (getDeclarationSequence().getDeclarations().get(i).getClass().getSimpleName()\r
- .equals("ParameterDeclaration")) {\r
+ Declaration declaration = declarationsList.get(i);\r
+\r
+ if (declaration.getClass().getSimpleName().equals("ParameterDeclaration")) {\r
declarationElement = document.createElement("parameter");\r
- declarationElement.setAttribute("name",\r
- getDeclarationSequence().getDeclarations().get(i).getName());\r
- declarationElement.setAttribute("type",\r
- getDeclarationSequence().getDeclarations().get(i).getType());\r
+ declarationElement.setAttribute("name", declaration.getName());\r
+ declarationElement.setAttribute("type", declaration.getType());\r
parameters.appendChild(declarationElement);\r
} else {\r
declarationElement = document.createElement("variable");\r
- declarationElement.setAttribute("name",\r
- getDeclarationSequence().getDeclarations().get(i).getName());\r
- declarationElement.setAttribute("type",\r
- getDeclarationSequence().getDeclarations().get(i).getType());\r
+ declarationElement.setAttribute("name", declaration.getName());\r
+ declarationElement.setAttribute("type", declaration.getType());\r
variables.appendChild(declarationElement);\r
}\r
}\r
if (getCommandSequence() != null) {\r
Element commands = document.createElement("commands");\r
root.appendChild(commands);\r
- for (int i = 0; i < getCommandSequence().getCommands().size(); i++) {\r
- CallJobStepCommand cjs = (CallJobStepCommand) getCommandSequence().getCommands().get(i);\r
+ List<Command> commandsList = getCommandSequence().getCommands();\r
+ for (int i = 0; i < commandsList.size(); i++) {\r
+ CallJobStepCommand cjs = (CallJobStepCommand) commandsList.get(i);\r
Element command = document.createElement("calljobstep");\r
command.setAttribute("type", cjs.getType());\r
command.setAttribute("weight", Integer.toString(cjs.getWeight()));\r
}\r
command.appendChild(inputs);\r
\r
- OutputParameterSequence ops = (OutputParameterSequence) cjs.getOutputParameterSequence();\r
- if (ops != null) {\r
+ if (cjs.getOutputParameterSequence() != null) {\r
+ OutputParameterSequence ops = (OutputParameterSequence) cjs.getOutputParameterSequence();\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
+ List<Parameter> outputParameters = ops.getParameters();\r
+ for (int j = 0; j < outputParameters.size(); j++) {\r
+ OutputParameter op = (OutputParameter) (outputParameters.get(j));\r
Element output = document.createElement("output");\r
Element variable = document.createElement("variable");\r
variable.setAttribute("name", op.getVariableName().getName());\r