Replace unwieldy methods with many arguments with Builder based interfaces, deprecating the old methods.
- The old methods will be removed completely in version 10 of this library. Fixes 2.
Maintenance and support of rundeck-api-java-client now primarily provided by the Rundeck project, and is now available at https://rundeck.github.com/rundeck-api-java-client
Replace unwieldy methods with many arguments with Builder based interfaces, deprecating the old methods.
+ The old methods will be removed completely in version 10 of this library. Fixes 2.
Maintenance and support of rundeck-api-java-client now primarily provided by the Rundeck project, and is now available at https://rundeck.github.com/rundeck-api-java-client
Description: The codec package contains simple encoder and decoders for
various formats such as Base64 and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
- collection of phonetic encoding utilities.
Description: Commons Lang, a package of Java utility classes for the
classes that are in java.lang's hierarchy, or are considered to be so
- standard as to justify existence in java.lang.
Project License: No project license is defined for this project.
xml-apis:xml-apis:jar:1.0.b2 (compile)
XML Commons External Components XML APIs
Description: xml-commons provides an Apache-hosted set of DOM, SAX, and
JAXP interfaces for use in other xml-based projects. Our hope is that we
can standardize on both a common version and packaging scheme for these
critical XML standards interfaces to make the lives of both our developers
and users easier. The External Components portion of xml-commons contains
interfaces that are defined by external standards organizations. For DOM,
that's the W3C; for SAX it's David Megginson and sax.sourceforge.net; for
- JAXP it's Sun.
Description: There is currently no description associated with this project.
Project License: No project license is defined for this project.
xerces:xercesImpl:jar:2.6.2 (compile)
Unnamed - xerces:xercesImpl:jar:2.6.2
Description: There is currently no description associated with this project.
Project License: No project license is defined for this project.
xalan:xalan:jar:2.6.0 (compile)
Unnamed - xalan:xalan:jar:2.6.0
Description: There is currently no description associated with this project.
Project License: No project license is defined for this project.
xml-apis:xml-apis:jar:1.0.b2 (compile)
XML Commons External Components XML APIs
Description: xml-commons provides an Apache-hosted set of DOM, SAX, and
JAXP interfaces for use in other xml-based projects. Our hope is that we
can standardize on both a common version and packaging scheme for these
critical XML standards interfaces to make the lives of both our developers
and users easier. The External Components portion of xml-commons contains
interfaces that are defined by external standards organizations. For DOM,
that's the W3C; for SAX it's David Megginson and sax.sourceforge.net; for
- JAXP it's Sun.
Description: There is currently no description associated with this project.
Project License: No project license is defined for this project.
junit:junit:jar:4.10 (test)
JUnit
Description: JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
- It is used by the developer who implements unit tests in Java.
Description: There is currently no description associated with this project.
Project License: No project license is defined for this project.
junit:junit:jar:4.10 (test)
JUnit
Description: JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
+ It is used by the developer who implements unit tests in Java.
diff --git a/xref/index.html b/xref/index.html
index 4a14c15..f697ca1 100644
--- a/xref/index.html
+++ b/xref/index.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference
+ RunDeck API - Java Client 11.1 Reference
diff --git a/xref/org/rundeck/api/RundeckClient.html b/xref/org/rundeck/api/RundeckClient.html
index 5389546..75cfbd2 100644
--- a/xref/org/rundeck/api/RundeckClient.html
+++ b/xref/org/rundeck/api/RundeckClient.html
@@ -1049,1566 +1049,1567 @@
1039public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
1040 RundeckApiTokenException, IllegalArgumentException {
1041 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !");
-1042returnnewApiCall(this).delete(newApiPathBuilder("/job/", jobId), newStringParser(rootXpath()+"/success/message"));
-1043 }
-1044/**
-1045 * Delete multiple jobs, identified by the given IDs
-1046 *
-1047 * @param jobIds List of job IDS
-1048 * @return the bulk delete result
-1049 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1050 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1051 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1052 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1053 */
-1054publicRundeckJobDeleteBulk deleteJobs(final List<String> jobIds) throws RundeckApiException, RundeckApiLoginException,
-1055 RundeckApiTokenException, IllegalArgumentException {
-1056if (null == jobIds || 0 == jobIds.size()) {
-1057thrownew IllegalArgumentException("jobIds are mandatory to delete a job");
-1058 }
-1059returnnewApiCall(this).post(newApiPathBuilder("/jobs/delete").field("ids",jobIds),
-1060newBulkDeleteParser(rootXpath()+"/deleteJobs"));
-1061 }
-1062
-1063/**
-1064 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
-1065 * end of the job execution)
-1066 *
-1067 * @param jobRun the RunJob, see {@link RunJobBuilder}
-1068 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-1069 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1070 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1071 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1072 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1073 * @see #triggerJob(String)
-1074 * @see #runJob(String, Properties, Properties)
-1075 */
-1076publicRundeckExecution triggerJob(finalRunJob jobRun)
-1077throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1078 AssertUtil.notBlank(jobRun.getJobId(), "jobId is mandatory to trigger a job !");
-1079ApiPathBuilder apiPath = newApiPathBuilder("/job/", jobRun.getJobId(), "/run").param("argString",
-1080 ParametersUtil.generateArgString(jobRun.getOptions()))
-1081 .nodeFilters(jobRun.getNodeFilters());
-1082if(null!=jobRun.getAsUser()) {
-1083 apiPath.param("asUser", jobRun.getAsUser());
-1084 }
-1085returnnewApiCall(this).get(apiPath, newExecutionParser(rootXpath()+"/executions/execution"));
-1086 }
-1087
+1042newApiCall(this).delete(newApiPathBuilder("/job/", jobId));
+1043return"Job " + jobId + " was deleted successfully";
+1044 }
+1045/**
+1046 * Delete multiple jobs, identified by the given IDs
+1047 *
+1048 * @param jobIds List of job IDS
+1049 * @return the bulk delete result
+1050 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1051 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1052 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1053 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1054 */
+1055publicRundeckJobDeleteBulk deleteJobs(final List<String> jobIds) throws RundeckApiException, RundeckApiLoginException,
+1056 RundeckApiTokenException, IllegalArgumentException {
+1057if (null == jobIds || 0 == jobIds.size()) {
+1058thrownew IllegalArgumentException("jobIds are mandatory to delete a job");
+1059 }
+1060returnnewApiCall(this).post(newApiPathBuilder("/jobs/delete").field("ids",jobIds),
+1061newBulkDeleteParser(rootXpath()+"/deleteJobs"));
+1062 }
+1063
+1064/**
+1065 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
+1066 * end of the job execution)
+1067 *
+1068 * @param jobRun the RunJob, see {@link RunJobBuilder}
+1069 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+1070 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1071 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1072 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1073 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1074 * @see #triggerJob(String)
+1075 * @see #runJob(String, Properties, Properties)
+1076 */
+1077publicRundeckExecution triggerJob(finalRunJob jobRun)
+1078throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1079 AssertUtil.notBlank(jobRun.getJobId(), "jobId is mandatory to trigger a job !");
+1080ApiPathBuilder apiPath = newApiPathBuilder("/job/", jobRun.getJobId(), "/run").param("argString",
+1081 ParametersUtil.generateArgString(jobRun.getOptions()))
+1082 .nodeFilters(jobRun.getNodeFilters());
+1083if(null!=jobRun.getAsUser()) {
+1084 apiPath.param("asUser", jobRun.getAsUser());
+1085 }
+1086returnnewApiCall(this).get(apiPath, newExecutionParser(rootXpath()+"/executions/execution"));
+1087 }
1088
-1089/**
-1090 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-1091 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
-1092 * aborted) or is still running.
-1093 *
-1094 * @param runJob the RunJob, see {@link RunJobBuilder}
-1095 *
-1096 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1097 *
-1098 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1099 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1100 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1101 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1102 * @see #triggerJob(RunJob)
-1103 * @see #runJob(RunJob, long, TimeUnit)
-1104 */
-1105publicRundeckExecution runJob(finalRunJob runJob) throws RundeckApiException, RundeckApiLoginException,
-1106 RundeckApiTokenException, IllegalArgumentException {
-1107return runJob(runJob, DEFAULT_POOLING_INTERVAL, DEFAULT_POOLING_UNIT);
-1108 }
-1109
-1110/**
-1111 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-1112 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to
-1113 * know if the execution is finished (or aborted) or is still running.
-1114 *
-1115 * @param jobRun the RunJob, see {@link RunJobBuilder}
-1116 * @param poolingInterval for checking the status of the execution. Must be > 0.
-1117 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-1118 *
-1119 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1120 *
-1121 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1122 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1123 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1124 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1125 * @see #triggerJob(RunJob)
-1126 */
-1127publicRundeckExecution runJob(finalRunJob jobRun, long poolingInterval,
-1128 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException,
-1129 IllegalArgumentException {
-1130
-1131if (poolingInterval <= 0) {
-1132 poolingInterval = DEFAULT_POOLING_INTERVAL;
-1133 poolingUnit = DEFAULT_POOLING_UNIT;
-1134 }
-1135if (poolingUnit == null) {
-1136 poolingUnit = DEFAULT_POOLING_UNIT;
-1137 }
-1138
-1139RundeckExecution execution = triggerJob(jobRun);
-1140while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
-1141try {
-1142 Thread.sleep(poolingUnit.toMillis(poolingInterval));
-1143 } catch (InterruptedException e) {
-1144break;
-1145 }
-1146 execution = getExecution(execution.getId());
-1147 }
-1148return execution;
-1149 }
-1150
-1151/*
-1152 * Ad-hoc commands
-1153 */
-1154
+1089
+1090/**
+1091 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
+1092 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
+1093 * aborted) or is still running.
+1094 *
+1095 * @param runJob the RunJob, see {@link RunJobBuilder}
+1096 *
+1097 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1098 *
+1099 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1100 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1101 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1102 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1103 * @see #triggerJob(RunJob)
+1104 * @see #runJob(RunJob, long, TimeUnit)
+1105 */
+1106publicRundeckExecution runJob(finalRunJob runJob) throws RundeckApiException, RundeckApiLoginException,
+1107 RundeckApiTokenException, IllegalArgumentException {
+1108return runJob(runJob, DEFAULT_POOLING_INTERVAL, DEFAULT_POOLING_UNIT);
+1109 }
+1110
+1111/**
+1112 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
+1113 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to
+1114 * know if the execution is finished (or aborted) or is still running.
+1115 *
+1116 * @param jobRun the RunJob, see {@link RunJobBuilder}
+1117 * @param poolingInterval for checking the status of the execution. Must be > 0.
+1118 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+1119 *
+1120 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1121 *
+1122 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1123 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1124 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1125 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1126 * @see #triggerJob(RunJob)
+1127 */
+1128publicRundeckExecution runJob(finalRunJob jobRun, long poolingInterval,
+1129 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException,
+1130 IllegalArgumentException {
+1131
+1132if (poolingInterval <= 0) {
+1133 poolingInterval = DEFAULT_POOLING_INTERVAL;
+1134 poolingUnit = DEFAULT_POOLING_UNIT;
+1135 }
+1136if (poolingUnit == null) {
+1137 poolingUnit = DEFAULT_POOLING_UNIT;
+1138 }
+1139
+1140RundeckExecution execution = triggerJob(jobRun);
+1141while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
+1142try {
+1143 Thread.sleep(poolingUnit.toMillis(poolingInterval));
+1144 } catch (InterruptedException e) {
+1145break;
+1146 }
+1147 execution = getExecution(execution.getId());
+1148 }
+1149return execution;
+1150 }
+1151
+1152/*
+1153 * Ad-hoc commands
+1154 */1155
-1156/**
-1157 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
-1158 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
-1159 *
-1160 * @param command the RunAdhocCommand. Project and command are mandatory, see {@link RunAdhocCommandBuilder}
-1161 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-1162 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1163 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1164 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1165 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-1166 * @see #triggerAdhocCommand(String, String)
-1167 * @see #runAdhocCommand(String, String, Properties)
-1168 */
-1169publicRundeckExecution triggerAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException,
-1170 RundeckApiTokenException, IllegalArgumentException {
-1171 AssertUtil.notBlank(command.getProject(), "project is mandatory to trigger an ad-hoc command !");
-1172 AssertUtil.notBlank(command.getCommand(), "command is mandatory to trigger an ad-hoc command !");
-1173ApiPathBuilder apiPath = newApiPathBuilder("/run/command").param("project", command.getProject())
-1174 .param("exec", command.getCommand())
-1175 .param("nodeThreadcount",
-1176 command.getNodeThreadcount())
-1177 .param("nodeKeepgoing",
-1178 command.getNodeKeepgoing())
-1179 .nodeFilters(command.getNodeFilters());
-1180if(null!= command.getAsUser()) {
-1181 apiPath.param("asUser", command.getAsUser());
-1182 }
-1183RundeckExecution execution = newApiCall(this).get(apiPath, newExecutionParser(rootXpath()+"/execution"));
-1184// the first call just returns the ID of the execution, so we need another call to get a "real" execution
-1185return getExecution(execution.getId());
-1186 }
-1187
+1156
+1157/**
+1158 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
+1159 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
+1160 *
+1161 * @param command the RunAdhocCommand. Project and command are mandatory, see {@link RunAdhocCommandBuilder}
+1162 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+1163 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1164 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1165 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1166 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+1167 * @see #triggerAdhocCommand(String, String)
+1168 * @see #runAdhocCommand(String, String, Properties)
+1169 */
+1170publicRundeckExecution triggerAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException,
+1171 RundeckApiTokenException, IllegalArgumentException {
+1172 AssertUtil.notBlank(command.getProject(), "project is mandatory to trigger an ad-hoc command !");
+1173 AssertUtil.notBlank(command.getCommand(), "command is mandatory to trigger an ad-hoc command !");
+1174ApiPathBuilder apiPath = newApiPathBuilder("/run/command").param("project", command.getProject())
+1175 .param("exec", command.getCommand())
+1176 .param("nodeThreadcount",
+1177 command.getNodeThreadcount())
+1178 .param("nodeKeepgoing",
+1179 command.getNodeKeepgoing())
+1180 .nodeFilters(command.getNodeFilters());
+1181if(null!= command.getAsUser()) {
+1182 apiPath.param("asUser", command.getAsUser());
+1183 }
+1184RundeckExecution execution = newApiCall(this).get(apiPath, newExecutionParser(rootXpath()+"/execution"));
+1185// the first call just returns the ID of the execution, so we need another call to get a "real" execution
+1186return getExecution(execution.getId());
+1187 }
1188
-1189/**
-1190 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-1191 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
-1192 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
-1193 *
-1194 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder}
-1195 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1196 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1197 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1198 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1199 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-1200 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
-1201 * @see #triggerAdhocCommand(RunAdhocCommand)
-1202 */
-1203publicRundeckExecution runAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException,
-1204 RundeckApiTokenException, IllegalArgumentException {
-1205return runAdhocCommand(command,
-1206 DEFAULT_POOLING_INTERVAL,
-1207 DEFAULT_POOLING_UNIT);
-1208 }
-1209
-1210/**
-1211 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-1212 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
-1213 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the
-1214 * nodeFilters parameter.
-1215 *
-1216 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder}
-1217 * @param poolingInterval for checking the status of the execution. Must be > 0.
-1218 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-1219 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1220 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1221 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1222 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1223 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-1224 * @see #triggerAdhocCommand(RunAdhocCommand)
-1225 */
-1226publicRundeckExecution runAdhocCommand(RunAdhocCommand command, long poolingInterval, TimeUnit poolingUnit)
-1227throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1228if (poolingInterval <= 0) {
-1229 poolingInterval = DEFAULT_POOLING_INTERVAL;
-1230 poolingUnit = DEFAULT_POOLING_UNIT;
-1231 }
-1232if (poolingUnit == null) {
-1233 poolingUnit = DEFAULT_POOLING_UNIT;
-1234 }
-1235
-1236RundeckExecution execution = triggerAdhocCommand(command);
-1237while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
-1238try {
-1239 Thread.sleep(poolingUnit.toMillis(poolingInterval));
-1240 } catch (InterruptedException e) {
-1241break;
-1242 }
-1243 execution = getExecution(execution.getId());
-1244 }
-1245return execution;
-1246 }
-1247
-1248/*
-1249 * Ad-hoc scripts
-1250 */
-1251
+1189
+1190/**
+1191 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+1192 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
+1193 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
+1194 *
+1195 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder}
+1196 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1197 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1198 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1199 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1200 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+1201 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
+1202 * @see #triggerAdhocCommand(RunAdhocCommand)
+1203 */
+1204publicRundeckExecution runAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException,
+1205 RundeckApiTokenException, IllegalArgumentException {
+1206return runAdhocCommand(command,
+1207 DEFAULT_POOLING_INTERVAL,
+1208 DEFAULT_POOLING_UNIT);
+1209 }
+1210
+1211/**
+1212 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+1213 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
+1214 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the
+1215 * nodeFilters parameter.
+1216 *
+1217 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder}
+1218 * @param poolingInterval for checking the status of the execution. Must be > 0.
+1219 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+1220 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1221 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1222 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1223 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1224 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+1225 * @see #triggerAdhocCommand(RunAdhocCommand)
+1226 */
+1227publicRundeckExecution runAdhocCommand(RunAdhocCommand command, long poolingInterval, TimeUnit poolingUnit)
+1228throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1229if (poolingInterval <= 0) {
+1230 poolingInterval = DEFAULT_POOLING_INTERVAL;
+1231 poolingUnit = DEFAULT_POOLING_UNIT;
+1232 }
+1233if (poolingUnit == null) {
+1234 poolingUnit = DEFAULT_POOLING_UNIT;
+1235 }
+1236
+1237RundeckExecution execution = triggerAdhocCommand(command);
+1238while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
+1239try {
+1240 Thread.sleep(poolingUnit.toMillis(poolingInterval));
+1241 } catch (InterruptedException e) {
+1242break;
+1243 }
+1244 execution = getExecution(execution.getId());
+1245 }
+1246return execution;
+1247 }
+1248
+1249/*
+1250 * Ad-hoc scripts
+1251 */1252
-1253/**
-1254 * Trigger the execution of an ad-hoc script read from a file, and return immediately (without waiting the end of
-1255 * the execution). The script will be dispatched to nodes, accordingly to the nodeFilters parameter.
-1256 *
-1257 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
-1258 * @param scriptFilename a file to read as the input script stream
-1259 *
-1260 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-1261 *
-1262 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1263 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1264 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1265 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
-1266 * @throws IOException if an error occurs reading the script file
-1267 * @see #triggerAdhocScript(RunAdhocScript)
-1268 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit)
-1269 */
-1270publicRundeckExecution triggerAdhocScript(finalRunAdhocScript script, final String scriptFilename) throws
-1271 RundeckApiException,
-1272 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException {
-1273 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to trigger an ad-hoc script !");
-1274 FileInputStream stream = null;
-1275try {
-1276 stream = FileUtils.openInputStream(new File(scriptFilename));
-1277return triggerAdhocScript(RunAdhocScriptBuilder.builder(script)
-1278 .setScript(stream)
-1279 .build());
-1280 } finally {
-1281 IOUtils.closeQuietly(stream);
-1282 }
-1283 }
-1284/**
-1285 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The
-1286 * script will be dispatched to nodes, accordingly to the nodeFilters parameter.
-1287 *
-1288 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
-1289 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-1290 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1291 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1292 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1293 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
-1294 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean)
-1295 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit)
-1296 */
-1297publicRundeckExecution triggerAdhocScript(RunAdhocScript script) throws RundeckApiException,
-1298 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1299 AssertUtil.notBlank(script.getProject(), "project is mandatory to trigger an ad-hoc script !");
-1300 AssertUtil.notNull(script.getScript(), "script is mandatory to trigger an ad-hoc script !");
-1301ApiPathBuilder apiPath = newApiPathBuilder("/run/script").param("project", script.getProject())
-1302 .attach("scriptFile",
-1303 script.getScript())
-1304 .param("argString",script.getArgString())
-1305 .param("nodeThreadcount",
-1306 script.getNodeThreadcount())
-1307 .param("nodeKeepgoing",
-1308 script.getNodeKeepgoing())
-1309 .param("scriptInterpreter",
-1310 script.getScriptInterpreter())
-1311 .param("interpreterArgsQuoted",
-1312 script.getInterpreterArgsQuoted())
-1313 .nodeFilters(script.getNodeFilters());
-1314if(null!=script.getAsUser()) {
-1315 apiPath.param("asUser", script.getAsUser());
-1316 }
-1317RundeckExecution execution = newApiCall(this).post(apiPath, newExecutionParser(rootXpath()+"/execution"));
-1318// the first call just returns the ID of the execution, so we need another call to get a "real" execution
-1319return getExecution(execution.getId());
-1320 }
-1321
+1253
+1254/**
+1255 * Trigger the execution of an ad-hoc script read from a file, and return immediately (without waiting the end of
+1256 * the execution). The script will be dispatched to nodes, accordingly to the nodeFilters parameter.
+1257 *
+1258 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
+1259 * @param scriptFilename a file to read as the input script stream
+1260 *
+1261 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+1262 *
+1263 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1264 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1265 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1266 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
+1267 * @throws IOException if an error occurs reading the script file
+1268 * @see #triggerAdhocScript(RunAdhocScript)
+1269 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit)
+1270 */
+1271publicRundeckExecution triggerAdhocScript(finalRunAdhocScript script, final String scriptFilename) throws
+1272 RundeckApiException,
+1273 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException {
+1274 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to trigger an ad-hoc script !");
+1275 FileInputStream stream = null;
+1276try {
+1277 stream = FileUtils.openInputStream(new File(scriptFilename));
+1278return triggerAdhocScript(RunAdhocScriptBuilder.builder(script)
+1279 .setScript(stream)
+1280 .build());
+1281 } finally {
+1282 IOUtils.closeQuietly(stream);
+1283 }
+1284 }
+1285/**
+1286 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The
+1287 * script will be dispatched to nodes, accordingly to the nodeFilters parameter.
+1288 *
+1289 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
+1290 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+1291 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1292 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1293 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1294 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
+1295 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean)
+1296 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit)
+1297 */
+1298publicRundeckExecution triggerAdhocScript(RunAdhocScript script) throws RundeckApiException,
+1299 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1300 AssertUtil.notBlank(script.getProject(), "project is mandatory to trigger an ad-hoc script !");
+1301 AssertUtil.notNull(script.getScript(), "script is mandatory to trigger an ad-hoc script !");
+1302ApiPathBuilder apiPath = newApiPathBuilder("/run/script").param("project", script.getProject())
+1303 .attach("scriptFile",
+1304 script.getScript())
+1305 .param("argString",script.getArgString())
+1306 .param("nodeThreadcount",
+1307 script.getNodeThreadcount())
+1308 .param("nodeKeepgoing",
+1309 script.getNodeKeepgoing())
+1310 .param("scriptInterpreter",
+1311 script.getScriptInterpreter())
+1312 .param("interpreterArgsQuoted",
+1313 script.getInterpreterArgsQuoted())
+1314 .nodeFilters(script.getNodeFilters());
+1315if(null!=script.getAsUser()) {
+1316 apiPath.param("asUser", script.getAsUser());
+1317 }
+1318RundeckExecution execution = newApiCall(this).post(apiPath, newExecutionParser(rootXpath()+"/execution"));
+1319// the first call just returns the ID of the execution, so we need another call to get a "real" execution
+1320return getExecution(execution.getId());
+1321 }
1322
-1323/**
-1324 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-1325 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
-1326 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter.
-1327 *
-1328 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
-1329 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1330 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1331 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1332 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1333 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
-1334 * @throws IOException if we failed to read the file
-1335 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit)
-1336 * @see #triggerAdhocScript(RunAdhocScript)
-1337 */
-1338publicRundeckExecution runAdhocScript(RunAdhocScript script) throws RundeckApiException,
-1339 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException {
-1340return runAdhocScript(script,
-1341 DEFAULT_POOLING_INTERVAL,
-1342 DEFAULT_POOLING_UNIT);
-1343 }
-1344
-1345/**
-1346 * Run an ad-hoc script read from a file, and wait until its execution is finished (or aborted) to return. We will
-1347 * poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the
-1348 * execution is finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to
-1349 * the nodeFilters parameter.
-1350 *
-1351 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
-1352 * @param scriptFilename filename of a script to read
-1353 * @param poolingInterval for checking the status of the execution. Must be > 0.
-1354 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-1355 *
-1356 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1357 *
-1358 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1359 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1360 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1361 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
-1362 * @throws IOException if we failed to read the file
-1363 * @see #runAdhocScript(RunAdhocScript)
-1364 * @see #triggerAdhocScript(RunAdhocScript, String)
-1365 */
-1366publicRundeckExecution runAdhocScript(finalRunAdhocScript script, final String scriptFilename,
-1367finallong poolingInterval, final TimeUnit poolingUnit) throws RundeckApiException,
-1368 RundeckApiLoginException, RundeckApiTokenException,
-1369 IllegalArgumentException, IOException {
-1370 FileInputStream stream = null;
-1371try {
-1372 stream = FileUtils.openInputStream(new File(scriptFilename));
-1373return runAdhocScript(RunAdhocScriptBuilder.builder(script)
-1374 .setScript(stream)
-1375 .build(), poolingInterval, poolingUnit);
-1376 } finally {
-1377 IOUtils.closeQuietly(stream);
-1378 }
-1379 }
-1380/**
-1381 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-1382 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
-1383 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters
-1384 * parameter.
-1385 *
-1386 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
-1387 * @param poolingInterval for checking the status of the execution. Must be > 0.
-1388 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-1389 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-1390 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1391 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1392 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1393 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
-1394 * @throws IOException if we failed to read the file
-1395 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit)
-1396 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean)
-1397 */
-1398publicRundeckExecution runAdhocScript(finalRunAdhocScript script, long poolingInterval,
-1399 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException,
-1400 IllegalArgumentException {
-1401if (poolingInterval <= 0) {
-1402 poolingInterval = DEFAULT_POOLING_INTERVAL;
-1403 poolingUnit = DEFAULT_POOLING_UNIT;
-1404 }
-1405if (poolingUnit == null) {
-1406 poolingUnit = DEFAULT_POOLING_UNIT;
-1407 }
-1408
-1409RundeckExecution execution = triggerAdhocScript(script);
-1410while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
-1411try {
-1412 Thread.sleep(poolingUnit.toMillis(poolingInterval));
-1413 } catch (InterruptedException e) {
-1414break;
-1415 }
-1416 execution = getExecution(execution.getId());
-1417 }
-1418return execution;
-1419 }
-1420
-1421/*
-1422 * Executions
-1423 */
-1424
-1425/**
-1426 * Get all running executions (for all projects)
-1427 *
-1428 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1429 * @throws RundeckApiException in case of error when calling the API
-1430 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1431 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1432 * @see #getRunningExecutions(String)
-1433 */
-1434public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException,
-1435RundeckApiTokenException {
-1436if (this.getApiVersion() >= Version.V9.getVersionNumber()) {
-1437//simply query using '*'
-1438return getRunningExecutions("*");
-1439 } else {
-1440 List<RundeckExecution> executions = new ArrayList<RundeckExecution>();
-1441for (RundeckProject project : getProjects()) {
-1442 executions.addAll(getRunningExecutions(project.getName()));
-1443 }
-1444return executions;
-1445 }
-1446 }
-1447
-1448/**
-1449 * Get the running executions for the given project
-1450 *
-1451 * @param project name of the project - mandatory
-1452 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1453 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1454 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1455 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1456 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1457 * @see #getRunningExecutions()
-1458 */
-1459public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException,
-1460 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1461 AssertUtil.notBlank(project, "project is mandatory get all running executions !");
-1462returnnewApiCall(this).get(newApiPathBuilder("/executions/running").param("project", project),
-1463new ListParser<RundeckExecution>(newExecutionParser(),
-1464 rootXpath()+"/executions/execution"));
-1465 }
-1466
-1467/**
-1468 * Get the executions of the given job
-1469 *
-1470 * @param jobId identifier of the job - mandatory
-1471 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1472 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1473 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1474 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1475 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1476 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long)
-1477 */
-1478public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException,
-1479 RundeckApiTokenException, IllegalArgumentException {
-1480return getJobExecutions(jobId, (ExecutionStatus) null);
-1481 }
-1482
-1483/**
-1484 * Get the executions of the given job
-1485 *
-1486 * @param jobId identifier of the job - mandatory
-1487 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
-1488 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1489 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1490 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1491 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1492 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is
-1493 * invalid
-1494 * @see #getJobExecutions(String, String, Long, Long)
-1495 */
-1496public List<RundeckExecution> getJobExecutions(String jobId, String status) throws RundeckApiException,
-1497 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1498return getJobExecutions(jobId,
-1499 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)));
-1500 }
-1501
-1502/**
-1503 * Get the executions of the given job
-1504 *
-1505 * @param jobId identifier of the job - mandatory
-1506 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
-1507 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1508 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1509 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1510 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1511 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1512 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long)
-1513 */
-1514public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException,
-1515 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1516return getJobExecutions(jobId, status, null, null);
-1517 }
-1518
-1519/**
-1520 * Get the executions of the given job
-1521 *
-1522 * @param jobId identifier of the job - mandatory
-1523 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
-1524 * @param max number of results to return - optional (null for all)
-1525 * @param offset the 0-indexed offset for the first result to return - optional
-1526 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1527 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1528 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1529 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1530 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is
-1531 * invalid
-1532 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long)
-1533 */
-1534public List<RundeckExecution> getJobExecutions(String jobId, String status, Long max, Long offset)
-1535throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1536return getJobExecutions(jobId,
-1537 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)),
-1538 max,
-1539 offset);
-1540 }
-1541
-1542/**
-1543 * Get the executions of the given job
-1544 *
-1545 * @param jobId identifier of the job - mandatory
-1546 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
-1547 * @param max number of results to return - optional (null for all)
-1548 * @param offset the 0-indexed offset for the first result to return - optional
-1549 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1550 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1551 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1552 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1553 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1554 */
-1555public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset)
-1556throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1557 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !");
-1558returnnewApiCall(this).get(newApiPathBuilder("/job/", jobId, "/executions").param("status", status)
-1559 .param("max", max)
-1560 .param("offset", offset),
-1561new ListParser<RundeckExecution>(newExecutionParser(),
-1562 rootXpath()+"/executions/execution"));
-1563 }
-1564
-1565/**
-1566 * Get executions based on query parameters
-1567 *
-1568 * @param query query parameters for the request
-1569 * @param max number of results to return - optional (null for all)
-1570 * @param offset the 0-indexed offset for the first result to return - optional
-1571 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-1572 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-1573 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1574 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1575 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-1576 */
-1577public PagedResults<RundeckExecution> getExecutions(ExecutionQuery query, Long max, Long offset)
-1578throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1579if (!query.notBlank()) {
-1580thrownew IllegalArgumentException("Some execution query parameter must be set");
-1581 }
-1582 AssertUtil.notBlank(query.getProject(), "project is required for execution query");
-1583returnnewApiCall(this).get(newApiPathBuilder("/executions")
-1584 .param(newExecutionQueryParameters(query))
-1585 .param("max", max)
-1586 .param("offset", offset),
-1587new PagedResultParser<RundeckExecution>(
-1588new ListParser<RundeckExecution>(newExecutionParser(), "execution"),
-1589 rootXpath()+"/executions"
-1590 )
-1591 );
-1592 }
-1593
-1594/**
-1595 * Get a single execution, identified by the given ID
-1596 *
-1597 * @param executionId identifier of the execution - mandatory
-1598 * @return a {@link RundeckExecution} instance - won't be null
-1599 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
-1600 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1601 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1602 * @throws IllegalArgumentException if the executionId is null
-1603 */
-1604publicRundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
-1605 RundeckApiTokenException, IllegalArgumentException {
-1606 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !");
-1607returnnewApiCall(this).get(newApiPathBuilder("/execution/", executionId.toString()),
-1608newExecutionParser(rootXpath()+"/executions/execution"));
-1609 }
-1610
-1611/**
-1612 * Abort an execution (identified by the given ID). The execution should be running...
-1613 *
-1614 * @param executionId identifier of the execution - mandatory
-1615 * @return a {@link RundeckAbort} instance - won't be null
-1616 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
-1617 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1618 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1619 * @throws IllegalArgumentException if the executionId is null
-1620 */
-1621publicRundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
-1622 RundeckApiTokenException, IllegalArgumentException {
-1623return abortExecution(executionId, null);
-1624 }
-1625/**
-1626 * Abort an execution (identified by the given ID). The execution should be running...
-1627 *
-1628 * @param executionId identifier of the execution - mandatory
-1629 * @param asUser specify a user name to abort the job as, must have 'killAs' permission
-1630 * @return a {@link RundeckAbort} instance - won't be null
-1631 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
-1632 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1633 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1634 * @throws IllegalArgumentException if the executionId is null
-1635 */
-1636publicRundeckAbort abortExecution(Long executionId, final String asUser) throws RundeckApiException, RundeckApiLoginException,
-1637 RundeckApiTokenException, IllegalArgumentException {
-1638 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !");
-1639ApiPathBuilder apiPath = newApiPathBuilder("/execution/", executionId.toString(), "/abort");
-1640if(null!=asUser) {
-1641 apiPath.param("asUser", asUser);
-1642 }
-1643returnnewApiCall(this).get(apiPath, newAbortParser(rootXpath()+"/abort"));
-1644 }
-1645
-1646/*
-1647 * History
-1648 */
-1649
-1650/**
-1651 * Get the (events) history for the given project
-1652 *
-1653 * @param project name of the project - mandatory
-1654 * @return a {@link RundeckHistory} instance - won't be null
-1655 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1656 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1657 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1658 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1659 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1660 */
-1661publicRundeckHistory getHistory(String project) throws RundeckApiException, RundeckApiLoginException,
-1662 RundeckApiTokenException, IllegalArgumentException {
-1663return getHistory(project, null, null,(String) null, (String) null, null, null, null, null);
-1664 }
-1665
-1666/**
-1667 * Get the (events) history for the given project
-1668 *
-1669 * @param project name of the project - mandatory
-1670 * @param max number of results to return - optional (default to 20)
-1671 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
-1672 * @return a {@link RundeckHistory} instance - won't be null
-1673 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1674 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1675 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1676 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1677 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1678 */
-1679publicRundeckHistory getHistory(String project, Long max, Long offset) throws RundeckApiException,
-1680 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1681return getHistory(project, null, null, (String)null, (String)null, null, null, max, offset);
-1682 }
-1683
-1684/**
-1685 * Get the (events) history for the given project
-1686 *
-1687 * @param project name of the project - mandatory
-1688 * @param jobId include only events matching the given job ID - optional
-1689 * @param reportId include only events matching the given report ID - optional
-1690 * @param user include only events created by the given user - optional
-1691 * @return a {@link RundeckHistory} instance - won't be null
-1692 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1693 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1694 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1695 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1696 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1697 */
-1698publicRundeckHistory getHistory(String project, String jobId, String reportId, String user)
-1699throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1700return getHistory(project, jobId, reportId, user, null, null, null, null, null);
-1701 }
-1702
-1703/**
-1704 * Get the (events) history for the given project
-1705 *
-1706 * @param project name of the project - mandatory
-1707 * @param jobId include only events matching the given job ID - optional
-1708 * @param reportId include only events matching the given report ID - optional
-1709 * @param user include only events created by the given user - optional
-1710 * @param max number of results to return - optional (default to 20)
-1711 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
-1712 * @return a {@link RundeckHistory} instance - won't be null
-1713 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1714 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1715 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1716 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1717 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1718 */
-1719publicRundeckHistory getHistory(String project, String jobId, String reportId, String user, Long max, Long offset)
-1720throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1721return getHistory(project, jobId, reportId, user, null, null, null, max, offset);
-1722 }
-1723
-1724/**
-1725 * Get the (events) history for the given project
-1726 *
-1727 * @param project name of the project - mandatory
-1728 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y
-1729 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2
-1730 * weeks), "5d" (= last 5 days), etc. Optional.
-1731 * @return a {@link RundeckHistory} instance - won't be null
-1732 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1733 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1734 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1735 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1736 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1737 */
-1738publicRundeckHistory getHistory(String project, String recent) throws RundeckApiException,
-1739 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1740return getHistory(project, null, null, null, recent, null, null, null, null);
-1741 }
-1742
-1743/**
-1744 * Get the (events) history for the given project
-1745 *
-1746 * @param project name of the project - mandatory
-1747 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y
-1748 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2
-1749 * weeks), "5d" (= last 5 days), etc. Optional.
-1750 * @param max number of results to return - optional (default to 20)
-1751 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
-1752 * @return a {@link RundeckHistory} instance - won't be null
-1753 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1754 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1755 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1756 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1757 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1758 */
-1759publicRundeckHistory getHistory(String project, String recent, Long max, Long offset) throws RundeckApiException,
-1760 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1761return getHistory(project, null, null, null, recent, null, null, max, offset);
-1762 }
-1763
-1764/**
-1765 * Get the (events) history for the given project
-1766 *
-1767 * @param project name of the project - mandatory
-1768 * @param begin date for the earlier events to retrieve - optional
-1769 * @param end date for the latest events to retrieve - optional
-1770 * @return a {@link RundeckHistory} instance - won't be null
-1771 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1772 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1773 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1774 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1775 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1776 */
-1777publicRundeckHistory getHistory(String project, Date begin, Date end) throws RundeckApiException,
-1778 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1779return getHistory(project, null, null, (String)null, (String)null, begin, end, null, null);
-1780 }
-1781
-1782/**
-1783 * Get the (events) history for the given project
-1784 *
-1785 * @param project name of the project - mandatory
-1786 * @param begin date for the earlier events to retrieve - optional
-1787 * @param end date for the latest events to retrieve - optional
-1788 * @param max number of results to return - optional (default to 20)
-1789 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
-1790 * @return a {@link RundeckHistory} instance - won't be null
-1791 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1792 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1793 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1794 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1795 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
-1796 */
-1797publicRundeckHistory getHistory(String project, Date begin, Date end, Long max, Long offset)
-1798throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1799return getHistory(project, null, null, (String)null, (String) null, begin, end, max, offset);
-1800 }
-1801
-1802/**
-1803 * Get the (events) history for the given project
-1804 *
-1805 * @param project name of the project - mandatory
-1806 * @param jobId include only events matching the given job ID - optional
-1807 * @param reportId include only events matching the given report ID - optional
-1808 * @param user include only events created by the given user - optional
-1809 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y
-1810 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2
-1811 * weeks), "5d" (= last 5 days), etc. Optional.
-1812 * @param begin date for the earlier events to retrieve - optional
-1813 * @param end date for the latest events to retrieve - optional
-1814 * @param max number of results to return - optional (default to 20)
-1815 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
-1816 * @return a {@link RundeckHistory} instance - won't be null
-1817 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1818 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1819 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1820 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1821 */
-1822publicRundeckHistory getHistory(String project, String jobId, String reportId, String user, String recent,
-1823 Date begin, Date end, Long max, Long offset) throws RundeckApiException, RundeckApiLoginException,
-1824 RundeckApiTokenException, IllegalArgumentException {
-1825 AssertUtil.notBlank(project, "project is mandatory to get the history !");
-1826returnnewApiCall(this).get(newApiPathBuilder("/history").param("project", project)
-1827 .param("jobIdFilter", jobId)
-1828 .param("reportIdFilter", reportId)
-1829 .param("userFilter", user)
-1830 .param("recentFilter", recent)
-1831 .param("begin", begin)
-1832 .param("end", end)
-1833 .param("max", max)
-1834 .param("offset", offset),
-1835newHistoryParser(rootXpath()+"/events"));
-1836 }
-1837
-1838/**
-1839 * Get the (events) history for the given project
-1840 *
-1841 * @param project name of the project - mandatory
-1842 * @param includeJobNames list of job names ("group/name") to include results for
-1843 * @param excludeJobNames list of job names ("group/name") to exclude results for
-1844 * @param user include only events created by the given user - optional
-1845 * @param recent include only events matching the given period of time. Format : "XY", where X is an
-1846 * integer, and Y is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year).
-1847 * Example : "2w" (= last 2 weeks), "5d" (= last 5 days), etc. Optional.
-1848 * @param begin date for the earlier events to retrieve - optional
-1849 * @param end date for the latest events to retrieve - optional
-1850 * @param max number of results to return - optional (default to 20)
-1851 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
-1852 *
-1853 * @return a {@link RundeckHistory} instance - won't be null
-1854 *
-1855 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1856 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1857 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1858 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1859 */
-1860publicRundeckHistory getHistory(String project,
-1861 String user,
-1862 String recent,
-1863 List<String> includeJobNames,
-1864 List<String> excludeJobNames,
-1865 Date begin,
-1866 Date end,
-1867 Long max,
-1868 Long offset)
-1869throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1870
-1871 AssertUtil.notBlank(project, "project is mandatory to get the history !");
-1872finalApiPathBuilder builder = newApiPathBuilder("/history").param("project", project)
-1873 .field("jobListFilter", includeJobNames)
-1874 .field("excludeJobListFilter", excludeJobNames)
-1875 .param("userFilter", user)
-1876 .param("recentFilter", recent)
-1877 .param("begin", begin)
-1878 .param("end", end)
-1879 .param("max", max)
-1880 .param("offset", offset);
-1881
-1882returnnewApiCall(this).postOrGet(builder, newHistoryParser(rootXpath()+"/events"));
-1883 }
-1884
-1885/*
-1886 * Nodes
-1887 */
-1888
-1889/**
-1890 * List all nodes (for all projects)
-1891 *
-1892 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
-1893 * @throws RundeckApiException in case of error when calling the API
-1894 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1895 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1896 */
-1897public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException {
-1898 List<RundeckNode> nodes = new ArrayList<RundeckNode>();
-1899for (RundeckProject project : getProjects()) {
-1900 nodes.addAll(getNodes(project.getName()));
-1901 }
-1902return nodes;
-1903 }
-1904
-1905/**
-1906 * List all nodes that belongs to the given project
-1907 *
-1908 * @param project name of the project - mandatory
-1909 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
-1910 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1911 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1912 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1913 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1914 * @see #getNodes(String, Properties)
-1915 */
-1916public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException,
-1917 RundeckApiTokenException, IllegalArgumentException {
-1918return getNodes(project, null);
-1919 }
-1920
-1921/**
-1922 * List nodes that belongs to the given project
-1923 *
-1924 * @param project name of the project - mandatory
-1925 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder}
-1926 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
-1927 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-1928 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1929 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1930 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-1931 */
-1932public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException,
-1933 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-1934 AssertUtil.notBlank(project, "project is mandatory to get all nodes !");
-1935returnnewApiCall(this).get(newApiPathBuilder("/resources").param("project", project)
-1936 .nodeFilters(nodeFilters),
-1937new ListParser<RundeckNode>(newNodeParser(), "project/node"));
-1938 }
-1939
-1940/**
-1941 * Get the definition of a single node
-1942 *
-1943 * @param name of the node - mandatory
-1944 * @param project name of the project - mandatory
-1945 * @return a {@link RundeckNode} instance - won't be null
-1946 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
-1947 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1948 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1949 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
-1950 */
-1951publicRundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException,
-1952 RundeckApiTokenException, IllegalArgumentException {
-1953 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !");
-1954 AssertUtil.notBlank(project, "project is mandatory to get a node !");
-1955returnnewApiCall(this).get(newApiPathBuilder("/resource/", name).param("project", project),
-1956newNodeParser("project/node"));
-1957 }
-1958
-1959/**
-1960 * Get the output of a job execution
-1961 *
-1962 * @param executionId id of the execution - mandatory
-1963 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
-1964 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
-1965 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1966 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1967 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
-1968 */
-1969public InputStream getOutput(String executionId) throws RundeckApiException, RundeckApiLoginException,
-1970 RundeckApiTokenException, IllegalArgumentException {
-1971 AssertUtil.notBlank(executionId, "the execution id is mandatory to get execution output !");
-1972returnnewApiCall(this).getNonApi(newApiPathBuilder("/execution/downloadOutput/", executionId));
-1973 }
-1974
-1975/**
-1976 * Get the html page of the user's profile
-1977 *
-1978 * @param username - mandatory
-1979 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
-1980 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
-1981 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1982 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-1983 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
-1984 */
-1985public InputStream getProfilePage(String username) throws RundeckApiException, RundeckApiLoginException,
-1986 RundeckApiTokenException, IllegalArgumentException {
-1987 AssertUtil.notBlank(username, "the username is mandatory to get profile page !");
-1988returnnewApiCall(this).getNonApi(newApiPathBuilder("/user/profile?login=", username));
-1989 }
-1990
+1323
+1324/**
+1325 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+1326 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
+1327 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter.
+1328 *
+1329 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
+1330 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1331 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1332 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1333 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1334 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
+1335 * @throws IOException if we failed to read the file
+1336 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit)
+1337 * @see #triggerAdhocScript(RunAdhocScript)
+1338 */
+1339publicRundeckExecution runAdhocScript(RunAdhocScript script) throws RundeckApiException,
+1340 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException {
+1341return runAdhocScript(script,
+1342 DEFAULT_POOLING_INTERVAL,
+1343 DEFAULT_POOLING_UNIT);
+1344 }
+1345
+1346/**
+1347 * Run an ad-hoc script read from a file, and wait until its execution is finished (or aborted) to return. We will
+1348 * poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the
+1349 * execution is finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to
+1350 * the nodeFilters parameter.
+1351 *
+1352 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
+1353 * @param scriptFilename filename of a script to read
+1354 * @param poolingInterval for checking the status of the execution. Must be > 0.
+1355 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+1356 *
+1357 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1358 *
+1359 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1360 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1361 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1362 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
+1363 * @throws IOException if we failed to read the file
+1364 * @see #runAdhocScript(RunAdhocScript)
+1365 * @see #triggerAdhocScript(RunAdhocScript, String)
+1366 */
+1367publicRundeckExecution runAdhocScript(finalRunAdhocScript script, final String scriptFilename,
+1368finallong poolingInterval, final TimeUnit poolingUnit) throws RundeckApiException,
+1369 RundeckApiLoginException, RundeckApiTokenException,
+1370 IllegalArgumentException, IOException {
+1371 FileInputStream stream = null;
+1372try {
+1373 stream = FileUtils.openInputStream(new File(scriptFilename));
+1374return runAdhocScript(RunAdhocScriptBuilder.builder(script)
+1375 .setScript(stream)
+1376 .build(), poolingInterval, poolingUnit);
+1377 } finally {
+1378 IOUtils.closeQuietly(stream);
+1379 }
+1380 }
+1381/**
+1382 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+1383 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
+1384 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters
+1385 * parameter.
+1386 *
+1387 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder}
+1388 * @param poolingInterval for checking the status of the execution. Must be > 0.
+1389 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+1390 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+1391 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1392 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1393 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1394 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null
+1395 * @throws IOException if we failed to read the file
+1396 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit)
+1397 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean)
+1398 */
+1399publicRundeckExecution runAdhocScript(finalRunAdhocScript script, long poolingInterval,
+1400 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException,
+1401 IllegalArgumentException {
+1402if (poolingInterval <= 0) {
+1403 poolingInterval = DEFAULT_POOLING_INTERVAL;
+1404 poolingUnit = DEFAULT_POOLING_UNIT;
+1405 }
+1406if (poolingUnit == null) {
+1407 poolingUnit = DEFAULT_POOLING_UNIT;
+1408 }
+1409
+1410RundeckExecution execution = triggerAdhocScript(script);
+1411while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
+1412try {
+1413 Thread.sleep(poolingUnit.toMillis(poolingInterval));
+1414 } catch (InterruptedException e) {
+1415break;
+1416 }
+1417 execution = getExecution(execution.getId());
+1418 }
+1419return execution;
+1420 }
+1421
+1422/*
+1423 * Executions
+1424 */
+1425
+1426/**
+1427 * Get all running executions (for all projects)
+1428 *
+1429 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1430 * @throws RundeckApiException in case of error when calling the API
+1431 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1432 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1433 * @see #getRunningExecutions(String)
+1434 */
+1435public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException,
+1436RundeckApiTokenException {
+1437if (this.getApiVersion() >= Version.V9.getVersionNumber()) {
+1438//simply query using '*'
+1439return getRunningExecutions("*");
+1440 } else {
+1441 List<RundeckExecution> executions = new ArrayList<RundeckExecution>();
+1442for (RundeckProject project : getProjects()) {
+1443 executions.addAll(getRunningExecutions(project.getName()));
+1444 }
+1445return executions;
+1446 }
+1447 }
+1448
+1449/**
+1450 * Get the running executions for the given project
+1451 *
+1452 * @param project name of the project - mandatory
+1453 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1454 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1455 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1456 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1457 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1458 * @see #getRunningExecutions()
+1459 */
+1460public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException,
+1461 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1462 AssertUtil.notBlank(project, "project is mandatory get all running executions !");
+1463returnnewApiCall(this).get(newApiPathBuilder("/executions/running").param("project", project),
+1464new ListParser<RundeckExecution>(newExecutionParser(),
+1465 rootXpath()+"/executions/execution"));
+1466 }
+1467
+1468/**
+1469 * Get the executions of the given job
+1470 *
+1471 * @param jobId identifier of the job - mandatory
+1472 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1473 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1474 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1475 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1476 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1477 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long)
+1478 */
+1479public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException,
+1480 RundeckApiTokenException, IllegalArgumentException {
+1481return getJobExecutions(jobId, (ExecutionStatus) null);
+1482 }
+1483
+1484/**
+1485 * Get the executions of the given job
+1486 *
+1487 * @param jobId identifier of the job - mandatory
+1488 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
+1489 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1490 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1491 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1492 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1493 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is
+1494 * invalid
+1495 * @see #getJobExecutions(String, String, Long, Long)
+1496 */
+1497public List<RundeckExecution> getJobExecutions(String jobId, String status) throws RundeckApiException,
+1498 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1499return getJobExecutions(jobId,
+1500 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)));
+1501 }
+1502
+1503/**
+1504 * Get the executions of the given job
+1505 *
+1506 * @param jobId identifier of the job - mandatory
+1507 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
+1508 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1509 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1510 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1511 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1512 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1513 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long)
+1514 */
+1515public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException,
+1516 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1517return getJobExecutions(jobId, status, null, null);
+1518 }
+1519
+1520/**
+1521 * Get the executions of the given job
+1522 *
+1523 * @param jobId identifier of the job - mandatory
+1524 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
+1525 * @param max number of results to return - optional (null for all)
+1526 * @param offset the 0-indexed offset for the first result to return - optional
+1527 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1528 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1529 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1530 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1531 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is
+1532 * invalid
+1533 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long)
+1534 */
+1535public List<RundeckExecution> getJobExecutions(String jobId, String status, Long max, Long offset)
+1536throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1537return getJobExecutions(jobId,
+1538 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)),
+1539 max,
+1540 offset);
+1541 }
+1542
+1543/**
+1544 * Get the executions of the given job
+1545 *
+1546 * @param jobId identifier of the job - mandatory
+1547 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all)
+1548 * @param max number of results to return - optional (null for all)
+1549 * @param offset the 0-indexed offset for the first result to return - optional
+1550 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1551 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1552 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1553 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1554 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1555 */
+1556public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset)
+1557throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1558 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !");
+1559returnnewApiCall(this).get(newApiPathBuilder("/job/", jobId, "/executions").param("status", status)
+1560 .param("max", max)
+1561 .param("offset", offset),
+1562new ListParser<RundeckExecution>(newExecutionParser(),
+1563 rootXpath()+"/executions/execution"));
+1564 }
+1565
+1566/**
+1567 * Get executions based on query parameters
+1568 *
+1569 * @param query query parameters for the request
+1570 * @param max number of results to return - optional (null for all)
+1571 * @param offset the 0-indexed offset for the first result to return - optional
+1572 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+1573 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+1574 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1575 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1576 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+1577 */
+1578public PagedResults<RundeckExecution> getExecutions(ExecutionQuery query, Long max, Long offset)
+1579throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1580if (!query.notBlank()) {
+1581thrownew IllegalArgumentException("Some execution query parameter must be set");
+1582 }
+1583 AssertUtil.notBlank(query.getProject(), "project is required for execution query");
+1584returnnewApiCall(this).get(newApiPathBuilder("/executions")
+1585 .param(newExecutionQueryParameters(query))
+1586 .param("max", max)
+1587 .param("offset", offset),
+1588new PagedResultParser<RundeckExecution>(
+1589new ListParser<RundeckExecution>(newExecutionParser(), "execution"),
+1590 rootXpath()+"/executions"
+1591 )
+1592 );
+1593 }
+1594
+1595/**
+1596 * Get a single execution, identified by the given ID
+1597 *
+1598 * @param executionId identifier of the execution - mandatory
+1599 * @return a {@link RundeckExecution} instance - won't be null
+1600 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
+1601 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1602 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1603 * @throws IllegalArgumentException if the executionId is null
+1604 */
+1605publicRundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
+1606 RundeckApiTokenException, IllegalArgumentException {
+1607 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !");
+1608returnnewApiCall(this).get(newApiPathBuilder("/execution/", executionId.toString()),
+1609newExecutionParser(rootXpath()+"/executions/execution"));
+1610 }
+1611
+1612/**
+1613 * Abort an execution (identified by the given ID). The execution should be running...
+1614 *
+1615 * @param executionId identifier of the execution - mandatory
+1616 * @return a {@link RundeckAbort} instance - won't be null
+1617 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
+1618 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1619 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1620 * @throws IllegalArgumentException if the executionId is null
+1621 */
+1622publicRundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
+1623 RundeckApiTokenException, IllegalArgumentException {
+1624return abortExecution(executionId, null);
+1625 }
+1626/**
+1627 * Abort an execution (identified by the given ID). The execution should be running...
+1628 *
+1629 * @param executionId identifier of the execution - mandatory
+1630 * @param asUser specify a user name to abort the job as, must have 'killAs' permission
+1631 * @return a {@link RundeckAbort} instance - won't be null
+1632 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
+1633 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1634 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1635 * @throws IllegalArgumentException if the executionId is null
+1636 */
+1637publicRundeckAbort abortExecution(Long executionId, final String asUser) throws RundeckApiException, RundeckApiLoginException,
+1638 RundeckApiTokenException, IllegalArgumentException {
+1639 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !");
+1640ApiPathBuilder apiPath = newApiPathBuilder("/execution/", executionId.toString(), "/abort");
+1641if(null!=asUser) {
+1642 apiPath.param("asUser", asUser);
+1643 }
+1644returnnewApiCall(this).get(apiPath, newAbortParser(rootXpath()+"/abort"));
+1645 }
+1646
+1647/*
+1648 * History
+1649 */
+1650
+1651/**
+1652 * Get the (events) history for the given project
+1653 *
+1654 * @param project name of the project - mandatory
+1655 * @return a {@link RundeckHistory} instance - won't be null
+1656 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1657 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1658 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1659 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1660 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1661 */
+1662publicRundeckHistory getHistory(String project) throws RundeckApiException, RundeckApiLoginException,
+1663 RundeckApiTokenException, IllegalArgumentException {
+1664return getHistory(project, null, null,(String) null, (String) null, null, null, null, null);
+1665 }
+1666
+1667/**
+1668 * Get the (events) history for the given project
+1669 *
+1670 * @param project name of the project - mandatory
+1671 * @param max number of results to return - optional (default to 20)
+1672 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
+1673 * @return a {@link RundeckHistory} instance - won't be null
+1674 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1675 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1676 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1677 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1678 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1679 */
+1680publicRundeckHistory getHistory(String project, Long max, Long offset) throws RundeckApiException,
+1681 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1682return getHistory(project, null, null, (String)null, (String)null, null, null, max, offset);
+1683 }
+1684
+1685/**
+1686 * Get the (events) history for the given project
+1687 *
+1688 * @param project name of the project - mandatory
+1689 * @param jobId include only events matching the given job ID - optional
+1690 * @param reportId include only events matching the given report ID - optional
+1691 * @param user include only events created by the given user - optional
+1692 * @return a {@link RundeckHistory} instance - won't be null
+1693 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1694 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1695 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1696 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1697 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1698 */
+1699publicRundeckHistory getHistory(String project, String jobId, String reportId, String user)
+1700throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1701return getHistory(project, jobId, reportId, user, null, null, null, null, null);
+1702 }
+1703
+1704/**
+1705 * Get the (events) history for the given project
+1706 *
+1707 * @param project name of the project - mandatory
+1708 * @param jobId include only events matching the given job ID - optional
+1709 * @param reportId include only events matching the given report ID - optional
+1710 * @param user include only events created by the given user - optional
+1711 * @param max number of results to return - optional (default to 20)
+1712 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
+1713 * @return a {@link RundeckHistory} instance - won't be null
+1714 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1715 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1716 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1717 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1718 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1719 */
+1720publicRundeckHistory getHistory(String project, String jobId, String reportId, String user, Long max, Long offset)
+1721throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1722return getHistory(project, jobId, reportId, user, null, null, null, max, offset);
+1723 }
+1724
+1725/**
+1726 * Get the (events) history for the given project
+1727 *
+1728 * @param project name of the project - mandatory
+1729 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y
+1730 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2
+1731 * weeks), "5d" (= last 5 days), etc. Optional.
+1732 * @return a {@link RundeckHistory} instance - won't be null
+1733 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1734 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1735 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1736 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1737 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1738 */
+1739publicRundeckHistory getHistory(String project, String recent) throws RundeckApiException,
+1740 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1741return getHistory(project, null, null, null, recent, null, null, null, null);
+1742 }
+1743
+1744/**
+1745 * Get the (events) history for the given project
+1746 *
+1747 * @param project name of the project - mandatory
+1748 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y
+1749 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2
+1750 * weeks), "5d" (= last 5 days), etc. Optional.
+1751 * @param max number of results to return - optional (default to 20)
+1752 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
+1753 * @return a {@link RundeckHistory} instance - won't be null
+1754 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1755 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1756 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1757 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1758 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1759 */
+1760publicRundeckHistory getHistory(String project, String recent, Long max, Long offset) throws RundeckApiException,
+1761 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1762return getHistory(project, null, null, null, recent, null, null, max, offset);
+1763 }
+1764
+1765/**
+1766 * Get the (events) history for the given project
+1767 *
+1768 * @param project name of the project - mandatory
+1769 * @param begin date for the earlier events to retrieve - optional
+1770 * @param end date for the latest events to retrieve - optional
+1771 * @return a {@link RundeckHistory} instance - won't be null
+1772 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1773 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1774 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1775 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1776 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1777 */
+1778publicRundeckHistory getHistory(String project, Date begin, Date end) throws RundeckApiException,
+1779 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1780return getHistory(project, null, null, (String)null, (String)null, begin, end, null, null);
+1781 }
+1782
+1783/**
+1784 * Get the (events) history for the given project
+1785 *
+1786 * @param project name of the project - mandatory
+1787 * @param begin date for the earlier events to retrieve - optional
+1788 * @param end date for the latest events to retrieve - optional
+1789 * @param max number of results to return - optional (default to 20)
+1790 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
+1791 * @return a {@link RundeckHistory} instance - won't be null
+1792 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1793 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1794 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1795 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1796 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long)
+1797 */
+1798publicRundeckHistory getHistory(String project, Date begin, Date end, Long max, Long offset)
+1799throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1800return getHistory(project, null, null, (String)null, (String) null, begin, end, max, offset);
+1801 }
+1802
+1803/**
+1804 * Get the (events) history for the given project
+1805 *
+1806 * @param project name of the project - mandatory
+1807 * @param jobId include only events matching the given job ID - optional
+1808 * @param reportId include only events matching the given report ID - optional
+1809 * @param user include only events created by the given user - optional
+1810 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y
+1811 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2
+1812 * weeks), "5d" (= last 5 days), etc. Optional.
+1813 * @param begin date for the earlier events to retrieve - optional
+1814 * @param end date for the latest events to retrieve - optional
+1815 * @param max number of results to return - optional (default to 20)
+1816 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
+1817 * @return a {@link RundeckHistory} instance - won't be null
+1818 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1819 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1820 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1821 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1822 */
+1823publicRundeckHistory getHistory(String project, String jobId, String reportId, String user, String recent,
+1824 Date begin, Date end, Long max, Long offset) throws RundeckApiException, RundeckApiLoginException,
+1825 RundeckApiTokenException, IllegalArgumentException {
+1826 AssertUtil.notBlank(project, "project is mandatory to get the history !");
+1827returnnewApiCall(this).get(newApiPathBuilder("/history").param("project", project)
+1828 .param("jobIdFilter", jobId)
+1829 .param("reportIdFilter", reportId)
+1830 .param("userFilter", user)
+1831 .param("recentFilter", recent)
+1832 .param("begin", begin)
+1833 .param("end", end)
+1834 .param("max", max)
+1835 .param("offset", offset),
+1836newHistoryParser(rootXpath()+"/events"));
+1837 }
+1838
+1839/**
+1840 * Get the (events) history for the given project
+1841 *
+1842 * @param project name of the project - mandatory
+1843 * @param includeJobNames list of job names ("group/name") to include results for
+1844 * @param excludeJobNames list of job names ("group/name") to exclude results for
+1845 * @param user include only events created by the given user - optional
+1846 * @param recent include only events matching the given period of time. Format : "XY", where X is an
+1847 * integer, and Y is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year).
+1848 * Example : "2w" (= last 2 weeks), "5d" (= last 5 days), etc. Optional.
+1849 * @param begin date for the earlier events to retrieve - optional
+1850 * @param end date for the latest events to retrieve - optional
+1851 * @param max number of results to return - optional (default to 20)
+1852 * @param offset the 0-indexed offset for the first result to return - optional (default to O)
+1853 *
+1854 * @return a {@link RundeckHistory} instance - won't be null
+1855 *
+1856 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1857 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1858 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1859 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1860 */
+1861publicRundeckHistory getHistory(String project,
+1862 String user,
+1863 String recent,
+1864 List<String> includeJobNames,
+1865 List<String> excludeJobNames,
+1866 Date begin,
+1867 Date end,
+1868 Long max,
+1869 Long offset)
+1870throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1871
+1872 AssertUtil.notBlank(project, "project is mandatory to get the history !");
+1873finalApiPathBuilder builder = newApiPathBuilder("/history").param("project", project)
+1874 .field("jobListFilter", includeJobNames)
+1875 .field("excludeJobListFilter", excludeJobNames)
+1876 .param("userFilter", user)
+1877 .param("recentFilter", recent)
+1878 .param("begin", begin)
+1879 .param("end", end)
+1880 .param("max", max)
+1881 .param("offset", offset);
+1882
+1883returnnewApiCall(this).postOrGet(builder, newHistoryParser(rootXpath()+"/events"));
+1884 }
+1885
+1886/*
+1887 * Nodes
+1888 */
+1889
+1890/**
+1891 * List all nodes (for all projects)
+1892 *
+1893 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
+1894 * @throws RundeckApiException in case of error when calling the API
+1895 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1896 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1897 */
+1898public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException {
+1899 List<RundeckNode> nodes = new ArrayList<RundeckNode>();
+1900for (RundeckProject project : getProjects()) {
+1901 nodes.addAll(getNodes(project.getName()));
+1902 }
+1903return nodes;
+1904 }
+1905
+1906/**
+1907 * List all nodes that belongs to the given project
+1908 *
+1909 * @param project name of the project - mandatory
+1910 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
+1911 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1912 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1913 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1914 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1915 * @see #getNodes(String, Properties)
+1916 */
+1917public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException,
+1918 RundeckApiTokenException, IllegalArgumentException {
+1919return getNodes(project, null);
+1920 }
+1921
+1922/**
+1923 * List nodes that belongs to the given project
+1924 *
+1925 * @param project name of the project - mandatory
+1926 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder}
+1927 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
+1928 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+1929 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1930 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1931 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+1932 */
+1933public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException,
+1934 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+1935 AssertUtil.notBlank(project, "project is mandatory to get all nodes !");
+1936returnnewApiCall(this).get(newApiPathBuilder("/resources").param("project", project)
+1937 .nodeFilters(nodeFilters),
+1938new ListParser<RundeckNode>(newNodeParser(), "project/node"));
+1939 }
+1940
+1941/**
+1942 * Get the definition of a single node
+1943 *
+1944 * @param name of the node - mandatory
+1945 * @param project name of the project - mandatory
+1946 * @return a {@link RundeckNode} instance - won't be null
+1947 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
+1948 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1949 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1950 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
+1951 */
+1952publicRundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException,
+1953 RundeckApiTokenException, IllegalArgumentException {
+1954 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !");
+1955 AssertUtil.notBlank(project, "project is mandatory to get a node !");
+1956returnnewApiCall(this).get(newApiPathBuilder("/resource/", name).param("project", project),
+1957newNodeParser("project/node"));
+1958 }
+1959
+1960/**
+1961 * Get the output of a job execution
+1962 *
+1963 * @param executionId id of the execution - mandatory
+1964 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
+1965 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
+1966 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1967 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1968 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
+1969 */
+1970public InputStream getOutput(String executionId) throws RundeckApiException, RundeckApiLoginException,
+1971 RundeckApiTokenException, IllegalArgumentException {
+1972 AssertUtil.notBlank(executionId, "the execution id is mandatory to get execution output !");
+1973returnnewApiCall(this).getNonApi(newApiPathBuilder("/execution/downloadOutput/", executionId));
+1974 }
+1975
+1976/**
+1977 * Get the html page of the user's profile
+1978 *
+1979 * @param username - mandatory
+1980 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
+1981 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
+1982 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+1983 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+1984 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
+1985 */
+1986public InputStream getProfilePage(String username) throws RundeckApiException, RundeckApiLoginException,
+1987 RundeckApiTokenException, IllegalArgumentException {
+1988 AssertUtil.notBlank(username, "the username is mandatory to get profile page !");
+1989returnnewApiCall(this).getNonApi(newApiPathBuilder("/user/profile?login=", username));
+1990 }
1991
-1992/**
-1993 * Generate a new token and get the result page (which is the html page of the user's profile)
-1994 *
-1995 * @param username - mandatory
-1996 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
-1997 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
-1998 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-1999 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2000 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
-2001 */
-2002public InputStream generateToken(String username) throws RundeckApiException, RundeckApiLoginException,
-2003 RundeckApiTokenException, IllegalArgumentException {
-2004 AssertUtil.notBlank(username, "the username is mandatory to generate the token");
-2005returnnewApiCall(this).getNonApi(newApiPathBuilder("/user/generateApiToken?login=", username));
-2006 }
-2007
+1992
+1993/**
+1994 * Generate a new token and get the result page (which is the html page of the user's profile)
+1995 *
+1996 * @param username - mandatory
+1997 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
+1998 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
+1999 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2000 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2001 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
+2002 */
+2003public InputStream generateToken(String username) throws RundeckApiException, RundeckApiLoginException,
+2004 RundeckApiTokenException, IllegalArgumentException {
+2005 AssertUtil.notBlank(username, "the username is mandatory to generate the token");
+2006returnnewApiCall(this).getNonApi(newApiPathBuilder("/user/generateApiToken?login=", username));
+2007 }
2008
-2009/**
-2010 * Get the execution output of the given job
-2011 *
-2012 * @param executionId identifier of the execution - mandatory
-2013 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2014 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log.
-2015 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
-2016 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2017 * @return {@link RundeckOutput}
-2018 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2019 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2020 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2021 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2022 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, int, long, int)}, will be removed in
-2023 * version 12 of this library
-2024 */
-2025publicRundeckOutput getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines)
-2026throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2027return getExecutionOutput(executionId, offset, lastlines, lastmod, maxlines);
-2028 }
-2029/**
-2030 * Get the execution output of the given job
-2031 *
-2032 * @param executionId identifier of the execution - mandatory
-2033 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2034 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log.
-2035 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
-2036 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2037 * @return {@link RundeckOutput}
-2038 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2039 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2040 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2041 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2042 */
-2043publicRundeckOutput getExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines)
-2044throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2045 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
-2046ApiPathBuilder param = newApiPathBuilder(
-2047"/execution/", executionId.toString(),
-2048"/output")
-2049 .param("offset", offset);
-2050if (lastlines > 0) {
-2051 param.param("lastlines", lastlines);
-2052 }
-2053if (lastmod >= 0) {
-2054 param.param("lastmod", lastmod);
-2055 }
-2056if (maxlines > 0) {
-2057 param.param("maxlines", maxlines);
-2058 }
-2059returnnewApiCall(this).get(param,
-2060newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
-2061 }
-2062/**
-2063 * Get the execution state of the given execution
-2064 *
-2065 * @param executionId identifier of the execution - mandatory
-2066 * @return {@link RundeckExecutionState} the execution state
-2067 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2068 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2069 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2070 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2071 */
-2072publicRundeckExecutionState getExecutionState(Long executionId)
-2073throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2074 AssertUtil.notNull(executionId, "executionId is mandatory to get the state of an execution!");
-2075ApiPathBuilder param = newApiPathBuilder(
-2076"/execution/", executionId.toString(),
-2077"/state");
-2078
-2079returnnewApiCall(this).get(param, newExecutionStateParser(rootXpath()+"/executionState"));
-2080 }
-2081
-2082/**
-2083 * Get the execution output of the given execution on the specified node
-2084 *
-2085 * @param executionId identifier of the execution - mandatory
-2086 * @param nodeName name of the node
-2087 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2088 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will
-2089 * override the offset value and return only the specified number of lines at the end of the
-2090 * log.
-2091 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the
-2092 * specified date OR if more data is available at the given offset
-2093 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2094 *
-2095 * @return {@link RundeckOutput}
-2096 *
-2097 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2098 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2099 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2100 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2101 */
-2102publicRundeckOutput getExecutionOutputForNode(Long executionId, String nodeName, int offset, int lastlines,
-2103long lastmod, int maxlines)
-2104throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2105 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
-2106 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!");
-2107ApiPathBuilder param = newApiPathBuilder(
-2108"/execution/", executionId.toString(),
-2109"/output/node/", nodeName)
-2110 .param("offset", offset);
-2111if(lastlines>0) {
-2112 param.param("lastlines", lastlines);
-2113 }
-2114if(lastmod>=0) {
-2115 param.param("lastmod", lastmod);
-2116 }
-2117if(maxlines>0) {
-2118 param.param("maxlines", maxlines);
-2119 }
-2120returnnewApiCall(this).get(param,
-2121newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
-2122 }
-2123/**
-2124 * Get the execution output of the given execution for the specified step
-2125 *
-2126 * @param executionId identifier of the execution - mandatory
-2127 * @param stepCtx identifier for the step
-2128 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2129 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will
-2130 * override the offset value and return only the specified number of lines at the end of the
-2131 * log.
-2132 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the
-2133 * specified date OR if more data is available at the given offset
-2134 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2135 *
-2136 * @return {@link RundeckOutput}
-2137 *
-2138 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2139 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2140 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2141 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2142 */
-2143publicRundeckOutput getExecutionOutputForStep(Long executionId, String stepCtx, int offset, int lastlines,
-2144long lastmod, int maxlines)
-2145throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2146 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
-2147 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!");
-2148ApiPathBuilder param = newApiPathBuilder(
-2149"/execution/", executionId.toString(),
-2150"/output/step/", stepCtx)
-2151 .param("offset", offset);
-2152if (lastlines > 0) {
-2153 param.param("lastlines", lastlines);
-2154 }
-2155if (lastmod >= 0) {
-2156 param.param("lastmod", lastmod);
-2157 }
-2158if (maxlines > 0) {
-2159 param.param("maxlines", maxlines);
-2160 }
-2161returnnewApiCall(this).get(param,
-2162newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
-2163 }
-2164/**
-2165 * Get the execution output of the given execution for the specified step
-2166 *
-2167 * @param executionId identifier of the execution - mandatory
-2168 * @param stepCtx identifier for the step
-2169 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2170 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will
-2171 * override the offset value and return only the specified number of lines at the end of the
-2172 * log.
-2173 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the
-2174 * specified date OR if more data is available at the given offset
-2175 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2176 *
-2177 * @return {@link RundeckOutput}
-2178 *
-2179 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2180 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2181 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2182 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2183 */
-2184publicRundeckOutput getExecutionOutputForNodeAndStep(Long executionId, String nodeName, String stepCtx,
-2185int offset, int lastlines,
-2186long lastmod, int maxlines)
-2187throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2188 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
-2189 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!");
-2190 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!");
-2191ApiPathBuilder param = newApiPathBuilder(
-2192"/execution/", executionId.toString(),
-2193"/output/node/", nodeName,
-2194"/step/", stepCtx)
-2195 .param("offset", offset);
-2196if (lastlines > 0) {
-2197 param.param("lastlines", lastlines);
-2198 }
-2199if (lastmod >= 0) {
-2200 param.param("lastmod", lastmod);
-2201 }
-2202if (maxlines > 0) {
-2203 param.param("maxlines", maxlines);
-2204 }
-2205returnnewApiCall(this).get(param,
-2206newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
-2207 }
-2208
+2009
+2010/**
+2011 * Get the execution output of the given job
+2012 *
+2013 * @param executionId identifier of the execution - mandatory
+2014 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2015 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log.
+2016 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
+2017 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2018 * @return {@link RundeckOutput}
+2019 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2020 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2021 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2022 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2023 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, int, long, int)}, will be removed in
+2024 * version 12 of this library
+2025 */
+2026publicRundeckOutput getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines)
+2027throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2028return getExecutionOutput(executionId, offset, lastlines, lastmod, maxlines);
+2029 }
+2030/**
+2031 * Get the execution output of the given job
+2032 *
+2033 * @param executionId identifier of the execution - mandatory
+2034 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2035 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log.
+2036 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
+2037 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2038 * @return {@link RundeckOutput}
+2039 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2040 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2041 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2042 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2043 */
+2044publicRundeckOutput getExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines)
+2045throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2046 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
+2047ApiPathBuilder param = newApiPathBuilder(
+2048"/execution/", executionId.toString(),
+2049"/output")
+2050 .param("offset", offset);
+2051if (lastlines > 0) {
+2052 param.param("lastlines", lastlines);
+2053 }
+2054if (lastmod >= 0) {
+2055 param.param("lastmod", lastmod);
+2056 }
+2057if (maxlines > 0) {
+2058 param.param("maxlines", maxlines);
+2059 }
+2060returnnewApiCall(this).get(param,
+2061newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
+2062 }
+2063/**
+2064 * Get the execution state of the given execution
+2065 *
+2066 * @param executionId identifier of the execution - mandatory
+2067 * @return {@link RundeckExecutionState} the execution state
+2068 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2069 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2070 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2071 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2072 */
+2073publicRundeckExecutionState getExecutionState(Long executionId)
+2074throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2075 AssertUtil.notNull(executionId, "executionId is mandatory to get the state of an execution!");
+2076ApiPathBuilder param = newApiPathBuilder(
+2077"/execution/", executionId.toString(),
+2078"/state");
+2079
+2080returnnewApiCall(this).get(param, newExecutionStateParser(rootXpath()+"/executionState"));
+2081 }
+2082
+2083/**
+2084 * Get the execution output of the given execution on the specified node
+2085 *
+2086 * @param executionId identifier of the execution - mandatory
+2087 * @param nodeName name of the node
+2088 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2089 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will
+2090 * override the offset value and return only the specified number of lines at the end of the
+2091 * log.
+2092 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the
+2093 * specified date OR if more data is available at the given offset
+2094 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2095 *
+2096 * @return {@link RundeckOutput}
+2097 *
+2098 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2099 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2100 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2101 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2102 */
+2103publicRundeckOutput getExecutionOutputForNode(Long executionId, String nodeName, int offset, int lastlines,
+2104long lastmod, int maxlines)
+2105throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2106 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
+2107 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!");
+2108ApiPathBuilder param = newApiPathBuilder(
+2109"/execution/", executionId.toString(),
+2110"/output/node/", nodeName)
+2111 .param("offset", offset);
+2112if(lastlines>0) {
+2113 param.param("lastlines", lastlines);
+2114 }
+2115if(lastmod>=0) {
+2116 param.param("lastmod", lastmod);
+2117 }
+2118if(maxlines>0) {
+2119 param.param("maxlines", maxlines);
+2120 }
+2121returnnewApiCall(this).get(param,
+2122newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
+2123 }
+2124/**
+2125 * Get the execution output of the given execution for the specified step
+2126 *
+2127 * @param executionId identifier of the execution - mandatory
+2128 * @param stepCtx identifier for the step
+2129 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2130 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will
+2131 * override the offset value and return only the specified number of lines at the end of the
+2132 * log.
+2133 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the
+2134 * specified date OR if more data is available at the given offset
+2135 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2136 *
+2137 * @return {@link RundeckOutput}
+2138 *
+2139 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2140 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2141 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2142 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2143 */
+2144publicRundeckOutput getExecutionOutputForStep(Long executionId, String stepCtx, int offset, int lastlines,
+2145long lastmod, int maxlines)
+2146throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2147 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
+2148 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!");
+2149ApiPathBuilder param = newApiPathBuilder(
+2150"/execution/", executionId.toString(),
+2151"/output/step/", stepCtx)
+2152 .param("offset", offset);
+2153if (lastlines > 0) {
+2154 param.param("lastlines", lastlines);
+2155 }
+2156if (lastmod >= 0) {
+2157 param.param("lastmod", lastmod);
+2158 }
+2159if (maxlines > 0) {
+2160 param.param("maxlines", maxlines);
+2161 }
+2162returnnewApiCall(this).get(param,
+2163newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
+2164 }
+2165/**
+2166 * Get the execution output of the given execution for the specified step
+2167 *
+2168 * @param executionId identifier of the execution - mandatory
+2169 * @param stepCtx identifier for the step
+2170 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2171 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will
+2172 * override the offset value and return only the specified number of lines at the end of the
+2173 * log.
+2174 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the
+2175 * specified date OR if more data is available at the given offset
+2176 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2177 *
+2178 * @return {@link RundeckOutput}
+2179 *
+2180 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2181 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2182 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2183 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2184 */
+2185publicRundeckOutput getExecutionOutputForNodeAndStep(Long executionId, String nodeName, String stepCtx,
+2186int offset, int lastlines,
+2187long lastmod, int maxlines)
+2188throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2189 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
+2190 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!");
+2191 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!");
+2192ApiPathBuilder param = newApiPathBuilder(
+2193"/execution/", executionId.toString(),
+2194"/output/node/", nodeName,
+2195"/step/", stepCtx)
+2196 .param("offset", offset);
+2197if (lastlines > 0) {
+2198 param.param("lastlines", lastlines);
+2199 }
+2200if (lastmod >= 0) {
+2201 param.param("lastmod", lastmod);
+2202 }
+2203if (maxlines > 0) {
+2204 param.param("maxlines", maxlines);
+2205 }
+2206returnnewApiCall(this).get(param,
+2207newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
+2208 }
2209
-2210/**
-2211 * Get the execution output of the given job
-2212 *
-2213 * @param executionId identifier of the execution - mandatory
-2214 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2215 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
-2216 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2217 * @return {@link RundeckOutput}
-2218 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2219 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2220 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2221 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2222 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, long, int)}, will be removed in
-2223 * version 12 of this library
-2224 */
-2225publicRundeckOutput getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines)
-2226throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2227return getExecutionOutput(executionId, offset, lastmod, maxlines);
-2228 }
-2229/**
-2230 * Get the execution output of the given job
-2231 *
-2232 * @param executionId identifier of the execution - mandatory
-2233 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2234 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
-2235 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2236 * @return {@link RundeckOutput}
-2237 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2238 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2239 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2240 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2241 */
-2242publicRundeckOutput getExecutionOutput(Long executionId, int offset, long lastmod, int maxlines)
-2243throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2244 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
-2245ApiPathBuilder param = newApiPathBuilder("/execution/", executionId.toString(), "/output")
-2246 .param("offset", offset);
-2247if (lastmod >= 0) {
-2248 param.param("lastmod", lastmod);
-2249 }
-2250if (maxlines > 0) {
-2251 param.param("maxlines", maxlines);
-2252 }
-2253returnnewApiCall(this).get(param, newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
-2254 }
-2255/**
-2256 * Get the execution state output sequence of the given job
-2257 *
-2258 * @param executionId identifier of the execution - mandatory
-2259 * @param stateOnly if true, include only state change output entries, otherwise include state and log entries
-2260 * @param offset byte offset to read from in the file. 0 indicates the beginning.
-2261 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
-2262 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
-2263 * @return {@link RundeckOutput}
-2264 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-2265 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2266 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2267 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-2268 */
-2269publicRundeckOutput getExecutionOutputState(Long executionId, boolean stateOnly, int offset, long lastmod,
-2270int maxlines)
-2271throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
-2272 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
-2273ApiPathBuilder param = newApiPathBuilder("/execution/", executionId.toString(), "/output/state")
-2274 .param("offset", offset);
-2275if (lastmod >= 0) {
-2276 param.param("lastmod", lastmod);
-2277 }
-2278if (maxlines > 0) {
-2279 param.param("maxlines", maxlines);
-2280 }
-2281if(stateOnly) {
-2282 param.param("stateOnly", true);
-2283 }
-2284returnnewApiCall(this).get(param, newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
-2285 }
-2286
-2287privateOutputEntryParser createOutputEntryParser() {
-2288if (getApiVersion() <= Version.V5.versionNumber) {
-2289returnnewOutputEntryParserV5();
-2290 }else{
-2291returnnewOutputEntryParser();
-2292 }
-2293 }
-2294
-2295
-2296/*
-2297 * System Info
-2298 */
-2299
-2300/**
-2301 * Get system informations about the RunDeck server
-2302 *
-2303 * @return a {@link RundeckSystemInfo} instance - won't be null
-2304 * @throws RundeckApiException in case of error when calling the API
-2305 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
-2306 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
-2307 */
-2308publicRundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException,
-2309RundeckApiTokenException {
-2310returnnewApiCall(this).get(newApiPathBuilder("/system/info"), newSystemInfoParser(rootXpath()+"/system"));
-2311 }
-2312
+2210
+2211/**
+2212 * Get the execution output of the given job
+2213 *
+2214 * @param executionId identifier of the execution - mandatory
+2215 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2216 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
+2217 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2218 * @return {@link RundeckOutput}
+2219 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2220 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2221 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2222 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2223 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, long, int)}, will be removed in
+2224 * version 12 of this library
+2225 */
+2226publicRundeckOutput getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines)
+2227throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2228return getExecutionOutput(executionId, offset, lastmod, maxlines);
+2229 }
+2230/**
+2231 * Get the execution output of the given job
+2232 *
+2233 * @param executionId identifier of the execution - mandatory
+2234 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2235 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
+2236 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2237 * @return {@link RundeckOutput}
+2238 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2239 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2240 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2241 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2242 */
+2243publicRundeckOutput getExecutionOutput(Long executionId, int offset, long lastmod, int maxlines)
+2244throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2245 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
+2246ApiPathBuilder param = newApiPathBuilder("/execution/", executionId.toString(), "/output")
+2247 .param("offset", offset);
+2248if (lastmod >= 0) {
+2249 param.param("lastmod", lastmod);
+2250 }
+2251if (maxlines > 0) {
+2252 param.param("maxlines", maxlines);
+2253 }
+2254returnnewApiCall(this).get(param, newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
+2255 }
+2256/**
+2257 * Get the execution state output sequence of the given job
+2258 *
+2259 * @param executionId identifier of the execution - mandatory
+2260 * @param stateOnly if true, include only state change output entries, otherwise include state and log entries
+2261 * @param offset byte offset to read from in the file. 0 indicates the beginning.
+2262 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset
+2263 * @param maxlines maximum number of lines to retrieve forward from the specified offset.
+2264 * @return {@link RundeckOutput}
+2265 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+2266 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2267 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2268 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+2269 */
+2270publicRundeckOutput getExecutionOutputState(Long executionId, boolean stateOnly, int offset, long lastmod,
+2271int maxlines)
+2272throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
+2273 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!");
+2274ApiPathBuilder param = newApiPathBuilder("/execution/", executionId.toString(), "/output/state")
+2275 .param("offset", offset);
+2276if (lastmod >= 0) {
+2277 param.param("lastmod", lastmod);
+2278 }
+2279if (maxlines > 0) {
+2280 param.param("maxlines", maxlines);
+2281 }
+2282if(stateOnly) {
+2283 param.param("stateOnly", true);
+2284 }
+2285returnnewApiCall(this).get(param, newOutputParser(rootXpath()+"/output", createOutputEntryParser()));
+2286 }
+2287
+2288privateOutputEntryParser createOutputEntryParser() {
+2289if (getApiVersion() <= Version.V5.versionNumber) {
+2290returnnewOutputEntryParserV5();
+2291 }else{
+2292returnnewOutputEntryParser();
+2293 }
+2294 }
+2295
+2296
+2297/*
+2298 * System Info
+2299 */
+2300
+2301/**
+2302 * Get system informations about the RunDeck server
+2303 *
+2304 * @return a {@link RundeckSystemInfo} instance - won't be null
+2305 * @throws RundeckApiException in case of error when calling the API
+2306 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication)
+2307 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication)
+2308 */
+2309publicRundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException,
+2310RundeckApiTokenException {
+2311returnnewApiCall(this).get(newApiPathBuilder("/system/info"), newSystemInfoParser(rootXpath()+"/system"));
+2312 }
2313
-2314/*
-2315 * API token
-2316 */
-2317
-2318/**
-2319 * List API tokens for a user.
-2320 * @param user username
-2321 * @return list of tokens
-2322 * @throws RundeckApiException
-2323 */
-2324public List<RundeckToken> listApiTokens(final String user) throws RundeckApiException {
-2325 AssertUtil.notNull(user, "user is mandatory to list API tokens for a user.");
-2326returnnewApiCall(this).
-2327 get(newApiPathBuilder("/tokens/", user),
-2328new ListParser<RundeckToken>(newRundeckTokenParser(), "/tokens/token"));
-2329 }
-2330
-2331/**
-2332 * List all API tokens
-2333 * @return list of tokens
-2334 * @throws RundeckApiException
-2335 */
-2336public List<RundeckToken> listApiTokens() throws RundeckApiException {
-2337returnnewApiCall(this).
-2338 get(newApiPathBuilder("/tokens"),
-2339new ListParser<RundeckToken>(newRundeckTokenParser(), "/tokens/token"));
-2340 }
-2341
-2342/**
-2343 * Generate an API token for a user.
-2344 * @param user
-2345 * @return
-2346 * @throws RundeckApiException
-2347 */
-2348public String generateApiToken(final String user) throws RundeckApiException{
-2349 AssertUtil.notNull(user, "user is mandatory to generate an API token for a user.");
-2350RundeckToken result = newApiCall(this).
-2351 post(newApiPathBuilder("/tokens/", user).emptyContent(),
-2352newRundeckTokenParser("/token"));
-2353return result.getToken();
-2354 }
-2355/**
-2356 * Delete an existing token
-2357 * @param token
-2358 * @return
-2359 * @throws RundeckApiException
-2360 */
-2361publicboolean deleteApiToken(final String token) throws RundeckApiException{
-2362 AssertUtil.notNull(token, "token is mandatory to delete an API token.");
-2363newApiCall(this).delete(newApiPathBuilder("/token/", token));
-2364returntrue;
-2365 }
-2366/**
-2367 * Return user info for an existing token
-2368 * @param token
-2369 * @return token info
-2370 * @throws RundeckApiException
-2371 */
-2372publicRundeckToken getApiToken(final String token) throws RundeckApiException{
-2373 AssertUtil.notNull(token, "token is mandatory to get an API token.");
-2374returnnewApiCall(this).get(newApiPathBuilder("/token/", token), newRundeckTokenParser("/token"));
-2375 }
-2376
-2377/**
-2378 * Store an key file
-2379 * @param path ssh key storage path, must start with "keys/"
-2380 * @param keyfile key file
-2381 * @param privateKey true to store private key, false to store public key
-2382 * @return the key resource
-2383 * @throws RundeckApiException
-2384 */
-2385publicKeyResource storeKey(final String path, final File keyfile, boolean privateKey) throws RundeckApiException{
-2386 AssertUtil.notNull(path, "path is mandatory to store an key.");
-2387 AssertUtil.notNull(keyfile, "keyfile is mandatory to store an key.");
-2388if (!path.startsWith(STORAGE_KEYS_PATH)) {
-2389thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
-2390 }
-2391returnnewApiCall(this).post(
-2392newApiPathBuilder(STORAGE_ROOT_PATH, path).content(
-2393 privateKey ? "application/octet-stream" : "application/pgp-keys",
-2394 keyfile
-2395 ),
-2396newSSHKeyResourceParser("/resource")
-2397 );
-2398 }
-2399
-2400/**
-2401 * Get metadata for an key file
-2402 *
-2403 * @param path ssh key storage path, must start with "keys/"
-2404 *
-2405 * @return the ssh key resource
-2406 *
-2407 * @throws RundeckApiException if there is an error, or if the path is a directory not a file
-2408 */
-2409publicKeyResource getKey(final String path) throws RundeckApiException {
-2410 AssertUtil.notNull(path, "path is mandatory to get an key.");
-2411if (!path.startsWith(STORAGE_KEYS_PATH)) {
-2412thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
-2413 }
-2414KeyResource storageResource = newApiCall(this).get(
-2415newApiPathBuilder(STORAGE_ROOT_PATH, path),
-2416newSSHKeyResourceParser("/resource")
-2417 );
-2418if (storageResource.isDirectory()) {
-2419thrownewRundeckApiException("Key Path is a directory: " + path);
-2420 }
-2421return storageResource;
-2422 }
-2423
-2424/**
-2425 * Get content for a public key file
-2426 * @param path ssh key storage path, must start with "keys/"
-2427 * @param out outputstream to write data to
-2428 *
-2429 * @return length of written data
-2430 * @throws RundeckApiException
-2431 */
-2432publicint getPublicKeyContent(final String path, final OutputStream out) throws
-2433 RundeckApiException, IOException {
-2434 AssertUtil.notNull(path, "path is mandatory to get an key.");
-2435if (!path.startsWith(STORAGE_KEYS_PATH)) {
-2436thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
-2437 }
-2438try {
-2439returnnewApiCall(this).get(
-2440newApiPathBuilder(STORAGE_ROOT_PATH, path)
-2441 .accept("application/pgp-keys")
-2442 .requireContentType("application/pgp-keys"),
-2443 out
-2444 );
-2445 } catch (RundeckApiException.RundeckApiHttpContentTypeException e) {
-2446thrownewRundeckApiException("Requested Key path was not a Public key: " + path, e);
-2447 }
-2448 }
-2449
-2450/**
-2451 * Get content for a public key file
-2452 * @param path ssh key storage path, must start with "keys/"
-2453 * @param out file to write data to
-2454 * @return length of written data
-2455 * @throws RundeckApiException
-2456 */
-2457publicint getPublicKeyContent(final String path, final File out) throws
-2458 RundeckApiException, IOException {
-2459final FileOutputStream fileOutputStream = new FileOutputStream(out);
-2460try {
-2461return getPublicKeyContent(path, fileOutputStream);
-2462 }finally {
-2463 fileOutputStream.close();
-2464 }
-2465 }
-2466
-2467/**
-2468 * List contents of root key directory
-2469 *
-2470 * @return list of key resources
-2471 * @throws RundeckApiException
-2472 */
-2473public List<KeyResource> listKeyDirectoryRoot() throws RundeckApiException {
-2474return listKeyDirectory(STORAGE_KEYS_PATH);
-2475 }
-2476/**
-2477 * List contents of key directory
-2478 *
-2479 * @param path ssh key storage path, must start with "keys/"
-2480 *
-2481 * @throws RundeckApiException if there is an error, or if the path is a file not a directory
-2482 */
-2483public List<KeyResource> listKeyDirectory(final String path) throws RundeckApiException {
-2484 AssertUtil.notNull(path, "path is mandatory to get an key.");
-2485if (!path.startsWith(STORAGE_KEYS_PATH)) {
-2486thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
-2487 }
-2488KeyResource storageResource = newApiCall(this).get(
-2489newApiPathBuilder(STORAGE_ROOT_PATH, path),
-2490newSSHKeyResourceParser("/resource")
-2491 );
-2492if(!storageResource.isDirectory()) {
-2493thrownewRundeckApiException("key path is not a directory path: " + path);
-2494 }
-2495return storageResource.getDirectoryContents();
-2496 }
-2497
-2498/**
-2499 * Delete an key file
-2500 * @param path a path to a key file, must start with "keys/"
-2501 */
-2502publicvoid deleteKey(final String path){
-2503 AssertUtil.notNull(path, "path is mandatory to delete an key.");
-2504if (!path.startsWith(STORAGE_KEYS_PATH)) {
-2505thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
-2506 }
-2507newApiCall(this).delete(newApiPathBuilder(STORAGE_ROOT_PATH, path));
-2508 }
-2509
-2510/**
-2511 * @return the URL of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)
-2512 */
-2513public String getUrl() {
-2514return url;
-2515 }
-2516
-2517/**
-2518 * @return the auth-token used for authentication on the RunDeck instance (null if using login-based or session-based auth)
-2519 */
-2520public String getToken() {
-2521return token;
-2522 }
-2523
-2524/**
-2525 * @return the login used for authentication on the RunDeck instance (null if using token-based or session-based auth)
-2526 */
-2527public String getLogin() {
-2528return login;
-2529 }
-2530
-2531/**
-2532 * @return the password used for authentication on the RunDeck instance (null if using token-based or session-based auth)
-2533 */
-2534public String getPassword() {
-2535return password;
-2536 }
-2537
-2538/**
-2539 * @return the sessionID used for authentication on the RunDeck instance (null if using login-based or token-based auth)
-2540 */
-2541public String getSessionID() {
-2542return sessionID;
-2543 }
-2544
-2545 @Override
-2546public String toString() {
-2547 StringBuilder str = new StringBuilder();
-2548 str.append("RundeckClient ").append(API_VERSION);
-2549 str.append(" [").append(url).append("] ");
-2550if (token != null) {
-2551 str.append("(token=").append(token).append(")");
-2552 } else {
-2553 str.append("(credentials=").append(login).append("|").append(password).append(")");
-2554 }
-2555return str.toString();
-2556 }
-2557
-2558 @Override
-2559publicint hashCode() {
-2560finalint prime = 31;
-2561int result = 1;
-2562 result = prime * result + ((login == null) ? 0 : login.hashCode());
-2563 result = prime * result + ((password == null) ? 0 : password.hashCode());
-2564 result = prime * result + ((token == null) ? 0 : token.hashCode());
-2565 result = prime * result + ((url == null) ? 0 : url.hashCode());
-2566return result;
-2567 }
-2568
-2569 @Override
-2570publicboolean equals(Object obj) {
-2571if (this == obj)
-2572returntrue;
-2573if (obj == null)
-2574return false;
-2575if (getClass() != obj.getClass())
-2576return false;
-2577RundeckClient other = (RundeckClient) obj;
-2578if (login == null) {
-2579if (other.login != null)
-2580return false;
-2581 } elseif (!login.equals(other.login))
-2582return false;
-2583if (password == null) {
-2584if (other.password != null)
-2585return false;
-2586 } elseif (!password.equals(other.password))
-2587return false;
-2588if (token == null) {
-2589if (other.token != null)
-2590return false;
-2591 } elseif (!token.equals(other.token))
-2592return false;
-2593if (url == null) {
-2594if (other.url != null)
-2595return false;
-2596 } elseif (!url.equals(other.url))
-2597return false;
-2598returntrue;
-2599 }
-2600
-2601 }
+2314
+2315/*
+2316 * API token
+2317 */
+2318
+2319/**
+2320 * List API tokens for a user.
+2321 * @param user username
+2322 * @return list of tokens
+2323 * @throws RundeckApiException
+2324 */
+2325public List<RundeckToken> listApiTokens(final String user) throws RundeckApiException {
+2326 AssertUtil.notNull(user, "user is mandatory to list API tokens for a user.");
+2327returnnewApiCall(this).
+2328 get(newApiPathBuilder("/tokens/", user),
+2329new ListParser<RundeckToken>(newRundeckTokenParser(), "/tokens/token"));
+2330 }
+2331
+2332/**
+2333 * List all API tokens
+2334 * @return list of tokens
+2335 * @throws RundeckApiException
+2336 */
+2337public List<RundeckToken> listApiTokens() throws RundeckApiException {
+2338returnnewApiCall(this).
+2339 get(newApiPathBuilder("/tokens"),
+2340new ListParser<RundeckToken>(newRundeckTokenParser(), "/tokens/token"));
+2341 }
+2342
+2343/**
+2344 * Generate an API token for a user.
+2345 * @param user
+2346 * @return
+2347 * @throws RundeckApiException
+2348 */
+2349public String generateApiToken(final String user) throws RundeckApiException{
+2350 AssertUtil.notNull(user, "user is mandatory to generate an API token for a user.");
+2351RundeckToken result = newApiCall(this).
+2352 post(newApiPathBuilder("/tokens/", user).emptyContent(),
+2353newRundeckTokenParser("/token"));
+2354return result.getToken();
+2355 }
+2356/**
+2357 * Delete an existing token
+2358 * @param token
+2359 * @return
+2360 * @throws RundeckApiException
+2361 */
+2362publicboolean deleteApiToken(final String token) throws RundeckApiException{
+2363 AssertUtil.notNull(token, "token is mandatory to delete an API token.");
+2364newApiCall(this).delete(newApiPathBuilder("/token/", token));
+2365returntrue;
+2366 }
+2367/**
+2368 * Return user info for an existing token
+2369 * @param token
+2370 * @return token info
+2371 * @throws RundeckApiException
+2372 */
+2373publicRundeckToken getApiToken(final String token) throws RundeckApiException{
+2374 AssertUtil.notNull(token, "token is mandatory to get an API token.");
+2375returnnewApiCall(this).get(newApiPathBuilder("/token/", token), newRundeckTokenParser("/token"));
+2376 }
+2377
+2378/**
+2379 * Store an key file
+2380 * @param path ssh key storage path, must start with "keys/"
+2381 * @param keyfile key file
+2382 * @param privateKey true to store private key, false to store public key
+2383 * @return the key resource
+2384 * @throws RundeckApiException
+2385 */
+2386publicKeyResource storeKey(final String path, final File keyfile, boolean privateKey) throws RundeckApiException{
+2387 AssertUtil.notNull(path, "path is mandatory to store an key.");
+2388 AssertUtil.notNull(keyfile, "keyfile is mandatory to store an key.");
+2389if (!path.startsWith(STORAGE_KEYS_PATH)) {
+2390thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
+2391 }
+2392returnnewApiCall(this).post(
+2393newApiPathBuilder(STORAGE_ROOT_PATH, path).content(
+2394 privateKey ? "application/octet-stream" : "application/pgp-keys",
+2395 keyfile
+2396 ),
+2397newSSHKeyResourceParser("/resource")
+2398 );
+2399 }
+2400
+2401/**
+2402 * Get metadata for an key file
+2403 *
+2404 * @param path ssh key storage path, must start with "keys/"
+2405 *
+2406 * @return the ssh key resource
+2407 *
+2408 * @throws RundeckApiException if there is an error, or if the path is a directory not a file
+2409 */
+2410publicKeyResource getKey(final String path) throws RundeckApiException {
+2411 AssertUtil.notNull(path, "path is mandatory to get an key.");
+2412if (!path.startsWith(STORAGE_KEYS_PATH)) {
+2413thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
+2414 }
+2415KeyResource storageResource = newApiCall(this).get(
+2416newApiPathBuilder(STORAGE_ROOT_PATH, path),
+2417newSSHKeyResourceParser("/resource")
+2418 );
+2419if (storageResource.isDirectory()) {
+2420thrownewRundeckApiException("Key Path is a directory: " + path);
+2421 }
+2422return storageResource;
+2423 }
+2424
+2425/**
+2426 * Get content for a public key file
+2427 * @param path ssh key storage path, must start with "keys/"
+2428 * @param out outputstream to write data to
+2429 *
+2430 * @return length of written data
+2431 * @throws RundeckApiException
+2432 */
+2433publicint getPublicKeyContent(final String path, final OutputStream out) throws
+2434 RundeckApiException, IOException {
+2435 AssertUtil.notNull(path, "path is mandatory to get an key.");
+2436if (!path.startsWith(STORAGE_KEYS_PATH)) {
+2437thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
+2438 }
+2439try {
+2440returnnewApiCall(this).get(
+2441newApiPathBuilder(STORAGE_ROOT_PATH, path)
+2442 .accept("application/pgp-keys")
+2443 .requireContentType("application/pgp-keys"),
+2444 out
+2445 );
+2446 } catch (RundeckApiException.RundeckApiHttpContentTypeException e) {
+2447thrownewRundeckApiException("Requested Key path was not a Public key: " + path, e);
+2448 }
+2449 }
+2450
+2451/**
+2452 * Get content for a public key file
+2453 * @param path ssh key storage path, must start with "keys/"
+2454 * @param out file to write data to
+2455 * @return length of written data
+2456 * @throws RundeckApiException
+2457 */
+2458publicint getPublicKeyContent(final String path, final File out) throws
+2459 RundeckApiException, IOException {
+2460final FileOutputStream fileOutputStream = new FileOutputStream(out);
+2461try {
+2462return getPublicKeyContent(path, fileOutputStream);
+2463 }finally {
+2464 fileOutputStream.close();
+2465 }
+2466 }
+2467
+2468/**
+2469 * List contents of root key directory
+2470 *
+2471 * @return list of key resources
+2472 * @throws RundeckApiException
+2473 */
+2474public List<KeyResource> listKeyDirectoryRoot() throws RundeckApiException {
+2475return listKeyDirectory(STORAGE_KEYS_PATH);
+2476 }
+2477/**
+2478 * List contents of key directory
+2479 *
+2480 * @param path ssh key storage path, must start with "keys/"
+2481 *
+2482 * @throws RundeckApiException if there is an error, or if the path is a file not a directory
+2483 */
+2484public List<KeyResource> listKeyDirectory(final String path) throws RundeckApiException {
+2485 AssertUtil.notNull(path, "path is mandatory to get an key.");
+2486if (!path.startsWith(STORAGE_KEYS_PATH)) {
+2487thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
+2488 }
+2489KeyResource storageResource = newApiCall(this).get(
+2490newApiPathBuilder(STORAGE_ROOT_PATH, path),
+2491newSSHKeyResourceParser("/resource")
+2492 );
+2493if(!storageResource.isDirectory()) {
+2494thrownewRundeckApiException("key path is not a directory path: " + path);
+2495 }
+2496return storageResource.getDirectoryContents();
+2497 }
+2498
+2499/**
+2500 * Delete an key file
+2501 * @param path a path to a key file, must start with "keys/"
+2502 */
+2503publicvoid deleteKey(final String path){
+2504 AssertUtil.notNull(path, "path is mandatory to delete an key.");
+2505if (!path.startsWith(STORAGE_KEYS_PATH)) {
+2506thrownew IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH);
+2507 }
+2508newApiCall(this).delete(newApiPathBuilder(STORAGE_ROOT_PATH, path));
+2509 }
+2510
+2511/**
+2512 * @return the URL of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)
+2513 */
+2514public String getUrl() {
+2515return url;
+2516 }
+2517
+2518/**
+2519 * @return the auth-token used for authentication on the RunDeck instance (null if using login-based or session-based auth)
+2520 */
+2521public String getToken() {
+2522return token;
+2523 }
+2524
+2525/**
+2526 * @return the login used for authentication on the RunDeck instance (null if using token-based or session-based auth)
+2527 */
+2528public String getLogin() {
+2529return login;
+2530 }
+2531
+2532/**
+2533 * @return the password used for authentication on the RunDeck instance (null if using token-based or session-based auth)
+2534 */
+2535public String getPassword() {
+2536return password;
+2537 }
+2538
+2539/**
+2540 * @return the sessionID used for authentication on the RunDeck instance (null if using login-based or token-based auth)
+2541 */
+2542public String getSessionID() {
+2543return sessionID;
+2544 }
+2545
+2546 @Override
+2547public String toString() {
+2548 StringBuilder str = new StringBuilder();
+2549 str.append("RundeckClient ").append(API_VERSION);
+2550 str.append(" [").append(url).append("] ");
+2551if (token != null) {
+2552 str.append("(token=").append(token).append(")");
+2553 } else {
+2554 str.append("(credentials=").append(login).append("|").append(password).append(")");
+2555 }
+2556return str.toString();
+2557 }
+2558
+2559 @Override
+2560publicint hashCode() {
+2561finalint prime = 31;
+2562int result = 1;
+2563 result = prime * result + ((login == null) ? 0 : login.hashCode());
+2564 result = prime * result + ((password == null) ? 0 : password.hashCode());
+2565 result = prime * result + ((token == null) ? 0 : token.hashCode());
+2566 result = prime * result + ((url == null) ? 0 : url.hashCode());
+2567return result;
+2568 }
+2569
+2570 @Override
+2571publicboolean equals(Object obj) {
+2572if (this == obj)
+2573returntrue;
+2574if (obj == null)
+2575return false;
+2576if (getClass() != obj.getClass())
+2577return false;
+2578RundeckClient other = (RundeckClient) obj;
+2579if (login == null) {
+2580if (other.login != null)
+2581return false;
+2582 } elseif (!login.equals(other.login))
+2583return false;
+2584if (password == null) {
+2585if (other.password != null)
+2586return false;
+2587 } elseif (!password.equals(other.password))
+2588return false;
+2589if (token == null) {
+2590if (other.token != null)
+2591return false;
+2592 } elseif (!token.equals(other.token))
+2593return false;
+2594if (url == null) {
+2595if (other.url != null)
+2596return false;
+2597 } elseif (!url.equals(other.url))
+2598return false;
+2599returntrue;
+2600 }
+2601
+2602 }
diff --git a/xref/org/rundeck/api/domain/package-frame.html b/xref/org/rundeck/api/domain/package-frame.html
index 5a2f7b5..44bf75b 100644
--- a/xref/org/rundeck/api/domain/package-frame.html
+++ b/xref/org/rundeck/api/domain/package-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.domain
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.domain
diff --git a/xref/org/rundeck/api/domain/package-summary.html b/xref/org/rundeck/api/domain/package-summary.html
index af38a71..023fe39 100644
--- a/xref/org/rundeck/api/domain/package-summary.html
+++ b/xref/org/rundeck/api/domain/package-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.domain
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.domain
diff --git a/xref/org/rundeck/api/generator/package-frame.html b/xref/org/rundeck/api/generator/package-frame.html
index 8c7a6c2..b994b1b 100644
--- a/xref/org/rundeck/api/generator/package-frame.html
+++ b/xref/org/rundeck/api/generator/package-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.generator
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.generator
diff --git a/xref/org/rundeck/api/generator/package-summary.html b/xref/org/rundeck/api/generator/package-summary.html
index c259642..0ae56a1 100644
--- a/xref/org/rundeck/api/generator/package-summary.html
+++ b/xref/org/rundeck/api/generator/package-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.generator
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.generator
diff --git a/xref/org/rundeck/api/package-frame.html b/xref/org/rundeck/api/package-frame.html
index acb7676..fd52a18 100644
--- a/xref/org/rundeck/api/package-frame.html
+++ b/xref/org/rundeck/api/package-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api
diff --git a/xref/org/rundeck/api/package-summary.html b/xref/org/rundeck/api/package-summary.html
index e82514b..f22459a 100644
--- a/xref/org/rundeck/api/package-summary.html
+++ b/xref/org/rundeck/api/package-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api
diff --git a/xref/org/rundeck/api/parser/package-frame.html b/xref/org/rundeck/api/parser/package-frame.html
index b0b8a3d..60c52ef 100644
--- a/xref/org/rundeck/api/parser/package-frame.html
+++ b/xref/org/rundeck/api/parser/package-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.parser
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.parser
diff --git a/xref/org/rundeck/api/parser/package-summary.html b/xref/org/rundeck/api/parser/package-summary.html
index ae0cc99..62120e1 100644
--- a/xref/org/rundeck/api/parser/package-summary.html
+++ b/xref/org/rundeck/api/parser/package-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.parser
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.parser
diff --git a/xref/org/rundeck/api/query/package-frame.html b/xref/org/rundeck/api/query/package-frame.html
index bc8d6d3..481f2b9 100644
--- a/xref/org/rundeck/api/query/package-frame.html
+++ b/xref/org/rundeck/api/query/package-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.query
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.query
diff --git a/xref/org/rundeck/api/query/package-summary.html b/xref/org/rundeck/api/query/package-summary.html
index f44d77c..fc0f5f9 100644
--- a/xref/org/rundeck/api/query/package-summary.html
+++ b/xref/org/rundeck/api/query/package-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.query
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.query
diff --git a/xref/org/rundeck/api/util/package-frame.html b/xref/org/rundeck/api/util/package-frame.html
index 3b8009d..a9d3919 100644
--- a/xref/org/rundeck/api/util/package-frame.html
+++ b/xref/org/rundeck/api/util/package-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.util
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.util
diff --git a/xref/org/rundeck/api/util/package-summary.html b/xref/org/rundeck/api/util/package-summary.html
index f321006..81c4c13 100644
--- a/xref/org/rundeck/api/util/package-summary.html
+++ b/xref/org/rundeck/api/util/package-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference Package org.rundeck.api.util
+ RunDeck API - Java Client 11.1 Reference Package org.rundeck.api.util
diff --git a/xref/overview-frame.html b/xref/overview-frame.html
index 303a8fd..b07b779 100644
--- a/xref/overview-frame.html
+++ b/xref/overview-frame.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference
+ RunDeck API - Java Client 11.1 Reference
diff --git a/xref/overview-summary.html b/xref/overview-summary.html
index 21b09ca..3a624bd 100644
--- a/xref/overview-summary.html
+++ b/xref/overview-summary.html
@@ -3,7 +3,7 @@
- RunDeck API - Java Client 11.0 Reference
+ RunDeck API - Java Client 11.1 Reference
@@ -24,7 +24,7 @@
-