All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rundeck.api.generator.DeleteExecutionsGenerator Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy