add method for getting all running executions

This commit is contained in:
Vincent Behar 2011-07-06 11:27:49 +02:00
parent 76588fe0cb
commit 57115708f2

View file

@ -547,6 +547,21 @@ public class RundeckClient implements Serializable {
* Executions
*/
/**
* Get all running executions (for all projects)
*
* @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
* @throws RundeckApiException in case of error when calling the API
* @throws RundeckApiLoginException if the login failed
*/
public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException {
List<RundeckExecution> executions = new ArrayList<RundeckExecution>();
for (RundeckProject project : getProjects()) {
executions.addAll(getRunningExecutions(project.getName()));
}
return executions;
}
/**
* Get the running executions for the given project
*