1 package org.rundeck.api.generator;
2
3 import org.dom4j.DocumentFactory;
4 import org.dom4j.Element;
5
6 import java.util.Set;
7
8
9
10
11
12
13
14 public class DeleteExecutionsGenerator extends BaseDocGenerator {
15 private Set<Long> executionIds;
16
17 public DeleteExecutionsGenerator(final Set<Long> executionIds) {
18 this.executionIds = executionIds;
19 }
20
21 @Override public Element generateXmlElement() {
22 Element rootElem = DocumentFactory.getInstance().createElement("executions");
23 for (Long executionId : executionIds) {
24 rootElem.addElement("execution").addAttribute("id", Long.toString(executionId));
25 }
26 return rootElem;
27 }
28
29 public Set<Long> getExecutionIds() {
30 return executionIds;
31 }
32
33 public void setExecutionIds(final Set<Long> executionIds) {
34 this.executionIds = executionIds;
35 }
36 }