1 package org.rundeck.api.parser;
2
3 import org.dom4j.Node;
4 import org.rundeck.api.domain.WorkflowStepContextState;
5
6
7
8
9 public class WorkflowStepContextStateParser implements XmlNodeParser<WorkflowStepContextState> {
10 WorkflowStepContextState inherit;
11
12 public WorkflowStepContextStateParser(WorkflowStepContextState inherit) {
13 this.inherit = inherit;
14 }
15
16 @Override
17 public WorkflowStepContextState parseXmlNode(Node node) {
18 WorkflowStepContextState workflowStepState = new WorkflowStepContextState();
19 if(null!=inherit) {
20 workflowStepState.setStepNum(inherit.getStepNum());
21 workflowStepState.setStepContextId(inherit.getStepContextId());
22 }
23 BaseStateParser.parseBaseState(node, workflowStepState);
24 return workflowStepState;
25 }
26 }