org.rundeck.api.generator.DeleteExecutionsGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rundeck-api-java-client Show documentation
Show all versions of rundeck-api-java-client Show documentation
Java client for the Rundeck REST API
The newest version!
package org.rundeck.api.generator;
import org.dom4j.DocumentFactory;
import org.dom4j.Element;
import java.util.Set;
/**
* DeleteExecutionsGenerator is ...
*
* @author Greg Schueler
* @since 2014-11-06
*/
public class DeleteExecutionsGenerator extends BaseDocGenerator {
private Set executionIds;
public DeleteExecutionsGenerator(final Set executionIds) {
this.executionIds = executionIds;
}
@Override public Element generateXmlElement() {
Element rootElem = DocumentFactory.getInstance().createElement("executions");
for (Long executionId : executionIds) {
rootElem.addElement("execution").addAttribute("id", Long.toString(executionId));
}
return rootElem;
}
public Set getExecutionIds() {
return executionIds;
}
public void setExecutionIds(final Set executionIds) {
this.executionIds = executionIds;
}
}