From d18ef95f576ba299a83e49a08a7d872eeb311182 Mon Sep 17 00:00:00 2001 From: Greg Schueler Date: Mon, 31 Dec 2012 17:34:38 -0800 Subject: [PATCH] Wagon: Deploying site to repository --- apidocs/assets/navtree_data.js | 11 +- apidocs/proof-read.txt | 1016 ++-- apidocs/reference/classes.html | 104 +- apidocs/reference/current.xml | 1858 ++++++- apidocs/reference/hierarchy.html | 210 + apidocs/reference/lists.js | 58 +- .../reference/org/rundeck/api/FileType.html | 2 + .../org/rundeck/api/NodeFiltersBuilder.html | 2 + .../org/rundeck/api/OptionsBuilder.html | 2 + ...kApiException.RundeckApiAuthException.html | 2 + ...ApiException.RundeckApiLoginException.html | 2 + ...ApiException.RundeckApiTokenException.html | 2 + .../org/rundeck/api/RundeckApiException.html | 2 + .../org/rundeck/api/RundeckClient.html | 1059 +++- .../api/domain/RundeckAbort.AbortStatus.html | 7 + .../org/rundeck/api/domain/RundeckAbort.html | 7 + .../api/domain/RundeckEvent.EventStatus.html | 7 + .../api/domain/RundeckEvent.NodeSummary.html | 7 + .../org/rundeck/api/domain/RundeckEvent.html | 7 + .../RundeckExecution.ExecutionStatus.html | 7 + .../rundeck/api/domain/RundeckExecution.html | 131 +- .../rundeck/api/domain/RundeckHistory.html | 7 + .../org/rundeck/api/domain/RundeckJob.html | 113 +- .../rundeck/api/domain/RundeckJobDelete.html | 1369 +++++ .../api/domain/RundeckJobDeleteBulk.html | 1035 ++++ .../api/domain/RundeckJobsImportMethod.html | 7 + .../api/domain/RundeckJobsImportResult.html | 7 + .../org/rundeck/api/domain/RundeckNode.html | 7 + .../org/rundeck/api/domain/RundeckOutput.html | 2162 ++++++++ .../RundeckOutputEntry.RundeckLogLevel.html | 1243 +++++ .../api/domain/RundeckOutputEntry.html | 1480 +++++ .../rundeck/api/domain/RundeckProject.html | 7 + .../rundeck/api/domain/RundeckSystemInfo.html | 7 + .../org/rundeck/api/domain/package-descr.html | 7 + .../rundeck/api/domain/package-summary.html | 32 + .../org/rundeck/api/package-descr.html | 2 + .../org/rundeck/api/package-summary.html | 2 + .../org/rundeck/api/parser/AbortParser.html | 7 + .../rundeck/api/parser/BulkDeleteParser.html | 894 +++ .../org/rundeck/api/parser/DeleteParser.html | 894 +++ .../org/rundeck/api/parser/EventParser.html | 7 + .../rundeck/api/parser/ExecutionParser.html | 7 + .../org/rundeck/api/parser/HistoryParser.html | 7 + .../org/rundeck/api/parser/JobParser.html | 7 + .../api/parser/JobsImportResultParser.html | 7 + .../org/rundeck/api/parser/ListParser.html | 7 + .../org/rundeck/api/parser/NodeParser.html | 7 + .../rundeck/api/parser/OutputEntryParser.html | 901 ++++ .../org/rundeck/api/parser/OutputParser.html | 901 ++++ .../rundeck/api/parser/PagedResultParser.html | 863 +++ .../org/rundeck/api/parser/ParserHelper.html | 7 + .../org/rundeck/api/parser/ProjectParser.html | 7 + .../org/rundeck/api/parser/StringParser.html | 7 + .../rundeck/api/parser/SystemInfoParser.html | 7 + .../org/rundeck/api/parser/XmlNodeParser.html | 41 +- .../org/rundeck/api/parser/package-descr.html | 7 + .../rundeck/api/parser/package-summary.html | 33 +- .../api/query/ExecutionQuery.Builder.html | 1840 +++++++ .../org/rundeck/api/query/ExecutionQuery.html | 1765 ++++++ .../org/rundeck/api/query/package-descr.html | 245 + .../rundeck/api/query/package-summary.html | 278 + .../org/rundeck/api/util/AssertUtil.html | 7 + .../org/rundeck/api/util/PagedResults.html | 742 +++ .../org/rundeck/api/util/ParametersUtil.html | 7 + .../org/rundeck/api/util/package-descr.html | 7 + .../org/rundeck/api/util/package-summary.html | 18 + apidocs/reference/package-list | 1 + apidocs/reference/packages.html | 9 + changes-report.html | 22 +- cpd.html | 24 +- cpd.xml | 8 +- dependencies.html | 44 +- dependency-updates-report.html | 22 +- distribution-management.html | 30 +- download.html | 18 +- faq.html | 16 +- findbugs.html | 22 +- groovy.html | 16 +- index.html | 31 +- integration.html | 28 +- issue-tracking.html | 30 +- jruby.html | 16 +- jython.html | 16 +- license.html | 28 +- mail-lists.html | 28 +- plugin-updates-report.html | 24 +- pmd.html | 22 +- pmd.xml | 38 +- project-info.html | 30 +- project-reports.html | 22 +- project-summary.html | 30 +- property-updates-report.html | 24 +- scripting.html | 16 +- source-repository.html | 30 +- status.html | 18 +- taglist.html | 20 +- team-list.html | 30 +- testapidocs/assets/navtree_data.js | 2 +- testapidocs/proof-read.txt | 174 +- testapidocs/reference/classes.html | 28 + testapidocs/reference/current.xml | 255 + testapidocs/reference/hierarchy.html | 32 + testapidocs/reference/lists.js | 28 +- .../org/rundeck/api/RundeckClientTest.html | 510 +- .../rundeck/api/parser/AbortParserTest.html | 2 + .../api/parser/BulkDeleteParserTest.html | 837 +++ .../rundeck/api/parser/DeleteParserTest.html | 949 ++++ .../rundeck/api/parser/EventParserTest.html | 2 + .../api/parser/ExecutionParserTest.html | 2 + .../rundeck/api/parser/HistoryParserTest.html | 2 + .../org/rundeck/api/parser/JobParserTest.html | 114 + .../parser/JobsImportResultParserTest.html | 2 + .../rundeck/api/parser/ListParserTest.html | 2 + .../rundeck/api/parser/NodeParserTest.html | 2 + .../rundeck/api/parser/ParserHelperTest.html | 2 + .../rundeck/api/parser/ProjectParserTest.html | 2 + .../rundeck/api/parser/StringParserTest.html | 2 + .../api/parser/SystemInfoParserTest.html | 2 + .../org/rundeck/api/parser/package-descr.html | 2 + .../rundeck/api/parser/package-summary.html | 10 + xref-test/allclasses-frame.html | 6 + xref-test/index.html | 2 +- .../org/rundeck/api/RundeckClientTest.html | 381 +- xref-test/org/rundeck/api/package-frame.html | 2 +- .../org/rundeck/api/package-summary.html | 4 +- .../api/parser/BulkDeleteParserTest.html | 74 + .../rundeck/api/parser/DeleteParserTest.html | 115 + .../api/parser/ExecutionParserTest.html | 158 +- .../org/rundeck/api/parser/JobParserTest.html | 31 +- .../org/rundeck/api/parser/package-frame.html | 8 +- .../rundeck/api/parser/package-summary.html | 14 +- .../org/rundeck/api/util/package-frame.html | 2 +- .../org/rundeck/api/util/package-summary.html | 4 +- xref-test/overview-frame.html | 2 +- xref-test/overview-summary.html | 6 +- xref/allclasses-frame.html | 48 + xref/index.html | 2 +- xref/org/rundeck/api/ApiCall.html | 914 ++-- xref/org/rundeck/api/ApiPathBuilder.html | 503 +- .../rundeck/api/ExecutionQueryParameters.html | 93 + .../rundeck/api/QueryParameterBuilder.html | 97 + xref/org/rundeck/api/RundeckClient.html | 4771 +++++++++-------- .../rundeck/api/domain/RundeckExecution.html | 429 +- xref/org/rundeck/api/domain/RundeckJob.html | 230 +- .../rundeck/api/domain/RundeckJobDelete.html | 147 + .../api/domain/RundeckJobDeleteBulk.html | 96 + .../org/rundeck/api/domain/RundeckOutput.html | 306 ++ .../api/domain/RundeckOutputEntry.html | 160 + .../org/rundeck/api/domain/package-frame.html | 17 +- .../rundeck/api/domain/package-summary.html | 29 +- xref/org/rundeck/api/package-frame.html | 11 +- xref/org/rundeck/api/package-summary.html | 19 +- .../rundeck/api/parser/BulkDeleteParser.html | 94 + xref/org/rundeck/api/parser/DeleteParser.html | 77 + .../rundeck/api/parser/ExecutionParser.html | 43 +- xref/org/rundeck/api/parser/JobParser.html | 29 +- .../rundeck/api/parser/OutputEntryParser.html | 61 + xref/org/rundeck/api/parser/OutputParser.html | 115 + .../rundeck/api/parser/PagedResultParser.html | 130 + .../org/rundeck/api/parser/package-frame.html | 17 +- .../rundeck/api/parser/package-summary.html | 29 +- .../org/rundeck/api/query/ExecutionQuery.html | 407 ++ xref/org/rundeck/api/query/package-frame.html | 27 + .../rundeck/api/query/package-summary.html | 72 + xref/org/rundeck/api/util/PagedResults.html | 74 + xref/org/rundeck/api/util/package-frame.html | 5 +- .../org/rundeck/api/util/package-summary.html | 9 +- xref/overview-frame.html | 5 +- xref/overview-summary.html | 11 +- 169 files changed, 30649 insertions(+), 4430 deletions(-) create mode 100644 apidocs/reference/org/rundeck/api/domain/RundeckJobDelete.html create mode 100644 apidocs/reference/org/rundeck/api/domain/RundeckJobDeleteBulk.html create mode 100644 apidocs/reference/org/rundeck/api/domain/RundeckOutput.html create mode 100644 apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html create mode 100644 apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.html create mode 100644 apidocs/reference/org/rundeck/api/parser/BulkDeleteParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/DeleteParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/OutputEntryParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/OutputParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/PagedResultParser.html create mode 100644 apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html create mode 100644 apidocs/reference/org/rundeck/api/query/ExecutionQuery.html create mode 100644 apidocs/reference/org/rundeck/api/query/package-descr.html create mode 100644 apidocs/reference/org/rundeck/api/query/package-summary.html create mode 100644 apidocs/reference/org/rundeck/api/util/PagedResults.html create mode 100644 testapidocs/reference/org/rundeck/api/parser/BulkDeleteParserTest.html create mode 100644 testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html create mode 100644 xref-test/org/rundeck/api/parser/BulkDeleteParserTest.html create mode 100644 xref-test/org/rundeck/api/parser/DeleteParserTest.html create mode 100644 xref/org/rundeck/api/ExecutionQueryParameters.html create mode 100644 xref/org/rundeck/api/QueryParameterBuilder.html create mode 100644 xref/org/rundeck/api/domain/RundeckJobDelete.html create mode 100644 xref/org/rundeck/api/domain/RundeckJobDeleteBulk.html create mode 100644 xref/org/rundeck/api/domain/RundeckOutput.html create mode 100644 xref/org/rundeck/api/domain/RundeckOutputEntry.html create mode 100644 xref/org/rundeck/api/parser/BulkDeleteParser.html create mode 100644 xref/org/rundeck/api/parser/DeleteParser.html create mode 100644 xref/org/rundeck/api/parser/OutputEntryParser.html create mode 100644 xref/org/rundeck/api/parser/OutputParser.html create mode 100644 xref/org/rundeck/api/parser/PagedResultParser.html create mode 100644 xref/org/rundeck/api/query/ExecutionQuery.html create mode 100644 xref/org/rundeck/api/query/package-frame.html create mode 100644 xref/org/rundeck/api/query/package-summary.html create mode 100644 xref/org/rundeck/api/util/PagedResults.html diff --git a/apidocs/assets/navtree_data.js b/apidocs/assets/navtree_data.js index adf562b..fc51aee 100644 --- a/apidocs/assets/navtree_data.js +++ b/apidocs/assets/navtree_data.js @@ -3,13 +3,16 @@ var NAVTREE_DATA = , "" ], [ "Enums", null, [ [ "FileType", "org/rundeck/api/FileType.html", null, "" ] ] , "" ], [ "Exceptions", null, [ [ "RundeckApiException", "org/rundeck/api/RundeckApiException.html", null, "" ], [ "RundeckApiException.RundeckApiAuthException", "org/rundeck/api/RundeckApiException.RundeckApiAuthException.html", null, "" ], [ "RundeckApiException.RundeckApiLoginException", "org/rundeck/api/RundeckApiException.RundeckApiLoginException.html", null, "" ], [ "RundeckApiException.RundeckApiTokenException", "org/rundeck/api/RundeckApiException.RundeckApiTokenException.html", null, "" ] ] , "" ] ] -, "" ], [ "org.rundeck.api.domain", "org/rundeck/api/domain/package-summary.html", [ [ "Description", "org/rundeck/api/domain/package-descr.html", null, "" ], [ "Classes", null, [ [ "RundeckAbort", "org/rundeck/api/domain/RundeckAbort.html", null, "" ], [ "RundeckEvent", "org/rundeck/api/domain/RundeckEvent.html", null, "" ], [ "RundeckEvent.NodeSummary", "org/rundeck/api/domain/RundeckEvent.NodeSummary.html", null, "" ], [ "RundeckExecution", "org/rundeck/api/domain/RundeckExecution.html", null, "" ], [ "RundeckHistory", "org/rundeck/api/domain/RundeckHistory.html", null, "" ], [ "RundeckJob", "org/rundeck/api/domain/RundeckJob.html", null, "" ], [ "RundeckJobsImportResult", "org/rundeck/api/domain/RundeckJobsImportResult.html", null, "" ], [ "RundeckNode", "org/rundeck/api/domain/RundeckNode.html", null, "" ], [ "RundeckProject", "org/rundeck/api/domain/RundeckProject.html", null, "" ], [ "RundeckSystemInfo", "org/rundeck/api/domain/RundeckSystemInfo.html", null, "" ] ] -, "" ], [ "Enums", null, [ [ "RundeckAbort.AbortStatus", "org/rundeck/api/domain/RundeckAbort.AbortStatus.html", null, "" ], [ "RundeckEvent.EventStatus", "org/rundeck/api/domain/RundeckEvent.EventStatus.html", null, "" ], [ "RundeckExecution.ExecutionStatus", "org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html", null, "" ], [ "RundeckJobsImportMethod", "org/rundeck/api/domain/RundeckJobsImportMethod.html", null, "" ] ] +, "" ], [ "org.rundeck.api.domain", "org/rundeck/api/domain/package-summary.html", [ [ "Description", "org/rundeck/api/domain/package-descr.html", null, "" ], [ "Classes", null, [ [ "RundeckAbort", "org/rundeck/api/domain/RundeckAbort.html", null, "" ], [ "RundeckEvent", "org/rundeck/api/domain/RundeckEvent.html", null, "" ], [ "RundeckEvent.NodeSummary", "org/rundeck/api/domain/RundeckEvent.NodeSummary.html", null, "" ], [ "RundeckExecution", "org/rundeck/api/domain/RundeckExecution.html", null, "" ], [ "RundeckHistory", "org/rundeck/api/domain/RundeckHistory.html", null, "" ], [ "RundeckJob", "org/rundeck/api/domain/RundeckJob.html", null, "" ], [ "RundeckJobDelete", "org/rundeck/api/domain/RundeckJobDelete.html", null, "" ], [ "RundeckJobDeleteBulk", "org/rundeck/api/domain/RundeckJobDeleteBulk.html", null, "" ], [ "RundeckJobsImportResult", "org/rundeck/api/domain/RundeckJobsImportResult.html", null, "" ], [ "RundeckNode", "org/rundeck/api/domain/RundeckNode.html", null, "" ], [ "RundeckOutput", "org/rundeck/api/domain/RundeckOutput.html", null, "" ], [ "RundeckOutputEntry", "org/rundeck/api/domain/RundeckOutputEntry.html", null, "" ], [ "RundeckProject", "org/rundeck/api/domain/RundeckProject.html", null, "" ], [ "RundeckSystemInfo", "org/rundeck/api/domain/RundeckSystemInfo.html", null, "" ] ] +, "" ], [ "Enums", null, [ [ "RundeckAbort.AbortStatus", "org/rundeck/api/domain/RundeckAbort.AbortStatus.html", null, "" ], [ "RundeckEvent.EventStatus", "org/rundeck/api/domain/RundeckEvent.EventStatus.html", null, "" ], [ "RundeckExecution.ExecutionStatus", "org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html", null, "" ], [ "RundeckJobsImportMethod", "org/rundeck/api/domain/RundeckJobsImportMethod.html", null, "" ], [ "RundeckOutputEntry.RundeckLogLevel", "org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html", null, "" ] ] , "" ] ] , "" ], [ "org.rundeck.api.parser", "org/rundeck/api/parser/package-summary.html", [ [ "Description", "org/rundeck/api/parser/package-descr.html", null, "" ], [ "Interfaces", null, [ [ "XmlNodeParser", "org/rundeck/api/parser/XmlNodeParser.html", null, "" ] ] -, "" ], [ "Classes", null, [ [ "AbortParser", "org/rundeck/api/parser/AbortParser.html", null, "" ], [ "EventParser", "org/rundeck/api/parser/EventParser.html", null, "" ], [ "ExecutionParser", "org/rundeck/api/parser/ExecutionParser.html", null, "" ], [ "HistoryParser", "org/rundeck/api/parser/HistoryParser.html", null, "" ], [ "JobParser", "org/rundeck/api/parser/JobParser.html", null, "" ], [ "JobsImportResultParser", "org/rundeck/api/parser/JobsImportResultParser.html", null, "" ], [ "ListParser", "org/rundeck/api/parser/ListParser.html", null, "" ], [ "NodeParser", "org/rundeck/api/parser/NodeParser.html", null, "" ], [ "ParserHelper", "org/rundeck/api/parser/ParserHelper.html", null, "" ], [ "ProjectParser", "org/rundeck/api/parser/ProjectParser.html", null, "" ], [ "StringParser", "org/rundeck/api/parser/StringParser.html", null, "" ], [ "SystemInfoParser", "org/rundeck/api/parser/SystemInfoParser.html", null, "" ] ] +, "" ], [ "Classes", null, [ [ "AbortParser", "org/rundeck/api/parser/AbortParser.html", null, "" ], [ "BulkDeleteParser", "org/rundeck/api/parser/BulkDeleteParser.html", null, "" ], [ "DeleteParser", "org/rundeck/api/parser/DeleteParser.html", null, "" ], [ "EventParser", "org/rundeck/api/parser/EventParser.html", null, "" ], [ "ExecutionParser", "org/rundeck/api/parser/ExecutionParser.html", null, "" ], [ "HistoryParser", "org/rundeck/api/parser/HistoryParser.html", null, "" ], [ "JobParser", "org/rundeck/api/parser/JobParser.html", null, "" ], [ "JobsImportResultParser", "org/rundeck/api/parser/JobsImportResultParser.html", null, "" ], [ "ListParser", "org/rundeck/api/parser/ListParser.html", null, "" ], [ "NodeParser", "org/rundeck/api/parser/NodeParser.html", null, "" ], [ "OutputEntryParser", "org/rundeck/api/parser/OutputEntryParser.html", null, "" ], [ "OutputParser", "org/rundeck/api/parser/OutputParser.html", null, "" ], [ "PagedResultParser", "org/rundeck/api/parser/PagedResultParser.html", null, "" ], [ "ParserHelper", "org/rundeck/api/parser/ParserHelper.html", null, "" ], [ "ProjectParser", "org/rundeck/api/parser/ProjectParser.html", null, "" ], [ "StringParser", "org/rundeck/api/parser/StringParser.html", null, "" ], [ "SystemInfoParser", "org/rundeck/api/parser/SystemInfoParser.html", null, "" ] ] , "" ] ] -, "" ], [ "org.rundeck.api.util", "org/rundeck/api/util/package-summary.html", [ [ "Description", "org/rundeck/api/util/package-descr.html", null, "" ], [ "Classes", null, [ [ "AssertUtil", "org/rundeck/api/util/AssertUtil.html", null, "" ], [ "ParametersUtil", "org/rundeck/api/util/ParametersUtil.html", null, "" ] ] +, "" ], [ "org.rundeck.api.query", "org/rundeck/api/query/package-summary.html", [ [ "Description", "org/rundeck/api/query/package-descr.html", null, "" ], [ "Classes", null, [ [ "ExecutionQuery", "org/rundeck/api/query/ExecutionQuery.html", null, "" ], [ "ExecutionQuery.Builder", "org/rundeck/api/query/ExecutionQuery.Builder.html", null, "" ] ] +, "" ] ] +, "" ], [ "org.rundeck.api.util", "org/rundeck/api/util/package-summary.html", [ [ "Description", "org/rundeck/api/util/package-descr.html", null, "" ], [ "Interfaces", null, [ [ "PagedResults", "org/rundeck/api/util/PagedResults.html", null, "" ] ] +, "" ], [ "Classes", null, [ [ "AssertUtil", "org/rundeck/api/util/AssertUtil.html", null, "" ], [ "ParametersUtil", "org/rundeck/api/util/ParametersUtil.html", null, "" ] ] , "" ] ] , "" ] ] diff --git a/apidocs/proof-read.txt b/apidocs/proof-read.txt index 9dde75a..67d01d3 100644 --- a/apidocs/proof-read.txt +++ b/apidocs/proof-read.txt @@ -13,6 +13,9 @@ javadoc proofread file: ./proof-read.txt Internal parsers for parsing the RunDeck responses. +=== reference/org/rundeck/api/query/package-descr.html === + + === reference/org/rundeck/api/util/package-descr.html === Some utility classes. @@ -21,325 +24,6 @@ javadoc proofread file: ./proof-read.txt

See the documentation of the RundeckClient class (main entry point of the API).

-=== org/rundeck/api/domain/RundeckJobsImportResult.html === - Result of importing some jobs into RunDeck -CONSTRUCTOR: RundeckJobsImportResult -METHOD: addFailedJob -METHOD: addSkippedJob -METHOD: addSucceededJob -METHOD: equals -METHOD: getFailedJobs -METHOD: getSkippedJobs -METHOD: getSucceededJobs -METHOD: hashCode -METHOD: toString - - -=== org/rundeck/api/domain/RundeckAbort.html === - Represents an abort of a - {@link ... RundeckExecution} -CONSTRUCTOR: RundeckAbort -METHOD: equals -METHOD: getExecution -METHOD: getStatus -METHOD: hashCode -METHOD: setExecution -METHOD: setStatus -METHOD: toString - - -=== org/rundeck/api/domain/RundeckAbort.AbortStatus.html === - The status of an abort -ENUM: ABORTED -ENUM: FAILED -ENUM: PENDING -METHOD: valueOf -METHOD: values - - -=== org/rundeck/api/domain/RundeckProject.html === - Represents a RunDeck project -CONSTRUCTOR: RundeckProject -METHOD: equals -METHOD: getDescription -METHOD: getName -METHOD: getResourceModelProviderUrl -METHOD: hashCode -METHOD: setDescription -METHOD: setName -METHOD: setResourceModelProviderUrl -METHOD: toString - - -=== org/rundeck/api/domain/RundeckNode.html === - Represents a RunDeck node (server on which RunDeck can execute jobs and commands) -CONSTRUCTOR: RundeckNode -METHOD: equals -METHOD: getDescription -METHOD: getEditUrl -METHOD: getHostname -METHOD: getName -METHOD: getOsArch -METHOD: getOsFamily -METHOD: getOsName -METHOD: getOsVersion -METHOD: getRemoteUrl -METHOD: getTags -METHOD: getType -METHOD: getUsername -METHOD: hashCode -METHOD: setDescription -METHOD: setEditUrl -METHOD: setHostname -METHOD: setName -METHOD: setOsArch -METHOD: setOsFamily -METHOD: setOsName -METHOD: setOsVersion -METHOD: setRemoteUrl -METHOD: setTags -METHOD: setType -METHOD: setUsername -METHOD: toString - - -=== org/rundeck/api/domain/RundeckHistory.html === - Represents a portion of the RunDeck (events) history -CONSTRUCTOR: RundeckHistory -METHOD: addEvent -METHOD: equals -METHOD: getCount -METHOD: getEvents -METHOD: getMax -METHOD: getOffset -METHOD: getTotal -METHOD: hashCode -METHOD: setCount -METHOD: setEvents -METHOD: setMax -METHOD: setOffset -METHOD: setTotal -METHOD: toString - - -=== org/rundeck/api/domain/RundeckEvent.html === - Represents a RunDeck event -CONSTRUCTOR: RundeckEvent -METHOD: equals -METHOD: getAbortedBy -METHOD: getDuration -METHOD: getDurationInMillis -METHOD: getDurationInSeconds -METHOD: getEndedAt -METHOD: getExecutionId -METHOD: getJobId -METHOD: getNodeSummary -METHOD: getProject -METHOD: getShortDuration -METHOD: getStartedAt -METHOD: getStatus -METHOD: getSummary -METHOD: getTitle -METHOD: getUser -METHOD: hashCode -METHOD: isAdhoc -METHOD: setAbortedBy -METHOD: setEndedAt -METHOD: setExecutionId -METHOD: setJobId -METHOD: setNodeSummary -METHOD: setProject -METHOD: setStartedAt -METHOD: setStatus -METHOD: setSummary -METHOD: setTitle -METHOD: setUser -METHOD: toString - - -=== org/rundeck/api/domain/RundeckEvent.NodeSummary.html === - Summary for nodes -CONSTRUCTOR: RundeckEvent.NodeSummary -METHOD: equals -METHOD: getFailed -METHOD: getSucceeded -METHOD: getTotal -METHOD: hashCode -METHOD: setFailed -METHOD: setSucceeded -METHOD: setTotal -METHOD: toString - - -=== org/rundeck/api/domain/RundeckEvent.EventStatus.html === - The status of an event -ENUM: ABORTED -ENUM: FAILED -ENUM: SUCCEEDED -METHOD: valueOf -METHOD: values - - -=== org/rundeck/api/domain/RundeckSystemInfo.html === - Represents the RunDeck system info -CONSTRUCTOR: RundeckSystemInfo -METHOD: equals -METHOD: getActiveThreads -METHOD: getBaseDir -METHOD: getBuild -METHOD: getCpuLoadAverage -METHOD: getDate -METHOD: getFreeMemoryInBytes -METHOD: getJvmName -METHOD: getJvmVendor -METHOD: getJvmVersion -METHOD: getMaxMemoryInBytes -METHOD: getNode -METHOD: getOsArch -METHOD: getOsName -METHOD: getOsVersion -METHOD: getRunningJobs -METHOD: getStartDate -METHOD: getTotalMemoryInBytes -METHOD: getUptime -METHOD: getUptimeInMillis -METHOD: getVersion -METHOD: hashCode -METHOD: setActiveThreads -METHOD: setBaseDir -METHOD: setBuild -METHOD: setCpuLoadAverage -METHOD: setDate -METHOD: setFreeMemoryInBytes -METHOD: setJvmName -METHOD: setJvmVendor -METHOD: setJvmVersion -METHOD: setMaxMemoryInBytes -METHOD: setNode -METHOD: setOsArch -METHOD: setOsName -METHOD: setOsVersion -METHOD: setRunningJobs -METHOD: setStartDate -METHOD: setTotalMemoryInBytes -METHOD: setUptimeInMillis -METHOD: setVersion -METHOD: toString - - -=== org/rundeck/api/domain/RundeckJob.html === - Represents a RunDeck job -CONSTRUCTOR: RundeckJob -METHOD: equals -METHOD: getDescription -METHOD: getFullName -METHOD: getGroup -METHOD: getId -METHOD: getName -METHOD: getProject -METHOD: hashCode -METHOD: setDescription -METHOD: setGroup -METHOD: setId -METHOD: setName -METHOD: setProject -METHOD: toString - - -=== org/rundeck/api/domain/RundeckJobsImportMethod.html === - The behavior when importing jobs (which may already exist). -ENUM: CREATE -ENUM: SKIP -ENUM: UPDATE -METHOD: valueOf -METHOD: values - - -=== org/rundeck/api/domain/RundeckExecution.html === - Represents a RunDeck execution, usually triggered by an API call. An execution could be a - {@link ... RundeckJob} - execution or an "ad-hoc" execution. -CONSTRUCTOR: RundeckExecution -METHOD: equals -METHOD: getAbortedBy -METHOD: getDescription -METHOD: getDuration -METHOD: getDurationInMillis -METHOD: getDurationInSeconds -METHOD: getEndedAt -METHOD: getId -METHOD: getJob -METHOD: getShortDuration -METHOD: getStartedAt -METHOD: getStartedBy -METHOD: getStatus -METHOD: getUrl -METHOD: hashCode -METHOD: setAbortedBy -METHOD: setDescription -METHOD: setEndedAt -METHOD: setId -METHOD: setJob -METHOD: setStartedAt -METHOD: setStartedBy -METHOD: setStatus -METHOD: setUrl -METHOD: toString - - -=== org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html === - The status of an execution -ENUM: ABORTED -ENUM: FAILED -ENUM: RUNNING -ENUM: SUCCEEDED -METHOD: valueOf -METHOD: values - - -=== org/rundeck/api/NodeFiltersBuilder.html === - Builder for node filters -CONSTRUCTOR: NodeFiltersBuilder - Build a new instance. At the end, use - {@link ... toProperties()} - . -METHOD: excludeHostname - Exclude nodes matching the given hostname -METHOD: excludeName - Exclude nodes matching the given name -METHOD: excludeOsArch - Exclude nodes matching the given OS-arch -METHOD: excludeOsFamily - Exclude nodes matching the given OS-family -METHOD: excludeOsName - Exclude nodes matching the given OS-name -METHOD: excludeOsVersion - Exclude nodes matching the given OS-version -METHOD: excludePrecedence - Whether exclusion filters take precedence (default to yes). -METHOD: excludeTags - Exclude nodes matching the given tags -METHOD: excludeType - Exclude nodes matching the given type -METHOD: hostname - Include nodes matching the given hostname -METHOD: name - Include nodes matching the given name -METHOD: osArch - Include nodes matching the given OS-arch -METHOD: osFamily - Include nodes matching the given OS-family -METHOD: osName - Include nodes matching the given OS-name -METHOD: osVersion - Include nodes matching the given OS-version -METHOD: tags - Include nodes matching the given tags -METHOD: toProperties -METHOD: type - Include nodes matching the given type - - === org/rundeck/api/RundeckClient.html === Main entry point to talk to a RunDeck instance.
You have 2 methods for authentication : login-based or token-based. If you want to use the first, you need to provide @@ -348,7 +32,7 @@ METHOD: type
Usage :
-
+         
          // using login-based authentication :
          RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin");
          // or for a token-based authentication :
@@ -371,19 +55,22 @@ FIELD: API_ENDPOINT
 FIELD: API_VERSION
         Version of the API supported
 CONSTRUCTOR: RundeckClient
-        Instantiate a new
-        {@link ... RundeckClient}
-        for the RunDeck instance at the given url, using token-based
-         authentication.
 CONSTRUCTOR: RundeckClient
         Instantiate a new
         {@link ... RundeckClient}
         for the RunDeck instance at the given url, using login-based
          authentication.
+CONSTRUCTOR: RundeckClient
+        Instantiate a new
+        {@link ... RundeckClient}
+        for the RunDeck instance at the given url, 
+         using token-based or session-based authentication. Either token or sessionID must be valid
 METHOD: abortExecution
         Abort an execution (identified by the given ID). The execution should be running...
 METHOD: deleteJob
         Delete a single job, identified by the given ID
+METHOD: deleteJobs
+        Delete multiple jobs, identified by the given IDs
 METHOD: equals
 METHOD: exportJob
         Export the definition of a single job, identified by the given ID
@@ -416,8 +103,14 @@ METHOD: exportJobsToFile
 METHOD: findJob
         Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not
          need to belong to a group (either pass null, or an empty string).
+METHOD: generateToken
+        Generate a new token and get the result page (which is the html page of the user's profile)
 METHOD: getExecution
         Get a single execution, identified by the given ID
+METHOD: getExecutions
+        Get executions based on query parameters
+METHOD: getHistory
+        Get the (events) history for the given project
 METHOD: getHistory
         Get the (events) history for the given project
 METHOD: getHistory
@@ -438,6 +131,10 @@ METHOD: getHistory
         Get the (events) history for the given project
 METHOD: getJob
         Get the definition of a single job, identified by the given ID
+METHOD: getJobExecutionOutput
+        Get the execution output of the given job
+METHOD: getJobExecutionOutput
+        Get the execution output of the given job
 METHOD: getJobExecutions
         Get the executions of the given job
 METHOD: getJobExecutions
@@ -463,7 +160,11 @@ METHOD: getNodes
         List all nodes that belongs to the given project
 METHOD: getNodes
         List nodes that belongs to the given project
+METHOD: getOutput
+        Get the output of a job execution
 METHOD: getPassword
+METHOD: getProfilePage
+        Get the html page of the user's profile
 METHOD: getProject
         Get the definition of a single project, identified by the given name
 METHOD: getProjects
@@ -472,6 +173,7 @@ METHOD: getRunningExecutions
         Get all running executions (for all projects)
 METHOD: getRunningExecutions
         Get the running executions for the given project
+METHOD: getSessionID
 METHOD: getSystemInfo
         Get system informations about the RunDeck server
 METHOD: getToken
@@ -662,19 +364,6 @@ METHOD: triggerJob
          end of the job execution)
 
 
-=== org/rundeck/api/OptionsBuilder.html ===
-        Builder for job options
-CONSTRUCTOR: OptionsBuilder
-        Build a new instance. Use
-        {@link ... addOption(Object, Object)}
-        to add some options, and then
-        {@link ... toProperties()}
-        when you're done !
-METHOD: addOption
-        Add an option
-METHOD: toProperties
-
-
 === org/rundeck/api/RundeckApiException.html ===
         A generic (unchecked) exception when using the RunDeck API
 CONSTRUCTOR: RundeckApiException
@@ -699,6 +388,62 @@ CONSTRUCTOR: RundeckApiException.RundeckApiTokenException
 CONSTRUCTOR: RundeckApiException.RundeckApiTokenException
 
 
+=== org/rundeck/api/OptionsBuilder.html ===
+        Builder for job options
+CONSTRUCTOR: OptionsBuilder
+        Build a new instance. Use
+        {@link ... addOption(Object, Object)}
+        to add some options, and then
+        {@link ... toProperties()}
+        when you're done !
+METHOD: addOption
+        Add an option
+METHOD: toProperties
+
+
+=== org/rundeck/api/NodeFiltersBuilder.html ===
+        Builder for node filters
+CONSTRUCTOR: NodeFiltersBuilder
+        Build a new instance. At the end, use
+        {@link ... toProperties()}
+        .
+METHOD: excludeHostname
+        Exclude nodes matching the given hostname
+METHOD: excludeName
+        Exclude nodes matching the given name
+METHOD: excludeOsArch
+        Exclude nodes matching the given OS-arch
+METHOD: excludeOsFamily
+        Exclude nodes matching the given OS-family
+METHOD: excludeOsName
+        Exclude nodes matching the given OS-name
+METHOD: excludeOsVersion
+        Exclude nodes matching the given OS-version
+METHOD: excludePrecedence
+        Whether exclusion filters take precedence (default to yes).
+METHOD: excludeTags
+        Exclude nodes matching the given tags
+METHOD: excludeType
+        Exclude nodes matching the given type
+METHOD: hostname
+        Include nodes matching the given hostname
+METHOD: name
+        Include nodes matching the given name
+METHOD: osArch
+        Include nodes matching the given OS-arch
+METHOD: osFamily
+        Include nodes matching the given OS-family
+METHOD: osName
+        Include nodes matching the given OS-name
+METHOD: osVersion
+        Include nodes matching the given OS-version
+METHOD: tags
+        Include nodes matching the given tags
+METHOD: toProperties
+METHOD: type
+        Include nodes matching the given type
+
+
 === org/rundeck/api/FileType.html ===
         All supported types of files.
 ENUM: XML
@@ -707,12 +452,388 @@ METHOD: valueOf
 METHOD: values
 
 
-=== org/rundeck/api/parser/AbortParser.html ===
-        Parser for a single
-        {@link ... RundeckAbort}
-CONSTRUCTOR: AbortParser
-CONSTRUCTOR: AbortParser
-METHOD: parseXmlNode
+=== org/rundeck/api/domain/RundeckSystemInfo.html ===
+        Represents the RunDeck system info
+CONSTRUCTOR: RundeckSystemInfo
+METHOD: equals
+METHOD: getActiveThreads
+METHOD: getBaseDir
+METHOD: getBuild
+METHOD: getCpuLoadAverage
+METHOD: getDate
+METHOD: getFreeMemoryInBytes
+METHOD: getJvmName
+METHOD: getJvmVendor
+METHOD: getJvmVersion
+METHOD: getMaxMemoryInBytes
+METHOD: getNode
+METHOD: getOsArch
+METHOD: getOsName
+METHOD: getOsVersion
+METHOD: getRunningJobs
+METHOD: getStartDate
+METHOD: getTotalMemoryInBytes
+METHOD: getUptime
+METHOD: getUptimeInMillis
+METHOD: getVersion
+METHOD: hashCode
+METHOD: setActiveThreads
+METHOD: setBaseDir
+METHOD: setBuild
+METHOD: setCpuLoadAverage
+METHOD: setDate
+METHOD: setFreeMemoryInBytes
+METHOD: setJvmName
+METHOD: setJvmVendor
+METHOD: setJvmVersion
+METHOD: setMaxMemoryInBytes
+METHOD: setNode
+METHOD: setOsArch
+METHOD: setOsName
+METHOD: setOsVersion
+METHOD: setRunningJobs
+METHOD: setStartDate
+METHOD: setTotalMemoryInBytes
+METHOD: setUptimeInMillis
+METHOD: setVersion
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckProject.html ===
+        Represents a RunDeck project
+CONSTRUCTOR: RundeckProject
+METHOD: equals
+METHOD: getDescription
+METHOD: getName
+METHOD: getResourceModelProviderUrl
+METHOD: hashCode
+METHOD: setDescription
+METHOD: setName
+METHOD: setResourceModelProviderUrl
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckOutputEntry.html ===
+        Represents a RunDeck output entry
+CONSTRUCTOR: RundeckOutputEntry
+METHOD: equals
+METHOD: getCommand
+METHOD: getLevel
+METHOD: getMessage
+METHOD: getNode
+METHOD: getTime
+METHOD: getUser
+METHOD: hashCode
+METHOD: setCommand
+METHOD: setLevel
+METHOD: setMessage
+METHOD: setNode
+METHOD: setTime
+METHOD: setUser
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html ===
+ENUM: CONFIG
+ENUM: FINEST
+ENUM: INFO
+ENUM: SEVERE
+ENUM: WARNING
+METHOD: valueOf
+METHOD: values
+
+
+=== org/rundeck/api/domain/RundeckOutput.html ===
+        Represents a RunDeck output
+CONSTRUCTOR: RundeckOutput
+METHOD: addLogEntry
+METHOD: equals
+METHOD: getExecDuration
+METHOD: getExecutionId
+METHOD: getLastModified
+METHOD: getLogEntries
+METHOD: getOffset
+METHOD: getPercentLoaded
+METHOD: getStatus
+METHOD: getTotalSize
+METHOD: hashCode
+METHOD: isCompleted
+METHOD: isEmpty
+METHOD: isExecCompleted
+METHOD: isHasFailedNodes
+METHOD: isUnmodified
+METHOD: setCompleted
+METHOD: setEmpty
+METHOD: setExecCompleted
+METHOD: setExecDuration
+METHOD: setExecutionId
+METHOD: setHasFailedNodes
+METHOD: setLastModified
+METHOD: setLogEntries
+METHOD: setOffset
+METHOD: setPercentLoaded
+METHOD: setStatus
+METHOD: setTotalSize
+METHOD: setUnmodified
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckNode.html ===
+        Represents a RunDeck node (server on which RunDeck can execute jobs and commands)
+CONSTRUCTOR: RundeckNode
+METHOD: equals
+METHOD: getDescription
+METHOD: getEditUrl
+METHOD: getHostname
+METHOD: getName
+METHOD: getOsArch
+METHOD: getOsFamily
+METHOD: getOsName
+METHOD: getOsVersion
+METHOD: getRemoteUrl
+METHOD: getTags
+METHOD: getType
+METHOD: getUsername
+METHOD: hashCode
+METHOD: setDescription
+METHOD: setEditUrl
+METHOD: setHostname
+METHOD: setName
+METHOD: setOsArch
+METHOD: setOsFamily
+METHOD: setOsName
+METHOD: setOsVersion
+METHOD: setRemoteUrl
+METHOD: setTags
+METHOD: setType
+METHOD: setUsername
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckJobsImportResult.html ===
+        Result of importing some jobs into RunDeck
+CONSTRUCTOR: RundeckJobsImportResult
+METHOD: addFailedJob
+METHOD: addSkippedJob
+METHOD: addSucceededJob
+METHOD: equals
+METHOD: getFailedJobs
+METHOD: getSkippedJobs
+METHOD: getSucceededJobs
+METHOD: hashCode
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckJobsImportMethod.html ===
+        The behavior when importing jobs (which may already exist).
+ENUM: CREATE
+ENUM: SKIP
+ENUM: UPDATE
+METHOD: valueOf
+METHOD: values
+
+
+=== org/rundeck/api/domain/RundeckJobDeleteBulk.html ===
+        RundeckJobDeleteBulk represents the result of a bulk job delete request and contains
+         a list of
+        {@link ... RundeckJobDelete}
+        objects.
+CONSTRUCTOR: RundeckJobDeleteBulk
+METHOD: getRequestCount
+        The number of job delete requests processed.
+METHOD: getResults
+METHOD: isAllsuccessful
+        True if all job delete requests were successful
+METHOD: iterator
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckJobDelete.html ===
+        RundeckJobDelete represents a result of a job delete request.
+CONSTRUCTOR: RundeckJobDelete
+METHOD: equals
+METHOD: getError
+        Error message if the job could not be deleted
+METHOD: getErrorCode
+        Error code string if there was a failure
+METHOD: getId
+        Job ID
+METHOD: getMessage
+        Success message if it was successful
+METHOD: hashCode
+METHOD: isSuccessful
+        True if the job was successfully deleted
+METHOD: setError
+METHOD: setErrorCode
+METHOD: setId
+METHOD: setMessage
+METHOD: setSuccessful
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckJob.html ===
+        Represents a RunDeck job
+CONSTRUCTOR: RundeckJob
+METHOD: equals
+METHOD: getAverageDuration
+METHOD: getDescription
+METHOD: getFullName
+METHOD: getGroup
+METHOD: getId
+METHOD: getName
+METHOD: getProject
+METHOD: hashCode
+METHOD: setAverageDuration
+METHOD: setDescription
+METHOD: setGroup
+METHOD: setId
+METHOD: setName
+METHOD: setProject
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckHistory.html ===
+        Represents a portion of the RunDeck (events) history
+CONSTRUCTOR: RundeckHistory
+METHOD: addEvent
+METHOD: equals
+METHOD: getCount
+METHOD: getEvents
+METHOD: getMax
+METHOD: getOffset
+METHOD: getTotal
+METHOD: hashCode
+METHOD: setCount
+METHOD: setEvents
+METHOD: setMax
+METHOD: setOffset
+METHOD: setTotal
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckExecution.html ===
+        Represents a RunDeck execution, usually triggered by an API call. An execution could be a
+        {@link ... RundeckJob}
+        execution or an "ad-hoc" execution.
+CONSTRUCTOR: RundeckExecution
+METHOD: equals
+METHOD: getAbortedBy
+METHOD: getArgstring
+        the argument string for the execution
+METHOD: getDescription
+METHOD: getDuration
+METHOD: getDurationInMillis
+METHOD: getDurationInSeconds
+METHOD: getEndedAt
+METHOD: getId
+METHOD: getJob
+METHOD: getShortDuration
+METHOD: getStartedAt
+METHOD: getStartedBy
+METHOD: getStatus
+METHOD: getUrl
+METHOD: hashCode
+METHOD: setAbortedBy
+METHOD: setArgstring
+METHOD: setDescription
+METHOD: setEndedAt
+METHOD: setId
+METHOD: setJob
+METHOD: setStartedAt
+METHOD: setStartedBy
+METHOD: setStatus
+METHOD: setUrl
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html ===
+        The status of an execution
+ENUM: ABORTED
+ENUM: FAILED
+ENUM: RUNNING
+ENUM: SUCCEEDED
+METHOD: valueOf
+METHOD: values
+
+
+=== org/rundeck/api/domain/RundeckEvent.html ===
+        Represents a RunDeck event
+CONSTRUCTOR: RundeckEvent
+METHOD: equals
+METHOD: getAbortedBy
+METHOD: getDuration
+METHOD: getDurationInMillis
+METHOD: getDurationInSeconds
+METHOD: getEndedAt
+METHOD: getExecutionId
+METHOD: getJobId
+METHOD: getNodeSummary
+METHOD: getProject
+METHOD: getShortDuration
+METHOD: getStartedAt
+METHOD: getStatus
+METHOD: getSummary
+METHOD: getTitle
+METHOD: getUser
+METHOD: hashCode
+METHOD: isAdhoc
+METHOD: setAbortedBy
+METHOD: setEndedAt
+METHOD: setExecutionId
+METHOD: setJobId
+METHOD: setNodeSummary
+METHOD: setProject
+METHOD: setStartedAt
+METHOD: setStatus
+METHOD: setSummary
+METHOD: setTitle
+METHOD: setUser
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckEvent.NodeSummary.html ===
+        Summary for nodes
+CONSTRUCTOR: RundeckEvent.NodeSummary
+METHOD: equals
+METHOD: getFailed
+METHOD: getSucceeded
+METHOD: getTotal
+METHOD: hashCode
+METHOD: setFailed
+METHOD: setSucceeded
+METHOD: setTotal
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckEvent.EventStatus.html ===
+        The status of an event
+ENUM: ABORTED
+ENUM: FAILED
+ENUM: SUCCEEDED
+METHOD: valueOf
+METHOD: values
+
+
+=== org/rundeck/api/domain/RundeckAbort.html ===
+        Represents an abort of a
+        {@link ... RundeckExecution}
+CONSTRUCTOR: RundeckAbort
+METHOD: equals
+METHOD: getExecution
+METHOD: getStatus
+METHOD: hashCode
+METHOD: setExecution
+METHOD: setStatus
+METHOD: toString
+
+
+=== org/rundeck/api/domain/RundeckAbort.AbortStatus.html ===
+        The status of an abort
+ENUM: ABORTED
+ENUM: FAILED
+ENUM: PENDING
+METHOD: valueOf
+METHOD: values
 
 
 === org/rundeck/api/parser/XmlNodeParser.html ===
@@ -724,19 +845,27 @@ METHOD: parseXmlNode
         {@link/Node}
 
 
-=== org/rundeck/api/parser/JobParser.html ===
+=== org/rundeck/api/parser/SystemInfoParser.html ===
         Parser for a single
-        {@link ... RundeckJob}
-CONSTRUCTOR: JobParser
-CONSTRUCTOR: JobParser
+        {@link ... RundeckSystemInfo}
+CONSTRUCTOR: SystemInfoParser
+CONSTRUCTOR: SystemInfoParser
 METHOD: parseXmlNode
 
 
-=== org/rundeck/api/parser/HistoryParser.html ===
+=== org/rundeck/api/parser/StringParser.html ===
         Parser for a single
-        {@link ... RundeckHistory}
-CONSTRUCTOR: HistoryParser
-CONSTRUCTOR: HistoryParser
+        {@link/String}
+CONSTRUCTOR: StringParser
+CONSTRUCTOR: StringParser
+METHOD: parseXmlNode
+
+
+=== org/rundeck/api/parser/ProjectParser.html ===
+        Parser for a single
+        {@link ... RundeckProject}
+CONSTRUCTOR: ProjectParser
+CONSTRUCTOR: ProjectParser
 METHOD: parseXmlNode
 
 
@@ -750,35 +879,22 @@ METHOD: loadDocument
         {@link/InputStream}
 
 
-=== org/rundeck/api/parser/StringParser.html ===
-        Parser for a single
-        {@link/String}
-CONSTRUCTOR: StringParser
-CONSTRUCTOR: StringParser
+=== org/rundeck/api/parser/PagedResultParser.html ===
+        PagedResultParser extracts paging data from an xpath node, and includes the List result from a ListParser
+CONSTRUCTOR: PagedResultParser
+        Create a PagedResultParser
 METHOD: parseXmlNode
 
 
-=== org/rundeck/api/parser/EventParser.html ===
-        Parser for a single
-        {@link ... RundeckEvent}
-CONSTRUCTOR: EventParser
-CONSTRUCTOR: EventParser
+=== org/rundeck/api/parser/OutputParser.html ===
+CONSTRUCTOR: OutputParser
+CONSTRUCTOR: OutputParser
 METHOD: parseXmlNode
 
 
-=== org/rundeck/api/parser/JobsImportResultParser.html ===
-        Parser for a single
-        {@link ... RundeckJobsImportResult}
-CONSTRUCTOR: JobsImportResultParser
-CONSTRUCTOR: JobsImportResultParser
-METHOD: parseXmlNode
-
-
-=== org/rundeck/api/parser/SystemInfoParser.html ===
-        Parser for a single
-        {@link ... RundeckSystemInfo}
-CONSTRUCTOR: SystemInfoParser
-CONSTRUCTOR: SystemInfoParser
+=== org/rundeck/api/parser/OutputEntryParser.html ===
+CONSTRUCTOR: OutputEntryParser
+CONSTRUCTOR: OutputEntryParser
 METHOD: parseXmlNode
 
 
@@ -798,6 +914,30 @@ CONSTRUCTOR: ListParser
 METHOD: parseXmlNode
 
 
+=== org/rundeck/api/parser/JobsImportResultParser.html ===
+        Parser for a single
+        {@link ... RundeckJobsImportResult}
+CONSTRUCTOR: JobsImportResultParser
+CONSTRUCTOR: JobsImportResultParser
+METHOD: parseXmlNode
+
+
+=== org/rundeck/api/parser/JobParser.html ===
+        Parser for a single
+        {@link ... RundeckJob}
+CONSTRUCTOR: JobParser
+CONSTRUCTOR: JobParser
+METHOD: parseXmlNode
+
+
+=== org/rundeck/api/parser/HistoryParser.html ===
+        Parser for a single
+        {@link ... RundeckHistory}
+CONSTRUCTOR: HistoryParser
+CONSTRUCTOR: HistoryParser
+METHOD: parseXmlNode
+
+
 === org/rundeck/api/parser/ExecutionParser.html ===
         Parser for a single
         {@link ... RundeckExecution}
@@ -806,14 +946,120 @@ CONSTRUCTOR: ExecutionParser
 METHOD: parseXmlNode
 
 
-=== org/rundeck/api/parser/ProjectParser.html ===
+=== org/rundeck/api/parser/EventParser.html ===
         Parser for a single
-        {@link ... RundeckProject}
-CONSTRUCTOR: ProjectParser
-CONSTRUCTOR: ProjectParser
+        {@link ... RundeckEvent}
+CONSTRUCTOR: EventParser
+CONSTRUCTOR: EventParser
 METHOD: parseXmlNode
 
 
+=== org/rundeck/api/parser/DeleteParser.html ===
+        DeleteParser is ...
+CONSTRUCTOR: DeleteParser
+CONSTRUCTOR: DeleteParser
+METHOD: parseXmlNode
+
+
+=== org/rundeck/api/parser/BulkDeleteParser.html ===
+        BulkDeleteParser is ...
+CONSTRUCTOR: BulkDeleteParser
+CONSTRUCTOR: BulkDeleteParser
+METHOD: parseXmlNode
+
+
+=== org/rundeck/api/parser/AbortParser.html ===
+        Parser for a single
+        {@link ... RundeckAbort}
+CONSTRUCTOR: AbortParser
+CONSTRUCTOR: AbortParser
+METHOD: parseXmlNode
+
+
+=== org/rundeck/api/query/ExecutionQuery.html ===
+        ExecutionQuery contains the query parameters for the /executions api, create one with the
+        {@link ... ExecutionQuery.Builder}
+        class, e.g.
+         using the
+        {@link ... builder()}
+        method.
+METHOD: builder
+        Create a Builder for an ExecutionQuery
+METHOD: getAbortedby
+METHOD: getAdhoc
+METHOD: getBegin
+METHOD: getDescription
+METHOD: getEnd
+METHOD: getExcludeGroupPath
+METHOD: getExcludeGroupPathExact
+METHOD: getExcludeJob
+METHOD: getExcludeJobExact
+METHOD: getExcludeJobIdList
+METHOD: getExcludeJobList
+METHOD: getGroupPath
+METHOD: getGroupPathExact
+METHOD: getJob
+METHOD: getJobExact
+METHOD: getJobIdList
+METHOD: getJobList
+METHOD: getProject
+METHOD: getRecent
+METHOD: getStatus
+METHOD: getUser
+METHOD: notBlank
+        Return true if some parameter is set
+
+
+=== org/rundeck/api/query/ExecutionQuery.Builder.html ===
+        Builder for ExecutionQueries
+CONSTRUCTOR: ExecutionQuery.Builder
+METHOD: abortedby
+        Username
+METHOD: adhoc
+        True to query only adhoc executions, false to query only Job executions, null for both
+METHOD: begin
+        Start date/time for execution completion time
+METHOD: build
+        Build the query
+METHOD: description
+        Job description match
+METHOD: end
+        End date/time for execution completion time
+METHOD: excludeGroupPath
+        Group path or super path, which will exclude any jobs within the subtree.
+METHOD: excludeGroupPathExact
+        Exact group path to exclude
+METHOD: excludeJob
+        Job name filter to exclude, which can match any part of the name
+METHOD: excludeJobExact
+        Job exact name filter to exclude, much match exactly
+METHOD: excludeJobIdList
+        List of job IDs to exclude from query
+METHOD: excludeJobList
+        List of job "group/name" to exclude from query
+METHOD: groupPath
+        Group path or super path, which will include any jobs within the subtree.
+METHOD: groupPathExact
+        Exact group path to include
+METHOD: job
+        Job name filter, which can match any part of the name
+METHOD: jobExact
+        Job exact name filter, much match exactly
+METHOD: jobIdList
+        List of job IDs to query
+METHOD: jobList
+        List of job "group/name" to query
+METHOD: project
+        Project name
+METHOD: recent
+        Recent time filter, in the for "XY", where X is a number, and Y
+         is one of: "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year)
+METHOD: status
+        Execution status to query
+METHOD: user
+        Name of username that started the execution
+
+
 === org/rundeck/api/util/ParametersUtil.html ===
         Utility class for API parameters that should be passed in URLs.
 CONSTRUCTOR: ParametersUtil
@@ -827,6 +1073,20 @@ METHOD: urlEncode
         URL-encode the given string
 
 
+=== org/rundeck/api/util/PagedResults.html ===
+        PagedResults contains a List of a certain type, and paging information.
+METHOD: getCount
+        Number of items available in page
+METHOD: getMax
+        Max number of items returned in page
+METHOD: getOffset
+        Offset into all items
+METHOD: getResults
+        Results list
+METHOD: getTotal
+        Total items to be paged
+
+
 === org/rundeck/api/util/AssertUtil.html ===
         Utility class for assertions
 CONSTRUCTOR: AssertUtil
diff --git a/apidocs/reference/classes.html b/apidocs/reference/classes.html
index 842ba14..14b5d94 100644
--- a/apidocs/reference/classes.html
+++ b/apidocs/reference/classes.html
@@ -148,6 +148,8 @@
     
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -197,6 +199,8 @@
    A + B + D E F H @@ -231,6 +235,32 @@ +

    B

    + + + + + + + + + +
    BulkDeleteParserBulkDeleteParser is ... 
    + + +

    D

    + + + + + + + + + +
    DeleteParserDeleteParser is ... 
    + +

    E

    @@ -247,6 +277,19 @@ + + + + + + + + + + + +
    ExecutionQueryExecutionQuery contains the query parameters for the /executions api, create one with the ExecutionQuery.Builder class, e.g. 
    ExecutionQuery.BuilderBuilder for ExecutionQueries + 
    @@ -337,6 +380,18 @@ + + OutputEntryParser +   + + + + + OutputParser +   + + + @@ -344,6 +399,18 @@ + + + + + + + + + + + + @@ -459,6 +526,19 @@ + + + + + + + + + + + + @@ -478,12 +558,34 @@ + + + + + + + + + + + + + + + + + + - + diff --git a/apidocs/reference/current.xml b/apidocs/reference/current.xml index b1a84b3..a8689bc 100644 --- a/apidocs/reference/current.xml +++ b/apidocs/reference/current.xml @@ -488,6 +488,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1166,6 +1288,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -399,6 +401,42 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -474,6 +473,25 @@ Summary: + + + + + +
    PagedResultParser<T>PagedResultParser extracts paging data from an xpath node, and includes the List result from a ListParser 
    PagedResults<T>PagedResults contains a List of a certain type, and paging information. 
    ParametersUtil Utility class for API parameters that should be passed in URLs. 
    RundeckJobDeleteRundeckJobDelete represents a result of a job delete request. 
    RundeckJobDeleteBulkRundeckJobDeleteBulk represents the result of a bulk job delete request and contains + a list of RundeckJobDelete objects. 
    RundeckJobsImportMethod The behavior when importing jobs (which may already exist). 
    RundeckOutputRepresents a RunDeck output + + 
    RundeckOutputEntryRepresents a RunDeck output entry + + 
    RundeckOutputEntry.RundeckLogLevel 
    RundeckProject Represents a RunDeck project 
    RundeckSystemInfo Represents the RunDeck system info 
    + + RundeckJobDelete + + + +   +
    + + RundeckJobDeleteBulk + + + + + Iterable +    + +   +
    @@ -439,6 +477,46 @@ +
    + + RundeckOutput + + + + + Serializable +    + +   +
    + + RundeckOutputEntry + + + + + Serializable +    + +   +
    @@ -499,6 +577,46 @@ +
    + + BulkDeleteParser + + + + + XmlNodeParser +    + +   +
    + + DeleteParser + + + + + XmlNodeParser +    + +   +
    @@ -639,6 +757,66 @@ +
    + + OutputEntryParser + + + + + XmlNodeParser +    + +   +
    + + OutputParser + + + + + XmlNodeParser +    + +   +
    + + PagedResultParser + + + + + XmlNodeParser +    + +   +
    @@ -715,6 +893,38 @@ +
    + + ExecutionQuery + + + +   +
    + + ExecutionQuery.Builder + + + +   +
    diff --git a/apidocs/reference/lists.js b/apidocs/reference/lists.js index 8f25957..e798ae4 100644 --- a/apidocs/reference/lists.js +++ b/apidocs/reference/lists.js @@ -18,27 +18,41 @@ var DATA = [ { id:16, label:"org.rundeck.api.domain.RundeckExecution.ExecutionStatus", link:"org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html", type:"class" }, { id:17, label:"org.rundeck.api.domain.RundeckHistory", link:"org/rundeck/api/domain/RundeckHistory.html", type:"class" }, { id:18, label:"org.rundeck.api.domain.RundeckJob", link:"org/rundeck/api/domain/RundeckJob.html", type:"class" }, - { id:19, label:"org.rundeck.api.domain.RundeckJobsImportMethod", link:"org/rundeck/api/domain/RundeckJobsImportMethod.html", type:"class" }, - { id:20, label:"org.rundeck.api.domain.RundeckJobsImportResult", link:"org/rundeck/api/domain/RundeckJobsImportResult.html", type:"class" }, - { id:21, label:"org.rundeck.api.domain.RundeckNode", link:"org/rundeck/api/domain/RundeckNode.html", type:"class" }, - { id:22, label:"org.rundeck.api.domain.RundeckProject", link:"org/rundeck/api/domain/RundeckProject.html", type:"class" }, - { id:23, label:"org.rundeck.api.domain.RundeckSystemInfo", link:"org/rundeck/api/domain/RundeckSystemInfo.html", type:"class" }, - { id:24, label:"org.rundeck.api.parser", link:"org/rundeck/api/parser/package-summary.html", type:"package" }, - { id:25, label:"org.rundeck.api.parser.AbortParser", link:"org/rundeck/api/parser/AbortParser.html", type:"class" }, - { id:26, label:"org.rundeck.api.parser.EventParser", link:"org/rundeck/api/parser/EventParser.html", type:"class" }, - { id:27, label:"org.rundeck.api.parser.ExecutionParser", link:"org/rundeck/api/parser/ExecutionParser.html", type:"class" }, - { id:28, label:"org.rundeck.api.parser.HistoryParser", link:"org/rundeck/api/parser/HistoryParser.html", type:"class" }, - { id:29, label:"org.rundeck.api.parser.JobParser", link:"org/rundeck/api/parser/JobParser.html", type:"class" }, - { id:30, label:"org.rundeck.api.parser.JobsImportResultParser", link:"org/rundeck/api/parser/JobsImportResultParser.html", type:"class" }, - { id:31, label:"org.rundeck.api.parser.ListParser", link:"org/rundeck/api/parser/ListParser.html", type:"class" }, - { id:32, label:"org.rundeck.api.parser.NodeParser", link:"org/rundeck/api/parser/NodeParser.html", type:"class" }, - { id:33, label:"org.rundeck.api.parser.ParserHelper", link:"org/rundeck/api/parser/ParserHelper.html", type:"class" }, - { id:34, label:"org.rundeck.api.parser.ProjectParser", link:"org/rundeck/api/parser/ProjectParser.html", type:"class" }, - { id:35, label:"org.rundeck.api.parser.StringParser", link:"org/rundeck/api/parser/StringParser.html", type:"class" }, - { id:36, label:"org.rundeck.api.parser.SystemInfoParser", link:"org/rundeck/api/parser/SystemInfoParser.html", type:"class" }, - { id:37, label:"org.rundeck.api.parser.XmlNodeParser", link:"org/rundeck/api/parser/XmlNodeParser.html", type:"class" }, - { id:38, label:"org.rundeck.api.util", link:"org/rundeck/api/util/package-summary.html", type:"package" }, - { id:39, label:"org.rundeck.api.util.AssertUtil", link:"org/rundeck/api/util/AssertUtil.html", type:"class" }, - { id:40, label:"org.rundeck.api.util.ParametersUtil", link:"org/rundeck/api/util/ParametersUtil.html", type:"class" } + { id:19, label:"org.rundeck.api.domain.RundeckJobDelete", link:"org/rundeck/api/domain/RundeckJobDelete.html", type:"class" }, + { id:20, label:"org.rundeck.api.domain.RundeckJobDeleteBulk", link:"org/rundeck/api/domain/RundeckJobDeleteBulk.html", type:"class" }, + { id:21, label:"org.rundeck.api.domain.RundeckJobsImportMethod", link:"org/rundeck/api/domain/RundeckJobsImportMethod.html", type:"class" }, + { id:22, label:"org.rundeck.api.domain.RundeckJobsImportResult", link:"org/rundeck/api/domain/RundeckJobsImportResult.html", type:"class" }, + { id:23, label:"org.rundeck.api.domain.RundeckNode", link:"org/rundeck/api/domain/RundeckNode.html", type:"class" }, + { id:24, label:"org.rundeck.api.domain.RundeckOutput", link:"org/rundeck/api/domain/RundeckOutput.html", type:"class" }, + { id:25, label:"org.rundeck.api.domain.RundeckOutputEntry", link:"org/rundeck/api/domain/RundeckOutputEntry.html", type:"class" }, + { id:26, label:"org.rundeck.api.domain.RundeckOutputEntry.RundeckLogLevel", link:"org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html", type:"class" }, + { id:27, label:"org.rundeck.api.domain.RundeckProject", link:"org/rundeck/api/domain/RundeckProject.html", type:"class" }, + { id:28, label:"org.rundeck.api.domain.RundeckSystemInfo", link:"org/rundeck/api/domain/RundeckSystemInfo.html", type:"class" }, + { id:29, label:"org.rundeck.api.parser", link:"org/rundeck/api/parser/package-summary.html", type:"package" }, + { id:30, label:"org.rundeck.api.parser.AbortParser", link:"org/rundeck/api/parser/AbortParser.html", type:"class" }, + { id:31, label:"org.rundeck.api.parser.BulkDeleteParser", link:"org/rundeck/api/parser/BulkDeleteParser.html", type:"class" }, + { id:32, label:"org.rundeck.api.parser.DeleteParser", link:"org/rundeck/api/parser/DeleteParser.html", type:"class" }, + { id:33, label:"org.rundeck.api.parser.EventParser", link:"org/rundeck/api/parser/EventParser.html", type:"class" }, + { id:34, label:"org.rundeck.api.parser.ExecutionParser", link:"org/rundeck/api/parser/ExecutionParser.html", type:"class" }, + { id:35, label:"org.rundeck.api.parser.HistoryParser", link:"org/rundeck/api/parser/HistoryParser.html", type:"class" }, + { id:36, label:"org.rundeck.api.parser.JobParser", link:"org/rundeck/api/parser/JobParser.html", type:"class" }, + { id:37, label:"org.rundeck.api.parser.JobsImportResultParser", link:"org/rundeck/api/parser/JobsImportResultParser.html", type:"class" }, + { id:38, label:"org.rundeck.api.parser.ListParser", link:"org/rundeck/api/parser/ListParser.html", type:"class" }, + { id:39, label:"org.rundeck.api.parser.NodeParser", link:"org/rundeck/api/parser/NodeParser.html", type:"class" }, + { id:40, label:"org.rundeck.api.parser.OutputEntryParser", link:"org/rundeck/api/parser/OutputEntryParser.html", type:"class" }, + { id:41, label:"org.rundeck.api.parser.OutputParser", link:"org/rundeck/api/parser/OutputParser.html", type:"class" }, + { id:42, label:"org.rundeck.api.parser.PagedResultParser", link:"org/rundeck/api/parser/PagedResultParser.html", type:"class" }, + { id:43, label:"org.rundeck.api.parser.ParserHelper", link:"org/rundeck/api/parser/ParserHelper.html", type:"class" }, + { id:44, label:"org.rundeck.api.parser.ProjectParser", link:"org/rundeck/api/parser/ProjectParser.html", type:"class" }, + { id:45, label:"org.rundeck.api.parser.StringParser", link:"org/rundeck/api/parser/StringParser.html", type:"class" }, + { id:46, label:"org.rundeck.api.parser.SystemInfoParser", link:"org/rundeck/api/parser/SystemInfoParser.html", type:"class" }, + { id:47, label:"org.rundeck.api.parser.XmlNodeParser", link:"org/rundeck/api/parser/XmlNodeParser.html", type:"class" }, + { id:48, label:"org.rundeck.api.query", link:"org/rundeck/api/query/package-summary.html", type:"package" }, + { id:49, label:"org.rundeck.api.query.ExecutionQuery", link:"org/rundeck/api/query/ExecutionQuery.html", type:"class" }, + { id:50, label:"org.rundeck.api.query.ExecutionQuery.Builder", link:"org/rundeck/api/query/ExecutionQuery.Builder.html", type:"class" }, + { id:51, label:"org.rundeck.api.util", link:"org/rundeck/api/util/package-summary.html", type:"package" }, + { id:52, label:"org.rundeck.api.util.AssertUtil", link:"org/rundeck/api/util/AssertUtil.html", type:"class" }, + { id:53, label:"org.rundeck.api.util.PagedResults", link:"org/rundeck/api/util/PagedResults.html", type:"class" }, + { id:54, label:"org.rundeck.api.util.ParametersUtil", link:"org/rundeck/api/util/ParametersUtil.html", type:"class" } ]; diff --git a/apidocs/reference/org/rundeck/api/FileType.html b/apidocs/reference/org/rundeck/api/FileType.html index d1ca21a..4286198 100644 --- a/apidocs/reference/org/rundeck/api/FileType.html +++ b/apidocs/reference/org/rundeck/api/FileType.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html b/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html index b1c5681..0c8c54e 100644 --- a/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html +++ b/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/OptionsBuilder.html b/apidocs/reference/org/rundeck/api/OptionsBuilder.html index d3ac568..ca344cc 100644 --- a/apidocs/reference/org/rundeck/api/OptionsBuilder.html +++ b/apidocs/reference/org/rundeck/api/OptionsBuilder.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html index 5150212..e1a21b7 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html index 204c06d..0db94ef 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html index a363a93..9b52e34 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.html index e5bc9b2..1e3026f 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/RundeckClient.html b/apidocs/reference/org/rundeck/api/RundeckClient.html index 443e90f..e05ace2 100644 --- a/apidocs/reference/org/rundeck/api/RundeckClient.html +++ b/apidocs/reference/org/rundeck/api/RundeckClient.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -341,7 +343,7 @@ Summary:
    Usage :
    -
    + 
      // using login-based authentication :
      RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin");
      // or for a token-based authentication :
    @@ -449,9 +451,6 @@ Summary:
             
    RundeckClient(String url, String token) -
    Instantiate a new RundeckClient for the RunDeck instance at the given url, using token-based - authentication.
    -
    + + + + + + + + RundeckClient(String url, String token, String sessionID, boolean useToken) + +
    Instantiate a new RundeckClient for the RunDeck instance at the given url, + using token-based or session-based authentication.
    + +
    @@ -531,6 +549,24 @@ Summary: + RundeckJobDeleteBulk + + + deleteJobs(List<String> jobIds) + +
    Delete multiple jobs, identified by the given IDs
    + + + + + + + + + + + + boolean @@ -540,7 +576,7 @@ Summary: - + @@ -558,7 +594,7 @@ Summary: - + @@ -576,7 +612,7 @@ Summary: - + @@ -594,7 +630,7 @@ Summary: - + @@ -612,7 +648,7 @@ Summary: - + @@ -630,7 +666,7 @@ Summary: - + @@ -649,7 +685,7 @@ Summary: - + @@ -667,7 +703,7 @@ Summary: - + @@ -686,7 +722,7 @@ Summary: - + @@ -704,7 +740,7 @@ Summary: - + @@ -723,7 +759,7 @@ Summary: - + @@ -741,7 +777,7 @@ Summary: - + @@ -760,7 +796,7 @@ Summary: - + @@ -778,6 +814,24 @@ Summary: + + + + + + + + InputStream + + + generateToken(String username) + +
    Generate a new token and get the result page (which is the html page of the user's profile)
    + + + + + @@ -803,6 +857,24 @@ Summary: + PagedResults<RundeckExecution> + + + getExecutions(ExecutionQuery query, Long max, Long offset) + +
    Get executions based on query parameters
    + + + + + + + + + + + + RundeckHistory @@ -814,7 +886,7 @@ Summary: - + @@ -832,7 +904,7 @@ Summary: - + @@ -850,7 +922,7 @@ Summary: - + @@ -868,7 +940,7 @@ Summary: - + @@ -886,7 +958,7 @@ Summary: - + @@ -904,7 +976,7 @@ Summary: - + @@ -922,6 +994,24 @@ Summary: + + + + + + + + RundeckHistory + + + getHistory(String project, String user, String recent, List<String> includeJobNames, List<String> excludeJobNames, Date begin, Date end, Long max, Long offset) + +
    Get the (events) history for the given project
    + + + + + @@ -983,6 +1073,42 @@ Summary: + RundeckOutput + + + getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines) + +
    Get the execution output of the given job
    + + + + + + + + + + + + + RundeckOutput + + + getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines) + +
    Get the execution output of the given job
    + + + + + + + + + + + + List<RundeckExecution> @@ -1215,6 +1341,24 @@ Summary: + InputStream + + + getOutput(String executionId) + +
    Get the output of a job execution
    + + + + + + + + + + + + String @@ -1224,6 +1368,24 @@ Summary: + + + + + + + + InputStream + + + getProfilePage(String username) + +
    Get the html page of the user's profile
    + + + + + @@ -1303,6 +1465,22 @@ Summary: + String + + + getSessionID() + + + + + + + + + + + + RundeckSystemInfo @@ -1314,7 +1492,7 @@ Summary: - + @@ -1330,7 +1508,7 @@ Summary: - + @@ -1346,7 +1524,7 @@ Summary: - + @@ -1362,7 +1540,7 @@ Summary: - + @@ -1380,7 +1558,7 @@ Summary: - + @@ -1398,7 +1576,7 @@ Summary: - + @@ -1416,7 +1594,7 @@ Summary: - + @@ -1434,7 +1612,7 @@ Summary: - + @@ -1452,7 +1630,7 @@ Summary: - + @@ -1470,7 +1648,7 @@ Summary: - + @@ -1488,7 +1666,7 @@ Summary: - + @@ -1506,7 +1684,7 @@ Summary: - + @@ -1524,7 +1702,7 @@ Summary: - + @@ -1542,7 +1720,7 @@ Summary: - + @@ -1560,7 +1738,7 @@ Summary: - + @@ -1578,7 +1756,7 @@ Summary: - + @@ -1596,7 +1774,7 @@ Summary: - + @@ -1614,7 +1792,7 @@ Summary: - + @@ -1632,7 +1810,7 @@ Summary: - + @@ -1650,7 +1828,7 @@ Summary: - + @@ -1668,7 +1846,7 @@ Summary: - + @@ -1686,7 +1864,7 @@ Summary: - + @@ -1704,7 +1882,7 @@ Summary: - + @@ -1722,7 +1900,7 @@ Summary: - + @@ -1740,7 +1918,7 @@ Summary: - + @@ -1758,7 +1936,7 @@ Summary: - + @@ -1776,7 +1954,7 @@ Summary: - + @@ -1794,7 +1972,7 @@ Summary: - + @@ -1812,7 +1990,7 @@ Summary: - + @@ -1830,7 +2008,7 @@ Summary: - + @@ -1848,7 +2026,7 @@ Summary: - + @@ -1866,7 +2044,7 @@ Summary: - + @@ -1884,7 +2062,7 @@ Summary: - + @@ -1902,7 +2080,7 @@ Summary: - + @@ -1920,7 +2098,7 @@ Summary: - + @@ -1938,7 +2116,7 @@ Summary: - + @@ -1956,7 +2134,7 @@ Summary: - + @@ -1974,7 +2152,7 @@ Summary: - + @@ -1992,7 +2170,7 @@ Summary: - + @@ -2010,14 +2188,14 @@ Summary: - + - void + String testAuth() @@ -2028,7 +2206,7 @@ Summary: - + @@ -2049,7 +2227,7 @@ Summary: - + @@ -2065,7 +2243,7 @@ Summary: - + @@ -2083,7 +2261,7 @@ Summary: - + @@ -2101,7 +2279,7 @@ Summary: - + @@ -2119,7 +2297,7 @@ Summary: - + @@ -2137,7 +2315,7 @@ Summary: - + @@ -2155,7 +2333,7 @@ Summary: - + @@ -2173,7 +2351,7 @@ Summary: - + @@ -2191,7 +2369,7 @@ Summary: - + @@ -2209,7 +2387,7 @@ Summary: - + @@ -2227,7 +2405,7 @@ Summary: - + @@ -2245,7 +2423,7 @@ Summary: - + @@ -2263,7 +2441,7 @@ Summary: - + @@ -2282,7 +2460,7 @@ Summary: - + @@ -2301,7 +2479,7 @@ Summary: - + @@ -2595,7 +2773,7 @@ From class Constant Value: - "/api/2" + "/api/5"
    @@ -2634,8 +2812,8 @@ From class Constant Value: - 2 - (0x00000002) + 5 + (0x00000005) @@ -2682,28 +2860,13 @@ From class
    -

    Instantiate a new RundeckClient for the RunDeck instance at the given url, using token-based - authentication.

    -
    -
    Parameters
    - - - - - - - -
    url - of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)
    token - to use for authentication on the RunDeck instance
    -
    +

    Throws
    +
    IllegalArgumentException - if the url or token is blank (null, empty or whitespace) -
    @@ -2771,6 +2934,69 @@ From class
    + + +
    +

    + + public + + + + + + + RundeckClient + (String url, String token, String sessionID, boolean useToken) +

    +
    +
    + +
    + + + +
    +
    + +

    Instantiate a new RundeckClient for the RunDeck instance at the given url, + using token-based or session-based authentication. Either token or sessionID must be valid

    +
    +
    Parameters
    + + + + + + + + + + + + + +
    url + of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)
    token + to use for authentication on the RunDeck instance
    sessionID + to use for session authentication on the RunDeck instance
    useToken + should be true if using token, false if using sessionID
    +
    +
    +
    Throws
    + + + + +
    IllegalArgumentException + if the url or token is blank (null, empty or whitespace) +
    +
    + +
    +
    + + @@ -2918,6 +3144,72 @@ From class + + +
    +

    + + public + + + + + RundeckJobDeleteBulk + + deleteJobs + (List<String> jobIds) +

    +
    +
    + +
    + + + +
    +
    + +

    Delete multiple jobs, identified by the given IDs

    +
    +
    Parameters
    + + + + +
    jobIds + List of job IDS
    +
    +
    +
    Returns
    +
    • the bulk delete result
    +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent job with this ID)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the jobId is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -4000,6 +4292,72 @@ From class
    + + +
    +

    + + public + + + + + InputStream + + generateToken + (String username) +

    +
    +
    + +
    + + + +
    +
    + +

    Generate a new token and get the result page (which is the html page of the user's profile)

    +
    +
    Parameters
    + + + + +
    username + - mandatory
    +
    +
    +
    Returns
    +
    • an InputStream instance, not linked to any network resources - won't be null
    +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent name or project with this name)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the name or project is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -4066,6 +4424,80 @@ From class
    + + +
    +

    + + public + + + + + PagedResults<RundeckExecution> + + getExecutions + (ExecutionQuery query, Long max, Long offset) +

    +
    +
    + +
    + + + +
    +
    + +

    Get executions based on query parameters

    +
    +
    Parameters
    + + + + + + + + + + +
    query + query parameters for the request
    max + number of results to return - optional (null for all)
    offset + the 0-indexed offset for the first result to return - optional
    +
    +
    +
    Returns
    + +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent job with this ID)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the jobId is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -4646,6 +5078,106 @@ From class
    + + +
    +

    + + public + + + + + RundeckHistory + + getHistory + (String project, String user, String recent, List<String> includeJobNames, List<String> excludeJobNames, Date begin, Date end, Long max, Long offset) +

    +
    +
    + +
    + + + +
    +
    + +

    Get the (events) history for the given project

    +
    +
    Parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    project + name of the project - mandatory
    user + include only events created by the given user - optional
    recent + include only events matching the given period of time. Format : "XY", where X is an + integer, and Y is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). + Example : "2w" (= last 2 weeks), "5d" (= last 5 days), etc. Optional.
    includeJobNames + list of job names ("group/name") to include results for
    excludeJobNames + list of job names ("group/name") to exclude results for
    begin + date for the earlier events to retrieve - optional
    end + date for the latest events to retrieve - optional
    max + number of results to return - optional (default to 20)
    offset + the 0-indexed offset for the first result to return - optional (default to O)
    +
    +
    +
    Returns
    + +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent project with this name)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the project is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -4880,6 +5412,162 @@ From class
    + + +
    +

    + + public + + + + + RundeckOutput + + getJobExecutionOutput + (Long executionId, int offset, int lastlines, long lastmod, int maxlines) +

    +
    +
    + +
    + + + +
    +
    + +

    Get the execution output of the given job

    +
    +
    Parameters
    + + + + + + + + + + + + + + + + +
    executionId + identifier of the execution - mandatory
    offset + byte offset to read from in the file. 0 indicates the beginning.
    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.
    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
    maxlines + maximum number of lines to retrieve forward from the specified offset.
    +
    +
    +
    Returns
    + +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent job with this ID)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the jobId is blank (null, empty or whitespace) +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + RundeckOutput + + getJobExecutionOutput + (Long executionId, int offset, long lastmod, int maxlines) +

    +
    +
    + +
    + + + +
    +
    + +

    Get the execution output of the given job

    +
    +
    Parameters
    + + + + + + + + + + +
    offset + byte offset to read from in the file. 0 indicates the beginning.
    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
    maxlines + maximum number of lines to retrieve forward from the specified offset.
    +
    +
    +
    Returns
    + +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent job with this ID)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the jobId is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -5493,7 +6181,7 @@ From class

    Returns
    -
    • the login used for authentication on the RunDeck instance (null if using token-based auth) +
      • the login used for authentication on the RunDeck instance (null if using token-based or session-based auth)
    @@ -5764,6 +6452,63 @@ From class
    + + +
    +

    + + public + + + + + InputStream + + getOutput + (String executionId) +

    +
    +
    + +
    + + + +
    +
    + +

    Get the output of a job execution

    +
    +
    Returns
    +
    • an InputStream instance, not linked to any network resources - won't be null
    +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent name or project with this name)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the name or project is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -5792,7 +6537,7 @@ From class

    Returns
    -
    • the password used for authentication on the RunDeck instance (null if using token-based auth) +
      • the password used for authentication on the RunDeck instance (null if using token-based or session-based auth)
    @@ -5800,6 +6545,72 @@ From class
    + + +
    +

    + + public + + + + + InputStream + + getProfilePage + (String username) +

    +
    +
    + +
    + + + +
    +
    + +

    Get the html page of the user's profile

    +
    +
    Parameters
    + + + + +
    username + - mandatory
    +
    +
    +
    Returns
    +
    • an InputStream instance, not linked to any network resources - won't be null
    +
    +
    +
    Throws
    + + + + + + + + + + + + + +
    RundeckApiException + in case of error when calling the API (non-existent name or project with this name)
    RundeckApiException.RundeckApiLoginException + if the login fails (in case of login-based authentication)
    RundeckApiException.RundeckApiTokenException + if the token is invalid (in case of token-based authentication)
    IllegalArgumentException + if the name or project is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -6046,6 +6857,42 @@ From class
    + + +
    +

    + + public + + + + + String + + getSessionID + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Returns
    +
    • the sessionID used for authentication on the RunDeck instance (null if using login-based or token-based auth) +
    +
    + +
    +
    + +
    @@ -6127,7 +6974,7 @@ From class

    Returns
    -
    • the auth-token used for authentication on the RunDeck instance (null if using login-based auth) +
      • the auth-token used for authentication on the RunDeck instance (null if using login-based or session-based auth)
    @@ -9262,7 +10109,7 @@ From class - void + String testAuth () @@ -9278,6 +10125,10 @@ From class

    Test the authentication on the RunDeck instance.

    +
    +
    Returns
    +
    • sessionID if doing username+password login and it succeeded
    +
    Throws
    diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckAbort.AbortStatus.html b/apidocs/reference/org/rundeck/api/domain/RundeckAbort.AbortStatus.html index c7dca82..5b432d6 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckAbort.AbortStatus.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckAbort.AbortStatus.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckAbort.html b/apidocs/reference/org/rundeck/api/domain/RundeckAbort.html index 5683a24..488bdbb 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckAbort.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckAbort.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckEvent.EventStatus.html b/apidocs/reference/org/rundeck/api/domain/RundeckEvent.EventStatus.html index f38d0ee..2db9539 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckEvent.EventStatus.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckEvent.EventStatus.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckEvent.NodeSummary.html b/apidocs/reference/org/rundeck/api/domain/RundeckEvent.NodeSummary.html index 9e89cdc..d07bb02 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckEvent.NodeSummary.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckEvent.NodeSummary.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckEvent.html b/apidocs/reference/org/rundeck/api/domain/RundeckEvent.html index 067a253..63afab9 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckEvent.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckEvent.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html b/apidocs/reference/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html index 563c51b..21d7877 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckExecution.html b/apidocs/reference/org/rundeck/api/domain/RundeckExecution.html index 04db062..2bdbe2b 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckExecution.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckExecution.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • @@ -482,6 +489,25 @@ Summary: + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -294,6 +310,18 @@ + + + + + + + + @@ -331,6 +359,10 @@ + + + +
    + getArgstring() + +
    the argument string for the execution +
    + +
    + + + + + String @@ -491,7 +517,7 @@ Summary: -
    @@ -507,7 +533,7 @@ Summary: -
    @@ -523,7 +549,7 @@ Summary: -
    @@ -539,7 +565,7 @@ Summary: -
    @@ -555,7 +581,7 @@ Summary: -
    @@ -571,7 +597,7 @@ Summary: -
    @@ -587,7 +613,7 @@ Summary: -
    @@ -603,7 +629,7 @@ Summary: -
    @@ -619,7 +645,7 @@ Summary: -
    @@ -635,7 +661,7 @@ Summary: -
    @@ -651,7 +677,7 @@ Summary: -
    @@ -667,7 +693,7 @@ Summary: -
    @@ -683,7 +709,7 @@ Summary: -
    @@ -699,6 +725,22 @@ Summary: +
    + + + + + + void + + setArgstring(String argstring) + +
    @@ -1202,6 +1244,38 @@ From class + + +
    +

    + + public + + + + + String + + getArgstring + () +

    +
    +
    + +
    + + + +
    +
    + +

    the argument string for the execution +

    + +
    +
    + +
    @@ -1670,6 +1744,37 @@ From class
    + + +
    +

    + + public + + + + + void + + setArgstring + (String argstring) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + +
    diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckHistory.html b/apidocs/reference/org/rundeck/api/domain/RundeckHistory.html index 43ee531..af7b328 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckHistory.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckHistory.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckJob.html b/apidocs/reference/org/rundeck/api/domain/RundeckJob.html index 95140ac..c00ccf0 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckJob.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckJob.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • @@ -441,6 +448,22 @@ Summary: + long
    +
    + getAverageDuration() + +
    + + + + + String @@ -450,7 +473,7 @@ Summary: -
    @@ -466,7 +489,7 @@ Summary: -
    @@ -482,7 +505,7 @@ Summary: -
    @@ -498,7 +521,7 @@ Summary: -
    @@ -514,7 +537,7 @@ Summary: -
    @@ -530,7 +553,7 @@ Summary: -
    @@ -546,6 +569,22 @@ Summary: +
    + + + + + + void + + setAverageDuration(long averageDuration) + +
    @@ -970,6 +1009,37 @@ From class + + +
    +

    + + public + + + + + long + + getAverageDuration + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + +
    @@ -1192,6 +1262,37 @@ From class
    + + +
    +

    + + public + + + + + void + + setAverageDuration + (long averageDuration) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + +
    diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckJobDelete.html b/apidocs/reference/org/rundeck/api/domain/RundeckJobDelete.html new file mode 100644 index 0000000..dff734e --- /dev/null +++ b/apidocs/reference/org/rundeck/api/domain/RundeckJobDelete.html @@ -0,0 +1,1369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckJobDelete + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    RundeckJobDelete

    + + + + + extends Object
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.domain.RundeckJobDelete
    + + + + + + + +
    + + +

    Class Overview

    +

    RundeckJobDelete represents a result of a job delete request.

    + + + + + +
    + + + + + + + + + + + + + + + + +
    + + +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + RundeckJobDelete() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + boolean + + equals(Object o) + +
    + + + + + + String + + getError() + +
    Error message if the job could not be deleted +
    + +
    + + + + + + String + + getErrorCode() + +
    Error code string if there was a failure +
    + +
    + + + + + + String + + getId() + +
    Job ID +
    + +
    + + + + + + String + + getMessage() + +
    Success message if it was successful +
    + +
    + + + + + + int + + hashCode() + +
    + + + + + + boolean + + isSuccessful() + +
    True if the job was successfully deleted +
    + +
    + + + + + + void + + setError(String error) + +
    + + + + + + void + + setErrorCode(String errorCode) + +
    + + + + + + void + + setId(String id) + +
    + + + + + + void + + setMessage(String message) + +
    + + + + + + void + + setSuccessful(boolean successful) + +
    + + + + + + String + + toString() + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + RundeckJobDelete + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + +

    Public Methods

    + + + + + +
    +

    + + public + + + + + boolean + + equals + (Object o) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getError + () +

    +
    +
    + +
    + + + +
    +
    + +

    Error message if the job could not be deleted +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getErrorCode + () +

    +
    +
    + +
    + + + +
    +
    + +

    Error code string if there was a failure +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getId + () +

    +
    +
    + +
    + + + +
    +
    + +

    Job ID +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getMessage + () +

    +
    +
    + +
    + + + +
    +
    + +

    Success message if it was successful +

    + +
    +
    + + + + +
    +

    + + public + + + + + int + + hashCode + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + boolean + + isSuccessful + () +

    +
    +
    + +
    + + + +
    +
    + +

    True if the job was successfully deleted +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setError + (String error) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setErrorCode + (String errorCode) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setId + (String id) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setMessage + (String message) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setSuccessful + (boolean successful) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + toString + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckJobDeleteBulk.html b/apidocs/reference/org/rundeck/api/domain/RundeckJobDeleteBulk.html new file mode 100644 index 0000000..44573cc --- /dev/null +++ b/apidocs/reference/org/rundeck/api/domain/RundeckJobDeleteBulk.html @@ -0,0 +1,1035 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckJobDeleteBulk + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    RundeckJobDeleteBulk

    + + + + + extends Object
    + + + + + + + implements + + Iterable<T> + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.domain.RundeckJobDeleteBulk
    + + + + + + + +
    + + +

    Class Overview

    +

    RundeckJobDeleteBulk represents the result of a bulk job delete request and contains + a list of RundeckJobDelete objects.

    + + + + + +
    + + + + + + + + + + + + + + + + +
    + + +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + RundeckJobDeleteBulk(List<RundeckJobDelete> results, int requestCount, boolean allsuccessful) + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + int + + getRequestCount() + +
    The number of job delete requests processed.
    + +
    + + + + + + List<RundeckJobDelete> + + getResults() + +
    + + + + + + boolean + + isAllsuccessful() + +
    True if all job delete requests were successful +
    + +
    + + + + + + Iterator<RundeckJobDelete> + + iterator() + +
    + + + + + + String + + toString() + +
    + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + java.lang.Iterable + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + RundeckJobDeleteBulk + (List<RundeckJobDelete> results, int requestCount, boolean allsuccessful) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + +

    Public Methods

    + + + + + +
    +

    + + public + + + + + int + + getRequestCount + () +

    +
    +
    + +
    + + + +
    +
    + +

    The number of job delete requests processed. +

    + +
    +
    + + + + +
    +

    + + public + + + + + List<RundeckJobDelete> + + getResults + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + boolean + + isAllsuccessful + () +

    +
    +
    + +
    + + + +
    +
    + +

    True if all job delete requests were successful +

    + +
    +
    + + + + +
    +

    + + public + + + + + Iterator<RundeckJobDelete> + + iterator + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + toString + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportMethod.html b/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportMethod.html index c6d1dad..6eeedcb 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportMethod.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportMethod.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportResult.html b/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportResult.html index 2839315..f879e27 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportResult.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckJobsImportResult.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckNode.html b/apidocs/reference/org/rundeck/api/domain/RundeckNode.html index cf4b1a1..e469d54 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckNode.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckNode.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckOutput.html b/apidocs/reference/org/rundeck/api/domain/RundeckOutput.html new file mode 100644 index 0000000..f2f28d1 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/domain/RundeckOutput.html @@ -0,0 +1,2162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckOutput + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    RundeckOutput

    + + + + + extends Object
    + + + + + + + implements + + Serializable + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.domain.RundeckOutput
    + + + + + + + +
    + + +

    Class Overview

    +

    Represents a RunDeck output + +

    + + + + + +
    + + + + + + + + + + + + + + + + +
    + + +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + RundeckOutput() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + addLogEntry(RundeckOutputEntry entry) + +
    + + + + + + boolean + + equals(Object obj) + +
    + + + + + + Long + + getExecDuration() + +
    + + + + + + Long + + getExecutionId() + +
    + + + + + + Long + + getLastModified() + +
    + + + + + + List<RundeckOutputEntry> + + getLogEntries() + +
    + + + + + + int + + getOffset() + +
    + + + + + + Float + + getPercentLoaded() + +
    + + + + + + RundeckExecution.ExecutionStatus + + getStatus() + +
    + + + + + + int + + getTotalSize() + +
    + + + + + + int + + hashCode() + +
    + + + + + + Boolean + + isCompleted() + +
    + + + + + + Boolean + + isEmpty() + +
    + + + + + + Boolean + + isExecCompleted() + +
    + + + + + + Boolean + + isHasFailedNodes() + +
    + + + + + + Boolean + + isUnmodified() + +
    + + + + + + void + + setCompleted(Boolean completed) + +
    + + + + + + void + + setEmpty(Boolean empty) + +
    + + + + + + void + + setExecCompleted(Boolean execCompleted) + +
    + + + + + + void + + setExecDuration(Long execDuration) + +
    + + + + + + void + + setExecutionId(Long executionId) + +
    + + + + + + void + + setHasFailedNodes(Boolean hasFailedNodes) + +
    + + + + + + void + + setLastModified(Long lastModified) + +
    + + + + + + void + + setLogEntries(List<RundeckOutputEntry> logEntries) + +
    + + + + + + void + + setOffset(int offset) + +
    + + + + + + void + + setPercentLoaded(Float percentLoaded) + +
    + + + + + + void + + setStatus(RundeckExecution.ExecutionStatus status) + +
    + + + + + + void + + setTotalSize(int totalSize) + +
    + + + + + + void + + setUnmodified(Boolean unmodified) + +
    + + + + + + String + + toString() + +
    + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + RundeckOutput + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + +

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + addLogEntry + (RundeckOutputEntry entry) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + boolean + + equals + (Object obj) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Long + + getExecDuration + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Long + + getExecutionId + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Long + + getLastModified + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + List<RundeckOutputEntry> + + getLogEntries + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + int + + getOffset + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Float + + getPercentLoaded + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + RundeckExecution.ExecutionStatus + + getStatus + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + int + + getTotalSize + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + int + + hashCode + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Boolean + + isCompleted + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Boolean + + isEmpty + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Boolean + + isExecCompleted + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Boolean + + isHasFailedNodes + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + Boolean + + isUnmodified + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setCompleted + (Boolean completed) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setEmpty + (Boolean empty) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setExecCompleted + (Boolean execCompleted) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setExecDuration + (Long execDuration) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setExecutionId + (Long executionId) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setHasFailedNodes + (Boolean hasFailedNodes) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setLastModified + (Long lastModified) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setLogEntries + (List<RundeckOutputEntry> logEntries) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setOffset + (int offset) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setPercentLoaded + (Float percentLoaded) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setStatus + (RundeckExecution.ExecutionStatus status) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setTotalSize + (int totalSize) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setUnmodified + (Boolean unmodified) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + toString + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html b/apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html new file mode 100644 index 0000000..0d5b09c --- /dev/null +++ b/apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html @@ -0,0 +1,1243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckOutputEntry.RundeckLogLevel + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + static + final + + enum +

    RundeckOutputEntry.RundeckLogLevel

    + + + + + + + + + extends Enum<E extends Enum<E>>
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳java.lang.Enum<E extends java.lang.Enum<E>>
        ↳org.rundeck.api.domain.RundeckOutputEntry.RundeckLogLevel
    + + + + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + +
    + + +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Enum Values
    RundeckOutputEntry.RundeckLogLevel CONFIG  
    RundeckOutputEntry.RundeckLogLevel FINEST  
    RundeckOutputEntry.RundeckLogLevel INFO  
    RundeckOutputEntry.RundeckLogLevel SEVERE  
    RundeckOutputEntry.RundeckLogLevel WARNING  
    + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + static + + RundeckOutputEntry.RundeckLogLevel + + valueOf(String name) + +
    + + + final + static + + RundeckLogLevel[] + + values() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Enum + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + java.lang.Comparable + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + +

    Enum Values

    + + + + + + +
    +

    + + public + static + final + RundeckOutputEntry.RundeckLogLevel + + CONFIG +

    +
    + + + + + + +
    +
    + +

    + + +
    +
    + + + + + +
    +

    + + public + static + final + RundeckOutputEntry.RundeckLogLevel + + FINEST +

    +
    + + + + + + +
    +
    + +

    + + +
    +
    + + + + + +
    +

    + + public + static + final + RundeckOutputEntry.RundeckLogLevel + + INFO +

    +
    + + + + + + +
    +
    + +

    + + +
    +
    + + + + + +
    +

    + + public + static + final + RundeckOutputEntry.RundeckLogLevel + + SEVERE +

    +
    + + + + + + +
    +
    + +

    + + +
    +
    + + + + + +
    +

    + + public + static + final + RundeckOutputEntry.RundeckLogLevel + + WARNING +

    +
    + + + + + + +
    +
    + +

    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +

    Public Methods

    + + + + + +
    +

    + + public + static + + + + RundeckOutputEntry.RundeckLogLevel + + valueOf + (String name) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + static + final + + + RundeckLogLevel[] + + values + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.html b/apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.html new file mode 100644 index 0000000..1bf2602 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/domain/RundeckOutputEntry.html @@ -0,0 +1,1480 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckOutputEntry + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    RundeckOutputEntry

    + + + + + extends Object
    + + + + + + + implements + + Serializable + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.domain.RundeckOutputEntry
    + + + + + + + +
    + + +

    Class Overview

    +

    Represents a RunDeck output entry + +

    + + + + + +
    + + + + + + + + + + + + + + + + +
    + + +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nested Classes
    + + + + + enumRundeckOutputEntry.RundeckLogLevel 
    + + + + + + + + + + +
    Public Constructors
    + + + + + + + + RundeckOutputEntry() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + boolean + + equals(Object obj) + +
    + + + + + + String + + getCommand() + +
    + + + + + + RundeckOutputEntry.RundeckLogLevel + + getLevel() + +
    + + + + + + String + + getMessage() + +
    + + + + + + String + + getNode() + +
    + + + + + + String + + getTime() + +
    + + + + + + String + + getUser() + +
    + + + + + + int + + hashCode() + +
    + + + + + + void + + setCommand(String command) + +
    + + + + + + void + + setLevel(RundeckOutputEntry.RundeckLogLevel level) + +
    + + + + + + void + + setMessage(String message) + +
    + + + + + + void + + setNode(String node) + +
    + + + + + + void + + setTime(String time) + +
    + + + + + + void + + setUser(String user) + +
    + + + + + + String + + toString() + +
    + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + RundeckOutputEntry + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + +

    Public Methods

    + + + + + +
    +

    + + public + + + + + boolean + + equals + (Object obj) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getCommand + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + RundeckOutputEntry.RundeckLogLevel + + getLevel + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getMessage + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getNode + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getTime + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getUser + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + int + + hashCode + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setCommand + (String command) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setLevel + (RundeckOutputEntry.RundeckLogLevel level) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setMessage + (String message) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setNode + (String node) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setTime + (String time) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setUser + (String user) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + toString + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckProject.html b/apidocs/reference/org/rundeck/api/domain/RundeckProject.html index 0d3388c..0b8fab6 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckProject.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckProject.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html b/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html index bcb83bf..7777fe4 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/package-descr.html b/apidocs/reference/org/rundeck/api/domain/package-descr.html index ddc7423..d57b912 100644 --- a/apidocs/reference/org/rundeck/api/domain/package-descr.html +++ b/apidocs/reference/org/rundeck/api/domain/package-descr.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • diff --git a/apidocs/reference/org/rundeck/api/domain/package-summary.html b/apidocs/reference/org/rundeck/api/domain/package-summary.html index bb1fa14..29ca2fa 100644 --- a/apidocs/reference/org/rundeck/api/domain/package-summary.html +++ b/apidocs/reference/org/rundeck/api/domain/package-summary.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,8 +167,12 @@
  • RundeckExecution
  • RundeckHistory
  • RundeckJob
  • +
  • RundeckJobDelete
  • +
  • RundeckJobDeleteBulk
  • RundeckJobsImportResult
  • RundeckNode
  • +
  • RundeckOutput
  • +
  • RundeckOutputEntry
  • RundeckProject
  • RundeckSystemInfo
  • @@ -179,6 +185,7 @@
  • RundeckEvent.EventStatus
  • RundeckExecution.ExecutionStatus
  • RundeckJobsImportMethod
  • +
  • RundeckOutputEntry.RundeckLogLevel
  • @@ -286,6 +293,15 @@
    RundeckJob Represents a RunDeck job 
    RundeckJobDeleteRundeckJobDelete represents a result of a job delete request. 
    RundeckJobDeleteBulkRundeckJobDeleteBulk represents the result of a bulk job delete request and contains + a list of RundeckJobDelete objects. 
    RundeckJobsImportResult Result of importing some jobs into RunDeck RundeckNode Represents a RunDeck node (server on which RunDeck can execute jobs and commands) 
    RundeckOutputRepresents a RunDeck output + + 
    RundeckOutputEntryRepresents a RunDeck output entry + + 
    RundeckProject Represents a RunDeck project RundeckJobsImportMethod The behavior when importing jobs (which may already exist). 
    RundeckOutputEntry.RundeckLogLevel 
    diff --git a/apidocs/reference/org/rundeck/api/package-descr.html b/apidocs/reference/org/rundeck/api/package-descr.html index 843f1ea..f8e0aa4 100644 --- a/apidocs/reference/org/rundeck/api/package-descr.html +++ b/apidocs/reference/org/rundeck/api/package-descr.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/package-summary.html b/apidocs/reference/org/rundeck/api/package-summary.html index a77a459..ab74637 100644 --- a/apidocs/reference/org/rundeck/api/package-summary.html +++ b/apidocs/reference/org/rundeck/api/package-summary.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • diff --git a/apidocs/reference/org/rundeck/api/parser/AbortParser.html b/apidocs/reference/org/rundeck/api/parser/AbortParser.html index 8237954..5a677ca 100644 --- a/apidocs/reference/org/rundeck/api/parser/AbortParser.html +++ b/apidocs/reference/org/rundeck/api/parser/AbortParser.html @@ -149,6 +149,8 @@
  • org.rundeck.api.parser
  • + org.rundeck.api.query
  • +
  • org.rundeck.api.util

  • @@ -165,6 +167,8 @@
  • Classes

    • AbortParser
    • +
    • BulkDeleteParser
    • +
    • DeleteParser
    • EventParser
    • ExecutionParser
    • HistoryParser
    • @@ -172,6 +176,9 @@
    • JobsImportResultParser
    • ListParser<T>
    • NodeParser
    • +
    • OutputEntryParser
    • +
    • OutputParser
    • +
    • PagedResultParser<T>
    • ParserHelper
    • ProjectParser
    • StringParser
    • diff --git a/apidocs/reference/org/rundeck/api/parser/BulkDeleteParser.html b/apidocs/reference/org/rundeck/api/parser/BulkDeleteParser.html new file mode 100644 index 0000000..a50ab5e --- /dev/null +++ b/apidocs/reference/org/rundeck/api/parser/BulkDeleteParser.html @@ -0,0 +1,894 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BulkDeleteParser + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + + + + class +

      BulkDeleteParser

      + + + + + extends Object
      + + + + + + + implements + + XmlNodeParser<T> + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.parser.BulkDeleteParser
      + + + + + + + +
      + + +

      Class Overview

      +

      BulkDeleteParser is ...

      + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Constructors
      + + + + + + + + BulkDeleteParser() + +
      + + + + + + + + BulkDeleteParser(String xpath) + +
      + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + + + RundeckJobDeleteBulk + + parseXmlNode(Node node) + +
      Parse the given XML Node
      + +
      + + + + + + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + +From interface + + org.rundeck.api.parser.XmlNodeParser + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Constructors

      + + + + + +
      +

      + + public + + + + + + + BulkDeleteParser + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + + + BulkDeleteParser + (String xpath) +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + + + + + RundeckJobDeleteBulk + + parseXmlNode + (Node node) +

      +
      +
      + +
      + + + +
      +
      + +

      Parse the given XML Node

      +
      +
      Returns
      +
      • any object holding the converted value +
      +
      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/parser/DeleteParser.html b/apidocs/reference/org/rundeck/api/parser/DeleteParser.html new file mode 100644 index 0000000..719ef5d --- /dev/null +++ b/apidocs/reference/org/rundeck/api/parser/DeleteParser.html @@ -0,0 +1,894 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DeleteParser + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + + + + class +

      DeleteParser

      + + + + + extends Object
      + + + + + + + implements + + XmlNodeParser<T> + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.parser.DeleteParser
      + + + + + + + +
      + + +

      Class Overview

      +

      DeleteParser is ...

      + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Constructors
      + + + + + + + + DeleteParser() + +
      + + + + + + + + DeleteParser(String xpath) + +
      + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + + + RundeckJobDelete + + parseXmlNode(Node node) + +
      Parse the given XML Node
      + +
      + + + + + + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + +From interface + + org.rundeck.api.parser.XmlNodeParser + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Constructors

      + + + + + +
      +

      + + public + + + + + + + DeleteParser + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + + + DeleteParser + (String xpath) +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + + + + + RundeckJobDelete + + parseXmlNode + (Node node) +

      +
      +
      + +
      + + + +
      +
      + +

      Parse the given XML Node

      +
      +
      Returns
      +
      • any object holding the converted value +
      +
      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/parser/EventParser.html b/apidocs/reference/org/rundeck/api/parser/EventParser.html index d345722..e3cc55c 100644 --- a/apidocs/reference/org/rundeck/api/parser/EventParser.html +++ b/apidocs/reference/org/rundeck/api/parser/EventParser.html @@ -149,6 +149,8 @@
    • org.rundeck.api.parser
    • + org.rundeck.api.query
    • +
    • org.rundeck.api.util

    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes

    • AbortParser
    • +
    • BulkDeleteParser
    • +
    • DeleteParser
    • EventParser
    • ExecutionParser
    • HistoryParser
    • @@ -172,6 +176,9 @@
    • JobsImportResultParser
    • ListParser<T>
    • NodeParser
    • +
    • OutputEntryParser
    • +
    • OutputParser
    • +
    • PagedResultParser<T>
    • ParserHelper
    • ProjectParser
    • StringParser
    • diff --git a/apidocs/reference/org/rundeck/api/parser/OutputEntryParser.html b/apidocs/reference/org/rundeck/api/parser/OutputEntryParser.html new file mode 100644 index 0000000..c7d5732 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/parser/OutputEntryParser.html @@ -0,0 +1,901 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OutputEntryParser + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + + + + class +

      OutputEntryParser

      + + + + + extends Object
      + + + + + + + implements + + XmlNodeParser<T> + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.parser.OutputEntryParser
      + + + + + + + +
      + + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Constructors
      + + + + + + + + OutputEntryParser() + +
      + + + + + + + + OutputEntryParser(String xpath) + +
      + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + + + RundeckOutputEntry + + parseXmlNode(Node node) + +
      Parse the given XML Node
      + +
      + + + + + + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + +From interface + + org.rundeck.api.parser.XmlNodeParser + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Constructors

      + + + + + +
      +

      + + public + + + + + + + OutputEntryParser + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + + + OutputEntryParser + (String xpath) +

      +
      +
      + +
      + + + +
      +
      + +

      +
      +
      Parameters
      + + + + +
      xpath + of the event element if it is not the root node +
      +
      + +
      +
      + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + + + + + RundeckOutputEntry + + parseXmlNode + (Node node) +

      +
      +
      + +
      + + + +
      +
      + +

      Parse the given XML Node

      +
      +
      Returns
      +
      • any object holding the converted value +
      +
      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/parser/OutputParser.html b/apidocs/reference/org/rundeck/api/parser/OutputParser.html new file mode 100644 index 0000000..820108c --- /dev/null +++ b/apidocs/reference/org/rundeck/api/parser/OutputParser.html @@ -0,0 +1,901 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OutputParser + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + + + + class +

      OutputParser

      + + + + + extends Object
      + + + + + + + implements + + XmlNodeParser<T> + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.parser.OutputParser
      + + + + + + + +
      + + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Constructors
      + + + + + + + + OutputParser() + +
      + + + + + + + + OutputParser(String xpath) + +
      + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + + + RundeckOutput + + parseXmlNode(Node node) + +
      Parse the given XML Node
      + +
      + + + + + + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + +From interface + + org.rundeck.api.parser.XmlNodeParser + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Constructors

      + + + + + +
      +

      + + public + + + + + + + OutputParser + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + + + OutputParser + (String xpath) +

      +
      +
      + +
      + + + +
      +
      + +

      +
      +
      Parameters
      + + + + +
      xpath + of the event element if it is not the root node +
      +
      + +
      +
      + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + + + + + RundeckOutput + + parseXmlNode + (Node node) +

      +
      +
      + +
      + + + +
      +
      + +

      Parse the given XML Node

      +
      +
      Returns
      +
      • any object holding the converted value +
      +
      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/parser/PagedResultParser.html b/apidocs/reference/org/rundeck/api/parser/PagedResultParser.html new file mode 100644 index 0000000..598c0b5 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/parser/PagedResultParser.html @@ -0,0 +1,863 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PagedResultParser + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + + + + class +

      PagedResultParser

      + + + + + extends Object
      + + + + + + + implements + + XmlNodeParser<T> + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.parser.PagedResultParser<T>
      + + + + + + + +
      + + +

      Class Overview

      +

      PagedResultParser extracts paging data from an xpath node, and includes the List result from a ListParser

      + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Constructors
      + + + + + + + + PagedResultParser(ListParser<T> itemParser, String xpath) + +
      Create a PagedResultParser
      + +
      + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + + + PagedResults<T> + + parseXmlNode(Node node) + +
      Parse the given XML Node
      + +
      + + + + + + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + +From interface + + org.rundeck.api.parser.XmlNodeParser + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Constructors

      + + + + + +
      +

      + + public + + + + + + + PagedResultParser + (ListParser<T> itemParser, String xpath) +

      +
      +
      + +
      + + + +
      +
      + +

      Create a PagedResultParser

      +
      +
      Parameters
      + + + + + + + +
      itemParser + the list parser
      xpath + xpath for list container containing paging attributes +
      +
      + +
      +
      + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + + + + + PagedResults<T> + + parseXmlNode + (Node node) +

      +
      +
      + +
      + + + +
      +
      + +

      Parse the given XML Node

      +
      +
      Returns
      +
      • any object holding the converted value +
      +
      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/parser/ParserHelper.html b/apidocs/reference/org/rundeck/api/parser/ParserHelper.html index ae56b4b..9d94272 100644 --- a/apidocs/reference/org/rundeck/api/parser/ParserHelper.html +++ b/apidocs/reference/org/rundeck/api/parser/ParserHelper.html @@ -149,6 +149,8 @@
    • org.rundeck.api.parser
    • + org.rundeck.api.query
    • +
    • org.rundeck.api.util

    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes


    @@ -165,6 +167,8 @@
  • Classes

    • AbortParser
    • +
    • BulkDeleteParser
    • +
    • DeleteParser
    • EventParser
    • ExecutionParser
    • HistoryParser
    • @@ -172,6 +176,9 @@
    • JobsImportResultParser
    • ListParser<T>
    • NodeParser
    • +
    • OutputEntryParser
    • +
    • OutputParser
    • +
    • PagedResultParser<T>
    • ParserHelper
    • ProjectParser
    • StringParser
    • @@ -275,6 +282,14 @@ AbortParser Parser for a single RundeckAbort  + + BulkDeleteParser + BulkDeleteParser is ...  + + + DeleteParser + DeleteParser is ...  + EventParser Parser for a single RundeckEvent  @@ -304,18 +319,30 @@ Parser for a single RundeckNode  + OutputEntryParser +   + + + OutputParser +   + + + PagedResultParser<T> + PagedResultParser extracts paging data from an xpath node, and includes the List result from a ListParser  + + ParserHelper Helper for parsing RunDeck responses  - + ProjectParser Parser for a single RundeckProject  - + StringParser Parser for a single String  - + SystemInfoParser Parser for a single RundeckSystemInfo  diff --git a/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html new file mode 100644 index 0000000..6242341 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html @@ -0,0 +1,1840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ExecutionQuery.Builder + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + static + + + class +

      ExecutionQuery.Builder

      + + + + + extends Object
      + + + + + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.query.ExecutionQuery.Builder
      + + + + + + + +
      + + +

      Class Overview

      +

      Builder for ExecutionQueries +

      + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Constructors
      + + + + + + + + ExecutionQuery.Builder() + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + + + ExecutionQuery.Builder + + abortedby(String abortedby) + +
      Username +
      + +
      + + + + + + ExecutionQuery.Builder + + adhoc(Boolean adhoc) + +
      True to query only adhoc executions, false to query only Job executions, null for both +
      + +
      + + + + + + ExecutionQuery.Builder + + begin(Date begin) + +
      Start date/time for execution completion time +
      + +
      + + + + + + ExecutionQuery + + build() + +
      Build the query +
      + +
      + + + + + + ExecutionQuery.Builder + + description(String description) + +
      Job description match +
      + +
      + + + + + + ExecutionQuery.Builder + + end(Date end) + +
      End date/time for execution completion time +
      + +
      + + + + + + ExecutionQuery.Builder + + excludeGroupPath(String excludeGroupPath) + +
      Group path or super path, which will exclude any jobs within the subtree.
      + +
      + + + + + + ExecutionQuery.Builder + + excludeGroupPathExact(String excludeGroupPathExact) + +
      Exact group path to exclude +
      + +
      + + + + + + ExecutionQuery.Builder + + excludeJob(String job) + +
      Job name filter to exclude, which can match any part of the name +
      + +
      + + + + + + ExecutionQuery.Builder + + excludeJobExact(String exact) + +
      Job exact name filter to exclude, much match exactly +
      + +
      + + + + + + ExecutionQuery.Builder + + excludeJobIdList(List<String> list) + +
      List of job IDs to exclude from query +
      + +
      + + + + + + ExecutionQuery.Builder + + excludeJobList(List<String> list) + +
      List of job "group/name" to exclude from query +
      + +
      + + + + + + ExecutionQuery.Builder + + groupPath(String path) + +
      Group path or super path, which will include any jobs within the subtree.
      + +
      + + + + + + ExecutionQuery.Builder + + groupPathExact(String exact) + +
      Exact group path to include +
      + +
      + + + + + + ExecutionQuery.Builder + + job(String job) + +
      Job name filter, which can match any part of the name +
      + +
      + + + + + + ExecutionQuery.Builder + + jobExact(String exact) + +
      Job exact name filter, much match exactly +
      + +
      + + + + + + ExecutionQuery.Builder + + jobIdList(List<String> list) + +
      List of job IDs to query +
      + +
      + + + + + + ExecutionQuery.Builder + + jobList(List<String> list) + +
      List of job "group/name" to query +
      + +
      + + + + + + ExecutionQuery.Builder + + project(String project) + +
      Project name +
      + +
      + + + + + + ExecutionQuery.Builder + + recent(String recent) + +
      Recent time filter, in the for "XY", where X is a number, and Y + is one of: "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year) +
      + +
      + + + + + + ExecutionQuery.Builder + + status(RundeckExecution.ExecutionStatus status) + +
      Execution status to query +
      + +
      + + + + + + ExecutionQuery.Builder + + user(String user) + +
      Name of username that started the execution +
      + +
      + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Constructors

      + + + + + +
      +

      + + public + + + + + + + ExecutionQuery.Builder + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + abortedby + (String abortedby) +

      +
      +
      + +
      + + + +
      +
      + +

      Username +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + adhoc + (Boolean adhoc) +

      +
      +
      + +
      + + + +
      +
      + +

      True to query only adhoc executions, false to query only Job executions, null for both +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + begin + (Date begin) +

      +
      +
      + +
      + + + +
      +
      + +

      Start date/time for execution completion time +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery + + build + () +

      +
      +
      + +
      + + + +
      +
      + +

      Build the query +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + description + (String description) +

      +
      +
      + +
      + + + +
      +
      + +

      Job description match +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + end + (Date end) +

      +
      +
      + +
      + + + +
      +
      + +

      End date/time for execution completion time +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + excludeGroupPath + (String excludeGroupPath) +

      +
      +
      + +
      + + + +
      +
      + +

      Group path or super path, which will exclude any jobs within the subtree. +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + excludeGroupPathExact + (String excludeGroupPathExact) +

      +
      +
      + +
      + + + +
      +
      + +

      Exact group path to exclude +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + excludeJob + (String job) +

      +
      +
      + +
      + + + +
      +
      + +

      Job name filter to exclude, which can match any part of the name +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + excludeJobExact + (String exact) +

      +
      +
      + +
      + + + +
      +
      + +

      Job exact name filter to exclude, much match exactly +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + excludeJobIdList + (List<String> list) +

      +
      +
      + +
      + + + +
      +
      + +

      List of job IDs to exclude from query +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + excludeJobList + (List<String> list) +

      +
      +
      + +
      + + + +
      +
      + +

      List of job "group/name" to exclude from query +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + groupPath + (String path) +

      +
      +
      + +
      + + + +
      +
      + +

      Group path or super path, which will include any jobs within the subtree. +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + groupPathExact + (String exact) +

      +
      +
      + +
      + + + +
      +
      + +

      Exact group path to include +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + job + (String job) +

      +
      +
      + +
      + + + +
      +
      + +

      Job name filter, which can match any part of the name +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + jobExact + (String exact) +

      +
      +
      + +
      + + + +
      +
      + +

      Job exact name filter, much match exactly +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + jobIdList + (List<String> list) +

      +
      +
      + +
      + + + +
      +
      + +

      List of job IDs to query +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + jobList + (List<String> list) +

      +
      +
      + +
      + + + +
      +
      + +

      List of job "group/name" to query +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + project + (String project) +

      +
      +
      + +
      + + + +
      +
      + +

      Project name +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + recent + (String recent) +

      +
      +
      + +
      + + + +
      +
      + +

      Recent time filter, in the for "XY", where X is a number, and Y + is one of: "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year) +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + status + (RundeckExecution.ExecutionStatus status) +

      +
      +
      + +
      + + + +
      +
      + +

      Execution status to query +

      + +
      +
      + + + + +
      +

      + + public + + + + + ExecutionQuery.Builder + + user + (String user) +

      +
      +
      + +
      + + + +
      +
      + +

      Name of username that started the execution +

      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html new file mode 100644 index 0000000..782a8db --- /dev/null +++ b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html @@ -0,0 +1,1765 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ExecutionQuery + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      + + + + + + + + + + + + +
      + + + + + + +
      +
      + + + + +
      + public + + + + class +

      ExecutionQuery

      + + + + + extends Object
      + + + + + + + + + +
      + +
      + +
      + + + + + + + + + + + + + + + + + +
      java.lang.Object
         ↳org.rundeck.api.query.ExecutionQuery
      + + + + + + + +
      + + +

      Class Overview

      +

      ExecutionQuery contains the query parameters for the /executions api, create one with the ExecutionQuery.Builder class, e.g. + using the builder() method.

      + + + + + +
      + + + + + + + + + + + + + + + + +
      + + +

      Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes
      + + + + + classExecutionQuery.BuilderBuilder for ExecutionQueries + 
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Public Methods
      + + + + static + + ExecutionQuery.Builder + + builder() + +
      Create a Builder for an ExecutionQuery +
      + +
      + + + + + + String + + getAbortedby() + +
      + + + + + + Boolean + + getAdhoc() + +
      + + + + + + Date + + getBegin() + +
      + + + + + + String + + getDescription() + +
      + + + + + + Date + + getEnd() + +
      + + + + + + String + + getExcludeGroupPath() + +
      + + + + + + String + + getExcludeGroupPathExact() + +
      + + + + + + String + + getExcludeJob() + +
      + + + + + + String + + getExcludeJobExact() + +
      + + + + + + List<String> + + getExcludeJobIdList() + +
      + + + + + + List<String> + + getExcludeJobList() + +
      + + + + + + String + + getGroupPath() + +
      + + + + + + String + + getGroupPathExact() + +
      + + + + + + String + + getJob() + +
      + + + + + + String + + getJobExact() + +
      + + + + + + List<String> + + getJobIdList() + +
      + + + + + + List<String> + + getJobList() + +
      + + + + + + String + + getProject() + +
      + + + + + + String + + getRecent() + +
      + + + + + + RundeckExecution.ExecutionStatus + + getStatus() + +
      + + + + + + String + + getUser() + +
      + + + + + + boolean + + notBlank() + +
      Return true if some parameter is set +
      + +
      + + + + + + + + + + + + + + + +
      + [Expand] +
      Inherited Methods
      + +From class + + java.lang.Object + +
      + + +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Public Methods

      + + + + + +
      +

      + + public + static + + + + ExecutionQuery.Builder + + builder + () +

      +
      +
      + +
      + + + +
      +
      + +

      Create a Builder for an ExecutionQuery +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getAbortedby + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + Boolean + + getAdhoc + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + Date + + getBegin + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getDescription + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + Date + + getEnd + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getExcludeGroupPath + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getExcludeGroupPathExact + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getExcludeJob + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getExcludeJobExact + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + List<String> + + getExcludeJobIdList + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + List<String> + + getExcludeJobList + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getGroupPath + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getGroupPathExact + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getJob + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getJobExact + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + List<String> + + getJobIdList + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + List<String> + + getJobList + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getProject + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getRecent + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + RundeckExecution.ExecutionStatus + + getStatus + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + String + + getUser + () +

      +
      +
      + +
      + + + +
      +
      + +

      + +
      +
      + + + + +
      +

      + + public + + + + + boolean + + notBlank + () +

      +
      +
      + +
      + + + +
      +
      + +

      Return true if some parameter is set +

      + +
      +
      + + + + + + + + + + + + + + +
      + +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/query/package-descr.html b/apidocs/reference/org/rundeck/api/query/package-descr.html new file mode 100644 index 0000000..a5a3758 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/query/package-descr.html @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api.query Details + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      +
      + + + + + + +
      +
      + +
      + package +

      org.rundeck.api.query

      +
      + Classes | Description +
      +
      + +
      + +
      +
      +

      +
      + + + +
      +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/query/package-summary.html b/apidocs/reference/org/rundeck/api/query/package-summary.html new file mode 100644 index 0000000..624417a --- /dev/null +++ b/apidocs/reference/org/rundeck/api/query/package-summary.html @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api.query + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      + +
      +
      + + + + + + +
      +
      + +
      + package +

      org.rundeck.api.query

      +
      + +
      +
      + +
      + +
      + + + + + + + + + + +

      Classes

      +
      + + + + + + + + + + +
      ExecutionQueryExecutionQuery contains the query parameters for the /executions api, create one with the ExecutionQuery.Builder class, e.g. 
      ExecutionQuery.BuilderBuilder for ExecutionQueries + 
      +
      + + + + + + + + + + + + + + +
      +
      + +
      + + + + + diff --git a/apidocs/reference/org/rundeck/api/util/AssertUtil.html b/apidocs/reference/org/rundeck/api/util/AssertUtil.html index f6f44a0..863565c 100644 --- a/apidocs/reference/org/rundeck/api/util/AssertUtil.html +++ b/apidocs/reference/org/rundeck/api/util/AssertUtil.html @@ -148,6 +148,8 @@ org.rundeck.api.domain
    • org.rundeck.api.parser
    • +
    • + org.rundeck.api.query
    • org.rundeck.api.util

    @@ -156,6 +158,11 @@
      +
    • Interfaces

      + +
    • Classes

        diff --git a/apidocs/reference/org/rundeck/api/util/PagedResults.html b/apidocs/reference/org/rundeck/api/util/PagedResults.html new file mode 100644 index 0000000..3525ae5 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/util/PagedResults.html @@ -0,0 +1,742 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PagedResults + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
        +
        +
        + + +
        +
        + + + + +
        + +
        + + + + + + + + + + + + +
        + + + + + + +
        +
        + + + + +
        + public + + + + interface +

        PagedResults

        + + + + + + implements + + Iterable<T> + + + + + +
        + +
        + +
        + + + + + + + + + +
        org.rundeck.api.util.PagedResults<T>
        + + + + + + + +
        + + +

        Class Overview

        +

        PagedResults contains a List of a certain type, and paging information.

        + + + + + +
        + + + + + + + + + + + + + + + + +
        + + +

        Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Public Methods
        + abstract + + + + + int + + getCount() + +
        Number of items available in page +
        + +
        + abstract + + + + + int + + getMax() + +
        Max number of items returned in page +
        + +
        + abstract + + + + + int + + getOffset() + +
        Offset into all items +
        + +
        + abstract + + + + + List<T> + + getResults() + +
        Results list +
        + +
        + abstract + + + + + int + + getTotal() + +
        Total items to be paged +
        + +
        + + + + + + + + + + + + + + + +
        + [Expand] +
        Inherited Methods
        + +From interface + + java.lang.Iterable + +
        + + +
        +
        + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

        Public Methods

        + + + + + +
        +

        + + public + + + abstract + + int + + getCount + () +

        +
        +
        + +
        + + + +
        +
        + +

        Number of items available in page +

        + +
        +
        + + + + +
        +

        + + public + + + abstract + + int + + getMax + () +

        +
        +
        + +
        + + + +
        +
        + +

        Max number of items returned in page +

        + +
        +
        + + + + +
        +

        + + public + + + abstract + + int + + getOffset + () +

        +
        +
        + +
        + + + +
        +
        + +

        Offset into all items +

        + +
        +
        + + + + +
        +

        + + public + + + abstract + + List<T> + + getResults + () +

        +
        +
        + +
        + + + +
        +
        + +

        Results list +

        + +
        +
        + + + + +
        +

        + + public + + + abstract + + int + + getTotal + () +

        +
        +
        + +
        + + + +
        +
        + +

        Total items to be paged +

        + +
        +
        + + + + + + + + + + + + + + +
        + +
        + +
        + + + + + diff --git a/apidocs/reference/org/rundeck/api/util/ParametersUtil.html b/apidocs/reference/org/rundeck/api/util/ParametersUtil.html index 00d60f6..4197039 100644 --- a/apidocs/reference/org/rundeck/api/util/ParametersUtil.html +++ b/apidocs/reference/org/rundeck/api/util/ParametersUtil.html @@ -148,6 +148,8 @@ org.rundeck.api.domain
      • org.rundeck.api.parser
      • +
      • + org.rundeck.api.query
      • org.rundeck.api.util

      @@ -156,6 +158,11 @@
        +
      • Interfaces

        + +
      • Classes


        @@ -156,6 +158,11 @@
          +
        • Interfaces

          + +
        • Classes


          @@ -156,6 +158,11 @@
            +
          • Interfaces

            + +
          • Classes

              @@ -238,6 +245,17 @@ +

              Interfaces

              +
              + + + + + + +
              PagedResults<T>PagedResults contains a List of a certain type, and paging information. 
              +
              + diff --git a/apidocs/reference/package-list b/apidocs/reference/package-list index e30632e..2ce964d 100644 --- a/apidocs/reference/package-list +++ b/apidocs/reference/package-list @@ -1,5 +1,6 @@ org.rundeck.api org.rundeck.api.domain org.rundeck.api.parser +org.rundeck.api.query org.rundeck.api.util diff --git a/apidocs/reference/packages.html b/apidocs/reference/packages.html index 2772bf8..945ffcc 100644 --- a/apidocs/reference/packages.html +++ b/apidocs/reference/packages.html @@ -149,6 +149,8 @@
            • org.rundeck.api.parser
            • + org.rundeck.api.query
            • +
            • org.rundeck.api.util

          @@ -226,6 +228,13 @@ + org.rundeck.api.query +   + + + + + org.rundeck.api.util Some utility classes.  diff --git a/changes-report.html b/changes-report.html index 3def609..02453af 100644 --- a/changes-report.html +++ b/changes-report.html @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ - + @@ -51,8 +51,8 @@
        • Changelog
        • -
        • Last Published: 2011-12-04
        • |
        • -
        • Version: 2.1-SNAPSHOT
        • +
        • Last Published: 2012-12-31
        • |
        • +
        • Version: 5.0-SNAPSHOT
        @@ -95,12 +95,6 @@
      • Jython
      • -
      -
      Older versions
      -
      Project Documentation
        @@ -132,10 +126,10 @@ Dependency Updates Report
      • - Property Updates Report + Plugin Updates Report
      • - Plugin Updates Report + Property Updates Report
      • PMD Report @@ -164,14 +158,14 @@
        -

        Changelog

        Release History

        VersionDateDescription
        2.02011-08-01Use RunDeck REST API version 2 (RunDeck 1.3+)
        1.22011-07-31Ad-hoc scripts + history events
        1.12011-07-28Import / export jobs
        1.02011-07-08Use RunDeck REST API version 1 (RunDeck 1.2+)

        Release 2.0 - 2011-08-01

        TypeChangesBy

        add

        Token-based authenticationvbehar

        Release 1.2 - 2011-07-31

        TypeChangesBy

        add

        Run ad-hoc scriptsvbehar

        add

        List history eventsvbehar

        Release 1.1 - 2011-07-28

        TypeChangesBy

        add

        Import jobs (XML or YAML)vbehar

        add

        YAML format is now supported when exporting jobs definitionsvbehar

        add

        Support for using an HTTP proxyvbehar

        Release 1.0 - 2011-07-08

        TypeChangesBy

        add

        Initial releasevbehar
        +

        Changelog

        Release History

        VersionDateDescription
        5.02012-12-30Use RunDeck REST API version 5 (RunDeck 1.4.4)
        2.02011-08-01Use RunDeck REST API version 2 (RunDeck 1.3+)
        1.22011-07-31Ad-hoc scripts + history events
        1.12011-07-28Import / export jobs
        1.02011-07-08Use RunDeck REST API version 1 (RunDeck 1.2+)

        Release 5.0 - 2012-12-30

        TypeChangesBy

        add

        Job Execution result contains average duration (v5)gschueler

        fix

        Issue #1: execution results don't contain argstringgschueler

        add

        Bulk Job delete (v5)gschueler

        add

        Executions query (v5)gschueler

        add

        History query (v5)gschueler

        add

        Support Rundeck API version 5gschueler

        add

        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-clientgschueler

        add

        Add output download, profile page, API token generationconnaryscott

        add

        Support Cookie-based user session authenticationconnaryscott

        Release 2.0 - 2011-08-01

        TypeChangesBy

        add

        Token-based authenticationvbehar

        Release 1.2 - 2011-07-31

        TypeChangesBy

        add

        Run ad-hoc scriptsvbehar

        add

        List history eventsvbehar

        Release 1.1 - 2011-07-28

        TypeChangesBy

        add

        Import jobs (XML or YAML)vbehar

        add

        YAML format is now supported when exporting jobs definitionsvbehar

        add

        Support for using an HTTP proxyvbehar

        Release 1.0 - 2011-07-08

        TypeChangesBy

        add

        Initial releasevbehar
      -
      Copyright © 2011. +
      Copyright © 2011-2012. All Rights Reserved.
      diff --git a/cpd.html b/cpd.html index 74a77cd..a5f4ea1 100644 --- a/cpd.html +++ b/cpd.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
    • CPD Results
    • -
    • Last Published: 2011-12-04
    • |
    • -
    • Version: 2.1-SNAPSHOT
    • +
    • Last Published: 2012-12-31
    • |
    • +
    • Version: 5.0-SNAPSHOT
    @@ -94,12 +94,6 @@
  • Jython
  • - -
    Older versions
    -
    Project Documentation
      @@ -131,10 +125,10 @@ Dependency Updates Report
    • - Property Updates Report + Plugin Updates Report
    • - Plugin Updates Report + Property Updates Report
    • PMD Report @@ -163,7 +157,7 @@
      -

      CPD Results

      The following document contains the results of PMD's CPD 4.2.5.

      Duplications

      FileLine
      org/rundeck/api/domain/RundeckEvent.java152
      org/rundeck/api/domain/RundeckExecution.java136
          }
      +          

      CPD Results

      The following document contains the results of PMD's CPD 4.2.5.

      Duplications

      FileLine
      org/rundeck/api/domain/RundeckEvent.java152
      org/rundeck/api/domain/RundeckExecution.java137
          }
       
           public Date getStartedAt() {
               return (startedAt != null) ? new Date(startedAt.getTime()) : null;
      @@ -189,7 +183,7 @@
               this.abortedBy = abortedBy;
           }
       
      -    public String getDescription() {
      FileLine
      org/rundeck/api/domain/RundeckEvent.java60
      org/rundeck/api/domain/RundeckExecution.java58
          public Long getDurationInMillis() {
      +    public String getDescription() {
      + + + + + + + + + + + + + + + + + + + + diff --git a/xref-test/allclasses-frame.html b/xref-test/allclasses-frame.html index d1f7f87..ab4f338 100644 --- a/xref-test/allclasses-frame.html +++ b/xref-test/allclasses-frame.html @@ -13,6 +13,12 @@
      • AbortParserTest +
      • +
      • + BulkDeleteParserTest +
      • +
      • + DeleteParserTest
      • EventParserTest diff --git a/xref-test/index.html b/xref-test/index.html index 1be5927..04b287f 100644 --- a/xref-test/index.html +++ b/xref-test/index.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference + RunDeck API - Java Client 5.0-SNAPSHOT Reference diff --git a/xref-test/org/rundeck/api/RundeckClientTest.html b/xref-test/org/rundeck/api/RundeckClientTest.html index 5a80e01..5f1c981 100644 --- a/xref-test/org/rundeck/api/RundeckClientTest.html +++ b/xref-test/org/rundeck/api/RundeckClientTest.html @@ -25,44 +25,351 @@ 15 */ 16 package org.rundeck.api; 17 -18 import java.util.List; -19 import org.junit.Assert; -20 import org.junit.Before; -21 import org.junit.Rule; -22 import org.junit.Test; -23 import org.rundeck.api.domain.RundeckProject; -24 import betamax.Betamax; -25 import betamax.Recorder; -26 -27 /** -28 * Test the {@link RundeckClient}. Uses betamax to unit-test HTTP requests without a live RunDeck instance. -29 * -30 * @author Vincent Behar -31 */ -32 public class RundeckClientTest { -33 -34 @Rule -35 public Recorder recorder = new Recorder(); -36 -37 private RundeckClient client; -38 -39 @Test -40 @Betamax(tape = "get_projects") -41 public void getProjects() throws Exception { -42 List<RundeckProject> projects = client.getProjects(); -43 Assert.assertEquals(1, projects.size()); -44 Assert.assertEquals("test", projects.get(0).getName()); -45 Assert.assertNull(projects.get(0).getDescription()); -46 } +18 import java.util.ArrayList; +19 import java.util.Arrays; +20 import java.util.Date; +21 import java.util.List; +22 +23 import betamax.MatchRule; +24 import betamax.TapeMode; +25 import org.junit.Assert; +26 import org.junit.Before; +27 import org.junit.Rule; +28 import org.junit.Test; +29 import org.rundeck.api.domain.RundeckEvent; +30 import org.rundeck.api.domain.RundeckExecution; +31 import org.rundeck.api.domain.RundeckHistory; +32 import org.rundeck.api.domain.RundeckJobDelete; +33 import org.rundeck.api.domain.RundeckJobDeleteBulk; +34 import org.rundeck.api.domain.RundeckProject; +35 import betamax.Betamax; +36 import betamax.Recorder; +37 import org.rundeck.api.query.ExecutionQuery; +38 import org.rundeck.api.util.PagedResults; +39 +40 +41 /** +42 * Test the {@link RundeckClient}. Uses betamax to unit-test HTTP requests without a live RunDeck instance. +43 * +44 * @author Vincent Behar +45 */ +46 public class RundeckClientTest { 47 -48 @Before -49 public void setUp() throws Exception { -50 // not that you can put whatever here, because we don't actually connect to the RunDeck instance -51 // but instead use betamax as a proxy to serve the previously recorded tapes (in src/test/resources) -52 client = new RundeckClient("http://rundeck.local:4440", "PVnN5K3OPc5vduS3uVuVnEsD57pDC5pd"); -53 } -54 -55 } +48 @Rule +49 public Recorder recorder = new Recorder(); +50 +51 private RundeckClient client; +52 +53 @Test +54 @Betamax(tape = "get_projects") +55 public void getProjects() throws Exception { +56 List<RundeckProject> projects = client.getProjects(); +57 Assert.assertEquals(1, projects.size()); +58 Assert.assertEquals("test", projects.get(0).getName()); +59 Assert.assertNull(projects.get(0).getDescription()); +60 } +61 @Test +62 @Betamax(tape = "get_history") +63 public void getHistory() throws Exception { +64 final RundeckHistory test = client.getHistory("test"); +65 Assert.assertEquals(3, test.getCount()); +66 Assert.assertEquals(20, test.getMax()); +67 Assert.assertEquals(0, test.getOffset()); +68 Assert.assertEquals(5, test.getTotal()); +69 final List<RundeckEvent> events = test.getEvents(); +70 Assert.assertEquals(3, events.size()); +71 } +72 +73 @Test +74 @Betamax(tape = "get_history_joblist", +75 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query /*, MatchRule.body */}) +76 public void getHistoryJoblist() throws Exception { +77 final List<String> jobNames = Arrays.asList("malk/blah", "malk/blah2"); +78 final RundeckHistory test = client.getHistory("demo", null, null, jobNames, null, null, null, null, null); +79 Assert.assertEquals(2, test.getCount()); +80 Assert.assertEquals(20, test.getMax()); +81 Assert.assertEquals(0, test.getOffset()); +82 Assert.assertEquals(2, test.getTotal()); +83 final List<RundeckEvent> events = test.getEvents(); +84 Assert.assertEquals(2, events.size()); +85 final List<String> names = new ArrayList<String>(); +86 for (final RundeckEvent event : events) { +87 names.add(event.getTitle()); +88 } +89 Assert.assertEquals(Arrays.asList("malk/blah2", "malk/blah"), names); +90 } +91 +92 @Test +93 @Betamax(tape = "get_history_excludeJoblist", +94 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query /*, MatchRule.body */}) +95 public void getHistoryExcludeJoblist() throws Exception { +96 final List<String> jobNames = Arrays.asList("malk/blah", "malk/blah2"); +97 final RundeckHistory test = client.getHistory("demo", null, null, null, jobNames, null, null, null, null); +98 Assert.assertEquals(2, test.getCount()); +99 Assert.assertEquals(20, test.getMax()); +100 Assert.assertEquals(0, test.getOffset()); +101 Assert.assertEquals(2, test.getTotal()); +102 final List<RundeckEvent> events = test.getEvents(); +103 Assert.assertEquals(2, events.size()); +104 final List<String> names = new ArrayList<String>(); +105 for (final RundeckEvent event : events) { +106 names.add(event.getTitle()); +107 } +108 Assert.assertEquals(Arrays.asList("fliff", "malk/blah3"), names); +109 } +110 +111 @Test +112 @Betamax(tape = "get_history_user", +113 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query }) +114 public void getHistoryUser() throws Exception { +115 final RundeckHistory test = client.getHistory("demo", "bob", (String)null, (List)null, null, null, null, 1L, 0L); +116 Assert.assertEquals(1, test.getCount()); +117 Assert.assertEquals(20, test.getMax()); +118 Assert.assertEquals(0, test.getOffset()); +119 Assert.assertEquals(1, test.getTotal()); +120 final List<RundeckEvent> events = test.getEvents(); +121 Assert.assertEquals(1, events.size()); +122 final List<String> names = new ArrayList<String>(); +123 for (final RundeckEvent event : events) { +124 names.add(event.getUser()); +125 } +126 Assert.assertEquals(Arrays.asList("bob"), names); +127 } +128 +129 @Test +130 @Betamax(tape = "get_executions", +131 mode = TapeMode.READ_ONLY, +132 match = {MatchRule.uri, MatchRule.headers, MatchRule.method, MatchRule.path, MatchRule.query}) +133 public void getExecutions() throws Exception { +134 +135 RundeckClient client = new RundeckClient("http://rundeck.local:4440", "0UUNkeRp4d58EDeCs7S6UdODp334DvK9"); +136 +137 +138 final String projectName = "blah"; +139 final PagedResults<RundeckExecution> jobTest = client.getExecutions(ExecutionQuery.builder() +140 .project(projectName) +141 .job("test job") +142 .build(), +143 2L, +144 0L); +145 assertPageResults(jobTest, 2, 2, 2, 0, 2); +146 final PagedResults<RundeckExecution> jobExactTest = client.getExecutions(ExecutionQuery.builder() +147 .project(projectName) +148 .jobExact("test job") +149 .build(), +150 2L, +151 0L); +152 assertPageResults(jobExactTest, 2, 2, 2, 0, 2); +153 final PagedResults<RundeckExecution> excludeJobTest = client.getExecutions(ExecutionQuery.builder() +154 .project(projectName) +155 .excludeJob("test job") +156 .build(), +157 2L, +158 0L); +159 assertPageResults(excludeJobTest, 2, 2, 2, 0, 2); +160 final PagedResults<RundeckExecution> excludeJobExactTest = client.getExecutions(ExecutionQuery.builder() +161 .project(projectName) +162 .excludeJobExact("test job") +163 .build(), +164 2L, +165 0L); +166 assertPageResults(excludeJobExactTest, 2, 2, 2, 0, 2); +167 final PagedResults<RundeckExecution> descriptionTest = client.getExecutions(ExecutionQuery.builder() +168 .project(projectName) +169 .description("a description") +170 .build(), 2L, 0L); +171 assertPageResults(descriptionTest, 2, 2, 2, 0, 2); +172 final PagedResults<RundeckExecution> abortedbyTest = client.getExecutions(ExecutionQuery.builder() +173 .project(projectName) +174 .abortedby("admin") +175 .build(), +176 2L, +177 0L); +178 assertPageResults(abortedbyTest, 1, 1, 2, 0, 1); +179 final PagedResults<RundeckExecution> beginTest = client.getExecutions(ExecutionQuery.builder() +180 .project(projectName) +181 .begin(new Date(1347581178168L)) +182 .build(), 2L, 0L); +183 assertPageResults(beginTest, 2, 2, 2, 0, 2); +184 final PagedResults<RundeckExecution> endTest = client.getExecutions(ExecutionQuery.builder() +185 .project(projectName) +186 .end(new Date(1347581178168L)) +187 .build(), 2L, 0L); +188 assertPageResults(endTest, 2, 2, 2, 0, 2); +189 final List<String> excludeJobIdList = Arrays.asList("123", "456"); +190 final PagedResults<RundeckExecution> excludeJobIdListTest = client.getExecutions(ExecutionQuery.builder() +191 .project(projectName) +192 .excludeJobIdList(excludeJobIdList) +193 .build(), 2L, 0L); +194 assertPageResults(excludeJobIdListTest, 2, 2, 2, 0, 2); +195 final List<String> jobList = Arrays.asList("fruit/mango", "fruit/lemon"); +196 final PagedResults<RundeckExecution> jobListTest = client.getExecutions(ExecutionQuery.builder() +197 .project(projectName) +198 .jobList(jobList) +199 .build(), 2L, 0L); +200 assertPageResults(jobListTest, 2, 2, 2, 0, 2); +201 final List<String> excludeJobList = Arrays.asList("a/path/job1", "path/to/job2"); +202 final PagedResults<RundeckExecution> excludeJobListTest = client.getExecutions(ExecutionQuery.builder() +203 .project(projectName) +204 .excludeJobList(excludeJobList) +205 .build(), 2L, 0L); +206 assertPageResults(excludeJobListTest, 2, 2, 2, 0, 2); +207 final List<String> list = Arrays.asList("1f4415d7-3b52-4fc8-ba42-b6ac97508bff", +208 "d9fc5ee6-f1db-4d24-8808-feda18345bab"); +209 final PagedResults<RundeckExecution> jobIdListTest = client.getExecutions(ExecutionQuery.builder() +210 .project(projectName) +211 .jobIdList(list) +212 .build(), 2L, 0L); +213 assertPageResults(jobIdListTest, 2, 2, 2, 0, 2); +214 final PagedResults<RundeckExecution> groupPathTest = client.getExecutions(ExecutionQuery.builder() +215 .project(projectName) +216 .groupPath("fruit") +217 .build(), +218 2L, +219 0L); +220 assertPageResults(groupPathTest, 2, 2, 2, 0, 2); +221 final PagedResults<RundeckExecution> groupPathExactTest = client.getExecutions(ExecutionQuery.builder() +222 .project(projectName) +223 .groupPathExact("fruit") +224 .build(), 2L, 0L); +225 assertPageResults(groupPathExactTest, 2, 2, 2, 0, 2); +226 +227 final PagedResults<RundeckExecution> excludeGroupPathTest = client.getExecutions(ExecutionQuery.builder() +228 .project(projectName) +229 .excludeGroupPath("fruit") +230 .build(), +231 2L, +232 0L); +233 assertPageResults(excludeGroupPathTest, 2, 2, 2, 0, 2); +234 final PagedResults<RundeckExecution> excliudeGroupPathExactTest = client.getExecutions(ExecutionQuery.builder() +235 .project(projectName) +236 .excludeGroupPathExact("fruit") +237 .build(), 2L, 0L); +238 assertPageResults(excliudeGroupPathExactTest, 2, 2, 2, 0, 2); +239 +240 final PagedResults<RundeckExecution> recentTest = client.getExecutions(ExecutionQuery.builder() +241 .project(projectName) +242 .recent("1h").build(), 2L, 0L); +243 assertPageResults(recentTest, 2, 2, 2, 0, 2); +244 final PagedResults<RundeckExecution> statusTest = client.getExecutions(ExecutionQuery.builder() +245 .project(projectName) +246 .status(RundeckExecution.ExecutionStatus.SUCCEEDED) +247 .build(), 2L, 0L); +248 assertPageResults(statusTest, 2, 2, 2, 0, 2); +249 final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder() +250 .project(projectName) +251 .adhoc(true) +252 .build(), 2L, 0L); +253 assertPageResults(adhocTest, 2, 2, 2, 0, 2); +254 } +255 +256 /** +257 * Test paging values from results +258 */ +259 @Test +260 @Betamax(tape = "get_executions_paging") +261 public void getExecutionsPaging() throws Exception{ +262 RundeckClient client = new RundeckClient("http://rundeck.local:4440", "0UUNkeRp4d58EDeCs7S6UdODp334DvK9"); +263 final String projectName = "blah"; +264 //2 max, 1 offset +265 final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder() +266 .project(projectName) +267 .excludeGroupPathExact("fruit") +268 .build(), 2L, 1L); +269 //expect 2 count, 3 total +270 assertPageResults(adhocTest, 2, 2, 2, 1, 3); +271 +272 //FAKE results, testing paging attributes parsing +273 +274 //1 max, 1 offset +275 final PagedResults<RundeckExecution> test2 = client.getExecutions(ExecutionQuery.builder() +276 .project(projectName) +277 .excludeGroupPathExact("fruit") +278 .build(), 1L, 1L); +279 //expect no paging attributes +280 assertPageResults(test2, 2, -1, -1, -1, -1); +281 +282 //1 max, 2 offset +283 final PagedResults<RundeckExecution> test3 = client.getExecutions(ExecutionQuery.builder() +284 .project(projectName) +285 .excludeGroupPathExact("fruit") +286 .build(), 1L, 2L); +287 //invalid value for count +288 assertPageResults(test3, 2, -1, -1, -1, -1); +289 } +290 @Test +291 @Betamax(tape = "bulk_delete") +292 public void bulkDelete() throws Exception { +293 RundeckClient client = new RundeckClient("http://rundeck.local:4440", "PP4s4SdCRO6KUoNPd1D303Dc304ORN87"); +294 +295 final RundeckJobDeleteBulk deleteTest +296 = client.deleteJobs(Arrays.asList("0ce457b5-ba84-41ca-812e-02b31da355a4")); +297 Assert.assertTrue(deleteTest.isAllsuccessful()); +298 Assert.assertEquals(1, deleteTest.getRequestCount()); +299 Assert.assertEquals(1, deleteTest.getResults().size()); +300 +301 final RundeckJobDelete delete = deleteTest.getResults().get(0); +302 Assert.assertTrue(delete.isSuccessful()); +303 Assert.assertNull(delete.getError()); +304 Assert.assertNull(delete.getErrorCode()); +305 Assert.assertNotNull(delete.getMessage()); +306 Assert.assertEquals("0ce457b5-ba84-41ca-812e-02b31da355a4", delete.getId()); +307 } +308 @Test +309 @Betamax(tape = "bulk_delete_dne") +310 public void bulkDeleteFailDNE() throws Exception { +311 RundeckClient client = new RundeckClient("http://rundeck.local:4440", "PP4s4SdCRO6KUoNPd1D303Dc304ORN87"); +312 +313 final RundeckJobDeleteBulk deleteTest +314 = client.deleteJobs(Arrays.asList("does-not-exist")); +315 Assert.assertFalse(deleteTest.isAllsuccessful()); +316 Assert.assertEquals(1, deleteTest.getRequestCount()); +317 Assert.assertEquals(1, deleteTest.getResults().size()); +318 +319 final RundeckJobDelete delete = deleteTest.getResults().get(0); +320 Assert.assertFalse(delete.isSuccessful()); +321 Assert.assertNotNull(delete.getError()); +322 Assert.assertEquals("notfound",delete.getErrorCode()); +323 Assert.assertNull(delete.getMessage()); +324 Assert.assertEquals("does-not-exist", delete.getId()); +325 } +326 @Test +327 @Betamax(tape = "bulk_delete_unauthorized") +328 public void bulkDeleteFailUnauthorized() throws Exception { +329 RundeckClient client = new RundeckClient("http://rundeck.local:4440", "PP4s4SdCRO6KUoNPd1D303Dc304ORN87"); +330 +331 final RundeckJobDeleteBulk deleteTest +332 = client.deleteJobs(Arrays.asList("3a6d16be-4268-4d26-86a9-cebc1781f768")); +333 Assert.assertFalse(deleteTest.isAllsuccessful()); +334 Assert.assertEquals(1, deleteTest.getRequestCount()); +335 Assert.assertEquals(1, deleteTest.getResults().size()); +336 +337 final RundeckJobDelete delete = deleteTest.getResults().get(0); +338 Assert.assertFalse(delete.isSuccessful()); +339 Assert.assertNotNull(delete.getError()); +340 Assert.assertEquals("unauthorized",delete.getErrorCode()); +341 Assert.assertNull(delete.getMessage()); +342 Assert.assertEquals("3a6d16be-4268-4d26-86a9-cebc1781f768", delete.getId()); +343 } +344 +345 private void assertPageResults(PagedResults<RundeckExecution> jobTest, +346 final int size, +347 final int count, final int max, final int offset, final int total) { +348 Assert.assertEquals(size, jobTest.getResults().size()); +349 Assert.assertEquals(count, jobTest.getCount()); +350 Assert.assertEquals(max, jobTest.getMax()); +351 Assert.assertEquals(offset, jobTest.getOffset()); +352 Assert.assertEquals(total, jobTest.getTotal()); +353 } +354 +355 @Before +356 public void setUp() throws Exception { +357 // not that you can put whatever here, because we don't actually connect to the RunDeck instance +358 // but instead use betamax as a proxy to serve the previously recorded tapes (in src/test/resources) +359 client = new RundeckClient("http://rundeck.local:4440", "PVnN5K3OPc5vduS3uVuVnEsD57pDC5pd"); +360 } +361 +362 }
        diff --git a/xref-test/org/rundeck/api/package-frame.html b/xref-test/org/rundeck/api/package-frame.html index bdf1760..ea72ae7 100644 --- a/xref-test/org/rundeck/api/package-frame.html +++ b/xref-test/org/rundeck/api/package-frame.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference Package org.rundeck.api + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api diff --git a/xref-test/org/rundeck/api/package-summary.html b/xref-test/org/rundeck/api/package-summary.html index ff0024a..dddd59d 100644 --- a/xref-test/org/rundeck/api/package-summary.html +++ b/xref-test/org/rundeck/api/package-summary.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference Package org.rundeck.api + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api @@ -62,6 +62,6 @@

      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref-test/org/rundeck/api/parser/BulkDeleteParserTest.html b/xref-test/org/rundeck/api/parser/BulkDeleteParserTest.html new file mode 100644 index 0000000..a8875f5 --- /dev/null +++ b/xref-test/org/rundeck/api/parser/BulkDeleteParserTest.html @@ -0,0 +1,74 @@ + + + + +BulkDeleteParserTest xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * BulkDeleteParserTest.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 10/1/12 5:03 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.parser;
      +26  
      +27  import org.dom4j.Document;
      +28  import org.junit.Assert;
      +29  import org.junit.Test;
      +30  import org.rundeck.api.domain.RundeckJobDeleteBulk;
      +31  
      +32  import java.io.InputStream;
      +33  import java.util.*;
      +34  
      +35  
      +36  /**
      +37   * BulkDeleteParserTest is ...
      +38   *
      +39   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +40   */
      +41  public class BulkDeleteParserTest {
      +42      @Test
      +43      public void bulkParser() throws Exception{
      +44          InputStream input = getClass().getResourceAsStream("delete-job-bulk-test1.xml");
      +45          Document document = ParserHelper.loadDocument(input);
      +46          final RundeckJobDeleteBulk deletes = new BulkDeleteParser("result/deleteJobs").parseXmlNode(document);
      +47          Assert.assertEquals(14, deletes.getRequestCount());
      +48          Assert.assertEquals(4, deletes.getResults().size());
      +49          Assert.assertFalse(deletes.isAllsuccessful());
      +50      }
      +51      @Test
      +52      public void bulkParserAllsuccessful() throws Exception{
      +53          InputStream input = getClass().getResourceAsStream("delete-job-bulk-test2.xml");
      +54          Document document = ParserHelper.loadDocument(input);
      +55          final RundeckJobDeleteBulk deletes = new BulkDeleteParser("result/deleteJobs").parseXmlNode(document);
      +56          Assert.assertEquals(2, deletes.getRequestCount());
      +57          Assert.assertEquals(2, deletes.getResults().size());
      +58          Assert.assertTrue(deletes.isAllsuccessful());
      +59      }
      +60  }
      +
      +
      + + diff --git a/xref-test/org/rundeck/api/parser/DeleteParserTest.html b/xref-test/org/rundeck/api/parser/DeleteParserTest.html new file mode 100644 index 0000000..4dc9ee1 --- /dev/null +++ b/xref-test/org/rundeck/api/parser/DeleteParserTest.html @@ -0,0 +1,115 @@ + + + + +DeleteParserTest xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * DeleteParserTest.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 10/1/12 4:36 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.parser;
      +26  
      +27  import junit.framework.TestCase;
      +28  import org.dom4j.Document;
      +29  import org.junit.Assert;
      +30  import org.junit.Test;
      +31  import org.rundeck.api.domain.RundeckAbort;
      +32  import org.rundeck.api.domain.RundeckExecution;
      +33  import org.rundeck.api.domain.RundeckJob;
      +34  import org.rundeck.api.domain.RundeckJobDelete;
      +35  
      +36  import java.io.InputStream;
      +37  import java.util.*;
      +38  
      +39  
      +40  /**
      +41   * DeleteParserTest is ...
      +42   *
      +43   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +44   */
      +45  public class DeleteParserTest  {
      +46      @Test
      +47      public void successfulResult() throws Exception {
      +48          InputStream input = getClass().getResourceAsStream("delete-job-bulk-test1.xml");
      +49          Document document = ParserHelper.loadDocument(input);
      +50  
      +51          RundeckJobDelete deleteResult = new DeleteParser("result/deleteJobs/succeeded/deleteJobResult[1]").parseXmlNode(document);
      +52  
      +53          Assert.assertTrue(deleteResult.toString(), deleteResult.isSuccessful());
      +54          Assert.assertNull(deleteResult.getError());
      +55          Assert.assertNull(deleteResult.getErrorCode());
      +56          Assert.assertEquals("test1", deleteResult.getId());
      +57          Assert.assertEquals("Success", deleteResult.getMessage());
      +58      }
      +59      @Test
      +60      public void failedResult1() throws Exception {
      +61          InputStream input = getClass().getResourceAsStream("delete-job-bulk-test1.xml");
      +62          Document document = ParserHelper.loadDocument(input);
      +63  
      +64          RundeckJobDelete deleteResult = new DeleteParser("result/deleteJobs/failed/deleteJobResult[1]").parseXmlNode(document);
      +65  
      +66  
      +67          Assert.assertFalse(deleteResult.isSuccessful());
      +68          Assert.assertEquals("Failed", deleteResult.getError());
      +69          Assert.assertEquals("failed", deleteResult.getErrorCode());
      +70          Assert.assertEquals("test2", deleteResult.getId());
      +71          Assert.assertNull(deleteResult.getMessage());
      +72      }
      +73      @Test
      +74      public void failedResult2() throws Exception {
      +75          InputStream input = getClass().getResourceAsStream("delete-job-bulk-test1.xml");
      +76          Document document = ParserHelper.loadDocument(input);
      +77  
      +78          RundeckJobDelete deleteResult = new DeleteParser("result/deleteJobs/failed/deleteJobResult[2]").parseXmlNode(document);
      +79  
      +80  
      +81          Assert.assertFalse(deleteResult.isSuccessful());
      +82          Assert.assertEquals("Unauthorized", deleteResult.getError());
      +83          Assert.assertEquals("unauthorized", deleteResult.getErrorCode());
      +84          Assert.assertEquals("test3", deleteResult.getId());
      +85          Assert.assertNull(deleteResult.getMessage());
      +86      }
      +87      @Test
      +88      public void failedResult3() throws Exception {
      +89          InputStream input = getClass().getResourceAsStream("delete-job-bulk-test1.xml");
      +90          Document document = ParserHelper.loadDocument(input);
      +91  
      +92          RundeckJobDelete deleteResult = new DeleteParser("result/deleteJobs/failed/deleteJobResult[3]").parseXmlNode(document);
      +93  
      +94  
      +95          Assert.assertFalse(deleteResult.isSuccessful());
      +96          Assert.assertEquals("Not found", deleteResult.getError());
      +97          Assert.assertEquals("notfound", deleteResult.getErrorCode());
      +98          Assert.assertEquals("test4", deleteResult.getId());
      +99          Assert.assertNull(deleteResult.getMessage());
      +100     }
      +101 }
      +
      +
      + + diff --git a/xref-test/org/rundeck/api/parser/ExecutionParserTest.html b/xref-test/org/rundeck/api/parser/ExecutionParserTest.html index 779fe92..649084f 100644 --- a/xref-test/org/rundeck/api/parser/ExecutionParserTest.html +++ b/xref-test/org/rundeck/api/parser/ExecutionParserTest.html @@ -59,85 +59,89 @@ 49 Assert.assertEquals(null, execution.getDuration()); 50 Assert.assertEquals(null, execution.getAbortedBy()); 51 Assert.assertEquals("ls ${option.dir}", execution.getDescription()); -52 -53 Assert.assertEquals("1", job.getId()); -54 Assert.assertEquals("ls", job.getName()); -55 Assert.assertEquals("system", job.getGroup()); -56 Assert.assertEquals("test", job.getProject()); -57 Assert.assertEquals("list files", job.getDescription()); -58 } -59 -60 @Test -61publicvoid parseSucceededExecution() throws Exception { -62 InputStream input = getClass().getResourceAsStream("execution-succeeded.xml"); -63 Document document = ParserHelper.loadDocument(input); -64 -65 RundeckExecution execution = new ExecutionParser("result/executions/execution").parseXmlNode(document); -66 RundeckJob job = execution.getJob(); -67 -68 Assert.assertEquals(new Long(1), execution.getId()); -69 Assert.assertEquals("http://localhost:4440/execution/follow/1", execution.getUrl()); -70 Assert.assertEquals(ExecutionStatus.SUCCEEDED, execution.getStatus()); -71 Assert.assertEquals("admin", execution.getStartedBy()); -72 Assert.assertEquals(new Date(1308322895104L), execution.getStartedAt()); -73 Assert.assertEquals(new Date(1308322959420L), execution.getEndedAt()); -74 Assert.assertEquals(new Long(64316), execution.getDurationInMillis()); -75 Assert.assertEquals("1 minute 4 seconds", execution.getDuration()); -76 Assert.assertEquals(null, execution.getAbortedBy()); -77 Assert.assertEquals("ls ${option.dir}", execution.getDescription()); -78 -79 Assert.assertEquals("1", job.getId()); -80 Assert.assertEquals("ls", job.getName()); -81 Assert.assertEquals("system", job.getGroup()); -82 Assert.assertEquals("test", job.getProject()); -83 Assert.assertEquals("list files", job.getDescription()); -84 } -85 -86 @Test -87publicvoid parseAdhocExecution() throws Exception { -88 InputStream input = getClass().getResourceAsStream("execution-adhoc.xml"); -89 Document document = ParserHelper.loadDocument(input); -90 -91 RundeckExecution execution = new ExecutionParser("result/executions/execution").parseXmlNode(document); -92 RundeckJob job = execution.getJob(); -93 -94 Assert.assertEquals(new Long(1), execution.getId()); -95 Assert.assertEquals("http://localhost:4440/execution/follow/1", execution.getUrl()); -96 Assert.assertEquals(ExecutionStatus.SUCCEEDED, execution.getStatus()); -97 Assert.assertEquals("admin", execution.getStartedBy()); -98 Assert.assertEquals(new Date(1309857539137L), execution.getStartedAt()); -99 Assert.assertEquals(new Date(1309857539606L), execution.getEndedAt()); -100 Assert.assertEquals(new Long(469), execution.getDurationInMillis()); -101 Assert.assertEquals("0 seconds", execution.getDuration()); -102 Assert.assertEquals(null, execution.getAbortedBy()); -103 Assert.assertEquals("w", execution.getDescription()); -104 -105 Assert.assertNull(job); -106 } +52 Assert.assertEquals("-arg1 value -arg2 value", execution.getArgstring()); +53 +54 Assert.assertEquals("1", job.getId()); +55 Assert.assertEquals("ls", job.getName()); +56 Assert.assertEquals("system", job.getGroup()); +57 Assert.assertEquals("test", job.getProject()); +58 Assert.assertEquals("list files", job.getDescription()); +59 } +60 +61 @Test +62publicvoid parseSucceededExecution() throws Exception { +63 InputStream input = getClass().getResourceAsStream("execution-succeeded.xml"); +64 Document document = ParserHelper.loadDocument(input); +65 +66 RundeckExecution execution = new ExecutionParser("result/executions/execution").parseXmlNode(document); +67 RundeckJob job = execution.getJob(); +68 +69 Assert.assertEquals(new Long(1), execution.getId()); +70 Assert.assertEquals("http://localhost:4440/execution/follow/1", execution.getUrl()); +71 Assert.assertEquals(ExecutionStatus.SUCCEEDED, execution.getStatus()); +72 Assert.assertEquals("admin", execution.getStartedBy()); +73 Assert.assertEquals(new Date(1308322895104L), execution.getStartedAt()); +74 Assert.assertEquals(new Date(1308322959420L), execution.getEndedAt()); +75 Assert.assertEquals(new Long(64316), execution.getDurationInMillis()); +76 Assert.assertEquals("1 minute 4 seconds", execution.getDuration()); +77 Assert.assertEquals(null, execution.getAbortedBy()); +78 Assert.assertEquals("ls ${option.dir}", execution.getDescription()); +79 Assert.assertEquals("-argA some -argB thing", execution.getArgstring()); +80 +81 Assert.assertEquals("1", job.getId()); +82 Assert.assertEquals("ls", job.getName()); +83 Assert.assertEquals("system", job.getGroup()); +84 Assert.assertEquals("test", job.getProject()); +85 Assert.assertEquals("list files", job.getDescription()); +86 } +87 +88 @Test +89publicvoid parseAdhocExecution() throws Exception { +90 InputStream input = getClass().getResourceAsStream("execution-adhoc.xml"); +91 Document document = ParserHelper.loadDocument(input); +92 +93 RundeckExecution execution = new ExecutionParser("result/executions/execution").parseXmlNode(document); +94 RundeckJob job = execution.getJob(); +95 +96 Assert.assertEquals(new Long(1), execution.getId()); +97 Assert.assertEquals("http://localhost:4440/execution/follow/1", execution.getUrl()); +98 Assert.assertEquals(ExecutionStatus.SUCCEEDED, execution.getStatus()); +99 Assert.assertEquals("admin", execution.getStartedBy()); +100 Assert.assertEquals(new Date(1309857539137L), execution.getStartedAt()); +101 Assert.assertEquals(new Date(1309857539606L), execution.getEndedAt()); +102 Assert.assertEquals(new Long(469), execution.getDurationInMillis()); +103 Assert.assertEquals("0 seconds", execution.getDuration()); +104 Assert.assertEquals(null, execution.getAbortedBy()); +105 Assert.assertEquals("w", execution.getDescription()); +106 Assert.assertEquals("-monkey true", execution.getArgstring()); 107 -108 @Test -109publicvoid parseMinimalistExecution() throws Exception { -110 InputStream input = getClass().getResourceAsStream("execution-minimalist.xml"); -111 Document document = ParserHelper.loadDocument(input); -112 -113 RundeckExecution execution = new ExecutionParser("result/execution").parseXmlNode(document); -114 RundeckJob job = execution.getJob(); +108 Assert.assertNull(job); +109 } +110 +111 @Test +112publicvoid parseMinimalistExecution() throws Exception { +113 InputStream input = getClass().getResourceAsStream("execution-minimalist.xml"); +114 Document document = ParserHelper.loadDocument(input); 115 -116 Assert.assertEquals(new Long(1), execution.getId()); -117 Assert.assertNull(execution.getUrl()); -118 Assert.assertNull(execution.getStatus()); -119 Assert.assertNull(execution.getStartedBy()); -120 Assert.assertNull(execution.getStartedAt()); -121 Assert.assertNull(execution.getEndedAt()); -122 Assert.assertNull(execution.getDurationInMillis()); -123 Assert.assertNull(execution.getDuration()); -124 Assert.assertNull(execution.getAbortedBy()); -125 Assert.assertNull(execution.getDescription()); -126 -127 Assert.assertNull(job); -128 } -129 -130 } +116 RundeckExecution execution = new ExecutionParser("result/execution").parseXmlNode(document); +117 RundeckJob job = execution.getJob(); +118 +119 Assert.assertEquals(new Long(1), execution.getId()); +120 Assert.assertNull(execution.getUrl()); +121 Assert.assertNull(execution.getStatus()); +122 Assert.assertNull(execution.getStartedBy()); +123 Assert.assertNull(execution.getStartedAt()); +124 Assert.assertNull(execution.getEndedAt()); +125 Assert.assertNull(execution.getDurationInMillis()); +126 Assert.assertNull(execution.getDuration()); +127 Assert.assertNull(execution.getAbortedBy()); +128 Assert.assertNull(execution.getDescription()); +129 Assert.assertNull(execution.getArgstring()); +130 +131 Assert.assertNull(job); +132 } +133 +134 }
      diff --git a/xref-test/org/rundeck/api/parser/JobParserTest.html b/xref-test/org/rundeck/api/parser/JobParserTest.html index cbfe9d3..b36ac3a 100644 --- a/xref-test/org/rundeck/api/parser/JobParserTest.html +++ b/xref-test/org/rundeck/api/parser/JobParserTest.html @@ -52,7 +52,36 @@ 42 Assert.assertEquals("project-name", job.getProject()); 43 } 44 -45 } +45 @Test +46publicvoid parseExecutionJob1() throws Exception { +47 InputStream input = getClass().getResourceAsStream("execution-running.xml"); +48 Document document = ParserHelper.loadDocument(input); +49 +50 RundeckJob job = new JobParser("result/executions/execution/job").parseXmlNode(document); +51 +52 Assert.assertEquals("1", job.getId()); +53 Assert.assertEquals("ls", job.getName()); +54 Assert.assertEquals("list files", job.getDescription()); +55 Assert.assertEquals("system", job.getGroup()); +56 Assert.assertEquals("test", job.getProject()); +57 Assert.assertEquals(10000L, job.getAverageDuration()); +58 } +59 @Test +60publicvoid parseExecutionJob2() throws Exception { +61 InputStream input = getClass().getResourceAsStream("execution-succeeded.xml"); +62 Document document = ParserHelper.loadDocument(input); +63 +64 RundeckJob job = new JobParser("result/executions/execution/job").parseXmlNode(document); +65 +66 Assert.assertEquals("1", job.getId()); +67 Assert.assertEquals("ls", job.getName()); +68 Assert.assertEquals("list files", job.getDescription()); +69 Assert.assertEquals("system", job.getGroup()); +70 Assert.assertEquals("test", job.getProject()); +71 Assert.assertEquals(-1, job.getAverageDuration()); +72 } +73 +74 }
      diff --git a/xref-test/org/rundeck/api/parser/package-frame.html b/xref-test/org/rundeck/api/parser/package-frame.html index 4694e06..00dcb09 100644 --- a/xref-test/org/rundeck/api/parser/package-frame.html +++ b/xref-test/org/rundeck/api/parser/package-frame.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference Package org.rundeck.api.parser + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -17,6 +17,12 @@
      • AbortParserTest +
      • +
      • + BulkDeleteParserTest +
      • +
      • + DeleteParserTest
      • EventParserTest diff --git a/xref-test/org/rundeck/api/parser/package-summary.html b/xref-test/org/rundeck/api/parser/package-summary.html index fe66783..ad113cc 100644 --- a/xref-test/org/rundeck/api/parser/package-summary.html +++ b/xref-test/org/rundeck/api/parser/package-summary.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference Package org.rundeck.api.parser + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -39,6 +39,16 @@
      + + + + + +
      FileLine
      org/rundeck/api/domain/RundeckEvent.java60
      org/rundeck/api/domain/RundeckExecution.java59
          public Long getDurationInMillis() {
               if (startedAt == null || endedAt == null) {
                   return null;
               }
      @@ -229,7 +223,7 @@
       
           
      -
      Copyright © 2011. +
      Copyright © 2011-2012. All Rights Reserved.
      diff --git a/cpd.xml b/cpd.xml index f27718c..000999a 100644 --- a/cpd.xml +++ b/cpd.xml @@ -1,8 +1,8 @@ - - + + - - + + - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
    • Project Dependencies
    • -
    • Last Published: 2011-12-04
    • |
    • -
    • Version: 2.1-SNAPSHOT
    • +
    • Last Published: 2012-12-31
    • |
    • +
    • Version: 5.0-SNAPSHOT
    • @@ -94,18 +94,18 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      • Project Information
          +
        • + Continuous Integration +
        • +
        • + Dependencies +
        • Distribution Management
        • @@ -113,13 +113,7 @@ About
        • - Dependencies -
        • -
        • Issue Tracking -
        • -
        • - Continuous Integration
        • Project License @@ -174,36 +168,36 @@ } } -

          Dependency Tree

          • org.rundeck:rundeck-api-java-client:jar:2.1-SNAPSHOT Information
            • org.apache.httpcomponents:httpclient:jar:4.1.2 (compile) Information
              • org.apache.httpcomponents:httpcore:jar:4.1.2 (compile) Information
              • commons-logging:commons-logging:jar:1.1.1 (compile) Information
              • commons-codec:commons-codec:jar:1.4 (compile) Information
            • com.ibm.icu:icu4j:jar:2.6.1 (compile) Information
        • junit:junit:jar:4.10 (test) Information
          • org.hamcrest:hamcrest-core:jar:1.1 (test) Information
        • com.github.robfletcher:betamax:jar:1.0 (test) Information
        • org.codehaus.groovy:groovy-all:jar:1.8.4 (test) Information

      Licenses

      LGPL: xom

      BSD style: Hamcrest Core

      Eclipse Public License - Version 1.0: Jetty :: Continuation, Jetty :: Http Utility, Jetty :: IO Utility, Jetty :: Server Core, Jetty :: Utilities

      Unknown: Groovy, dom4j, icu4j, jaxen, jdom, servlet-api, xalan, xercesImpl, xmlParserAPIs

      Apache License: HttpClient, HttpCore, HttpMime

      Apache Software License - Version 2.0: Jetty :: Continuation, Jetty :: Http Utility, Jetty :: IO Utility, Jetty :: Server Core, Jetty :: Utilities

      Common Public License Version 1.0: JUnit

      The Apache Software License, Version 2.0: Apache Log4j, Betamax - An HTTP stubbing proxy for testing JVM applications., Commons Codec, Commons IO, Commons Lang, Commons Logging, RunDeck API - Java Client, XML Commons External Components XML APIs

      Apache License Version 2.0: SnakeYAML

      Dependency File Details

      FilenameSizeEntriesClassesPackagesJDK RevDebugSealed
      betamax-1.0.jar160.45 kB685971.5debug-
      icu4j-2.6.1.jar2.34 MB75564861.2debug-
      commons-codec-1.4.jar56.80 kB473051.4debug-
      commons-io-2.1.jar159.33 kB12210461.5debug-
      commons-lang-2.6.jar277.56 kB155133101.3debug-
      commons-logging-1.1.1.jar59.26 kB422821.1debug-
      dom4j-1.6.1.jar306.54 kB208190141.3debug-
      servlet-api-2.5.jar102.65 kB684221.5debug-
      jaxen-1.1.1.jar221.60 kB236214171.2debug-
      jdom-1.0.jar149.66 kB877581.1debug-
      junit-4.10.jar247.23 kB290252311.5debug-
      log4j-1.2.16.jar470.25 kB346308201.1debug-
      httpclient-4.1.2.jar344.00 kB309273221.5debug-
      httpcore-4.1.2.jar176.95 kB185163101.3debug-
      httpmime-4.1.2.jar26.26 kB311521.5debug-
      groovy-all-1.8.4.jar5.86 MB3,8723,686961.5debug-
      jetty-continuation-7.5.1.v20110908.jar19.72 kB231111.5debug-
      jetty-http-7.5.1.v20110908.jar110.53 kB674941.5debug-
      jetty-io-7.5.1.v20110908.jar90.57 kB695531.5debug-
      jetty-server-7.5.1.v20110908.jar296.87 kB17513991.5debug-
      jetty-util-7.5.1.v20110908.jar208.08 kB14012081.5debug-
      hamcrest-core-1.1.jar74.85 kB542131.5debug-
      snakeyaml-1.9.jar259.59 kB238202191.5debug-
      xalan-2.6.0.jar3.00 MB1,6251,548501.1debug-
      xercesImpl-2.6.2.jar986.99 kB845784371.1release-
      xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release-
      xml-apis-1.0.b2.jar106.76 kB217184171.2release-
      xom-1.0.jar106.32 kB1089661.2releasesealed
      TotalSizeEntriesClassesPackagesJDK RevDebugSealed
      2816.22 MB10,6209,6364321.5241
      compile: 16compile: 8.37 MBcompile: 5,210compile: 4,692compile: 229-compile: 12compile: 1
      test: 12test: 7.85 MBtest: 5,410test: 4,944test: 203-test: 12-

      Dependency Repository Locations

      Repo IDURLReleaseSnapshot
      sonatype-snapshotshttp://oss.sonatype.org/content/groups/jettyYesYes-
      apache.snapshotshttp://people.apache.org/repo/m2-snapshot-repository-Yes-
      sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes-
      centralhttp://repo1.maven.org/maven2Yes--

      Repository locations for each of the Dependencies.

      Artifactsonatype-snapshotsapache.snapshotssonatype-nexus-snapshotscentral
      com.github.robfletcher:betamax:jar:1.0---Found at http://repo1.maven.org/maven2
      com.ibm.icu:icu4j:jar:2.6.1---Found at http://repo1.maven.org/maven2
      commons-codec:commons-codec:jar:1.4---Found at http://repo1.maven.org/maven2
      commons-io:commons-io:jar:2.1---Found at http://repo1.maven.org/maven2
      commons-lang:commons-lang:jar:2.6---Found at http://repo1.maven.org/maven2
      commons-logging:commons-logging:jar:1.1.1---Found at http://repo1.maven.org/maven2
      dom4j:dom4j:jar:1.6.1---Found at http://repo1.maven.org/maven2
      javax.servlet:servlet-api:jar:2.5---Found at http://repo1.maven.org/maven2
      jaxen:jaxen:jar:1.1.1---Found at http://repo1.maven.org/maven2
      jdom:jdom:jar:1.0---Found at http://repo1.maven.org/maven2
      junit:junit:jar:4.10---Found at http://repo1.maven.org/maven2
      log4j:log4j:jar:1.2.16---Found at http://repo1.maven.org/maven2
      org.apache.httpcomponents:httpclient:jar:4.1.2---Found at http://repo1.maven.org/maven2
      org.apache.httpcomponents:httpcore:jar:4.1.2---Found at http://repo1.maven.org/maven2
      org.apache.httpcomponents:httpmime:jar:4.1.2---Found at http://repo1.maven.org/maven2
      org.codehaus.groovy:groovy-all:jar:1.8.4---Found at http://repo1.maven.org/maven2
      org.eclipse.jetty:jetty-continuation:jar:7.5.1.v20110908Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repo1.maven.org/maven2
      org.eclipse.jetty:jetty-http:jar:7.5.1.v20110908Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repo1.maven.org/maven2
      org.eclipse.jetty:jetty-io:jar:7.5.1.v20110908Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repo1.maven.org/maven2
      org.eclipse.jetty:jetty-server:jar:7.5.1.v20110908Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repo1.maven.org/maven2
      org.eclipse.jetty:jetty-util:jar:7.5.1.v20110908Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repo1.maven.org/maven2
      org.hamcrest:hamcrest-core:jar:1.1---Found at http://repo1.maven.org/maven2
      org.yaml:snakeyaml:jar:1.9---Found at http://repo1.maven.org/maven2
      xalan:xalan:jar:2.6.0---Found at http://repo1.maven.org/maven2
      xerces:xercesImpl:jar:2.6.2---Found at http://repo1.maven.org/maven2
      xerces:xmlParserAPIs:jar:2.6.2---Found at http://repo1.maven.org/maven2
      xml-apis:xml-apis:jar:1.0.b2---Found at http://repo1.maven.org/maven2
      xom:xom:jar:1.0---Found at http://repo1.maven.org/maven2
      Totalsonatype-snapshotsapache.snapshotssonatype-nexus-snapshotscentral
      28 (compile: 16, test: 12)50028
      -
      Copyright © 2011. +
      Copyright © 2011-2012. All Rights Reserved.
      diff --git a/dependency-updates-report.html b/dependency-updates-report.html index 48fb1b5..a649866 100644 --- a/dependency-updates-report.html +++ b/dependency-updates-report.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
    • Dependency Updates Report
    • -
    • Last Published: 2011-12-04
    • |
    • -
    • Version: 2.1-SNAPSHOT
    • +
    • Last Published: 2012-12-31
    • |
    • +
    • Version: 5.0-SNAPSHOT
    • @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -131,10 +125,10 @@ Dependency Updates Report
      • - Property Updates Report + Plugin Updates Report
      • - Plugin Updates Report + Property Updates Report
      • PMD Report @@ -163,14 +157,14 @@
        -

        Overview

        This report summarizes newer versions that may be available for your project's various dependencies.

        # of dependencies using the latest version available5
        # of dependencies where the next version available is smaller than an incremental version update0
        # of dependencies where the next version available is an incremental version update4
        # of dependencies where the next version available is a minor version update0
        # of dependencies where the next version available is a major version update0

        Dependency Management

        This project does not declare any dependencies in a dependencyManagement section.

        Dependencies

        StatusGroup IdArtifact IdCurrent VersionScopeClassifierTypeNext VersionNext IncrementalNext MinorNext Major
        com.github.robfletcherbetamax1.0testjar
        commons-iocommons-io2.1compilejar
        commons-langcommons-lang2.6compilejar
        dom4jdom4j1.6.1compilejar
        jaxenjaxen1.1.1compilejar1.1.3
        junitjunit4.10testjar
        org.apache.httpcomponentshttpclient4.1.2compilejar4.2-alpha1
        org.apache.httpcomponentshttpmime4.1.2compilejar4.2-alpha1
        org.codehaus.groovygroovy-all1.8.4testjar1.9.0-beta-12.0.0-beta-1
        StatusGroup IdArtifact IdCurrent VersionScopeClassifierTypeNext VersionNext IncrementalNext MinorNext Major

        Dependency Updates

        com.github.robfletcher:betamax

        Status No newer versions available.
        Group Idcom.github.robfletcher
        Artifact Idbetamax
        Current Version1.0
        Scopetest
        Classifier
        Typejar

        commons-io:commons-io

        Status No newer versions available.
        Group Idcommons-io
        Artifact Idcommons-io
        Current Version2.1
        Scopecompile
        Classifier
        Typejar

        commons-lang:commons-lang

        Status No newer versions available.
        Group Idcommons-lang
        Artifact Idcommons-lang
        Current Version2.6
        Scopecompile
        Classifier
        Typejar

        dom4j:dom4j

        Status No newer versions available.
        Group Iddom4j
        Artifact Iddom4j
        Current Version1.6.1
        Scopecompile
        Classifier
        Typejar

        jaxen:jaxen

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idjaxen
        Artifact Idjaxen
        Current Version1.1.1
        Scopecompile
        Classifier
        Typejar
        Newer versions1.1.3 Next Incremental

        junit:junit

        Status No newer versions available.
        Group Idjunit
        Artifact Idjunit
        Current Version4.10
        Scopetest
        Classifier
        Typejar

        org.apache.httpcomponents:httpclient

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.httpcomponents
        Artifact Idhttpclient
        Current Version4.1.2
        Scopecompile
        Classifier
        Typejar
        Newer versions4.2-alpha1 Next Incremental

        org.apache.httpcomponents:httpmime

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.httpcomponents
        Artifact Idhttpmime
        Current Version4.1.2
        Scopecompile
        Classifier
        Typejar
        Newer versions4.2-alpha1 Next Incremental

        org.codehaus.groovy:groovy-all

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.codehaus.groovy
        Artifact Idgroovy-all
        Current Version1.8.4
        Scopetest
        Classifier
        Typejar
        Newer versions1.9.0-beta-1 Next Incremental
        1.9.0-beta-2
        1.9.0-beta-3
        1.9.0-beta-4 Latest Incremental
        2.0.0-beta-1 Next Minor
        +

        Overview

        This report summarizes newer versions that may be available for your project's various dependencies.

        # of dependencies using the latest version available2
        # of dependencies where the next version available is smaller than an incremental version update0
        # of dependencies where the next version available is an incremental version update5
        # of dependencies where the next version available is a minor version update1
        # of dependencies where the next version available is a major version update1

        Dependency Management

        This project does not declare any dependencies in a dependencyManagement section.

        Dependencies

        StatusGroup IdArtifact IdCurrent VersionScopeClassifierTypeNext VersionNext IncrementalNext MinorNext Major
        com.github.robfletcherbetamax1.0testjar
        commons-iocommons-io2.1compilejar2.2
        commons-langcommons-lang2.6compilejar
        dom4jdom4j1.6.1compilejar20040902.021138
        jaxenjaxen1.1.1compilejar1.1.3
        junitjunit4.10testjar4.11-beta-14.11
        org.apache.httpcomponentshttpclient4.1.2compilejar4.1.34.2
        org.apache.httpcomponentshttpmime4.1.2compilejar4.1.34.2
        org.codehaus.groovygroovy-all1.8.4testjar1.8.52.0.0-beta-12.0.0
        StatusGroup IdArtifact IdCurrent VersionScopeClassifierTypeNext VersionNext IncrementalNext MinorNext Major

        Dependency Updates

        com.github.robfletcher:betamax

        Status No newer versions available.
        Group Idcom.github.robfletcher
        Artifact Idbetamax
        Current Version1.0
        Scopetest
        Classifier
        Typejar

        commons-io:commons-io

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idcommons-io
        Artifact Idcommons-io
        Current Version2.1
        Scopecompile
        Classifier
        Typejar
        Newer versions2.2 Next Minor
        2.3
        2.4 Latest Minor

        commons-lang:commons-lang

        Status No newer versions available.
        Group Idcommons-lang
        Artifact Idcommons-lang
        Current Version2.6
        Scopecompile
        Classifier
        Typejar

        dom4j:dom4j

        Status There is at least one newer major version available. Major updates are rarely passive.
        Group Iddom4j
        Artifact Iddom4j
        Current Version1.6.1
        Scopecompile
        Classifier
        Typejar
        Newer versions20040902.021138 Next Major

        jaxen:jaxen

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idjaxen
        Artifact Idjaxen
        Current Version1.1.1
        Scopecompile
        Classifier
        Typejar
        Newer versions1.1.3 Next Incremental
        1.1.4 Latest Incremental

        junit:junit

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idjunit
        Artifact Idjunit
        Current Version4.10
        Scopetest
        Classifier
        Typejar
        Newer versions4.11-beta-1 Next Incremental
        4.11 Next Minor

        org.apache.httpcomponents:httpclient

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.httpcomponents
        Artifact Idhttpclient
        Current Version4.1.2
        Scopecompile
        Classifier
        Typejar
        Newer versions4.1.3 Next Incremental
        4.2-alpha1
        4.2-beta1 Latest Incremental
        4.2 Next Minor
        4.2.1
        4.2.2 Latest Minor

        org.apache.httpcomponents:httpmime

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.httpcomponents
        Artifact Idhttpmime
        Current Version4.1.2
        Scopecompile
        Classifier
        Typejar
        Newer versions4.1.3 Next Incremental
        4.2-alpha1
        4.2-beta1 Latest Incremental
        4.2 Next Minor
        4.2.1
        4.2.2 Latest Minor

        org.codehaus.groovy:groovy-all

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.codehaus.groovy
        Artifact Idgroovy-all
        Current Version1.8.4
        Scopetest
        Classifier
        Typejar
        Newer versions1.8.5 Next Incremental
        1.8.6
        1.8.7
        1.8.8
        1.9.0-beta-1
        1.9.0-beta-2
        1.9.0-beta-3
        1.9.0-beta-4 Latest Incremental
        2.0.0-beta-1 Next Minor
        2.0.0-beta-2
        2.0.0-beta-3
        2.0.0-rc-1
        2.0.0-rc-2
        2.0.0-rc-3
        2.0.0-rc-4 Latest Minor
        2.0.0 Next Major
        2.0.1
        2.0.2
        2.0.3
        2.0.4
        2.0.5
        2.0.6
        2.1.0-beta-1 Latest Major
      -
      Copyright © 2011. +
      Copyright © 2011-2012. All Rights Reserved.
      diff --git a/distribution-management.html b/distribution-management.html index 7c2ab36..8646a67 100644 --- a/distribution-management.html +++ b/distribution-management.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
    • Project Distribution Management
    • -
    • Last Published: 2011-12-04
    • |
    • -
    • Version: 2.1-SNAPSHOT
    • +
    • Last Published: 2012-12-31
    • |
    • +
    • Version: 5.0-SNAPSHOT
    • @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      -
      Copyright © 2011. +
      Copyright © 2011-2012. All Rights Reserved.
      diff --git a/download.html b/download.html index 74bfcd5..f0ec890 100644 --- a/download.html +++ b/download.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
    • -
    • Last Published: 2011-12-04
    • |
    • -
    • Version: 2.1-SNAPSHOT
    • +
    • Last Published: 2012-12-31
    • |
    • +
    • Version: 5.0-SNAPSHOT
    • @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      -
      Copyright © 2011. +
      Copyright © 2011-2012. All Rights Reserved.
      diff --git a/faq.html b/faq.html index 73c8a17..f8cf9e1 100644 --- a/faq.html +++ b/faq.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
    • Frequently Asked Questions
    • -
    • Last Published: 2011-12-04
    • |
    • -
    • Version: 2.1-SNAPSHOT
    • +
    • Last Published: 2012-12-31
    • |
    • +
    • Version: 5.0-SNAPSHOT
    • @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -167,7 +161,7 @@
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/findbugs.html b/findbugs.html index 01fd95c..43bf548 100644 --- a/findbugs.html +++ b/findbugs.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • FindBugs Bug Detector Report
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -131,10 +125,10 @@ Dependency Updates Report
      • - Property Updates Report + Plugin Updates Report
      • - Plugin Updates Report + Property Updates Report
      • PMD Report @@ -163,14 +157,14 @@
        -

        FindBugs Bug Detector Report

        The following document contains the results of FindBugs Report

        FindBugs Version is 1.3.9

        Threshold is medium

        Effort is min

        Summary

        ClassesBugsErrorsMissing Classes
        41000

        Files

        ClassBugs
        +

        FindBugs Bug Detector Report

        The following document contains the results of FindBugs Report

        FindBugs Version is 1.3.9

        Threshold is medium

        Effort is min

        Summary

        ClassesBugsErrorsMissing Classes
        59200

        org.rundeck.api.query.ExecutionQuery

        BugCategoryDetailsLinePriority
        org.rundeck.api.query.ExecutionQuery.getBegin() may expose internal representation by returning ExecutionQuery.beginMALICIOUS_CODEEI_EXPOSE_REP139Medium
        org.rundeck.api.query.ExecutionQuery.getEnd() may expose internal representation by returning ExecutionQuery.endMALICIOUS_CODEEI_EXPOSE_REP143Medium
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/groovy.html b/groovy.html index 7f2b036..f6828e7 100644 --- a/groovy.html +++ b/groovy.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -203,7 +197,7 @@ println "${result.succeededJobs.size} jobs successfully imported, ${result.
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/index.html b/index.html index 4301b4b..ea3ad64 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,32 +94,26 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      -
      Older versions
      -
      Project Documentation
        @@ -107,21 +101,21 @@ Project Information
        • + Continuous Integration +
        • +
        • + Dependencies +
        • +
        • Distribution Management
        • About -
        • -
        • - Dependencies
        • Issue Tracking
        • - Continuous Integration -
        • -
        • Project License
        • @@ -164,7 +158,7 @@
          -
          Copyright © 2011. +
          Copyright © 2011-2012. All Rights Reserved.
          diff --git a/issue-tracking.html b/issue-tracking.html index 29150e6..59dbfcd 100644 --- a/issue-tracking.html +++ b/issue-tracking.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
        • Issue Tracking
        • -
        • Last Published: 2011-12-04
        • |
        • -
        • Version: 2.1-SNAPSHOT
        • +
        • Last Published: 2012-12-31
        • |
        • +
        • Version: 5.0-SNAPSHOT
        @@ -94,33 +94,27 @@
      • Jython
      • -
      -
      Older versions
      -
      Project Documentation
      -
      Older versions
      -
      Project Documentation
        @@ -211,7 +205,7 @@ puts "#{result.succeededJobs.size} jobs successfully imported, #{result.ski
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/jython.html b/jython.html index 20bb43f..9faddb6 100644 --- a/jython.html +++ b/jython.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -200,7 +194,7 @@ print("%s jobs successfully imported, %s jobs skipped, and %s jobs failed&q
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/license.html b/license.html index 37b715a..7c9dd34 100644 --- a/license.html +++ b/license.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • Project License
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,32 +94,26 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      -
      Older versions
      -
      Project Documentation
      -
      Older versions
      -
      Project Documentation
        @@ -129,13 +123,13 @@
      • Dependency Updates Report -
      • -
      • - Property Updates Report
      • Plugin Updates Report
      • +
      • + Property Updates Report +
      • PMD Report
      • @@ -163,14 +157,14 @@
        -

        Overview

        This report summarizes newer versions that may be available for your project's various plugins.

        # of plugins using the latest version available27
        # of plugins where the next version available is smaller than an incremental version update1
        # of plugins where the next version available is an incremental version update1
        # of plugins where the next version available is a minor version update2
        # of plugins where the next version available is a major version update0
        # of plugins where a dependencies section containes a dependency with an updated version0

        Plugin Management

        StatusGroup IdArtifact IdCurrent VersionNext VersionNext IncrementalNext MinorNext MajorDependency status
        org.apache.maven.pluginsmaven-antrun-plugin1.7
        org.apache.maven.pluginsmaven-assembly-plugin2.2.2
        org.apache.maven.pluginsmaven-checkstyle-plugin2.8
        org.apache.maven.pluginsmaven-clean-plugin2.4.1
        org.apache.maven.pluginsmaven-compiler-plugin2.3.2
        org.apache.maven.pluginsmaven-dependency-plugin2.3
        org.apache.maven.pluginsmaven-deploy-plugin2.7
        org.apache.maven.pluginsmaven-ear-plugin2.3.12.3.22.4
        org.apache.maven.pluginsmaven-eclipse-plugin2.8
        org.apache.maven.pluginsmaven-ejb-plugin2.12.2
        org.apache.maven.pluginsmaven-enforcer-plugin1.0.1
        org.apache.maven.pluginsmaven-gpg-plugin1.4
        org.apache.maven.pluginsmaven-help-plugin2.1.1
        org.apache.maven.pluginsmaven-install-plugin2.3.1
        org.apache.maven.pluginsmaven-jar-plugin2.3.2
        org.apache.maven.pluginsmaven-javadoc-plugin2.8
        org.apache.maven.pluginsmaven-plugin-plugin2.4.32.5
        org.apache.maven.pluginsmaven-pmd-plugin2.6
        org.apache.maven.pluginsmaven-rar-plugin2.2
        org.apache.maven.pluginsmaven-release-plugin2.2.1
        org.apache.maven.pluginsmaven-resources-plugin2.5
        org.apache.maven.pluginsmaven-site-plugin3.0
        org.apache.maven.pluginsmaven-source-plugin2.1.2
        org.apache.maven.pluginsmaven-surefire-plugin2.10
        org.apache.maven.pluginsmaven-war-plugin2.1-alpha-22.1-beta-12.1.1
        org.codehaus.mojofindbugs-maven-plugin2.3.2
        StatusGroup IdArtifact IdCurrent VersionNext VersionNext IncrementalNext MinorNext MajorDependency status

        Plugins

        StatusGroup IdArtifact IdCurrent VersionNext VersionNext IncrementalNext MinorNext MajorDependency status
        org.apache.maven.pluginsmaven-changes-plugin2.6
        org.apache.maven.pluginsmaven-jxr-plugin2.3
        org.apache.maven.pluginsmaven-project-info-reports-plugin2.4
        org.codehaus.mojotaglist-maven-plugin2.4
        org.codehaus.mojoversions-maven-plugin1.2
        StatusGroup IdArtifact IdCurrent VersionNext VersionNext IncrementalNext MinorNext MajorDependency status

        Plugin Updates

        Plugin org.apache.maven.plugins:maven-antrun-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-antrun-plugin
        Current Version1.7

        Plugin org.apache.maven.plugins:maven-assembly-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-assembly-plugin
        Current Version2.2.2

        Plugin org.apache.maven.plugins:maven-changes-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-changes-plugin
        Current Version2.6

        Plugin org.apache.maven.plugins:maven-checkstyle-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-checkstyle-plugin
        Current Version2.8

        Plugin org.apache.maven.plugins:maven-clean-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-clean-plugin
        Current Version2.4.1

        Plugin org.apache.maven.plugins:maven-compiler-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-compiler-plugin
        Current Version2.3.2

        Plugin org.apache.maven.plugins:maven-dependency-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-dependency-plugin
        Current Version2.3

        Plugin org.apache.maven.plugins:maven-deploy-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-deploy-plugin
        Current Version2.7

        Plugin org.apache.maven.plugins:maven-ear-plugin

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-ear-plugin
        Current Version2.3.1
        Newer versions2.3.2 Next Incremental
        2.4 Next Minor
        2.4.1
        2.4.2
        2.5
        2.6 Latest Minor

        Plugin org.apache.maven.plugins:maven-eclipse-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-eclipse-plugin
        Current Version2.8

        Plugin org.apache.maven.plugins:maven-ejb-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-ejb-plugin
        Current Version2.1
        Newer versions2.2 Next Minor
        2.2.1
        2.3 Latest Minor

        Plugin org.apache.maven.plugins:maven-enforcer-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-enforcer-plugin
        Current Version1.0.1

        Plugin org.apache.maven.plugins:maven-gpg-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-gpg-plugin
        Current Version1.4

        Plugin org.apache.maven.plugins:maven-help-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-help-plugin
        Current Version2.1.1

        Plugin org.apache.maven.plugins:maven-install-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-install-plugin
        Current Version2.3.1

        Plugin org.apache.maven.plugins:maven-jar-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-jar-plugin
        Current Version2.3.2

        Plugin org.apache.maven.plugins:maven-javadoc-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-javadoc-plugin
        Current Version2.8

        Plugin org.apache.maven.plugins:maven-jxr-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-jxr-plugin
        Current Version2.3

        Plugin org.apache.maven.plugins:maven-plugin-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-plugin-plugin
        Current Version2.4.3
        Newer versions2.5 Next Minor
        2.5.1
        2.6
        2.7
        2.8 Latest Minor

        Plugin org.apache.maven.plugins:maven-pmd-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-pmd-plugin
        Current Version2.6

        Plugin org.apache.maven.plugins:maven-project-info-reports-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-project-info-reports-plugin
        Current Version2.4

        Plugin org.apache.maven.plugins:maven-rar-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-rar-plugin
        Current Version2.2

        Plugin org.apache.maven.plugins:maven-release-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-release-plugin
        Current Version2.2.1

        Plugin org.apache.maven.plugins:maven-resources-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-resources-plugin
        Current Version2.5

        Plugin org.apache.maven.plugins:maven-site-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-site-plugin
        Current Version3.0

        Plugin org.apache.maven.plugins:maven-source-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-source-plugin
        Current Version2.1.2

        Plugin org.apache.maven.plugins:maven-surefire-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-surefire-plugin
        Current Version2.10

        Plugin org.apache.maven.plugins:maven-war-plugin

        Status There is at least one newer version available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-war-plugin
        Current Version2.1-alpha-2
        Newer versions2.1-beta-1 Next Version
        2.1
        2.1.1 Next Incremental

        Plugin org.codehaus.mojo:findbugs-maven-plugin

        Status No newer versions available.
        Group Idorg.codehaus.mojo
        Artifact Idfindbugs-maven-plugin
        Current Version2.3.2

        Plugin org.codehaus.mojo:taglist-maven-plugin

        Status No newer versions available.
        Group Idorg.codehaus.mojo
        Artifact Idtaglist-maven-plugin
        Current Version2.4

        Plugin org.codehaus.mojo:versions-maven-plugin

        Status No newer versions available.
        Group Idorg.codehaus.mojo
        Artifact Idversions-maven-plugin
        Current Version1.2
        +

        Overview

        This report summarizes newer versions that may be available for your project's various plugins.

        # of plugins using the latest version available4
        # of plugins where the next version available is smaller than an incremental version update0
        # of plugins where the next version available is an incremental version update3
        # of plugins where the next version available is a minor version update14
        # of plugins where the next version available is a major version update0
        # of plugins where a dependencies section containes a dependency with an updated version0

        Plugin Management

        StatusGroup IdArtifact IdCurrent VersionNext VersionNext IncrementalNext MinorNext MajorDependency status
        org.apache.maven.pluginsmaven-antrun-plugin1.7
        org.apache.maven.pluginsmaven-assembly-plugin2.2.22.3
        org.apache.maven.pluginsmaven-checkstyle-plugin2.82.9
        org.apache.maven.pluginsmaven-clean-plugin2.4.12.5
        org.apache.maven.pluginsmaven-compiler-plugin2.3.22.43.0
        org.apache.maven.pluginsmaven-dependency-plugin2.32.4
        org.apache.maven.pluginsmaven-deploy-plugin2.7
        org.apache.maven.pluginsmaven-eclipse-plugin2.82.9
        org.apache.maven.pluginsmaven-enforcer-plugin1.0.11.1
        org.apache.maven.pluginsmaven-gpg-plugin1.4
        org.apache.maven.pluginsmaven-help-plugin2.1.1
        org.apache.maven.pluginsmaven-install-plugin2.3.12.4
        org.apache.maven.pluginsmaven-jar-plugin2.3.22.4
        org.apache.maven.pluginsmaven-javadoc-plugin2.82.8.12.9
        org.apache.maven.pluginsmaven-pmd-plugin2.62.7
        org.apache.maven.pluginsmaven-release-plugin2.2.12.2.22.3
        org.apache.maven.pluginsmaven-resources-plugin2.52.6
        org.apache.maven.pluginsmaven-site-plugin3.03.1
        org.apache.maven.pluginsmaven-source-plugin2.1.22.2
        org.apache.maven.pluginsmaven-surefire-plugin2.102.11
        org.codehaus.mojofindbugs-maven-plugin2.3.22.3.32.4.0
        StatusGroup IdArtifact IdCurrent VersionNext VersionNext IncrementalNext MinorNext MajorDependency status

        Plugins

        This project does not declare any plugins in a build/plugins setcion.

        Plugin Updates

        Plugin org.apache.maven.plugins:maven-antrun-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-antrun-plugin
        Current Version1.7

        Plugin org.apache.maven.plugins:maven-assembly-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-assembly-plugin
        Current Version2.2.2
        Newer versions2.3 Next Minor
        2.4 Latest Minor

        Plugin org.apache.maven.plugins:maven-checkstyle-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-checkstyle-plugin
        Current Version2.8
        Newer versions2.9 Next Minor
        2.9.1 Latest Minor

        Plugin org.apache.maven.plugins:maven-clean-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-clean-plugin
        Current Version2.4.1
        Newer versions2.5 Next Minor

        Plugin org.apache.maven.plugins:maven-compiler-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-compiler-plugin
        Current Version2.3.2
        Newer versions2.4 Next Minor
        2.5
        2.5.1 Latest Minor
        3.0 Next Major

        Plugin org.apache.maven.plugins:maven-dependency-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-dependency-plugin
        Current Version2.3
        Newer versions2.4 Next Minor
        2.5
        2.5.1
        2.6 Latest Minor

        Plugin org.apache.maven.plugins:maven-deploy-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-deploy-plugin
        Current Version2.7

        Plugin org.apache.maven.plugins:maven-eclipse-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-eclipse-plugin
        Current Version2.8
        Newer versions2.9 Next Minor

        Plugin org.apache.maven.plugins:maven-enforcer-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-enforcer-plugin
        Current Version1.0.1
        Newer versions1.1 Next Minor
        1.1.1
        1.2 Latest Minor

        Plugin org.apache.maven.plugins:maven-gpg-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-gpg-plugin
        Current Version1.4

        Plugin org.apache.maven.plugins:maven-help-plugin

        Status No newer versions available.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-help-plugin
        Current Version2.1.1

        Plugin org.apache.maven.plugins:maven-install-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-install-plugin
        Current Version2.3.1
        Newer versions2.4 Next Minor

        Plugin org.apache.maven.plugins:maven-jar-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-jar-plugin
        Current Version2.3.2
        Newer versions2.4 Next Minor

        Plugin org.apache.maven.plugins:maven-javadoc-plugin

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-javadoc-plugin
        Current Version2.8
        Newer versions2.8.1 Next Incremental
        2.9 Next Minor

        Plugin org.apache.maven.plugins:maven-pmd-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-pmd-plugin
        Current Version2.6
        Newer versions2.7 Next Minor
        2.7.1 Latest Minor

        Plugin org.apache.maven.plugins:maven-release-plugin

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-release-plugin
        Current Version2.2.1
        Newer versions2.2.2 Next Incremental
        2.3 Next Minor
        2.3.1
        2.3.2
        2.4 Latest Minor

        Plugin org.apache.maven.plugins:maven-resources-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-resources-plugin
        Current Version2.5
        Newer versions2.6 Next Minor

        Plugin org.apache.maven.plugins:maven-site-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-site-plugin
        Current Version3.0
        Newer versions3.1 Next Minor
        3.2 Latest Minor

        Plugin org.apache.maven.plugins:maven-source-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-source-plugin
        Current Version2.1.2
        Newer versions2.2 Next Minor
        2.2.1 Latest Minor

        Plugin org.apache.maven.plugins:maven-surefire-plugin

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Group Idorg.apache.maven.plugins
        Artifact Idmaven-surefire-plugin
        Current Version2.10
        Newer versions2.11 Next Minor
        2.12
        2.12.1
        2.12.2
        2.12.3
        2.12.4
        2.13 Latest Minor

        Plugin org.codehaus.mojo:findbugs-maven-plugin

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Group Idorg.codehaus.mojo
        Artifact Idfindbugs-maven-plugin
        Current Version2.3.2
        Newer versions2.3.3 Next Incremental
        2.4.0 Next Minor
        2.5
        2.5.1
        2.5.2 Latest Minor
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/pmd.html b/pmd.html index 1a0a0b4..b1669a6 100644 --- a/pmd.html +++ b/pmd.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • PMD Results
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -131,10 +125,10 @@ Dependency Updates Report
      • - Property Updates Report + Plugin Updates Report
      • - Plugin Updates Report + Property Updates Report
      • PMD Report @@ -163,14 +157,14 @@
        -

        PMD Results

        The following document contains the results of PMD 4.2.5.

        Files

        PMD found no problems in your source code.

        +

        PMD Results

        The following document contains the results of PMD 4.2.5.

        Files

        org/rundeck/api/ApiCall.java

        ViolationLine
        Avoid unused imports such as 'org.apache.http.cookie.Cookie'33
        Avoid unused imports such as 'org.apache.http.client.CookieStore'41

        org/rundeck/api/domain/RundeckOutput.java

        ViolationLine
        Avoid unused imports such as 'org.rundeck.api.domain.RundeckExecution.ExecutionStatus'8

        org/rundeck/api/parser/BulkDeleteParser.java

        ViolationLine
        Avoid unused imports such as 'org.dom4j.Element'28
        Avoid empty catch blocks70 - 72

        org/rundeck/api/parser/DeleteParser.java

        ViolationLine
        Avoid unused imports such as 'org.dom4j.Element'28

        org/rundeck/api/parser/OutputParser.java

        ViolationLine
        Avoid unused imports such as 'org.rundeck.api.domain.RundeckExecution.ExecutionStatus'10

        org/rundeck/api/parser/PagedResultParser.java

        ViolationLine
        Avoid empty catch blocks112 - 113
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/pmd.xml b/pmd.xml index 69188c4..6ffe91e 100644 --- a/pmd.xml +++ b/pmd.xml @@ -1,3 +1,39 @@ - + + + +Avoid unused imports such as 'org.apache.http.cookie.Cookie' + + +Avoid unused imports such as 'org.apache.http.client.CookieStore' + + + + +Avoid unused imports such as 'org.rundeck.api.domain.RundeckExecution.ExecutionStatus' + + + + +Avoid unused imports such as 'org.dom4j.Element' + + +Avoid empty catch blocks + + + + +Avoid unused imports such as 'org.dom4j.Element' + + + + +Avoid unused imports such as 'org.rundeck.api.domain.RundeckExecution.ExecutionStatus' + + + + +Avoid empty catch blocks + + \ No newline at end of file diff --git a/project-info.html b/project-info.html index 5b976ec..4330d69 100644 --- a/project-info.html +++ b/project-info.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • Project Information
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,32 +94,26 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      • Project Information
          +
        • + Continuous Integration +
        • +
        • + Dependencies +
        • Distribution Management
        • About -
        • -
        • - Dependencies
        • Issue Tracking -
        • -
        • - Continuous Integration
        • Project License @@ -157,14 +151,14 @@
          -

          Project Information

          This document provides an overview of the various documents and links that are part of this project's general information. All of this content is automatically generated by Maven on behalf of the project.

          Overview

          DocumentDescription
          Distribution ManagementThis document provides informations on the distribution management of this project.
          AboutJava client for the RunDeck REST API
          DependenciesThis document lists the project's dependencies and provides information on each dependency.
          Issue TrackingThis is a link to the issue management system for this project. Issues (bugs, features, change requests) can be created and queried using this link.
          Continuous IntegrationThis is a link to the definitions of all continuous integration processes that builds and tests code on a frequent, regular basis.
          Project LicenseThis is a link to the definitions of project licenses.
          Mailing ListsThis document provides subscription and archive information for this project's mailing lists.
          Project TeamThis document provides information on the members of this project. These are the individuals who have contributed to the project in one form or another.
          Source RepositoryThis is a link to the online source repository that can be viewed via a web browser.
          Project SummaryThis document lists other related information of this project
          +

          Project Information

          This document provides an overview of the various documents and links that are part of this project's general information. All of this content is automatically generated by Maven on behalf of the project.

          Overview

          DocumentDescription
          Continuous IntegrationThis is a link to the definitions of all continuous integration processes that builds and tests code on a frequent, regular basis.
          DependenciesThis document lists the project's dependencies and provides information on each dependency.
          Distribution ManagementThis document provides informations on the distribution management of this project.
          AboutJava client for the RunDeck REST API
          Issue TrackingThis is a link to the issue management system for this project. Issues (bugs, features, change requests) can be created and queried using this link.
          Project LicenseThis is a link to the definitions of project licenses.
          Mailing ListsThis document provides subscription and archive information for this project's mailing lists.
          Project TeamThis document provides information on the members of this project. These are the individuals who have contributed to the project in one form or another.
          Source RepositoryThis is a link to the online source repository that can be viewed via a web browser.
          Project SummaryThis document lists other related information of this project
          -
          Copyright © 2011. +
          Copyright © 2011-2012. All Rights Reserved.
          diff --git a/project-reports.html b/project-reports.html index da5b337..cf60520 100644 --- a/project-reports.html +++ b/project-reports.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
        • Generated Reports
        • -
        • Last Published: 2011-12-04
        • |
        • -
        • Version: 2.1-SNAPSHOT
        • +
        • Last Published: 2012-12-31
        • |
        • +
        • Version: 5.0-SNAPSHOT
        @@ -94,12 +94,6 @@
      • Jython
      • -
      -
      Older versions
      -
      Project Documentation
        @@ -131,10 +125,10 @@ Dependency Updates Report
      • - Property Updates Report + Plugin Updates Report
      • - Plugin Updates Report + Property Updates Report
      • PMD Report @@ -163,14 +157,14 @@
        -

        Generated Reports

        This document provides an overview of the various reports that are automatically generated by Maven . Each report is briefly described below.

        Overview

        DocumentDescription
        JavaDocsJavaDoc API documentation.
        Test JavaDocsTest JavaDoc API documentation.
        Source XrefHTML based, cross-reference version of Java source code.
        Test Source XrefHTML based, cross-reference version of Java test source code.
        Tag ListReport on various tags found in the code.
        Changes ReportChanges Report on Releases of the Project.
        Dependency Updates ReportProvides details of the dependencies which have updated versions available.
        Property Updates ReportProvides details of properties which control versions of dependencies and/or plugins, and indicates any newer versions which are available.
        Plugin Updates ReportProvides details of the plugins used by this project which have newer versions available.
        PMD ReportVerification of coding rules.
        CPD ReportDuplicate code detection.
        FindBugs ReportGenerates a source code report with the FindBugs Library.
        +

        Generated Reports

        This document provides an overview of the various reports that are automatically generated by Maven . Each report is briefly described below.

        Overview

        DocumentDescription
        JavaDocsJavaDoc API documentation.
        Test JavaDocsTest JavaDoc API documentation.
        Source XrefHTML based, cross-reference version of Java source code.
        Test Source XrefHTML based, cross-reference version of Java test source code.
        Tag ListReport on various tags found in the code.
        Changes ReportChanges Report on Releases of the Project.
        Dependency Updates ReportProvides details of the dependencies which have updated versions available.
        Plugin Updates ReportProvides details of the plugins used by this project which have newer versions available.
        Property Updates ReportProvides details of properties which control versions of dependencies and/or plugins, and indicates any newer versions which are available.
        PMD ReportVerification of coding rules.
        CPD ReportDuplicate code detection.
        FindBugs ReportGenerates a source code report with the FindBugs Library.
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/project-summary.html b/project-summary.html index b229730..67ae331 100644 --- a/project-summary.html +++ b/project-summary.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • Project Summary
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,32 +94,26 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      • Project Information
          +
        • + Continuous Integration +
        • +
        • + Dependencies +
        • Distribution Management
        • About -
        • -
        • - Dependencies
        • Issue Tracking -
        • -
        • - Continuous Integration
        • Project License @@ -157,14 +151,14 @@
          -

          Project Summary

          Project Information

          FieldValue
          NameRunDeck API - Java Client
          DescriptionJava client for the RunDeck REST API
          Homepagehttp://vbehar.github.com/rundeck-api-java-client

          Project Organization

          This project does not belong to an organization.

          Build Information

          FieldValue
          GroupIdorg.rundeck
          ArtifactIdrundeck-api-java-client
          Version2.1-SNAPSHOT
          Typejar
          JDK Rev1.6
          +

          Project Summary

          Project Information

          FieldValue
          NameRunDeck API - Java Client
          DescriptionJava client for the RunDeck REST API
          Homepagehttp://rundeck.github.com/rundeck-api-java-client

          Project Organization

          This project does not belong to an organization.

          Build Information

          FieldValue
          GroupIdorg.rundeck
          ArtifactIdrundeck-api-java-client
          Version5.0-SNAPSHOT
          Typejar
          JDK Rev1.6
          -
          Copyright © 2011. +
          Copyright © 2011-2012. All Rights Reserved.
          diff --git a/property-updates-report.html b/property-updates-report.html index 11a46a2..22e8341 100644 --- a/property-updates-report.html +++ b/property-updates-report.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
        • Property Updates Report
        • -
        • Last Published: 2011-12-04
        • |
        • -
        • Version: 2.1-SNAPSHOT
        • +
        • Last Published: 2012-12-31
        • |
        • +
        • Version: 5.0-SNAPSHOT
        @@ -94,12 +94,6 @@
      • Jython
      • -
      -
      Older versions
      -
      Project Documentation
        @@ -131,12 +125,12 @@ Dependency Updates Report
      • - Property Updates Report -
      • -
      • Plugin Updates Report
      • + Property Updates Report +
      • +
      • PMD Report
      • @@ -163,14 +157,14 @@
        -

        Overview

        This report summarizes newer versions that may be available for your project's various properties associated with artifacts.

        # of properties using the latest version available26
        # of properties where the next version available is smaller than an incremental version update0
        # of properties where the next version available is an incremental version update0
        # of properties where the next version available is a minor version update0
        # of properties where the next version available is a major version update0

        Summary of properties sssociated with artifact versions

        StatusPropertyCurrent VersionNext VersionNext IncrementalNext MinorNext Major
        ${plugin.findbugs.version}2.3.2
        ${plugin.clean.version}2.4.1
        ${plugin.enforcer.version}1.0.1
        ${plugin.install.version}2.3.1
        ${plugin.release.version}2.2.1
        ${plugin.resources.version}2.5
        ${plugin.assembly.version}2.2.2
        ${plugin.antrun.version}1.7
        ${plugin.site.version}3.0
        ${plugin.versions.version}1.2
        ${plugin.project-info-reports.version}2.4
        ${plugin.javadoc.version}2.8
        ${plugin.taglist.version}2.4
        ${plugin.eclipse.version}2.8
        ${plugin.help.version}2.1.1
        ${plugin.source.version}2.1.2
        ${plugin.surefire.version}2.10
        ${plugin.compiler.version}2.3.2
        ${plugin.pmd.version}2.6
        ${plugin.jxr.version}2.3
        ${plugin.gpg.version}1.4
        ${plugin.checkstyle.version}2.8
        ${plugin.changes.version}2.6
        ${plugin.deploy.version}2.7
        ${plugin.dependency.version}2.3
        ${plugin.jar.version}2.3.2
        StatusPropertyCurrent VersionNext VersionNext IncrementalNext MinorNext Major

        Properties sssociated with artifact versions

        ${plugin.antrun.version}

        Status No newer versions available.
        Property${plugin.antrun.version}
        Associated artifactsorg.apache.maven.plugins:maven-antrun-plugin
        Current Version1.7
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.assembly.version}

        Status No newer versions available.
        Property${plugin.assembly.version}
        Associated artifactsorg.apache.maven.plugins:maven-assembly-plugin
        Current Version2.2.2
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.changes.version}

        Status No newer versions available.
        Property${plugin.changes.version}
        Associated artifactsorg.apache.maven.plugins:maven-changes-plugin
        Current Version2.6
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.checkstyle.version}

        Status No newer versions available.
        Property${plugin.checkstyle.version}
        Associated artifactsorg.apache.maven.plugins:maven-checkstyle-plugin
        Current Version2.8
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.clean.version}

        Status No newer versions available.
        Property${plugin.clean.version}
        Associated artifactsorg.apache.maven.plugins:maven-clean-plugin
        Current Version2.4.1
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.compiler.version}

        Status No newer versions available.
        Property${plugin.compiler.version}
        Associated artifactsorg.apache.maven.plugins:maven-compiler-plugin
        Current Version2.3.2
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.dependency.version}

        Status No newer versions available.
        Property${plugin.dependency.version}
        Associated artifactsorg.apache.maven.plugins:maven-dependency-plugin
        Current Version2.3
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.deploy.version}

        Status No newer versions available.
        Property${plugin.deploy.version}
        Associated artifactsorg.apache.maven.plugins:maven-deploy-plugin
        Current Version2.7
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.eclipse.version}

        Status No newer versions available.
        Property${plugin.eclipse.version}
        Associated artifactsorg.apache.maven.plugins:maven-eclipse-plugin
        Current Version2.8
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.enforcer.version}

        Status No newer versions available.
        Property${plugin.enforcer.version}
        Associated artifactsorg.apache.maven.plugins:maven-enforcer-plugin
        Current Version1.0.1
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.findbugs.version}

        Status No newer versions available.
        Property${plugin.findbugs.version}
        Associated artifactsorg.codehaus.mojo:findbugs-maven-plugin
        Current Version2.3.2
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.gpg.version}

        Status No newer versions available.
        Property${plugin.gpg.version}
        Associated artifactsorg.apache.maven.plugins:maven-gpg-plugin
        Current Version1.4
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.help.version}

        Status No newer versions available.
        Property${plugin.help.version}
        Associated artifactsorg.apache.maven.plugins:maven-help-plugin
        Current Version2.1.1
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.install.version}

        Status No newer versions available.
        Property${plugin.install.version}
        Associated artifactsorg.apache.maven.plugins:maven-install-plugin
        Current Version2.3.1
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.jar.version}

        Status No newer versions available.
        Property${plugin.jar.version}
        Associated artifactsorg.apache.maven.plugins:maven-jar-plugin
        Current Version2.3.2
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.javadoc.version}

        Status No newer versions available.
        Property${plugin.javadoc.version}
        Associated artifactsorg.apache.maven.plugins:maven-javadoc-plugin
        Current Version2.8
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.jxr.version}

        Status No newer versions available.
        Property${plugin.jxr.version}
        Associated artifactsorg.apache.maven.plugins:maven-jxr-plugin
        Current Version2.3
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.pmd.version}

        Status No newer versions available.
        Property${plugin.pmd.version}
        Associated artifactsorg.apache.maven.plugins:maven-pmd-plugin
        Current Version2.6
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.project-info-reports.version}

        Status No newer versions available.
        Property${plugin.project-info-reports.version}
        Associated artifactsorg.apache.maven.plugins:maven-project-info-reports-plugin
        Current Version2.4
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.release.version}

        Status No newer versions available.
        Property${plugin.release.version}
        Associated artifactsorg.apache.maven.plugins:maven-release-plugin
        Current Version2.2.1
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.resources.version}

        Status No newer versions available.
        Property${plugin.resources.version}
        Associated artifactsorg.apache.maven.plugins:maven-resources-plugin
        Current Version2.5
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.site.version}

        Status No newer versions available.
        Property${plugin.site.version}
        Associated artifactsorg.apache.maven.plugins:maven-site-plugin
        Current Version3.0
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.source.version}

        Status No newer versions available.
        Property${plugin.source.version}
        Associated artifactsorg.apache.maven.plugins:maven-source-plugin
        Current Version2.1.2
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.surefire.version}

        Status No newer versions available.
        Property${plugin.surefire.version}
        Associated artifactsorg.apache.maven.plugins:maven-surefire-plugin
        Current Version2.10
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.taglist.version}

        Status No newer versions available.
        Property${plugin.taglist.version}
        Associated artifactsorg.codehaus.mojo:taglist-maven-plugin
        Current Version2.4
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.versions.version}

        Status No newer versions available.
        Property${plugin.versions.version}
        Associated artifactsorg.codehaus.mojo:versions-maven-plugin
        Current Version1.2
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes
        +

        Overview

        This report summarizes newer versions that may be available for your project's various properties associated with artifacts.

        # of properties using the latest version available6
        # of properties where the next version available is smaller than an incremental version update0
        # of properties where the next version available is an incremental version update3
        # of properties where the next version available is a minor version update17
        # of properties where the next version available is a major version update0

        Summary of properties sssociated with artifact versions

        StatusPropertyCurrent VersionNext VersionNext IncrementalNext MinorNext Major
        ${plugin.findbugs.version}2.3.22.3.32.4.0
        ${plugin.clean.version}2.4.12.5
        ${plugin.enforcer.version}1.0.11.1
        ${plugin.install.version}2.3.12.4
        ${plugin.release.version}2.2.12.2.22.3
        ${plugin.resources.version}2.52.6
        ${plugin.assembly.version}2.2.22.3
        ${plugin.antrun.version}1.7
        ${plugin.site.version}3.03.1
        ${plugin.versions.version}1.21.32.0
        ${plugin.project-info-reports.version}2.42.5
        ${plugin.javadoc.version}2.82.8.12.9
        ${plugin.taglist.version}2.4
        ${plugin.eclipse.version}2.82.9
        ${plugin.help.version}2.1.1
        ${plugin.source.version}2.1.22.2
        ${plugin.surefire.version}2.102.11
        ${plugin.compiler.version}2.3.22.43.0
        ${plugin.pmd.version}2.62.7
        ${plugin.jxr.version}2.3
        ${plugin.gpg.version}1.4
        ${plugin.checkstyle.version}2.82.9
        ${plugin.changes.version}2.62.7
        ${plugin.deploy.version}2.7
        ${plugin.dependency.version}2.32.4
        ${plugin.jar.version}2.3.22.4
        StatusPropertyCurrent VersionNext VersionNext IncrementalNext MinorNext Major

        Properties sssociated with artifact versions

        ${plugin.antrun.version}

        Status No newer versions available.
        Property${plugin.antrun.version}
        Associated artifactsorg.apache.maven.plugins:maven-antrun-plugin
        Current Version1.7
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.assembly.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.assembly.version}
        Associated artifactsorg.apache.maven.plugins:maven-assembly-plugin
        Current Version2.2.2
        Newer versions2.3 Next Minor
        2.4 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.changes.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.changes.version}
        Associated artifactsorg.apache.maven.plugins:maven-changes-plugin
        Current Version2.6
        Newer versions2.7 Next Minor
        2.7.1
        2.8 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.checkstyle.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.checkstyle.version}
        Associated artifactsorg.apache.maven.plugins:maven-checkstyle-plugin
        Current Version2.8
        Newer versions2.9 Next Minor
        2.9.1 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.clean.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.clean.version}
        Associated artifactsorg.apache.maven.plugins:maven-clean-plugin
        Current Version2.4.1
        Newer versions2.5 Next Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.compiler.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.compiler.version}
        Associated artifactsorg.apache.maven.plugins:maven-compiler-plugin
        Current Version2.3.2
        Newer versions2.4 Next Minor
        2.5
        2.5.1 Latest Minor
        3.0 Next Major
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.dependency.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.dependency.version}
        Associated artifactsorg.apache.maven.plugins:maven-dependency-plugin
        Current Version2.3
        Newer versions2.4 Next Minor
        2.5
        2.5.1
        2.6 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.deploy.version}

        Status No newer versions available.
        Property${plugin.deploy.version}
        Associated artifactsorg.apache.maven.plugins:maven-deploy-plugin
        Current Version2.7
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.eclipse.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.eclipse.version}
        Associated artifactsorg.apache.maven.plugins:maven-eclipse-plugin
        Current Version2.8
        Newer versions2.9 Next Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.enforcer.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.enforcer.version}
        Associated artifactsorg.apache.maven.plugins:maven-enforcer-plugin
        Current Version1.0.1
        Newer versions1.1 Next Minor
        1.1.1
        1.2 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.findbugs.version}

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Property${plugin.findbugs.version}
        Associated artifactsorg.codehaus.mojo:findbugs-maven-plugin
        Current Version2.3.2
        Newer versions2.3.3 Next Incremental
        2.4.0 Next Minor
        2.5
        2.5.1
        2.5.2 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.gpg.version}

        Status No newer versions available.
        Property${plugin.gpg.version}
        Associated artifactsorg.apache.maven.plugins:maven-gpg-plugin
        Current Version1.4
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.help.version}

        Status No newer versions available.
        Property${plugin.help.version}
        Associated artifactsorg.apache.maven.plugins:maven-help-plugin
        Current Version2.1.1
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.install.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.install.version}
        Associated artifactsorg.apache.maven.plugins:maven-install-plugin
        Current Version2.3.1
        Newer versions2.4 Next Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.jar.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.jar.version}
        Associated artifactsorg.apache.maven.plugins:maven-jar-plugin
        Current Version2.3.2
        Newer versions2.4 Next Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.javadoc.version}

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Property${plugin.javadoc.version}
        Associated artifactsorg.apache.maven.plugins:maven-javadoc-plugin
        Current Version2.8
        Newer versions2.8.1 Next Incremental
        2.9 Next Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.jxr.version}

        Status No newer versions available.
        Property${plugin.jxr.version}
        Associated artifactsorg.apache.maven.plugins:maven-jxr-plugin
        Current Version2.3
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.pmd.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.pmd.version}
        Associated artifactsorg.apache.maven.plugins:maven-pmd-plugin
        Current Version2.6
        Newer versions2.7 Next Minor
        2.7.1 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.project-info-reports.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.project-info-reports.version}
        Associated artifactsorg.apache.maven.plugins:maven-project-info-reports-plugin
        Current Version2.4
        Newer versions2.5 Next Minor
        2.5.1
        2.6 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.release.version}

        Status There is at least one newer incremental version available. Incremental updates are typically passive.
        Property${plugin.release.version}
        Associated artifactsorg.apache.maven.plugins:maven-release-plugin
        Current Version2.2.1
        Newer versions2.2.2 Next Incremental
        2.3 Next Minor
        2.3.1
        2.3.2
        2.4 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.resources.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.resources.version}
        Associated artifactsorg.apache.maven.plugins:maven-resources-plugin
        Current Version2.5
        Newer versions2.6 Next Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.site.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.site.version}
        Associated artifactsorg.apache.maven.plugins:maven-site-plugin
        Current Version3.0
        Newer versions3.1 Next Minor
        3.2 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.source.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.source.version}
        Associated artifactsorg.apache.maven.plugins:maven-source-plugin
        Current Version2.1.2
        Newer versions2.2 Next Minor
        2.2.1 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.surefire.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.surefire.version}
        Associated artifactsorg.apache.maven.plugins:maven-surefire-plugin
        Current Version2.10
        Newer versions2.11 Next Minor
        2.12
        2.12.1
        2.12.2
        2.12.3
        2.12.4
        2.13 Latest Minor
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.taglist.version}

        Status No newer versions available.
        Property${plugin.taglist.version}
        Associated artifactsorg.codehaus.mojo:taglist-maven-plugin
        Current Version2.4
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes

        ${plugin.versions.version}

        Status There is at least one newer minor version available. Minor updates are sometimes passive.
        Property${plugin.versions.version}
        Associated artifactsorg.codehaus.mojo:versions-maven-plugin
        Current Version1.2
        Newer versions1.3 Next Minor
        1.3.1 Latest Minor
        2.0 Next Major
        Allowed version range[,)
        Infer associations from projectYes
        Only use release versionsNo
        Include projects from reactorYes
        Always use reactor projects (even if older or -SNAPSHOT)Yes
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/scripting.html b/scripting.html index bb32dee..6a05ac8 100644 --- a/scripting.html +++ b/scripting.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
        @@ -132,7 +126,7 @@
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/source-repository.html b/source-repository.html index 03a7571..ded0d76 100644 --- a/source-repository.html +++ b/source-repository.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • Source Repository
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,32 +94,26 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      • Project Information
          +
        • + Continuous Integration +
        • +
        • + Dependencies +
        • Distribution Management
        • About -
        • -
        • - Dependencies
        • Issue Tracking -
        • -
        • - Continuous Integration
        • Project License @@ -157,14 +151,14 @@
          -

          Overview

          This project uses a Source Content Management System to manage its source code.

          Web Access

          The following is a link to the online source repository.

          Anonymous access

          Refer to the documentation of the SCM used for more information about anonymously check out. The connection url is:

          git:git://github.com/vbehar/rundeck-api-java-client.git

          Developer access

          Refer to the documentation of the SCM used for more information about developer check out. The connection url is:

          git:git@github.com:vbehar/rundeck-api-java-client.git

          Access from behind a firewall

          Refer to the documentation of the SCM used for more information about access behind a firewall.

          +

          Overview

          This project uses a Source Content Management System to manage its source code.

          Web Access

          The following is a link to the online source repository.

          Anonymous access

          Refer to the documentation of the SCM used for more information about anonymously check out. The connection url is:

          git:git://github.com/rundeck/rundeck-api-java-client.git

          Developer access

          Refer to the documentation of the SCM used for more information about developer check out. The connection url is:

          git:git@github.com:rundeck/rundeck-api-java-client.git

          Access from behind a firewall

          Refer to the documentation of the SCM used for more information about access behind a firewall.

          -
          Copyright © 2011. +
          Copyright © 2011-2012. All Rights Reserved.
          diff --git a/status.html b/status.html index 9b92460..5475011 100644 --- a/status.html +++ b/status.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
        • -
        • Last Published: 2011-12-04
        • |
        • -
        • Version: 2.1-SNAPSHOT
        • +
        • Last Published: 2012-12-31
        • |
        • +
        • Version: 5.0-SNAPSHOT
        @@ -94,12 +94,6 @@
      • Jython
      • -
      -
      Older versions
      -
      Project Documentation
        @@ -125,14 +119,14 @@
        -

        Status of the implementation of the RunDeck API

        RunDeck API version 1

        Documentation of the RunDeck API version 1

        • Login-based authentication - OK
        • System Info - OK
        • Listing Jobs - OK
        • Running a Job - OK
        • Exporting Jobs - OK
        • Importing Jobs - OK
        • Getting a Job Definition - OK
        • Deleting a Job Definition - OK
        • Getting Executions for a Job - OK
        • Listing Running Executions - OK
        • Getting Execution Info - OK
        • Aborting Executions - OK
        • Running Adhoc Commands - OK
        • Running Adhoc Scripts - OK
        • Listing Projects - OK
        • Getting Project Info - OK
        • Listing History - OK
        • Creating History Event Reports - TODO
        • Listing Resources - OK
        • Getting Resource Info - OK

        RunDeck API version 2

        Documentation of the RunDeck API version 2

        • Token-based authentication - OK
        • Listing Jobs for a Project - TODO
        • Updating and Listing Resources for a Project - TODO
        • Refreshing Resources for a Project - TODO
        +

        Status of the implementation of the RunDeck API

        RunDeck API version 1

        Documentation of the RunDeck API version 1

        • Login-based authentication - OK
        • System Info - OK
        • Listing Jobs - OK
        • Running a Job - OK
        • Exporting Jobs - OK
        • Importing Jobs - OK
        • Getting a Job Definition - OK
        • Deleting a Job Definition - OK
        • Getting Executions for a Job - OK
        • Listing Running Executions - OK
        • Getting Execution Info - OK
        • Aborting Executions - OK
        • Running Adhoc Commands - OK
        • Running Adhoc Scripts - OK
        • Listing Projects - OK
        • Getting Project Info - OK
        • Listing History - OK
        • Creating History Event Reports - TODO
        • Listing Resources - OK
        • Getting Resource Info - OK

        RunDeck API version 2

        Documentation of the RunDeck API version 2

        • Token-based authentication - OK
        • Listing Jobs for a Project - TODO
        • Updating and Listing Resources for a Project - TODO
        • Refreshing Resources for a Project - TODO

        RunDeck API version 3

        Documentation of the RunDeck API version 3

        • (only updates to Resource endpoints) - TODO

        RunDeck API version 4

        Documentation of the RunDeck API version 4

        • Running Adhoc Script URLs - TODO

        RunDeck API version 5

        Documentation of the RunDeck API version 5

        • Bulk Job Delete - OK
        • Execution Output - OK
        • Execution Query - OK
        • History list query - OK
        -
        Copyright © 2011. +
        Copyright © 2011-2012. All Rights Reserved.
        diff --git a/taglist.html b/taglist.html index 9405726..68630fc 100644 --- a/taglist.html +++ b/taglist.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
      • Tag List report
      • -
      • Last Published: 2011-12-04
      • |
      • -
      • Version: 2.1-SNAPSHOT
      • +
      • Last Published: 2012-12-31
      • |
      • +
      • Version: 5.0-SNAPSHOT
      @@ -94,12 +94,6 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      @@ -94,32 +94,26 @@
    • Jython
    • - -
      Older versions
      -
      Project Documentation
      • Project Information
          +
        • + Continuous Integration +
        • +
        • + Dependencies +
        • Distribution Management
        • About -
        • -
        • - Dependencies
        • Issue Tracking -
        • -
        • - Continuous Integration
        • Project License @@ -157,7 +151,7 @@
          -

          The Team

          A successful project requires many people to play many roles. Some members write code or documentation, while others are valuable as testers, submitting patches and suggestions.

          The team is comprised of Members and Contributors. Members have direct access to the source of a project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. Get involved today. All contributions to the project are greatly appreciated.

          Members

          The following is a list of developers with commit privileges that have directly contributed to the project in one way or another.

          IdName
          vbeharVincent Behar

          Contributors

          There are no contributors listed for this project. Please check back again later.

          + + + + + + + + + + + + + + + +
          + + + + + +
          + +
          + + + + + + + + + + + + +
          + + + + + + +
          +
          + + + + +
          + public + + + + class +

          BulkDeleteParserTest

          + + + + + extends Object
          + + + + + + + + + +
          + +
          + +
          + + + + + + + + + + + + + + + + + +
          java.lang.Object
             ↳org.rundeck.api.parser.BulkDeleteParserTest
          + + + + + + + +
          + + +

          Class Overview

          +

          BulkDeleteParserTest is ...

          + + + + + +
          + + + + + + + + + + + + + + + + +
          + + +

          Summary

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Public Constructors
          + + + + + + + + BulkDeleteParserTest() + +
          + + + + + + + + + + + + + + + + + + + + + + + + +
          Public Methods
          + + + + + + void + + bulkParser() + +
          + + + + + + void + + bulkParserAllsuccessful() + +
          + + + + + + + + + + + + + + + +
          + [Expand] +
          Inherited Methods
          + +From class + + java.lang.Object + +
          + + +
          +
          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + +

          Public Constructors

          + + + + + +
          +

          + + public + + + + + + + BulkDeleteParserTest + () +

          +
          +
          + +
          + + + +
          +
          + +

          + +
          +
          + + + + + + + + + + + + + +

          Public Methods

          + + + + + +
          +

          + + public + + + + + void + + bulkParser + () +

          +
          +
          + +
          + + + +
          +
          + +

          +
          +
          Throws
          + + + + +
          Exception +
          +
          + +
          +
          + + + + +
          +

          + + public + + + + + void + + bulkParserAllsuccessful + () +

          +
          +
          + +
          + + + +
          +
          + +

          +
          +
          Throws
          + + + + +
          Exception +
          +
          + +
          +
          + + + + + + + + + + + + + + +
          + +
          + +
          + + + + + diff --git a/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html b/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html new file mode 100644 index 0000000..61704ec --- /dev/null +++ b/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html @@ -0,0 +1,949 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DeleteParserTest + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
          + + + + + +
          + +
          + + + + + + + + + + + + +
          + + + + + + +
          +
          + + + + +
          + public + + + + class +

          DeleteParserTest

          + + + + + extends Object
          + + + + + + + + + +
          + +
          + +
          + + + + + + + + + + + + + + + + + +
          java.lang.Object
             ↳org.rundeck.api.parser.DeleteParserTest
          + + + + + + + +
          + + +

          Class Overview

          +

          DeleteParserTest is ...

          + + + + + +
          + + + + + + + + + + + + + + + + +
          + + +

          Summary

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Public Constructors
          + + + + + + + + DeleteParserTest() + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Public Methods
          + + + + + + void + + failedResult1() + +
          + + + + + + void + + failedResult2() + +
          + + + + + + void + + failedResult3() + +
          + + + + + + void + + successfulResult() + +
          + + + + + + + + + + + + + + + +
          + [Expand] +
          Inherited Methods
          + +From class + + java.lang.Object + +
          + + +
          +
          + + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + +

          Public Constructors

          + + + + + +
          +

          + + public + + + + + + + DeleteParserTest + () +

          +
          +
          + +
          + + + +
          +
          + +

          + +
          +
          + + + + + + + + + + + + + +

          Public Methods

          + + + + + +
          +

          + + public + + + + + void + + failedResult1 + () +

          +
          +
          + +
          + + + +
          +
          + +

          +
          +
          Throws
          + + + + +
          Exception +
          +
          + +
          +
          + + + + +
          +

          + + public + + + + + void + + failedResult2 + () +

          +
          +
          + +
          + + + +
          +
          + +

          +
          +
          Throws
          + + + + +
          Exception +
          +
          + +
          +
          + + + + +
          +

          + + public + + + + + void + + failedResult3 + () +

          +
          +
          + +
          + + + +
          +
          + +

          +
          +
          Throws
          + + + + +
          Exception +
          +
          + +
          +
          + + + + +
          +

          + + public + + + + + void + + successfulResult + () +

          +
          +
          + +
          + + + +
          +
          + +

          +
          +
          Throws
          + + + + +
          Exception +
          +
          + +
          +
          + + + + + + + + + + + + + + +
          + +
          + +
          + + + + + diff --git a/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html b/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html index fc2de65..a2536be 100644 --- a/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html @@ -158,6 +158,8 @@
        • Classes

      + parseExecutionJob1() + +
      + + + + + + void + + parseExecutionJob2() + +
      + + + + + void @@ -711,6 +745,86 @@ From class + + +
      +

      + + public + + + + + void + + parseExecutionJob1 + () +

      +
      +
      + +
      + + + +
      +
      + +

      +
      +
      Throws
      + + + + +
      Exception +
      +
      + +
      +
      + + + + +
      +

      + + public + + + + + void + + parseExecutionJob2 + () +

      +
      +
      + +
      + + + +
      +
      + +

      +
      +
      Throws
      + + + + +
      Exception +
      +
      + +
      +
      + +
      diff --git a/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html b/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html index e9ee9b8..82d5ce4 100644 --- a/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html @@ -158,6 +158,8 @@
    • Classes

    • AbortParserTest Test the AbortParser 
      BulkDeleteParserTestBulkDeleteParserTest is ... 
      DeleteParserTestDeleteParserTest is ... 
      EventParserTest Test the EventParser  AbortParserTest
      + BulkDeleteParserTest +
      + DeleteParserTest +
      @@ -117,6 +127,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref-test/org/rundeck/api/util/package-frame.html b/xref-test/org/rundeck/api/util/package-frame.html index 3685eb0..9ff470c 100644 --- a/xref-test/org/rundeck/api/util/package-frame.html +++ b/xref-test/org/rundeck/api/util/package-frame.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference Package org.rundeck.api.util + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.util diff --git a/xref-test/org/rundeck/api/util/package-summary.html b/xref-test/org/rundeck/api/util/package-summary.html index f4138c6..398e075 100644 --- a/xref-test/org/rundeck/api/util/package-summary.html +++ b/xref-test/org/rundeck/api/util/package-summary.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference Package org.rundeck.api.util + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.util @@ -62,6 +62,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref-test/overview-frame.html b/xref-test/overview-frame.html index 826a61f..f3d839f 100644 --- a/xref-test/overview-frame.html +++ b/xref-test/overview-frame.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference + RunDeck API - Java Client 5.0-SNAPSHOT Reference diff --git a/xref-test/overview-summary.html b/xref-test/overview-summary.html index 7c739e1..c75154e 100644 --- a/xref-test/overview-summary.html +++ b/xref-test/overview-summary.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference + RunDeck API - Java Client 5.0-SNAPSHOT Reference @@ -24,7 +24,7 @@ -

      RunDeck API - Java Client 2.1-SNAPSHOT Reference

      +

      RunDeck API - Java Client 5.0-SNAPSHOT Reference

      @@ -69,6 +69,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref/allclasses-frame.html b/xref/allclasses-frame.html index be06392..49ed88b 100644 --- a/xref/allclasses-frame.html +++ b/xref/allclasses-frame.html @@ -25,6 +25,18 @@
    • AssertUtil +
    • +
    • + Builder +
    • +
    • + BuildsParameters +
    • +
    • + BulkDeleteParser +
    • +
    • + DeleteParser
    • EventParser @@ -34,6 +46,12 @@
    • ExecutionParser +
    • +
    • + ExecutionQuery +
    • +
    • + ExecutionQueryParameters
    • ExecutionStatus @@ -64,6 +82,18 @@
    • OptionsBuilder +
    • +
    • + OutputEntryParser +
    • +
    • + OutputParser +
    • +
    • + PagedResultParser +
    • +
    • + PagedResults
    • ParametersUtil @@ -73,6 +103,9 @@
    • ProjectParser +
    • +
    • + QueryParameterBuilder
    • RundeckAbort @@ -103,15 +136,30 @@
    • RundeckJob +
    • +
    • + RundeckJobDelete +
    • +
    • + RundeckJobDeleteBulk
    • RundeckJobsImportMethod
    • RundeckJobsImportResult +
    • +
    • + RundeckLogLevel
    • RundeckNode +
    • +
    • + RundeckOutput +
    • +
    • + RundeckOutputEntry
    • RundeckProject diff --git a/xref/index.html b/xref/index.html index 1be5927..04b287f 100644 --- a/xref/index.html +++ b/xref/index.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference + RunDeck API - Java Client 5.0-SNAPSHOT Reference diff --git a/xref/org/rundeck/api/ApiCall.html b/xref/org/rundeck/api/ApiCall.html index d1a4e09..063d57a 100644 --- a/xref/org/rundeck/api/ApiCall.html +++ b/xref/org/rundeck/api/ApiCall.html @@ -28,421 +28,505 @@ 18 import java.io.ByteArrayInputStream; 19 import java.io.IOException; 20 import java.io.InputStream; -21 import java.net.ProxySelector; -22 import java.security.KeyManagementException; -23 import java.security.KeyStoreException; -24 import java.security.NoSuchAlgorithmException; -25 import java.security.UnrecoverableKeyException; -26 import java.security.cert.CertificateException; -27 import java.security.cert.X509Certificate; -28 import java.util.ArrayList; -29 import java.util.List; -30 import java.util.Map.Entry; -31 import org.apache.commons.lang.StringUtils; -32 import org.apache.http.HttpException; -33 import org.apache.http.HttpRequest; -34 import org.apache.http.HttpRequestInterceptor; -35 import org.apache.http.HttpResponse; -36 import org.apache.http.NameValuePair; -37 import org.apache.http.ParseException; -38 import org.apache.http.client.HttpClient; -39 import org.apache.http.client.entity.UrlEncodedFormEntity; -40 import org.apache.http.client.methods.HttpDelete; -41 import org.apache.http.client.methods.HttpGet; -42 import org.apache.http.client.methods.HttpPost; -43 import org.apache.http.client.methods.HttpRequestBase; -44 import org.apache.http.conn.scheme.Scheme; -45 import org.apache.http.conn.ssl.SSLSocketFactory; -46 import org.apache.http.conn.ssl.TrustStrategy; -47 import org.apache.http.entity.mime.HttpMultipartMode; -48 import org.apache.http.entity.mime.MultipartEntity; -49 import org.apache.http.entity.mime.content.InputStreamBody; -50 import org.apache.http.impl.client.DefaultHttpClient; -51 import org.apache.http.impl.conn.ProxySelectorRoutePlanner; -52 import org.apache.http.message.BasicNameValuePair; -53 import org.apache.http.params.HttpProtocolParams; -54 import org.apache.http.protocol.HTTP; -55 import org.apache.http.protocol.HttpContext; -56 import org.apache.http.util.EntityUtils; -57 import org.dom4j.Document; -58 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; -59 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; -60 import org.rundeck.api.parser.ParserHelper; -61 import org.rundeck.api.parser.XmlNodeParser; -62 import org.rundeck.api.util.AssertUtil; -63 -64 /** -65 * Class responsible for making the HTTP API calls -66 * -67 * @author Vincent Behar -68 */ -69 class ApiCall { -70 -71 /** RunDeck HTTP header for the auth-token (in case of token-based authentication) */ -72 private static final transient String AUTH_TOKEN_HEADER = "X-RunDeck-Auth-Token"; -73 -74 /** {@link RundeckClient} instance holding the RunDeck url and the credentials */ -75 private final RundeckClient client; -76 -77 /** -78 * Build a new instance, linked to the given RunDeck client -79 * -80 * @param client holding the RunDeck url and the credentials -81 * @throws IllegalArgumentException if client is null -82 */ -83 public ApiCall(RundeckClient client) throws IllegalArgumentException { -84 super(); -85 this.client = client; -86 AssertUtil.notNull(client, "The RunDeck Client must not be null !"); -87 } -88 -89 /** -90 * Try to "ping" the RunDeck instance to see if it is alive -91 * -92 * @throws RundeckApiException if the ping fails -93 */ -94 public void ping() throws RundeckApiException { -95 HttpClient httpClient = instantiateHttpClient(); -96 try { -97 HttpResponse response = httpClient.execute(new HttpGet(client.getUrl())); -98 if (response.getStatusLine().getStatusCode() / 100 != 2) { -99 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' when pinging " -100 + client.getUrl()); -101 } -102 } catch (IOException e) { -103 throw new RundeckApiException("Failed to ping RunDeck instance at " + client.getUrl(), e); -104 } finally { -105 httpClient.getConnectionManager().shutdown(); -106 } -107 } -108 -109 /** -110 * Test the authentication on the RunDeck instance. Will delegate to either {@link #testLoginAuth()} (in case of -111 * login-based auth) or {@link #testTokenAuth()} (in case of token-based auth). -112 * -113 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -114 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -115 * @see #testLoginAuth() -116 * @see #testTokenAuth() -117 */ -118 public void testAuth() throws RundeckApiLoginException, RundeckApiTokenException { -119 if (client.getToken() != null) { -120 testTokenAuth(); -121 } else { -122 testLoginAuth(); -123 } -124 } -125 -126 /** -127 * Test the login-based authentication on the RunDeck instance -128 * -129 * @throws RundeckApiLoginException if the login fails -130 * @see #testAuth() -131 */ -132 public void testLoginAuth() throws RundeckApiLoginException { -133 HttpClient httpClient = instantiateHttpClient(); -134 try { -135 login(httpClient); -136 } finally { -137 httpClient.getConnectionManager().shutdown(); -138 } -139 } -140 -141 /** -142 * Test the token-based authentication on the RunDeck instance -143 * -144 * @throws RundeckApiTokenException if the token is invalid -145 * @see #testAuth() -146 */ -147 public void testTokenAuth() throws RundeckApiTokenException { -148 try { -149 execute(new HttpGet(client.getUrl() + RundeckClient.API_ENDPOINT + "/system/info")); -150 } catch (RundeckApiTokenException e) { -151 throw e; -152 } catch (RundeckApiException e) { -153 throw new RundeckApiTokenException("Failed to verify token", e); -154 } -155 } -156 -157 /** -158 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the -159 * API call. At the end, the given parser will be used to convert the response to a more useful result object. -160 * -161 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -162 * @param parser used to parse the response -163 * @return the result of the call, as formatted by the parser -164 * @throws RundeckApiException in case of error when calling the API -165 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -166 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -167 */ -168 public <T> T get(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, -169 RundeckApiLoginException, RundeckApiTokenException { -170 return execute(new HttpGet(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath), parser); -171 } -172 -173 /** -174 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the -175 * API call. -176 * -177 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -178 * @return a new {@link InputStream} instance, not linked with network resources -179 * @throws RundeckApiException in case of error when calling the API -180 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -181 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -182 */ -183 public InputStream get(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, -184 RundeckApiTokenException { -185 ByteArrayInputStream response = execute(new HttpGet(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath)); -186 -187 // try to load the document, to throw an exception in case of error -188 ParserHelper.loadDocument(response); -189 response.reset(); -190 -191 return response; -192 } -193 -194 /** -195 * Execute an HTTP POST request to the RunDeck instance, on the given path. We will login first, and then execute -196 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. -197 * -198 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -199 * @param parser used to parse the response -200 * @return the result of the call, as formatted by the parser -201 * @throws RundeckApiException in case of error when calling the API -202 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -203 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -204 */ -205 public <T> T post(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, -206 RundeckApiLoginException, RundeckApiTokenException { -207 HttpPost httpPost = new HttpPost(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath); -208 -209 // POST a multi-part request, with all attachments -210 MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); -211 for (Entry<String, InputStream> attachment : apiPath.getAttachments().entrySet()) { -212 entity.addPart(attachment.getKey(), new InputStreamBody(attachment.getValue(), attachment.getKey())); -213 } -214 httpPost.setEntity(entity); -215 -216 return execute(httpPost, parser); -217 } -218 -219 /** -220 * Execute an HTTP DELETE request to the RunDeck instance, on the given path. We will login first, and then execute -221 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. -222 * -223 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -224 * @param parser used to parse the response -225 * @return the result of the call, as formatted by the parser -226 * @throws RundeckApiException in case of error when calling the API -227 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -228 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -229 */ -230 public <T> T delete(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, -231 RundeckApiLoginException, RundeckApiTokenException { -232 return execute(new HttpDelete(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath), parser); -233 } -234 -235 /** -236 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. At the end, -237 * the given parser will be used to convert the response to a more useful result object. -238 * -239 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... -240 * @param parser used to parse the response -241 * @return the result of the call, as formatted by the parser -242 * @throws RundeckApiException in case of error when calling the API -243 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -244 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -245 */ -246 private <T> T execute(HttpRequestBase request, XmlNodeParser<T> parser) throws RundeckApiException, -247 RundeckApiLoginException, RundeckApiTokenException { -248 // execute the request -249 InputStream response = execute(request); -250 -251 // read and parse the response -252 Document xmlDocument = ParserHelper.loadDocument(response); -253 return parser.parseXmlNode(xmlDocument); -254 } -255 -256 /** -257 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. -258 * -259 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... -260 * @return a new {@link InputStream} instance, not linked with network resources -261 * @throws RundeckApiException in case of error when calling the API -262 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -263 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -264 */ -265 private ByteArrayInputStream execute(HttpRequestBase request) throws RundeckApiException, RundeckApiLoginException, -266 RundeckApiTokenException { -267 HttpClient httpClient = instantiateHttpClient(); -268 try { -269 // we only need to manually login in case of login-based authentication -270 // note that in case of token-based auth, the auth (via an HTTP header) is managed by an interceptor. -271 if (client.getToken() == null) { -272 login(httpClient); -273 } -274 -275 // execute the HTTP request -276 HttpResponse response = null; -277 try { -278 response = httpClient.execute(request); -279 } catch (IOException e) { -280 throw new RundeckApiException("Failed to execute an HTTP " + request.getMethod() + " on url : " -281 + request.getURI(), e); -282 } -283 -284 // in case of error, we get a redirect to /api/error -285 // that we need to follow manually for POST and DELETE requests (as GET) -286 if (response.getStatusLine().getStatusCode() / 100 == 3) { -287 String newLocation = response.getFirstHeader("Location").getValue(); -288 try { -289 EntityUtils.consume(response.getEntity()); -290 } catch (IOException e) { -291 throw new RundeckApiException("Failed to consume entity (release connection)", e); -292 } -293 request = new HttpGet(newLocation); -294 try { -295 response = httpClient.execute(request); -296 } catch (IOException e) { -297 throw new RundeckApiException("Failed to execute an HTTP GET on url : " + request.getURI(), e); -298 } -299 } -300 -301 // check the response code (should be 2xx, even in case of error : error message is in the XML result) -302 if (response.getStatusLine().getStatusCode() / 100 != 2) { -303 if (response.getStatusLine().getStatusCode() == 403 && client.getToken() != null) { -304 throw new RundeckApiTokenException("Invalid Token ! Got HTTP response '" + response.getStatusLine() -305 + "' for " + request.getURI()); -306 } else { -307 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' for " -308 + request.getURI()); -309 } -310 } -311 if (response.getEntity() == null) { -312 throw new RundeckApiException("Empty RunDeck response ! HTTP status line is : " -313 + response.getStatusLine()); -314 } -315 -316 // return a new inputStream, so that we can close all network resources -317 try { -318 return new ByteArrayInputStream(EntityUtils.toByteArray(response.getEntity())); -319 } catch (IOException e) { -320 throw new RundeckApiException("Failed to consume entity and convert the inputStream", e); -321 } -322 } finally { -323 httpClient.getConnectionManager().shutdown(); -324 } -325 } -326 -327 /** -328 * Do the actual work of login, using the given {@link HttpClient} instance. You'll need to re-use this instance -329 * when making API calls (such as running a job). Only use this in case of login-based authentication. -330 * -331 * @param httpClient pre-instantiated -332 * @throws RundeckApiLoginException if the login failed -333 */ -334 private void login(HttpClient httpClient) throws RundeckApiLoginException { -335 String location = client.getUrl() + "/j_security_check"; -336 -337 while (true) { -338 HttpPost postLogin = new HttpPost(location); -339 List<NameValuePair> params = new ArrayList<NameValuePair>(); -340 params.add(new BasicNameValuePair("j_username", client.getLogin())); -341 params.add(new BasicNameValuePair("j_password", client.getPassword())); -342 params.add(new BasicNameValuePair("action", "login")); -343 -344 HttpResponse response = null; -345 try { -346 postLogin.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); -347 response = httpClient.execute(postLogin); -348 } catch (IOException e) { -349 throw new RundeckApiLoginException("Failed to post login form on " + location, e); -350 } -351 -352 if (response.getStatusLine().getStatusCode() / 100 == 3) { -353 // HTTP client refuses to handle redirects (code 3xx) for POST, so we have to do it manually... -354 location = response.getFirstHeader("Location").getValue(); -355 try { -356 EntityUtils.consume(response.getEntity()); -357 } catch (IOException e) { -358 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); -359 } -360 continue; -361 } -362 if (response.getStatusLine().getStatusCode() / 100 != 2) { -363 throw new RundeckApiLoginException("Invalid HTTP response '" + response.getStatusLine() + "' for " -364 + location); -365 } -366 try { -367 String content = EntityUtils.toString(response.getEntity(), HTTP.UTF_8); -368 if (StringUtils.contains(content, "j_security_check")) { -369 throw new RundeckApiLoginException("Login failed for user " + client.getLogin()); -370 } -371 try { -372 EntityUtils.consume(response.getEntity()); -373 } catch (IOException e) { -374 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); -375 } -376 } catch (IOException io) { -377 throw new RundeckApiLoginException("Failed to read RunDeck result", io); -378 } catch (ParseException p) { -379 throw new RundeckApiLoginException("Failed to parse RunDeck response", p); -380 } -381 break; -382 } -383 } -384 -385 /** -386 * Instantiate a new {@link HttpClient} instance, configured to accept all SSL certificates -387 * -388 * @return an {@link HttpClient} instance - won't be null -389 */ -390 private HttpClient instantiateHttpClient() { -391 DefaultHttpClient httpClient = new DefaultHttpClient(); -392 -393 // configure user-agent -394 HttpProtocolParams.setUserAgent(httpClient.getParams(), "RunDeck API Java Client " + RundeckClient.API_VERSION); -395 -396 // configure SSL -397 SSLSocketFactory socketFactory = null; -398 try { -399 socketFactory = new SSLSocketFactory(new TrustStrategy() { -400 -401 @Override -402 public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { -403 return true; -404 } -405 }, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); -406 } catch (KeyManagementException e) { -407 throw new RuntimeException(e); -408 } catch (UnrecoverableKeyException e) { -409 throw new RuntimeException(e); -410 } catch (NoSuchAlgorithmException e) { -411 throw new RuntimeException(e); -412 } catch (KeyStoreException e) { -413 throw new RuntimeException(e); -414 } -415 httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, socketFactory)); -416 -417 // configure proxy (use system env : http.proxyHost / http.proxyPort) -418 System.setProperty("java.net.useSystemProxies", "true"); -419 httpClient.setRoutePlanner(new ProxySelectorRoutePlanner(httpClient.getConnectionManager().getSchemeRegistry(), -420 ProxySelector.getDefault())); -421 -422 // in case of token-based authentication, add the correct HTTP header to all requests via an interceptor -423 httpClient.addRequestInterceptor(new HttpRequestInterceptor() { -424 -425 @Override -426 public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { -427 if (client.getToken() != null) { -428 request.addHeader(AUTH_TOKEN_HEADER, client.getToken()); -429 } -430 } -431 }); -432 -433 return httpClient; -434 } -435 } +21 import java.io.UnsupportedEncodingException; +22 import java.net.ProxySelector; +23 import java.security.KeyManagementException; +24 import java.security.KeyStoreException; +25 import java.security.NoSuchAlgorithmException; +26 import java.security.UnrecoverableKeyException; +27 import java.security.cert.CertificateException; +28 import java.security.cert.X509Certificate; +29 import java.util.ArrayList; +30 import java.util.List; +31 import java.util.Map.Entry; +32 import org.apache.commons.lang.StringUtils; +33 import org.apache.http.cookie.Cookie; +34 import org.apache.http.Header; +35 import org.apache.http.HttpException; +36 import org.apache.http.HttpRequest; +37 import org.apache.http.HttpRequestInterceptor; +38 import org.apache.http.HttpResponse; +39 import org.apache.http.NameValuePair; +40 import org.apache.http.ParseException; +41 import org.apache.http.client.CookieStore; +42 import org.apache.http.client.HttpClient; +43 import org.apache.http.client.entity.UrlEncodedFormEntity; +44 import org.apache.http.client.methods.HttpDelete; +45 import org.apache.http.client.methods.HttpGet; +46 import org.apache.http.client.methods.HttpPost; +47 import org.apache.http.client.methods.HttpRequestBase; +48 import org.apache.http.conn.scheme.Scheme; +49 import org.apache.http.conn.ssl.SSLSocketFactory; +50 import org.apache.http.conn.ssl.TrustStrategy; +51 import org.apache.http.entity.mime.HttpMultipartMode; +52 import org.apache.http.entity.mime.MultipartEntity; +53 import org.apache.http.entity.mime.content.InputStreamBody; +54 import org.apache.http.impl.client.DefaultHttpClient; +55 import org.apache.http.impl.conn.ProxySelectorRoutePlanner; +56 import org.apache.http.message.BasicNameValuePair; +57 import org.apache.http.params.HttpProtocolParams; +58 import org.apache.http.protocol.HTTP; +59 import org.apache.http.protocol.HttpContext; +60 import org.apache.http.util.EntityUtils; +61 import org.dom4j.Document; +62 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; +63 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; +64 import org.rundeck.api.parser.ParserHelper; +65 import org.rundeck.api.parser.XmlNodeParser; +66 import org.rundeck.api.util.AssertUtil; +67 +68 /** +69 * Class responsible for making the HTTP API calls +70 * +71 * @author Vincent Behar +72 */ +73 class ApiCall { +74 +75 /** RunDeck HTTP header for the auth-token (in case of token-based authentication) */ +76 private static final transient String AUTH_TOKEN_HEADER = "X-RunDeck-Auth-Token"; +77 +78 /** RunDeck HTTP header for the setting session cookie (in case of session-based authentication) */ +79 private static final transient String COOKIE_HEADER = "Cookie"; +80 +81 /** {@link RundeckClient} instance holding the RunDeck url and the credentials */ +82 private final RundeckClient client; +83 +84 /** +85 * Build a new instance, linked to the given RunDeck client +86 * +87 * @param client holding the RunDeck url and the credentials +88 * @throws IllegalArgumentException if client is null +89 */ +90 public ApiCall(RundeckClient client) throws IllegalArgumentException { +91 super(); +92 this.client = client; +93 AssertUtil.notNull(client, "The RunDeck Client must not be null !"); +94 } +95 +96 /** +97 * Try to "ping" the RunDeck instance to see if it is alive +98 * +99 * @throws RundeckApiException if the ping fails +100 */ +101 public void ping() throws RundeckApiException { +102 HttpClient httpClient = instantiateHttpClient(); +103 try { +104 HttpResponse response = httpClient.execute(new HttpGet(client.getUrl())); +105 if (response.getStatusLine().getStatusCode() / 100 != 2) { +106 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' when pinging " +107 + client.getUrl()); +108 } +109 } catch (IOException e) { +110 throw new RundeckApiException("Failed to ping RunDeck instance at " + client.getUrl(), e); +111 } finally { +112 httpClient.getConnectionManager().shutdown(); +113 } +114 } +115 +116 /** +117 * Test the authentication on the RunDeck instance. Will delegate to either {@link #testLoginAuth()} (in case of +118 * login-based auth) or {@link #testTokenAuth()} (in case of token-based auth). +119 * +120 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +121 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +122 * @see #testLoginAuth() +123 * @see #testTokenAuth() +124 */ +125 public String testAuth() throws RundeckApiLoginException, RundeckApiTokenException { +126 String sessionID = null; +127 if (client.getToken() != null || client.getSessionID() != null) { +128 testTokenAuth(); +129 } else { +130 sessionID = testLoginAuth(); +131 } +132 return sessionID; +133 } +134 +135 /** +136 * Test the login-based authentication on the RunDeck instance +137 * +138 * @throws RundeckApiLoginException if the login fails +139 * @see #testAuth() +140 */ +141 public String testLoginAuth() throws RundeckApiLoginException { +142 String sessionID = null; +143 HttpClient httpClient = instantiateHttpClient(); +144 try { +145 sessionID = login(httpClient); +146 } finally { +147 httpClient.getConnectionManager().shutdown(); +148 } +149 return sessionID; +150 } +151 +152 /** +153 * Test the token-based authentication on the RunDeck instance +154 * +155 * @throws RundeckApiTokenException if the token is invalid +156 * @see #testAuth() +157 */ +158 public void testTokenAuth() throws RundeckApiTokenException { +159 try { +160 execute(new HttpGet(client.getUrl() + RundeckClient.API_ENDPOINT + "/system/info")); +161 } catch (RundeckApiTokenException e) { +162 throw e; +163 } catch (RundeckApiException e) { +164 throw new RundeckApiTokenException("Failed to verify token", e); +165 } +166 } +167 +168 /** +169 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +170 * API call. At the end, the given parser will be used to convert the response to a more useful result object. +171 * +172 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +173 * @param parser used to parse the response +174 * @return the result of the call, as formatted by the parser +175 * @throws RundeckApiException in case of error when calling the API +176 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +177 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +178 */ +179 public <T> T get(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +180 RundeckApiLoginException, RundeckApiTokenException { +181 return execute(new HttpGet(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath), parser); +182 } +183 +184 /** +185 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +186 * API call. +187 * +188 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +189 * @return a new {@link InputStream} instance, not linked with network resources +190 * @throws RundeckApiException in case of error when calling the API +191 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +192 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +193 */ +194 public InputStream get(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, +195 RundeckApiTokenException { +196 ByteArrayInputStream response = execute(new HttpGet(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath)); +197 +198 // try to load the document, to throw an exception in case of error +199 ParserHelper.loadDocument(response); +200 response.reset(); +201 +202 return response; +203 } +204 +205 /** +206 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +207 * API call without appending the API_ENDPOINT to the URL. +208 * +209 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +210 * @return a new {@link InputStream} instance, not linked with network resources +211 * @throws RundeckApiException in case of error when calling the API +212 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +213 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +214 */ +215 public InputStream getNonApi(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, +216 RundeckApiTokenException { +217 ByteArrayInputStream response = execute(new HttpGet(client.getUrl() + apiPath)); +218 response.reset(); +219 +220 return response; +221 } +222 +223 /** +224 * Execute an HTTP POST or GET request to the RunDeck instance, on the given path, depend ing of the {@link +225 * ApiPathBuilder} contains POST content or not (attachments or Form data). We will login first, and then execute +226 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +227 * +228 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +229 * @param parser used to parse the response +230 * +231 * @return the result of the call, as formatted by the parser +232 * +233 * @throws RundeckApiException in case of error when calling the API +234 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +235 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +236 */ +237 public <T> T postOrGet(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +238 RundeckApiLoginException, +239 RundeckApiTokenException { +240 if (apiPath.hasPostContent()) { +241 return post(apiPath, parser); +242 } else { +243 return get(apiPath, parser); +244 } +245 } +246 +247 /** +248 * Execute an HTTP POST request to the RunDeck instance, on the given path. We will login first, and then execute +249 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +250 * +251 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +252 * @param parser used to parse the response +253 * @return the result of the call, as formatted by the parser +254 * @throws RundeckApiException in case of error when calling the API +255 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +256 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +257 */ +258 public <T> T post(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +259 RundeckApiLoginException, RundeckApiTokenException { +260 HttpPost httpPost = new HttpPost(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath); +261 +262 // POST a multi-part request, with all attachments +263 if(apiPath.getAttachments().size()>0){ +264 MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); +265 for (Entry<String, InputStream> attachment : apiPath.getAttachments().entrySet()) { +266 entity.addPart(attachment.getKey(), new InputStreamBody(attachment.getValue(), attachment.getKey())); +267 } +268 httpPost.setEntity(entity); +269 }else if(apiPath.getForm().size()>0){ +270 try { +271 httpPost.setEntity(new UrlEncodedFormEntity(apiPath.getForm(), HTTP.UTF_8)); +272 } catch (UnsupportedEncodingException e) { +273 throw new RundeckApiException("Unsupported encoding: " + e.getMessage(), e); +274 } +275 }else { +276 throw new IllegalArgumentException("No Form or Multipart entity for POST content-body"); +277 } +278 +279 return execute(httpPost, parser); +280 } +281 +282 /** +283 * Execute an HTTP DELETE request to the RunDeck instance, on the given path. We will login first, and then execute +284 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +285 * +286 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +287 * @param parser used to parse the response +288 * @return the result of the call, as formatted by the parser +289 * @throws RundeckApiException in case of error when calling the API +290 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +291 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +292 */ +293 public <T> T delete(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +294 RundeckApiLoginException, RundeckApiTokenException { +295 return execute(new HttpDelete(client.getUrl() + RundeckClient.API_ENDPOINT + apiPath), parser); +296 } +297 +298 /** +299 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. At the end, +300 * the given parser will be used to convert the response to a more useful result object. +301 * +302 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... +303 * @param parser used to parse the response +304 * @return the result of the call, as formatted by the parser +305 * @throws RundeckApiException in case of error when calling the API +306 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +307 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +308 */ +309 private <T> T execute(HttpRequestBase request, XmlNodeParser<T> parser) throws RundeckApiException, +310 RundeckApiLoginException, RundeckApiTokenException { +311 // execute the request +312 InputStream response = execute(request); +313 +314 // read and parse the response +315 Document xmlDocument = ParserHelper.loadDocument(response); +316 return parser.parseXmlNode(xmlDocument); +317 } +318 +319 /** +320 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. +321 * +322 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... +323 * @return a new {@link InputStream} instance, not linked with network resources +324 * @throws RundeckApiException in case of error when calling the API +325 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +326 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +327 */ +328 private ByteArrayInputStream execute(HttpRequestBase request) throws RundeckApiException, RundeckApiLoginException, +329 RundeckApiTokenException { +330 HttpClient httpClient = instantiateHttpClient(); +331 try { +332 // we only need to manually login in case of login-based authentication +333 // note that in case of token-based auth, the auth (via an HTTP header) is managed by an interceptor. +334 if (client.getToken() == null && client.getSessionID() == null) { +335 login(httpClient); +336 } +337 +338 // execute the HTTP request +339 HttpResponse response = null; +340 try { +341 response = httpClient.execute(request); +342 } catch (IOException e) { +343 throw new RundeckApiException("Failed to execute an HTTP " + request.getMethod() + " on url : " +344 + request.getURI(), e); +345 } +346 +347 // in case of error, we get a redirect to /api/error +348 // that we need to follow manually for POST and DELETE requests (as GET) +349 if (response.getStatusLine().getStatusCode() / 100 == 3) { +350 String newLocation = response.getFirstHeader("Location").getValue(); +351 try { +352 EntityUtils.consume(response.getEntity()); +353 } catch (IOException e) { +354 throw new RundeckApiException("Failed to consume entity (release connection)", e); +355 } +356 request = new HttpGet(newLocation); +357 try { +358 response = httpClient.execute(request); +359 } catch (IOException e) { +360 throw new RundeckApiException("Failed to execute an HTTP GET on url : " + request.getURI(), e); +361 } +362 } +363 +364 // check the response code (should be 2xx, even in case of error : error message is in the XML result) +365 if (response.getStatusLine().getStatusCode() / 100 != 2) { +366 if (response.getStatusLine().getStatusCode() == 403 && +367 (client.getToken() != null || client.getSessionID() != null)) { +368 throw new RundeckApiTokenException("Invalid Token or sessionID ! Got HTTP response '" + response.getStatusLine() +369 + "' for " + request.getURI()); +370 } else { +371 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' for " +372 + request.getURI()); +373 } +374 } +375 if (response.getEntity() == null) { +376 throw new RundeckApiException("Empty RunDeck response ! HTTP status line is : " +377 + response.getStatusLine()); +378 } +379 +380 // return a new inputStream, so that we can close all network resources +381 try { +382 return new ByteArrayInputStream(EntityUtils.toByteArray(response.getEntity())); +383 } catch (IOException e) { +384 throw new RundeckApiException("Failed to consume entity and convert the inputStream", e); +385 } +386 } finally { +387 httpClient.getConnectionManager().shutdown(); +388 } +389 } +390 +391 /** +392 * Do the actual work of login, using the given {@link HttpClient} instance. You'll need to re-use this instance +393 * when making API calls (such as running a job). Only use this in case of login-based authentication. +394 * +395 * @param httpClient pre-instantiated +396 * @throws RundeckApiLoginException if the login failed +397 */ +398 private String login(HttpClient httpClient) throws RundeckApiLoginException { +399 String location = client.getUrl() + "/j_security_check"; +400 String sessionID = null; +401 while (true) { +402 HttpPost postLogin = new HttpPost(location); +403 List<NameValuePair> params = new ArrayList<NameValuePair>(); +404 params.add(new BasicNameValuePair("j_username", client.getLogin())); +405 params.add(new BasicNameValuePair("j_password", client.getPassword())); +406 params.add(new BasicNameValuePair("action", "login")); +407 +408 HttpResponse response = null; +409 try { +410 postLogin.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); +411 response = httpClient.execute(postLogin); +412 Header cookieHeader = response.getFirstHeader("Set-Cookie"); +413 if(cookieHeader != null){ +414 String cookieStr = cookieHeader.getValue(); +415 if(cookieStr != null){ +416 int i1 = cookieStr.indexOf("JSESSIONID="); +417 if(i1 >= 0){ +418 cookieStr = cookieStr.substring(i1 + "JSESSIONID=".length()); +419 int i2 = cookieStr.indexOf(";"); +420 if(i2 >= 0){ +421 sessionID = cookieStr.substring(0, i2); +422 } +423 } +424 } +425 } +426 } catch (IOException e) { +427 throw new RundeckApiLoginException("Failed to post login form on " + location, e); +428 } +429 +430 if (response.getStatusLine().getStatusCode() / 100 == 3) { +431 // HTTP client refuses to handle redirects (code 3xx) for POST, so we have to do it manually... +432 location = response.getFirstHeader("Location").getValue(); +433 try { +434 EntityUtils.consume(response.getEntity()); +435 } catch (IOException e) { +436 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); +437 } +438 continue; +439 } +440 if (response.getStatusLine().getStatusCode() / 100 != 2) { +441 throw new RundeckApiLoginException("Invalid HTTP response '" + response.getStatusLine() + "' for " +442 + location); +443 } +444 try { +445 String content = EntityUtils.toString(response.getEntity(), HTTP.UTF_8); +446 if (StringUtils.contains(content, "j_security_check")) { +447 throw new RundeckApiLoginException("Login failed for user " + client.getLogin()); +448 } +449 try { +450 EntityUtils.consume(response.getEntity()); +451 } catch (IOException e) { +452 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); +453 } +454 } catch (IOException io) { +455 throw new RundeckApiLoginException("Failed to read RunDeck result", io); +456 } catch (ParseException p) { +457 throw new RundeckApiLoginException("Failed to parse RunDeck response", p); +458 } +459 break; +460 } +461 return sessionID; +462 } +463 +464 /** +465 * Instantiate a new {@link HttpClient} instance, configured to accept all SSL certificates +466 * +467 * @return an {@link HttpClient} instance - won't be null +468 */ +469 private HttpClient instantiateHttpClient() { +470 DefaultHttpClient httpClient = new DefaultHttpClient(); +471 +472 // configure user-agent +473 HttpProtocolParams.setUserAgent(httpClient.getParams(), "RunDeck API Java Client " + RundeckClient.API_VERSION); +474 +475 // configure SSL +476 SSLSocketFactory socketFactory = null; +477 try { +478 socketFactory = new SSLSocketFactory(new TrustStrategy() { +479 +480 @Override +481 public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { +482 return true; +483 } +484 }, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); +485 } catch (KeyManagementException e) { +486 throw new RuntimeException(e); +487 } catch (UnrecoverableKeyException e) { +488 throw new RuntimeException(e); +489 } catch (NoSuchAlgorithmException e) { +490 throw new RuntimeException(e); +491 } catch (KeyStoreException e) { +492 throw new RuntimeException(e); +493 } +494 httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, socketFactory)); +495 +496 // configure proxy (use system env : http.proxyHost / http.proxyPort) +497 System.setProperty("java.net.useSystemProxies", "true"); +498 httpClient.setRoutePlanner(new ProxySelectorRoutePlanner(httpClient.getConnectionManager().getSchemeRegistry(), +499 ProxySelector.getDefault())); +500 +501 // in case of token-based authentication, add the correct HTTP header to all requests via an interceptor +502 httpClient.addRequestInterceptor(new HttpRequestInterceptor() { +503 +504 @Override +505 public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { +506 if (client.getToken() != null) { +507 request.addHeader(AUTH_TOKEN_HEADER, client.getToken()); +508 //System.out.println("httpClient adding token header"); +509 } +510 else if(client.getSessionID() != null) { +511 request.addHeader(COOKIE_HEADER, "JSESSIONID="+client.getSessionID()); +512 //System.out.println("httpClient adding session header, sessionID="+client.getSessionID()); +513 } +514 } +515 }); +516 +517 return httpClient; +518 } +519 }
      diff --git a/xref/org/rundeck/api/ApiPathBuilder.html b/xref/org/rundeck/api/ApiPathBuilder.html index fe3ab3d..6acbc51 100644 --- a/xref/org/rundeck/api/ApiPathBuilder.html +++ b/xref/org/rundeck/api/ApiPathBuilder.html @@ -26,207 +26,310 @@ 16 package org.rundeck.api; 17 18 import java.io.InputStream; -19 import java.util.Date; -20 import java.util.HashMap; -21 import java.util.Map; -22 import java.util.Properties; -23 import org.apache.commons.lang.StringUtils; -24 import org.rundeck.api.util.ParametersUtil; -25 -26 /** -27 * Builder for API paths -28 * -29 * @author Vincent Behar -30 */ -31 class ApiPathBuilder { -32 -33 /** Internally, we store everything in a {@link StringBuilder} */ -34 private final StringBuilder apiPath; -35 -36 /** When POSTing, we can add attachments */ -37 private final Map<String, InputStream> attachments; -38 -39 /** Marker for using the right separator between parameters ("?" or "&") */ -40 private boolean firstParamDone = false; -41 -42 /** -43 * Build a new instance, for the given "path" (the "path" is the part before the parameters. The path and the -44 * parameters are separated by a "?") -45 * -46 * @param paths elements of the path -47 */ -48 public ApiPathBuilder(String... paths) { -49 apiPath = new StringBuilder(); -50 attachments = new HashMap<String, InputStream>(); -51 if (paths != null) { -52 for (String path : paths) { -53 if (StringUtils.isNotBlank(path)) { -54 append(path); -55 } -56 } -57 } -58 } -59 -60 /** -61 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty -62 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated -63 * by the "=" character. Also, the value will be url-encoded. -64 * -65 * @param key of the parameter. Must not be null or empty -66 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. -67 * @return this, for method chaining +19 import java.util.ArrayList; +20 import java.util.Collection; +21 import java.util.Date; +22 import java.util.HashMap; +23 import java.util.List; +24 import java.util.Map; +25 import java.util.Properties; +26 import org.apache.commons.lang.StringUtils; +27 import org.apache.http.NameValuePair; +28 import org.apache.http.message.BasicNameValuePair; +29 import org.rundeck.api.util.ParametersUtil; +30 +31 /** +32 * Builder for API paths +33 * +34 * @author Vincent Behar +35 */ +36 class ApiPathBuilder { +37 +38 /** Internally, we store everything in a {@link StringBuilder} */ +39 private final StringBuilder apiPath; +40 +41 /** When POSTing, we can add attachments */ +42 private final Map<String, InputStream> attachments; +43 private final List<NameValuePair> form = new ArrayList<NameValuePair>(); +44 +45 /** Marker for using the right separator between parameters ("?" or "&") */ +46 private boolean firstParamDone = false; +47 +48 /** +49 * Build a new instance, for the given "path" (the "path" is the part before the parameters. The path and the +50 * parameters are separated by a "?") +51 * +52 * @param paths elements of the path +53 */ +54 public ApiPathBuilder(String... paths) { +55 apiPath = new StringBuilder(); +56 attachments = new HashMap<String, InputStream>(); +57 if (paths != null) { +58 for (String path : paths) { +59 if (StringUtils.isNotBlank(path)) { +60 append(path); +61 } +62 } +63 } +64 } +65 +66 /** +67 * Visit a {@link BuildsParameters} and add the parameters 68 */ -69 public ApiPathBuilder param(String key, String value) { -70 if (StringUtils.isNotBlank(value)) { -71 appendSeparator(); -72 append(key); -73 append("="); -74 append(ParametersUtil.urlEncode(value)); -75 } -76 return this; -77 } -78 -79 /** -80 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -81 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. Also, -82 * the value will be converted to lower-case. -83 * -84 * @param key of the parameter. Must not be null or empty -85 * @param value of the parameter. May be null -86 * @return this, for method chaining -87 */ -88 public ApiPathBuilder param(String key, Enum<?> value) { -89 if (value != null) { -90 param(key, StringUtils.lowerCase(value.toString())); -91 } -92 return this; -93 } -94 -95 /** -96 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -97 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -98 * -99 * @param key of the parameter. Must not be null or empty -100 * @param value of the parameter. May be null -101 * @return this, for method chaining -102 */ -103 public ApiPathBuilder param(String key, Date value) { -104 if (value != null) { -105 param(key, value.getTime()); -106 } -107 return this; -108 } -109 -110 /** -111 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -112 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -113 * -114 * @param key of the parameter. Must not be null or empty -115 * @param value of the parameter. May be null -116 * @return this, for method chaining -117 */ -118 public ApiPathBuilder param(String key, Long value) { -119 if (value != null) { -120 param(key, value.toString()); -121 } -122 return this; -123 } -124 -125 /** -126 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -127 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -128 * -129 * @param key of the parameter. Must not be null or empty -130 * @param value of the parameter. May be null -131 * @return this, for method chaining -132 */ -133 public ApiPathBuilder param(String key, Integer value) { -134 if (value != null) { -135 param(key, value.toString()); -136 } -137 return this; -138 } -139 -140 /** -141 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -142 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -143 * -144 * @param key of the parameter. Must not be null or empty -145 * @param value of the parameter. May be null -146 * @return this, for method chaining -147 */ -148 public ApiPathBuilder param(String key, Boolean value) { -149 if (value != null) { -150 param(key, value.toString()); -151 } -152 return this; -153 } -154 -155 /** -156 * Append the given node filters, only if it is not null/empty -157 * -158 * @param nodeFilters may be null/empty -159 * @return this, for method chaining -160 * @see ParametersUtil#generateNodeFiltersString(Properties) -161 */ -162 public ApiPathBuilder nodeFilters(Properties nodeFilters) { -163 String filters = ParametersUtil.generateNodeFiltersString(nodeFilters); -164 if (StringUtils.isNotBlank(filters)) { -165 appendSeparator(); -166 append(filters); -167 } -168 return this; -169 } -170 -171 /** -172 * When POSTing a request, add the given {@link InputStream} as an attachment to the content of the request. This -173 * will only add the stream if it is not null. -174 * -175 * @param name of the attachment. Must not be null or empty -176 * @param stream. May be null -177 * @return this, for method chaining -178 */ -179 public ApiPathBuilder attach(String name, InputStream stream) { -180 if (stream != null) { -181 attachments.put(name, stream); -182 } -183 return this; -184 } -185 -186 /** -187 * @return all attachments to be POSTed, with their names -188 */ -189 public Map<String, InputStream> getAttachments() { -190 return attachments; -191 } -192 -193 @Override -194 public String toString() { -195 return apiPath.toString(); -196 } -197 -198 /** -199 * Append the given string -200 * -201 * @param str to append -202 */ -203 private void append(String str) { -204 apiPath.append(str); -205 } -206 -207 /** -208 * Append the right separator "?" or "&" between 2 parameters -209 */ -210 private void appendSeparator() { -211 if (firstParamDone) { -212 append("&"); -213 } else { -214 append("?"); -215 firstParamDone = true; -216 } -217 } -218 -219 } +69 public ApiPathBuilder param(BuildsParameters params) { +70 params.buildParameters(this, false); +71 return this; +72 } +73 /** +74 * Visit a {@link BuildsParameters} and add the parameters +75 */ +76 public ApiPathBuilder field(BuildsParameters params) { +77 params.buildParameters(this, true); +78 return this; +79 } +80 /** +81 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty +82 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated +83 * by the "=" character. Also, the value will be url-encoded. +84 * +85 * @param key of the parameter. Must not be null or empty +86 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. +87 * @return this, for method chaining +88 */ +89 public ApiPathBuilder param(String key, String value) { +90 if (StringUtils.isNotBlank(value)) { +91 appendSeparator(); +92 append(key); +93 append("="); +94 append(ParametersUtil.urlEncode(value)); +95 } +96 return this; +97 } +98 +99 /** +100 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty +101 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated +102 * by the "=" character. Also, the value will be url-encoded. +103 * +104 * @param key of the parameter. Must not be null or empty +105 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. +106 * @return this, for method chaining +107 */ +108 public ApiPathBuilder param(final String key, final Collection<String> values) { +109 for(final String value: values){ +110 if (StringUtils.isNotBlank(value)) { +111 appendSeparator(); +112 append(key); +113 append("="); +114 append(ParametersUtil.urlEncode(value)); +115 } +116 } +117 return this; +118 } +119 +120 /** +121 * Append multiple values for the given Form field. This will be appended if it is not blank (null, empty +122 * or whitespace). The form field values will only be used for a "post" request +123 * +124 * @param key of the field name. Must not be null or empty +125 * @param values of the field. May be null/empty/blank. Will be url-encoded. +126 * @return this, for method chaining +127 */ +128 public ApiPathBuilder field(final String key, final Collection<String> values) { +129 if (null!=values) { +130 for(final String value: values){ +131 if (StringUtils.isNotBlank(value)) { +132 form.add(new BasicNameValuePair(key, value)); +133 } +134 } +135 } +136 return this; +137 } +138 +139 /** +140 * Append a single value for the given Form field. This will be appended if it is not blank (null, empty +141 * or whitespace). The form field values will only be used for a "post" request +142 * +143 * @param key of the field name. Must not be null or empty +144 * @param value of the field. May be null/empty/blank. Will be url-encoded. +145 * @return this, for method chaining +146 */ +147 public ApiPathBuilder field(final String key, final String value) { +148 if (StringUtils.isNotBlank(value)) { +149 form.add(new BasicNameValuePair(key, value)); +150 } +151 return this; +152 } +153 +154 /** +155 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +156 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. Also, +157 * the value will be converted to lower-case. +158 * +159 * @param key of the parameter. Must not be null or empty +160 * @param value of the parameter. May be null +161 * @return this, for method chaining +162 */ +163 public ApiPathBuilder param(String key, Enum<?> value) { +164 if (value != null) { +165 param(key, StringUtils.lowerCase(value.toString())); +166 } +167 return this; +168 } +169 +170 /** +171 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +172 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +173 * +174 * @param key of the parameter. Must not be null or empty +175 * @param value of the parameter. May be null +176 * @return this, for method chaining +177 */ +178 public ApiPathBuilder param(String key, Date value) { +179 if (value != null) { +180 param(key, value.getTime()); +181 } +182 return this; +183 } +184 +185 /** +186 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +187 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +188 * +189 * @param key of the parameter. Must not be null or empty +190 * @param value of the parameter. May be null +191 * @return this, for method chaining +192 */ +193 public ApiPathBuilder param(String key, Long value) { +194 if (value != null) { +195 param(key, value.toString()); +196 } +197 return this; +198 } +199 +200 /** +201 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +202 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +203 * +204 * @param key of the parameter. Must not be null or empty +205 * @param value of the parameter. May be null +206 * @return this, for method chaining +207 */ +208 public ApiPathBuilder param(String key, Integer value) { +209 if (value != null) { +210 param(key, value.toString()); +211 } +212 return this; +213 } +214 +215 /** +216 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +217 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +218 * +219 * @param key of the parameter. Must not be null or empty +220 * @param value of the parameter. May be null +221 * @return this, for method chaining +222 */ +223 public ApiPathBuilder param(String key, Boolean value) { +224 if (value != null) { +225 param(key, value.toString()); +226 } +227 return this; +228 } +229 +230 /** +231 * Append the given node filters, only if it is not null/empty +232 * +233 * @param nodeFilters may be null/empty +234 * @return this, for method chaining +235 * @see ParametersUtil#generateNodeFiltersString(Properties) +236 */ +237 public ApiPathBuilder nodeFilters(Properties nodeFilters) { +238 String filters = ParametersUtil.generateNodeFiltersString(nodeFilters); +239 if (StringUtils.isNotBlank(filters)) { +240 appendSeparator(); +241 append(filters); +242 } +243 return this; +244 } +245 +246 /** +247 * When POSTing a request, add the given {@link InputStream} as an attachment to the content of the request. This +248 * will only add the stream if it is not null. +249 * +250 * @param name of the attachment. Must not be null or empty +251 * @param stream. May be null +252 * @return this, for method chaining +253 */ +254 public ApiPathBuilder attach(String name, InputStream stream) { +255 if (stream != null) { +256 attachments.put(name, stream); +257 } +258 return this; +259 } +260 +261 /** +262 * @return all attachments to be POSTed, with their names +263 */ +264 public Map<String, InputStream> getAttachments() { +265 return attachments; +266 } +267 +268 @Override +269 public String toString() { +270 return apiPath.toString(); +271 } +272 +273 /** +274 * Append the given string +275 * +276 * @param str to append +277 */ +278 private void append(String str) { +279 apiPath.append(str); +280 } +281 +282 /** +283 * Append the right separator "?" or "&" between 2 parameters +284 */ +285 private void appendSeparator() { +286 if (firstParamDone) { +287 append("&"); +288 } else { +289 append("?"); +290 firstParamDone = true; +291 } +292 } +293 +294 /** +295 * Form fields for POST request +296 */ +297 public List<NameValuePair> getForm() { +298 return form; +299 } +300 +301 /** +302 * Return true if there are any Attachments or Form data for a POST request. +303 */ +304 public boolean hasPostContent() { +305 return getAttachments().size() > 0 || getForm().size() > 0; +306 } +307 +308 /** +309 * BuildsParameters can add URL or POST parameters to an {@link ApiPathBuilder} +310 * +311 * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> +312 */ +313 public static interface BuildsParameters { +314 /** +315 * Add the parameters or form fields to the ApiPathBuilder +316 * +317 * @param builder the builder +318 * @param doPost if true, use form fields, otherwise use query parameters +319 */ +320 public boolean buildParameters(ApiPathBuilder builder, boolean doPost); +321 } +322 }
      diff --git a/xref/org/rundeck/api/ExecutionQueryParameters.html b/xref/org/rundeck/api/ExecutionQueryParameters.html new file mode 100644 index 0000000..ad96459 --- /dev/null +++ b/xref/org/rundeck/api/ExecutionQueryParameters.html @@ -0,0 +1,93 @@ + + + + +ExecutionQueryParameters xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * ExecutionQueryParameters.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 9/13/12 3:54 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api;
      +26  
      +27  import org.rundeck.api.domain.RundeckExecution;
      +28  import org.rundeck.api.query.ExecutionQuery;
      +29  
      +30  
      +31  /**
      +32   * ExecutionQueryParameters adds parameters to a {@link ApiPathBuilder} from a {@link ExecutionQuery} object.
      +33   *
      +34   *
      +35   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +36   */
      +37  class ExecutionQueryParameters extends QueryParameterBuilder {
      +38      ExecutionQuery query;
      +39  
      +40      ExecutionQueryParameters(final ExecutionQuery query) {
      +41          this.query = query;
      +42      }
      +43  
      +44      public boolean buildParameters(final ApiPathBuilder builder, final boolean doPost) {
      +45          boolean seen = false;
      +46  
      +47          seen |= visit("jobFilter", query.getJob(), doPost, builder);
      +48          seen |= visit("jobExactFilter", query.getJobExact(), doPost, builder);
      +49          seen |= visit("excludeJobFilter", query.getExcludeJob(), doPost, builder);
      +50          seen |= visit("excludeJobExactFilter", query.getExcludeJobExact(), doPost, builder);
      +51          seen |= visit("project", query.getProject(), doPost, builder);
      +52          seen |= visit("groupPath", query.getGroupPath(), doPost, builder);
      +53          seen |= visit("groupPathExact", query.getGroupPathExact(), doPost, builder);
      +54          seen |= visit("excludeGroupPath", query.getExcludeGroupPath(), doPost, builder);
      +55          seen |= visit("excludeGroupPathExact", query.getExcludeGroupPathExact(), doPost, builder);
      +56          seen |= visit("descFilter", query.getDescription(), doPost, builder);
      +57          seen |= visit("userFilter", query.getUser(), doPost, builder);
      +58          if(null!=query.getAdhoc()){
      +59              seen |= visit("adhoc", query.getAdhoc(), doPost, builder);
      +60          }
      +61  
      +62          seen |= visit("statusFilter", stringVal(query.getStatus()), doPost, builder);
      +63          seen |= visit("abortedbyFilter", query.getAbortedby(), doPost, builder);
      +64          seen |= visit("jobListFilter", query.getJobList(), doPost, builder);
      +65          seen |= visit("jobIdListFilter", query.getJobIdList(), doPost, builder);
      +66          seen |= visit("excludeJobIdListFilter", query.getExcludeJobIdList(), doPost, builder);
      +67          seen |= visit("excludeJobListFilter", query.getExcludeJobList(), doPost, builder);
      +68          seen |= visit("begin", query.getBegin(), doPost, builder);
      +69          seen |= visit("end", query.getEnd(), doPost, builder);
      +70          seen |= visit("recentFilter", query.getRecent(), doPost, builder);
      +71  
      +72          return seen;
      +73      }
      +74  
      +75      public static String stringVal(final RundeckExecution.ExecutionStatus status) {
      +76          return null != status ? status.toString().toLowerCase() : null;
      +77      }
      +78  
      +79  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/QueryParameterBuilder.html b/xref/org/rundeck/api/QueryParameterBuilder.html new file mode 100644 index 0000000..da36bc8 --- /dev/null +++ b/xref/org/rundeck/api/QueryParameterBuilder.html @@ -0,0 +1,97 @@ + + + + +QueryParameterBuilder xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * QueryParameterBuilder.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 9/13/12 4:21 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api;
      +26  
      +27  import java.text.SimpleDateFormat;
      +28  import java.util.*;
      +29  
      +30  
      +31  /**
      +32   * Abstract utility base class for building query parameters from a query object.
      +33   *
      +34   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +35   */
      +36  abstract class QueryParameterBuilder implements ApiPathBuilder.BuildsParameters {
      +37      public static final String W3C_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
      +38      static final SimpleDateFormat format = new SimpleDateFormat(W3C_DATE_FORMAT);
      +39  
      +40      /**
      +41       * Add a value to the builder for a given key
      +42       *
      +43       * @param key     parameter name
      +44       * @param value   value which can be a String, Boolean, Date or collection of Strings. Other types will be converted
      +45       *                via {@link Object#toString()}
      +46       * @param doPost  if true, add POST field instead of query parameters
      +47       * @param builder the builder
      +48       *
      +49       * @return true if the value was not null and was added to the builder
      +50       */
      +51      protected boolean visit(String key, Object value, boolean doPost, ApiPathBuilder builder) {
      +52          if (null != value) {
      +53              if (doPost) {
      +54                  if (value instanceof Collection) {
      +55                      builder.field(key, (Collection<String>) value);
      +56                  } else {
      +57                      builder.field(key, stringVal(value));
      +58                  }
      +59                  return true;
      +60              } else {
      +61                  if (value instanceof Collection) {
      +62                      builder.param(key, (Collection<String>) value);
      +63                  } else {
      +64                      builder.param(key, stringVal(value));
      +65                  }
      +66                  return true;
      +67              }
      +68          }
      +69          return false;
      +70      }
      +71  
      +72      private String stringVal(Object value) {
      +73          return value instanceof String ? (String) value :
      +74                 value instanceof Boolean ? Boolean.toString((Boolean) value) :
      +75                 value instanceof Date ? formatDate((Date) value)
      +76  
      +77                                       : value.toString();
      +78      }
      +79  
      +80      private String formatDate(Date value) {
      +81          return format.format(value);
      +82      }
      +83  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/RundeckClient.html b/xref/org/rundeck/api/RundeckClient.html index 9c49099..85eccfb 100644 --- a/xref/org/rundeck/api/RundeckClient.html +++ b/xref/org/rundeck/api/RundeckClient.html @@ -40,893 +40,893 @@ 30 import org.apache.commons.lang.StringUtils; 31 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; 32 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; -33 import org.rundeck.api.domain.RundeckAbort; -34 import org.rundeck.api.domain.RundeckExecution; -35 import org.rundeck.api.domain.RundeckHistory; -36 import org.rundeck.api.domain.RundeckJob; -37 import org.rundeck.api.domain.RundeckJobsImportMethod; -38 import org.rundeck.api.domain.RundeckJobsImportResult; -39 import org.rundeck.api.domain.RundeckNode; -40 import org.rundeck.api.domain.RundeckProject; -41 import org.rundeck.api.domain.RundeckSystemInfo; -42 import org.rundeck.api.domain.RundeckExecution.ExecutionStatus; -43 import org.rundeck.api.parser.AbortParser; -44 import org.rundeck.api.parser.ExecutionParser; -45 import org.rundeck.api.parser.HistoryParser; -46 import org.rundeck.api.parser.JobParser; -47 import org.rundeck.api.parser.JobsImportResultParser; -48 import org.rundeck.api.parser.ListParser; -49 import org.rundeck.api.parser.NodeParser; -50 import org.rundeck.api.parser.ProjectParser; -51 import org.rundeck.api.parser.StringParser; -52 import org.rundeck.api.parser.SystemInfoParser; -53 import org.rundeck.api.util.AssertUtil; -54 import org.rundeck.api.util.ParametersUtil; -55 -56 /** -57 * Main entry point to talk to a RunDeck instance.<br> -58 * You have 2 methods for authentication : login-based or token-based. If you want to use the first, you need to provide -59 * both a "login" and a "password". Otherwise, just provide a "token" (also called "auth-token"). See the RunDeck -60 * documentation for generating such a token.<br> -61 * <br> -62 * Usage : <br> -63 * <code> -64 * <pre class="prettyprint"> -65 * // using login-based authentication : -66 * RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin"); -67 * // or for a token-based authentication : -68 * RundeckClient rundeck = new RundeckClient("http://localhost:4440", "PDDNKo5VE29kpk4prOUDr2rsKdRkEvsD"); -69 * -70 * List&lt;RundeckProject&gt; projects = rundeck.getProjects(); -71 * -72 * RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name"); -73 * RundeckExecution execution = rundeck.triggerJob(job.getId(), -74 * new OptionsBuilder().addOption("version", "1.2.0").toProperties()); -75 * -76 * List&lt;RundeckExecution&gt; runningExecutions = rundeck.getRunningExecutions("my-project"); -77 * -78 * rundeck.exportJobsToFile("/tmp/jobs.xml", FileType.XML, "my-project"); -79 * rundeck.importJobs("/tmp/jobs.xml", FileType.XML); -80 * </pre> -81 * </code> -82 * -83 * @author Vincent Behar -84 */ -85 public class RundeckClient implements Serializable { -86 -87 private static final long serialVersionUID = 1L; +33 import org.rundeck.api.domain.*; +34 import org.rundeck.api.domain.RundeckExecution.ExecutionStatus; +35 import org.rundeck.api.parser.*; +36 import org.rundeck.api.query.ExecutionQuery; +37 import org.rundeck.api.util.AssertUtil; +38 import org.rundeck.api.util.PagedResults; +39 import org.rundeck.api.util.ParametersUtil; +40 +41 /** +42 * Main entry point to talk to a RunDeck instance.<br> +43 * You have 2 methods for authentication : login-based or token-based. If you want to use the first, you need to provide +44 * both a "login" and a "password". Otherwise, just provide a "token" (also called "auth-token"). See the RunDeck +45 * documentation for generating such a token.<br> +46 * <br> +47 * Usage : <br> +48 * <code> +49 * <pre> +50 * // using login-based authentication : +51 * RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin"); +52 * // or for a token-based authentication : +53 * RundeckClient rundeck = new RundeckClient("http://localhost:4440", "PDDNKo5VE29kpk4prOUDr2rsKdRkEvsD"); +54 * +55 * List&lt;RundeckProject&gt; projects = rundeck.getProjects(); +56 * +57 * RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name"); +58 * RundeckExecution execution = rundeck.triggerJob(job.getId(), +59 * new OptionsBuilder().addOption("version", "1.2.0").toProperties()); +60 * +61 * List&lt;RundeckExecution&gt; runningExecutions = rundeck.getRunningExecutions("my-project"); +62 * +63 * rundeck.exportJobsToFile("/tmp/jobs.xml", FileType.XML, "my-project"); +64 * rundeck.importJobs("/tmp/jobs.xml", FileType.XML); +65 * </pre> +66 * </code> +67 * +68 * @author Vincent Behar +69 */ +70 public class RundeckClient implements Serializable { +71 +72 private static final long serialVersionUID = 1L; +73 +74 /** Version of the API supported */ +75 public static final transient int API_VERSION = 5; +76 +77 /** End-point of the API */ +78 public static final transient String API_ENDPOINT = "/api/" + API_VERSION; +79 +80 /** Default value for the "pooling interval" used when running jobs/commands/scripts */ +81 private static final transient long DEFAULT_POOLING_INTERVAL = 5; +82 +83 /** Default unit of the "pooling interval" used when running jobs/commands/scripts */ +84 private static final transient TimeUnit DEFAULT_POOLING_UNIT = TimeUnit.SECONDS; +85 +86 /** URL of the RunDeck instance ("http://localhost:4440" target="alexandria_uri">http://localhost:4440", "http://rundeck.your-compagny.com/", etc) */ +87 private final String url; 88 -89 /** Version of the API supported */ -90 public static final transient int API_VERSION = 2; +89 /** Auth-token for authentication (if not using login-based auth) */ +90 private final String token; 91 -92 /** End-point of the API */ -93 public static final transient String API_ENDPOINT = "/api/" + API_VERSION; +92 /** Login to use for authentication on the RunDeck instance (if not using token-based auth) */ +93 private final String login; 94 -95 /** Default value for the "pooling interval" used when running jobs/commands/scripts */ -96 private static final transient long DEFAULT_POOLING_INTERVAL = 5; -97 -98 /** Default unit of the "pooling interval" used when running jobs/commands/scripts */ -99 private static final transient TimeUnit DEFAULT_POOLING_UNIT = TimeUnit.SECONDS; -100 -101 /** URL of the RunDeck instance ("http://localhost:4440" target="alexandria_uri">http://localhost:4440", "http://rundeck.your-compagny.com/", etc) */ -102 private final String url; -103 -104 /** Auth-token for authentication (if not using login-based auth) */ -105 private final String token; -106 -107 /** Login to use for authentication on the RunDeck instance (if not using token-based auth) */ -108 private final String login; -109 -110 /** Password to use for authentication on the RunDeck instance (if not using token-based auth) */ -111 private final String password; -112 -113 /** -114 * Instantiate a new {@link RundeckClient} for the RunDeck instance at the given url, using login-based -115 * authentication. -116 * -117 * @param url of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) -118 * @param login to use for authentication on the RunDeck instance -119 * @param password to use for authentication on the RunDeck instance -120 * @throws IllegalArgumentException if the url, login or password is blank (null, empty or whitespace) -121 */ -122 public RundeckClient(String url, String login, String password) throws IllegalArgumentException { -123 super(); -124 AssertUtil.notBlank(url, "The RunDeck URL is mandatory !"); -125 AssertUtil.notBlank(login, "The RunDeck login is mandatory !"); -126 AssertUtil.notBlank(password, "The RunDeck password is mandatory !"); -127 this.url = url; -128 this.login = login; -129 this.password = password; -130 this.token = null; -131 } -132 -133 /** -134 * Instantiate a new {@link RundeckClient} for the RunDeck instance at the given url, using token-based -135 * authentication. -136 * -137 * @param url of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) -138 * @param token to use for authentication on the RunDeck instance -139 * @throws IllegalArgumentException if the url or token is blank (null, empty or whitespace) -140 */ -141 public RundeckClient(String url, String token) throws IllegalArgumentException { -142 super(); -143 AssertUtil.notBlank(url, "The RunDeck URL is mandatory !"); -144 AssertUtil.notBlank(token, "The RunDeck auth-token is mandatory !"); -145 this.url = url; -146 this.token = token; -147 this.login = null; -148 this.password = null; -149 } -150 -151 /** -152 * Try to "ping" the RunDeck instance to see if it is alive -153 * -154 * @throws RundeckApiException if the ping fails -155 */ -156 public void ping() throws RundeckApiException { -157 new ApiCall(this).ping(); -158 } -159 -160 /** -161 * Test the authentication on the RunDeck instance. -162 * -163 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -164 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -165 */ -166 public void testAuth() throws RundeckApiLoginException, RundeckApiTokenException { -167 new ApiCall(this).testAuth(); -168 } -169 -170 /** -171 * @deprecated Use {@link #testAuth()} -172 * @see #testAuth() -173 */ -174 @Deprecated -175 public void testCredentials() throws RundeckApiLoginException, RundeckApiTokenException { -176 testAuth(); -177 } -178 -179 /* -180 * Projects -181 */ +95 /** Password to use for authentication on the RunDeck instance (if not using token-based auth) */ +96 private final String password; +97 +98 private String sessionID; +99 +100 /** +101 * Instantiate a new {@link RundeckClient} for the RunDeck instance at the given url, using login-based +102 * authentication. +103 * +104 * @param url of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) +105 * @param login to use for authentication on the RunDeck instance +106 * @param password to use for authentication on the RunDeck instance +107 * @throws IllegalArgumentException if the url, login or password is blank (null, empty or whitespace) +108 */ +109 public RundeckClient(String url, String login, String password) throws IllegalArgumentException { +110 super(); +111 AssertUtil.notBlank(url, "The RunDeck URL is mandatory !"); +112 AssertUtil.notBlank(login, "The RunDeck login is mandatory !"); +113 AssertUtil.notBlank(password, "The RunDeck password is mandatory !"); +114 this.url = url; +115 this.login = login; +116 this.password = password; +117 this.token = null; +118 } +119 +120 /** +121 * Instantiate a new {@link RundeckClient} for the RunDeck instance at the given url, +122 * using token-based or session-based authentication. Either token or sessionID must be valid +123 * +124 * @param url of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) +125 * @param token to use for authentication on the RunDeck instance +126 * @param sessionID to use for session authentication on the RunDeck instance +127 * @param useToken should be true if using token, false if using sessionID +128 * @throws IllegalArgumentException if the url or token is blank (null, empty or whitespace) +129 */ +130 public RundeckClient(String url, String token, String sessionID, boolean useToken) throws IllegalArgumentException { +131 super(); +132 AssertUtil.notBlank(url, "The RunDeck URL is mandatory !"); +133 if(useToken){ +134 AssertUtil.notBlank(token, "Token is mandatory!"); +135 this.token = token; +136 this.sessionID = null; +137 } +138 else { +139 AssertUtil.notBlank(sessionID, "sessionID is mandatory!"); +140 this.sessionID = sessionID; +141 this.token = null; +142 } +143 this.url = url; +144 this.login = null; +145 this.password = null; +146 } +147 +148 +149 public RundeckClient(String url, String token) throws IllegalArgumentException { +150 this(url, token, null, true); +151 } +152 +153 +154 /** +155 * Try to "ping" the RunDeck instance to see if it is alive +156 * +157 * @throws RundeckApiException if the ping fails +158 */ +159 public void ping() throws RundeckApiException { +160 new ApiCall(this).ping(); +161 } +162 +163 /** +164 * Test the authentication on the RunDeck instance. +165 * +166 * @return sessionID if doing username+password login and it succeeded +167 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +168 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +169 */ +170 public String testAuth() throws RundeckApiLoginException, RundeckApiTokenException { +171 return (new ApiCall(this)).testAuth(); +172 } +173 +174 /** +175 * @deprecated Use {@link #testAuth()} +176 * @see #testAuth() +177 */ +178 @Deprecated +179 public void testCredentials() throws RundeckApiLoginException, RundeckApiTokenException { +180 testAuth(); +181 } 182 -183 /** -184 * List all projects -185 * -186 * @return a {@link List} of {@link RundeckProject} : might be empty, but won't be null -187 * @throws RundeckApiException in case of error when calling the API -188 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -189 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -190 */ -191 public List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiLoginException, -192 RundeckApiTokenException { -193 return new ApiCall(this).get(new ApiPathBuilder("/projects"), -194 new ListParser<RundeckProject>(new ProjectParser(), "result/projects/project")); -195 } -196 -197 /** -198 * Get the definition of a single project, identified by the given name -199 * -200 * @param projectName name of the project - mandatory -201 * @return a {@link RundeckProject} instance - won't be null -202 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -203 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -204 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -205 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) -206 */ -207 public RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiLoginException, -208 RundeckApiTokenException, IllegalArgumentException { -209 AssertUtil.notBlank(projectName, "projectName is mandatory to get the details of a project !"); -210 return new ApiCall(this).get(new ApiPathBuilder("/project/", projectName), -211 new ProjectParser("result/projects/project")); -212 } -213 -214 /* -215 * Jobs -216 */ +183 /* +184 * Projects +185 */ +186 +187 /** +188 * List all projects +189 * +190 * @return a {@link List} of {@link RundeckProject} : might be empty, but won't be null +191 * @throws RundeckApiException in case of error when calling the API +192 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +193 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +194 */ +195 public List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiLoginException, +196 RundeckApiTokenException { +197 return new ApiCall(this).get(new ApiPathBuilder("/projects"), +198 new ListParser<RundeckProject>(new ProjectParser(), "result/projects/project")); +199 } +200 +201 /** +202 * Get the definition of a single project, identified by the given name +203 * +204 * @param projectName name of the project - mandatory +205 * @return a {@link RundeckProject} instance - won't be null +206 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +207 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +208 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +209 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +210 */ +211 public RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiLoginException, +212 RundeckApiTokenException, IllegalArgumentException { +213 AssertUtil.notBlank(projectName, "projectName is mandatory to get the details of a project !"); +214 return new ApiCall(this).get(new ApiPathBuilder("/project/", projectName), +215 new ProjectParser("result/projects/project")); +216 } 217 -218 /** -219 * List all jobs (for all projects) -220 * -221 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null -222 * @throws RundeckApiException in case of error when calling the API -223 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -224 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -225 */ -226 public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { -227 List<RundeckJob> jobs = new ArrayList<RundeckJob>(); -228 for (RundeckProject project : getProjects()) { -229 jobs.addAll(getJobs(project.getName())); -230 } -231 return jobs; -232 } -233 -234 /** -235 * List all jobs that belongs to the given project -236 * -237 * @param project name of the project - mandatory -238 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null -239 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -240 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -241 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -242 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -243 * @see #getJobs(String, String, String, String...) -244 */ -245 public List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiLoginException, -246 RundeckApiTokenException, IllegalArgumentException { -247 return getJobs(project, null, null, new String[0]); -248 } -249 -250 /** -251 * List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) -252 * -253 * @param project name of the project - mandatory -254 * @param jobFilter a filter for the job Name - optional -255 * @param groupPath a group or partial group path to include all jobs within that group path - optional -256 * @param jobIds a list of Job IDs to include - optional -257 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null -258 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -259 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -260 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -261 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -262 * @see #getJobs(String) -263 */ -264 public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds) -265 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -266 AssertUtil.notBlank(project, "project is mandatory to get all jobs !"); -267 return new ApiCall(this).get(new ApiPathBuilder("/jobs").param("project", project) -268 .param("jobFilter", jobFilter) -269 .param("groupPath", groupPath) -270 .param("idlist", StringUtils.join(jobIds, ",")), -271 new ListParser<RundeckJob>(new JobParser(), "result/jobs/job")); -272 } -273 -274 /** -275 * Export the definitions of all jobs that belongs to the given project -276 * -277 * @param filename path of the file where the content should be saved - mandatory -278 * @param format of the export. See {@link FileType} - mandatory -279 * @param project name of the project - mandatory -280 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -281 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -282 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -283 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is -284 * invalid -285 * @throws IOException if we failed to write to the file -286 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -287 * @see #exportJobs(String, String) -288 */ -289 public void exportJobsToFile(String filename, String format, String project) throws RundeckApiException, -290 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -291 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -292 exportJobsToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), project); -293 } -294 -295 /** -296 * Export the definitions of all jobs that belongs to the given project -297 * -298 * @param filename path of the file where the content should be saved - mandatory -299 * @param format of the export. See {@link FileType} - mandatory -300 * @param project name of the project - mandatory -301 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -302 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -303 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -304 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null -305 * @throws IOException if we failed to write to the file -306 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -307 * @see #exportJobs(FileType, String) -308 */ -309 public void exportJobsToFile(String filename, FileType format, String project) throws RundeckApiException, -310 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -311 exportJobsToFile(filename, format, project, null, null, new String[0]); -312 } -313 -314 /** -315 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -316 * groupPath and jobIds) -317 * -318 * @param filename path of the file where the content should be saved - mandatory -319 * @param format of the export. See {@link FileType} - mandatory -320 * @param project name of the project - mandatory -321 * @param jobFilter a filter for the job Name - optional -322 * @param groupPath a group or partial group path to include all jobs within that group path - optional -323 * @param jobIds a list of Job IDs to include - optional -324 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -325 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -326 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -327 * @throws IllegalArgumentException if the filename, format or project is blank (null, empty or whitespace), or the -328 * format is invalid -329 * @throws IOException if we failed to write to the file -330 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -331 * @see #exportJobs(FileType, String, String, String, String...) -332 */ -333 public void exportJobsToFile(String filename, String format, String project, String jobFilter, String groupPath, -334 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -335 IllegalArgumentException, IOException { -336 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -337 exportJobsToFile(filename, -338 FileType.valueOf(StringUtils.upperCase(format)), -339 project, -340 jobFilter, -341 groupPath, -342 jobIds); -343 } -344 -345 /** -346 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -347 * groupPath and jobIds) -348 * -349 * @param filename path of the file where the content should be saved - mandatory -350 * @param format of the export. See {@link FileType} - mandatory -351 * @param project name of the project - mandatory -352 * @param jobFilter a filter for the job Name - optional -353 * @param groupPath a group or partial group path to include all jobs within that group path - optional -354 * @param jobIds a list of Job IDs to include - optional -355 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -356 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -357 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -358 * @throws IllegalArgumentException if the filename or project is blank (null, empty or whitespace), or the format -359 * is null -360 * @throws IOException if we failed to write to the file -361 * @see #exportJobs(FileType, String, String, String, String...) -362 */ -363 public void exportJobsToFile(String filename, FileType format, String project, String jobFilter, String groupPath, -364 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -365 IllegalArgumentException, IOException { -366 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); -367 InputStream inputStream = exportJobs(format, project, jobFilter, groupPath, jobIds); -368 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); -369 } -370 -371 /** -372 * Export the definitions of all jobs that belongs to the given project -373 * -374 * @param format of the export. See {@link FileType} - mandatory -375 * @param project name of the project - mandatory -376 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -377 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -378 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -379 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -380 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is -381 * invalid -382 * @see #exportJobs(FileType, String, String, String, String...) -383 * @see #exportJobsToFile(String, String, String) -384 */ -385 public InputStream exportJobs(String format, String project) throws RundeckApiException, RundeckApiLoginException, -386 RundeckApiTokenException, IllegalArgumentException { -387 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -388 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project); -389 } -390 -391 /** -392 * Export the definitions of all jobs that belongs to the given project -393 * -394 * @param format of the export. See {@link FileType} - mandatory -395 * @param project name of the project - mandatory -396 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -397 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -398 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -399 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -400 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null -401 * @see #exportJobs(FileType, String, String, String, String...) -402 * @see #exportJobsToFile(String, FileType, String) -403 */ -404 public InputStream exportJobs(FileType format, String project) throws RundeckApiException, -405 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -406 return exportJobs(format, project, null, null, new String[0]); -407 } -408 -409 /** -410 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -411 * groupPath and jobIds) -412 * -413 * @param format of the export. See {@link FileType} - mandatory -414 * @param project name of the project - mandatory -415 * @param jobFilter a filter for the job Name - optional -416 * @param groupPath a group or partial group path to include all jobs within that group path - optional -417 * @param jobIds a list of Job IDs to include - optional -418 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -419 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -420 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -421 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -422 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is -423 * invalid -424 * @see #exportJobs(FileType, String, String, String, String...) -425 * @see #exportJobsToFile(String, String, String, String, String, String...) -426 */ -427 public InputStream exportJobs(String format, String project, String jobFilter, String groupPath, String... jobIds) -428 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -429 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -430 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project, jobFilter, groupPath, jobIds); -431 } -432 -433 /** -434 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -435 * groupPath and jobIds) -436 * -437 * @param format of the export. See {@link FileType} - mandatory -438 * @param project name of the project - mandatory -439 * @param jobFilter a filter for the job Name - optional -440 * @param groupPath a group or partial group path to include all jobs within that group path - optional -441 * @param jobIds a list of Job IDs to include - optional -442 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -443 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -444 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -445 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -446 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null -447 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -448 */ -449 public InputStream exportJobs(FileType format, String project, String jobFilter, String groupPath, String... jobIds) -450 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -451 AssertUtil.notNull(format, "format is mandatory to export jobs !"); -452 AssertUtil.notBlank(project, "project is mandatory to export jobs !"); -453 return new ApiCall(this).get(new ApiPathBuilder("/jobs/export").param("format", format) -454 .param("project", project) -455 .param("jobFilter", jobFilter) -456 .param("groupPath", groupPath) -457 .param("idlist", StringUtils.join(jobIds, ","))); -458 } -459 -460 /** -461 * Export the definition of a single job (identified by the given ID) -462 * -463 * @param filename path of the file where the content should be saved - mandatory -464 * @param format of the export. See {@link FileType} - mandatory -465 * @param jobId identifier of the job - mandatory -466 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -467 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -468 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -469 * @throws IllegalArgumentException if the filename, format or jobId is blank (null, empty or whitespace), or the -470 * format is invalid -471 * @throws IOException if we failed to write to the file -472 * @see #exportJobToFile(String, FileType, String) -473 * @see #exportJob(String, String) -474 * @see #getJob(String) -475 */ -476 public void exportJobToFile(String filename, String format, String jobId) throws RundeckApiException, -477 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -478 AssertUtil.notBlank(format, "format is mandatory to export a job !"); -479 exportJobToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), jobId); -480 } -481 -482 /** -483 * Export the definition of a single job (identified by the given ID) -484 * -485 * @param filename path of the file where the content should be saved - mandatory -486 * @param format of the export. See {@link FileType} - mandatory -487 * @param jobId identifier of the job - mandatory -488 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -489 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -490 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -491 * @throws IllegalArgumentException if the filename or jobId is blank (null, empty or whitespace), or the format is -492 * null -493 * @throws IOException if we failed to write to the file -494 * @see #exportJob(FileType, String) -495 * @see #getJob(String) -496 */ -497 public void exportJobToFile(String filename, FileType format, String jobId) throws RundeckApiException, -498 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -499 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); -500 InputStream inputStream = exportJob(format, jobId); -501 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); -502 } -503 -504 /** -505 * Export the definition of a single job, identified by the given ID -506 * -507 * @param format of the export. See {@link FileType} - mandatory -508 * @param jobId identifier of the job - mandatory -509 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -510 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -511 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -512 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -513 * @throws IllegalArgumentException if the format or jobId is blank (null, empty or whitespace), or the format is -514 * invalid -515 * @see #exportJobToFile(String, String, String) -516 * @see #getJob(String) -517 */ -518 public InputStream exportJob(String format, String jobId) throws RundeckApiException, RundeckApiLoginException, -519 RundeckApiTokenException, IllegalArgumentException { -520 AssertUtil.notBlank(format, "format is mandatory to export a job !"); -521 return exportJob(FileType.valueOf(StringUtils.upperCase(format)), jobId); -522 } -523 -524 /** -525 * Export the definition of a single job, identified by the given ID -526 * -527 * @param format of the export. See {@link FileType} - mandatory -528 * @param jobId identifier of the job - mandatory -529 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -530 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -531 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -532 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -533 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the format is null -534 * @see #exportJobToFile(String, FileType, String) -535 * @see #getJob(String) -536 */ -537 public InputStream exportJob(FileType format, String jobId) throws RundeckApiException, RundeckApiLoginException, -538 RundeckApiTokenException, IllegalArgumentException { -539 AssertUtil.notNull(format, "format is mandatory to export a job !"); -540 AssertUtil.notBlank(jobId, "jobId is mandatory to export a job !"); -541 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId).param("format", format)); -542 } -543 -544 /** -545 * Import the definitions of jobs, from the given file -546 * -547 * @param filename of the file containing the jobs definitions - mandatory -548 * @param fileType type of the file. See {@link FileType} - mandatory -549 * @return a {@link RundeckJobsImportResult} instance - won't be null -550 * @throws RundeckApiException in case of error when calling the API -551 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -552 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -553 * @throws IllegalArgumentException if the filename or fileType is blank (null, empty or whitespace), or the -554 * fileType is invalid -555 * @throws IOException if we failed to read the file -556 * @see #importJobs(InputStream, String) -557 * @see #importJobs(String, FileType, RundeckJobsImportMethod) -558 */ -559 public RundeckJobsImportResult importJobs(String filename, String fileType) throws RundeckApiException, -560 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -561 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); -562 return importJobs(filename, FileType.valueOf(StringUtils.upperCase(fileType))); -563 } -564 -565 /** -566 * Import the definitions of jobs, from the given file -567 * -568 * @param filename of the file containing the jobs definitions - mandatory -569 * @param fileType type of the file. See {@link FileType} - mandatory -570 * @return a {@link RundeckJobsImportResult} instance - won't be null -571 * @throws RundeckApiException in case of error when calling the API -572 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -573 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -574 * @throws IllegalArgumentException if the filename is blank (null, empty or whitespace), or the fileType is null -575 * @throws IOException if we failed to read the file -576 * @see #importJobs(InputStream, FileType) -577 * @see #importJobs(String, FileType, RundeckJobsImportMethod) -578 */ -579 public RundeckJobsImportResult importJobs(String filename, FileType fileType) throws RundeckApiException, -580 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -581 return importJobs(filename, fileType, (RundeckJobsImportMethod) null); -582 } -583 -584 /** -585 * Import the definitions of jobs, from the given file, using the given behavior -586 * -587 * @param filename of the file containing the jobs definitions - mandatory -588 * @param fileType type of the file. See {@link FileType} - mandatory -589 * @param importBehavior see {@link RundeckJobsImportMethod} -590 * @return a {@link RundeckJobsImportResult} instance - won't be null -591 * @throws RundeckApiException in case of error when calling the API -592 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -593 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -594 * @throws IllegalArgumentException if the filename or fileType is blank (null, empty or whitespace), or the -595 * fileType or behavior is not valid -596 * @throws IOException if we failed to read the file -597 * @see #importJobs(InputStream, String, String) -598 * @see #importJobs(String, FileType, RundeckJobsImportMethod) -599 */ -600 public RundeckJobsImportResult importJobs(String filename, String fileType, String importBehavior) -601 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, -602 IOException { -603 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); -604 return importJobs(filename, -605 FileType.valueOf(StringUtils.upperCase(fileType)), -606 RundeckJobsImportMethod.valueOf(StringUtils.upperCase(importBehavior))); -607 } -608 -609 /** -610 * Import the definitions of jobs, from the given file, using the given behavior -611 * -612 * @param filename of the file containing the jobs definitions - mandatory -613 * @param fileType type of the file. See {@link FileType} - mandatory -614 * @param importBehavior see {@link RundeckJobsImportMethod} -615 * @return a {@link RundeckJobsImportResult} instance - won't be null -616 * @throws RundeckApiException in case of error when calling the API -617 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -618 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -619 * @throws IllegalArgumentException if the filename is blank (null, empty or whitespace), or the fileType is null -620 * @throws IOException if we failed to read the file -621 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) -622 */ -623 public RundeckJobsImportResult importJobs(String filename, FileType fileType, RundeckJobsImportMethod importBehavior) -624 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, -625 IOException { -626 AssertUtil.notBlank(filename, "filename (of jobs file) is mandatory to import jobs !"); -627 FileInputStream stream = null; -628 try { -629 stream = FileUtils.openInputStream(new File(filename)); -630 return importJobs(stream, fileType, importBehavior); -631 } finally { -632 IOUtils.closeQuietly(stream); -633 } -634 } -635 -636 /** -637 * Import the definitions of jobs, from the given input stream -638 * -639 * @param stream inputStream for reading the definitions - mandatory -640 * @param fileType type of the file. See {@link FileType} - mandatory -641 * @return a {@link RundeckJobsImportResult} instance - won't be null -642 * @throws RundeckApiException in case of error when calling the API -643 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -644 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -645 * @throws IllegalArgumentException if the stream is null, or the fileType is blank (null, empty or whitespace) or -646 * invalid -647 * @see #importJobs(String, String) -648 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) -649 */ -650 public RundeckJobsImportResult importJobs(InputStream stream, String fileType) throws RundeckApiException, -651 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -652 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); -653 return importJobs(stream, FileType.valueOf(StringUtils.upperCase(fileType))); -654 } -655 -656 /** -657 * Import the definitions of jobs, from the given input stream -658 * -659 * @param stream inputStream for reading the definitions - mandatory -660 * @param fileType type of the file. See {@link FileType} - mandatory -661 * @return a {@link RundeckJobsImportResult} instance - won't be null -662 * @throws RundeckApiException in case of error when calling the API -663 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -664 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -665 * @throws IllegalArgumentException if the stream or fileType is null -666 * @see #importJobs(String, FileType) -667 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) -668 */ -669 public RundeckJobsImportResult importJobs(InputStream stream, FileType fileType) throws RundeckApiException, -670 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -671 return importJobs(stream, fileType, (RundeckJobsImportMethod) null); -672 } -673 -674 /** -675 * Import the definitions of jobs, from the given input stream, using the given behavior -676 * -677 * @param stream inputStream for reading the definitions - mandatory -678 * @param fileType type of the file. See {@link FileType} - mandatory -679 * @param importBehavior see {@link RundeckJobsImportMethod} -680 * @return a {@link RundeckJobsImportResult} instance - won't be null -681 * @throws RundeckApiException in case of error when calling the API -682 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -683 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -684 * @throws IllegalArgumentException if the stream is null, or the fileType is blank (null, empty or whitespace), or -685 * the fileType or behavior is not valid -686 * @see #importJobs(String, String, String) -687 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) -688 */ -689 public RundeckJobsImportResult importJobs(InputStream stream, String fileType, String importBehavior) -690 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -691 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); -692 return importJobs(stream, -693 FileType.valueOf(StringUtils.upperCase(fileType)), -694 RundeckJobsImportMethod.valueOf(StringUtils.upperCase(importBehavior))); -695 } -696 -697 /** -698 * Import the definitions of jobs, from the given input stream, using the given behavior -699 * -700 * @param stream inputStream for reading the definitions - mandatory -701 * @param fileType type of the file. See {@link FileType} - mandatory -702 * @param importBehavior see {@link RundeckJobsImportMethod} -703 * @return a {@link RundeckJobsImportResult} instance - won't be null -704 * @throws RundeckApiException in case of error when calling the API -705 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -706 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -707 * @throws IllegalArgumentException if the stream or fileType is null -708 * @see #importJobs(String, FileType, RundeckJobsImportMethod) -709 */ -710 public RundeckJobsImportResult importJobs(InputStream stream, FileType fileType, -711 RundeckJobsImportMethod importBehavior) throws RundeckApiException, RundeckApiLoginException, -712 RundeckApiTokenException, IllegalArgumentException { -713 AssertUtil.notNull(stream, "inputStream of jobs is mandatory to import jobs !"); -714 AssertUtil.notNull(fileType, "fileType is mandatory to import jobs !"); -715 return new ApiCall(this).post(new ApiPathBuilder("/jobs/import").param("format", fileType) -716 .param("dupeOption", importBehavior) -717 .attach("xmlBatch", stream), -718 new JobsImportResultParser("result")); -719 } -720 -721 /** -722 * Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not -723 * need to belong to a group (either pass null, or an empty string). -724 * -725 * @param project name of the project - mandatory -726 * @param groupPath group to which the job belongs (if it belongs to a group) - optional -727 * @param name of the job to find - mandatory -728 * @return a {@link RundeckJob} instance - null if not found -729 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -730 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -731 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -732 * @throws IllegalArgumentException if the project or the name is blank (null, empty or whitespace) -733 * @see #getJob(String) -734 */ -735 public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException, -736 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -737 AssertUtil.notBlank(project, "project is mandatory to find a job !"); -738 AssertUtil.notBlank(name, "job name is mandatory to find a job !"); -739 List<RundeckJob> jobs = getJobs(project, name, groupPath, new String[0]); -740 return jobs.isEmpty() ? null : jobs.get(0); -741 } -742 -743 /** -744 * Get the definition of a single job, identified by the given ID -745 * -746 * @param jobId identifier of the job - mandatory -747 * @return a {@link RundeckJob} instance - won't be null -748 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -749 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -750 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -751 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -752 * @see #findJob(String, String, String) -753 * @see #exportJob(String, String) -754 */ -755 public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiLoginException, -756 RundeckApiTokenException, IllegalArgumentException { -757 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !"); -758 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId), new JobParser("joblist/job")); -759 } -760 -761 /** -762 * Delete a single job, identified by the given ID -763 * -764 * @param jobId identifier of the job - mandatory -765 * @return the success message (note that in case of error, you'll get an exception) -766 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -767 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -768 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -769 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -770 */ -771 public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException, -772 RundeckApiTokenException, IllegalArgumentException { -773 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !"); -774 return new ApiCall(this).delete(new ApiPathBuilder("/job/", jobId), new StringParser("result/success/message")); -775 } -776 -777 /** -778 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the -779 * end of the job execution) -780 * -781 * @param jobId identifier of the job - mandatory -782 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -783 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -784 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -785 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -786 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -787 * @see #triggerJob(String, Properties, Properties) -788 * @see #runJob(String) +218 /* +219 * Jobs +220 */ +221 +222 /** +223 * List all jobs (for all projects) +224 * +225 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null +226 * @throws RundeckApiException in case of error when calling the API +227 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +228 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +229 */ +230 public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { +231 List<RundeckJob> jobs = new ArrayList<RundeckJob>(); +232 for (RundeckProject project : getProjects()) { +233 jobs.addAll(getJobs(project.getName())); +234 } +235 return jobs; +236 } +237 +238 /** +239 * List all jobs that belongs to the given project +240 * +241 * @param project name of the project - mandatory +242 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null +243 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +244 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +245 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +246 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +247 * @see #getJobs(String, String, String, String...) +248 */ +249 public List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiLoginException, +250 RundeckApiTokenException, IllegalArgumentException { +251 return getJobs(project, null, null, new String[0]); +252 } +253 +254 /** +255 * List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) +256 * +257 * @param project name of the project - mandatory +258 * @param jobFilter a filter for the job Name - optional +259 * @param groupPath a group or partial group path to include all jobs within that group path - optional +260 * @param jobIds a list of Job IDs to include - optional +261 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null +262 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +263 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +264 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +265 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +266 * @see #getJobs(String) +267 */ +268 public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds) +269 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +270 AssertUtil.notBlank(project, "project is mandatory to get all jobs !"); +271 return new ApiCall(this).get(new ApiPathBuilder("/jobs").param("project", project) +272 .param("jobFilter", jobFilter) +273 .param("groupPath", groupPath) +274 .param("idlist", StringUtils.join(jobIds, ",")), +275 new ListParser<RundeckJob>(new JobParser(), "result/jobs/job")); +276 } +277 +278 /** +279 * Export the definitions of all jobs that belongs to the given project +280 * +281 * @param filename path of the file where the content should be saved - mandatory +282 * @param format of the export. See {@link FileType} - mandatory +283 * @param project name of the project - mandatory +284 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +285 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +286 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +287 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is +288 * invalid +289 * @throws IOException if we failed to write to the file +290 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +291 * @see #exportJobs(String, String) +292 */ +293 public void exportJobsToFile(String filename, String format, String project) throws RundeckApiException, +294 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +295 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +296 exportJobsToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), project); +297 } +298 +299 /** +300 * Export the definitions of all jobs that belongs to the given project +301 * +302 * @param filename path of the file where the content should be saved - mandatory +303 * @param format of the export. See {@link FileType} - mandatory +304 * @param project name of the project - mandatory +305 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +306 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +307 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +308 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null +309 * @throws IOException if we failed to write to the file +310 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +311 * @see #exportJobs(FileType, String) +312 */ +313 public void exportJobsToFile(String filename, FileType format, String project) throws RundeckApiException, +314 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +315 exportJobsToFile(filename, format, project, null, null, new String[0]); +316 } +317 +318 /** +319 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +320 * groupPath and jobIds) +321 * +322 * @param filename path of the file where the content should be saved - mandatory +323 * @param format of the export. See {@link FileType} - mandatory +324 * @param project name of the project - mandatory +325 * @param jobFilter a filter for the job Name - optional +326 * @param groupPath a group or partial group path to include all jobs within that group path - optional +327 * @param jobIds a list of Job IDs to include - optional +328 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +329 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +330 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +331 * @throws IllegalArgumentException if the filename, format or project is blank (null, empty or whitespace), or the +332 * format is invalid +333 * @throws IOException if we failed to write to the file +334 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +335 * @see #exportJobs(FileType, String, String, String, String...) +336 */ +337 public void exportJobsToFile(String filename, String format, String project, String jobFilter, String groupPath, +338 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +339 IllegalArgumentException, IOException { +340 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +341 exportJobsToFile(filename, +342 FileType.valueOf(StringUtils.upperCase(format)), +343 project, +344 jobFilter, +345 groupPath, +346 jobIds); +347 } +348 +349 /** +350 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +351 * groupPath and jobIds) +352 * +353 * @param filename path of the file where the content should be saved - mandatory +354 * @param format of the export. See {@link FileType} - mandatory +355 * @param project name of the project - mandatory +356 * @param jobFilter a filter for the job Name - optional +357 * @param groupPath a group or partial group path to include all jobs within that group path - optional +358 * @param jobIds a list of Job IDs to include - optional +359 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +360 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +361 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +362 * @throws IllegalArgumentException if the filename or project is blank (null, empty or whitespace), or the format +363 * is null +364 * @throws IOException if we failed to write to the file +365 * @see #exportJobs(FileType, String, String, String, String...) +366 */ +367 public void exportJobsToFile(String filename, FileType format, String project, String jobFilter, String groupPath, +368 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +369 IllegalArgumentException, IOException { +370 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); +371 InputStream inputStream = exportJobs(format, project, jobFilter, groupPath, jobIds); +372 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); +373 } +374 +375 /** +376 * Export the definitions of all jobs that belongs to the given project +377 * +378 * @param format of the export. See {@link FileType} - mandatory +379 * @param project name of the project - mandatory +380 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +381 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +382 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +383 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +384 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is +385 * invalid +386 * @see #exportJobs(FileType, String, String, String, String...) +387 * @see #exportJobsToFile(String, String, String) +388 */ +389 public InputStream exportJobs(String format, String project) throws RundeckApiException, RundeckApiLoginException, +390 RundeckApiTokenException, IllegalArgumentException { +391 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +392 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project); +393 } +394 +395 /** +396 * Export the definitions of all jobs that belongs to the given project +397 * +398 * @param format of the export. See {@link FileType} - mandatory +399 * @param project name of the project - mandatory +400 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +401 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +402 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +403 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +404 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null +405 * @see #exportJobs(FileType, String, String, String, String...) +406 * @see #exportJobsToFile(String, FileType, String) +407 */ +408 public InputStream exportJobs(FileType format, String project) throws RundeckApiException, +409 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +410 return exportJobs(format, project, null, null, new String[0]); +411 } +412 +413 /** +414 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +415 * groupPath and jobIds) +416 * +417 * @param format of the export. See {@link FileType} - mandatory +418 * @param project name of the project - mandatory +419 * @param jobFilter a filter for the job Name - optional +420 * @param groupPath a group or partial group path to include all jobs within that group path - optional +421 * @param jobIds a list of Job IDs to include - optional +422 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +423 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +424 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +425 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +426 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is +427 * invalid +428 * @see #exportJobs(FileType, String, String, String, String...) +429 * @see #exportJobsToFile(String, String, String, String, String, String...) +430 */ +431 public InputStream exportJobs(String format, String project, String jobFilter, String groupPath, String... jobIds) +432 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +433 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +434 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project, jobFilter, groupPath, jobIds); +435 } +436 +437 /** +438 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +439 * groupPath and jobIds) +440 * +441 * @param format of the export. See {@link FileType} - mandatory +442 * @param project name of the project - mandatory +443 * @param jobFilter a filter for the job Name - optional +444 * @param groupPath a group or partial group path to include all jobs within that group path - optional +445 * @param jobIds a list of Job IDs to include - optional +446 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +447 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +448 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +449 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +450 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null +451 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +452 */ +453 public InputStream exportJobs(FileType format, String project, String jobFilter, String groupPath, String... jobIds) +454 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +455 AssertUtil.notNull(format, "format is mandatory to export jobs !"); +456 AssertUtil.notBlank(project, "project is mandatory to export jobs !"); +457 return new ApiCall(this).get(new ApiPathBuilder("/jobs/export").param("format", format) +458 .param("project", project) +459 .param("jobFilter", jobFilter) +460 .param("groupPath", groupPath) +461 .param("idlist", StringUtils.join(jobIds, ","))); +462 } +463 +464 /** +465 * Export the definition of a single job (identified by the given ID) +466 * +467 * @param filename path of the file where the content should be saved - mandatory +468 * @param format of the export. See {@link FileType} - mandatory +469 * @param jobId identifier of the job - mandatory +470 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +471 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +472 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +473 * @throws IllegalArgumentException if the filename, format or jobId is blank (null, empty or whitespace), or the +474 * format is invalid +475 * @throws IOException if we failed to write to the file +476 * @see #exportJobToFile(String, FileType, String) +477 * @see #exportJob(String, String) +478 * @see #getJob(String) +479 */ +480 public void exportJobToFile(String filename, String format, String jobId) throws RundeckApiException, +481 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +482 AssertUtil.notBlank(format, "format is mandatory to export a job !"); +483 exportJobToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), jobId); +484 } +485 +486 /** +487 * Export the definition of a single job (identified by the given ID) +488 * +489 * @param filename path of the file where the content should be saved - mandatory +490 * @param format of the export. See {@link FileType} - mandatory +491 * @param jobId identifier of the job - mandatory +492 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +493 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +494 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +495 * @throws IllegalArgumentException if the filename or jobId is blank (null, empty or whitespace), or the format is +496 * null +497 * @throws IOException if we failed to write to the file +498 * @see #exportJob(FileType, String) +499 * @see #getJob(String) +500 */ +501 public void exportJobToFile(String filename, FileType format, String jobId) throws RundeckApiException, +502 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +503 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); +504 InputStream inputStream = exportJob(format, jobId); +505 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); +506 } +507 +508 /** +509 * Export the definition of a single job, identified by the given ID +510 * +511 * @param format of the export. See {@link FileType} - mandatory +512 * @param jobId identifier of the job - mandatory +513 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +514 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +515 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +516 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +517 * @throws IllegalArgumentException if the format or jobId is blank (null, empty or whitespace), or the format is +518 * invalid +519 * @see #exportJobToFile(String, String, String) +520 * @see #getJob(String) +521 */ +522 public InputStream exportJob(String format, String jobId) throws RundeckApiException, RundeckApiLoginException, +523 RundeckApiTokenException, IllegalArgumentException { +524 AssertUtil.notBlank(format, "format is mandatory to export a job !"); +525 return exportJob(FileType.valueOf(StringUtils.upperCase(format)), jobId); +526 } +527 +528 /** +529 * Export the definition of a single job, identified by the given ID +530 * +531 * @param format of the export. See {@link FileType} - mandatory +532 * @param jobId identifier of the job - mandatory +533 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +534 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +535 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +536 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +537 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the format is null +538 * @see #exportJobToFile(String, FileType, String) +539 * @see #getJob(String) +540 */ +541 public InputStream exportJob(FileType format, String jobId) throws RundeckApiException, RundeckApiLoginException, +542 RundeckApiTokenException, IllegalArgumentException { +543 AssertUtil.notNull(format, "format is mandatory to export a job !"); +544 AssertUtil.notBlank(jobId, "jobId is mandatory to export a job !"); +545 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId).param("format", format)); +546 } +547 +548 /** +549 * Import the definitions of jobs, from the given file +550 * +551 * @param filename of the file containing the jobs definitions - mandatory +552 * @param fileType type of the file. See {@link FileType} - mandatory +553 * @return a {@link RundeckJobsImportResult} instance - won't be null +554 * @throws RundeckApiException in case of error when calling the API +555 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +556 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +557 * @throws IllegalArgumentException if the filename or fileType is blank (null, empty or whitespace), or the +558 * fileType is invalid +559 * @throws IOException if we failed to read the file +560 * @see #importJobs(InputStream, String) +561 * @see #importJobs(String, FileType, RundeckJobsImportMethod) +562 */ +563 public RundeckJobsImportResult importJobs(String filename, String fileType) throws RundeckApiException, +564 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +565 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); +566 return importJobs(filename, FileType.valueOf(StringUtils.upperCase(fileType))); +567 } +568 +569 /** +570 * Import the definitions of jobs, from the given file +571 * +572 * @param filename of the file containing the jobs definitions - mandatory +573 * @param fileType type of the file. See {@link FileType} - mandatory +574 * @return a {@link RundeckJobsImportResult} instance - won't be null +575 * @throws RundeckApiException in case of error when calling the API +576 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +577 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +578 * @throws IllegalArgumentException if the filename is blank (null, empty or whitespace), or the fileType is null +579 * @throws IOException if we failed to read the file +580 * @see #importJobs(InputStream, FileType) +581 * @see #importJobs(String, FileType, RundeckJobsImportMethod) +582 */ +583 public RundeckJobsImportResult importJobs(String filename, FileType fileType) throws RundeckApiException, +584 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +585 return importJobs(filename, fileType, (RundeckJobsImportMethod) null); +586 } +587 +588 /** +589 * Import the definitions of jobs, from the given file, using the given behavior +590 * +591 * @param filename of the file containing the jobs definitions - mandatory +592 * @param fileType type of the file. See {@link FileType} - mandatory +593 * @param importBehavior see {@link RundeckJobsImportMethod} +594 * @return a {@link RundeckJobsImportResult} instance - won't be null +595 * @throws RundeckApiException in case of error when calling the API +596 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +597 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +598 * @throws IllegalArgumentException if the filename or fileType is blank (null, empty or whitespace), or the +599 * fileType or behavior is not valid +600 * @throws IOException if we failed to read the file +601 * @see #importJobs(InputStream, String, String) +602 * @see #importJobs(String, FileType, RundeckJobsImportMethod) +603 */ +604 public RundeckJobsImportResult importJobs(String filename, String fileType, String importBehavior) +605 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, +606 IOException { +607 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); +608 return importJobs(filename, +609 FileType.valueOf(StringUtils.upperCase(fileType)), +610 RundeckJobsImportMethod.valueOf(StringUtils.upperCase(importBehavior))); +611 } +612 +613 /** +614 * Import the definitions of jobs, from the given file, using the given behavior +615 * +616 * @param filename of the file containing the jobs definitions - mandatory +617 * @param fileType type of the file. See {@link FileType} - mandatory +618 * @param importBehavior see {@link RundeckJobsImportMethod} +619 * @return a {@link RundeckJobsImportResult} instance - won't be null +620 * @throws RundeckApiException in case of error when calling the API +621 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +622 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +623 * @throws IllegalArgumentException if the filename is blank (null, empty or whitespace), or the fileType is null +624 * @throws IOException if we failed to read the file +625 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) +626 */ +627 public RundeckJobsImportResult importJobs(String filename, FileType fileType, RundeckJobsImportMethod importBehavior) +628 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, +629 IOException { +630 AssertUtil.notBlank(filename, "filename (of jobs file) is mandatory to import jobs !"); +631 FileInputStream stream = null; +632 try { +633 stream = FileUtils.openInputStream(new File(filename)); +634 return importJobs(stream, fileType, importBehavior); +635 } finally { +636 IOUtils.closeQuietly(stream); +637 } +638 } +639 +640 /** +641 * Import the definitions of jobs, from the given input stream +642 * +643 * @param stream inputStream for reading the definitions - mandatory +644 * @param fileType type of the file. See {@link FileType} - mandatory +645 * @return a {@link RundeckJobsImportResult} instance - won't be null +646 * @throws RundeckApiException in case of error when calling the API +647 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +648 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +649 * @throws IllegalArgumentException if the stream is null, or the fileType is blank (null, empty or whitespace) or +650 * invalid +651 * @see #importJobs(String, String) +652 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) +653 */ +654 public RundeckJobsImportResult importJobs(InputStream stream, String fileType) throws RundeckApiException, +655 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +656 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); +657 return importJobs(stream, FileType.valueOf(StringUtils.upperCase(fileType))); +658 } +659 +660 /** +661 * Import the definitions of jobs, from the given input stream +662 * +663 * @param stream inputStream for reading the definitions - mandatory +664 * @param fileType type of the file. See {@link FileType} - mandatory +665 * @return a {@link RundeckJobsImportResult} instance - won't be null +666 * @throws RundeckApiException in case of error when calling the API +667 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +668 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +669 * @throws IllegalArgumentException if the stream or fileType is null +670 * @see #importJobs(String, FileType) +671 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) +672 */ +673 public RundeckJobsImportResult importJobs(InputStream stream, FileType fileType) throws RundeckApiException, +674 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +675 return importJobs(stream, fileType, (RundeckJobsImportMethod) null); +676 } +677 +678 /** +679 * Import the definitions of jobs, from the given input stream, using the given behavior +680 * +681 * @param stream inputStream for reading the definitions - mandatory +682 * @param fileType type of the file. See {@link FileType} - mandatory +683 * @param importBehavior see {@link RundeckJobsImportMethod} +684 * @return a {@link RundeckJobsImportResult} instance - won't be null +685 * @throws RundeckApiException in case of error when calling the API +686 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +687 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +688 * @throws IllegalArgumentException if the stream is null, or the fileType is blank (null, empty or whitespace), or +689 * the fileType or behavior is not valid +690 * @see #importJobs(String, String, String) +691 * @see #importJobs(InputStream, FileType, RundeckJobsImportMethod) +692 */ +693 public RundeckJobsImportResult importJobs(InputStream stream, String fileType, String importBehavior) +694 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +695 AssertUtil.notBlank(fileType, "fileType is mandatory to import jobs !"); +696 return importJobs(stream, +697 FileType.valueOf(StringUtils.upperCase(fileType)), +698 RundeckJobsImportMethod.valueOf(StringUtils.upperCase(importBehavior))); +699 } +700 +701 /** +702 * Import the definitions of jobs, from the given input stream, using the given behavior +703 * +704 * @param stream inputStream for reading the definitions - mandatory +705 * @param fileType type of the file. See {@link FileType} - mandatory +706 * @param importBehavior see {@link RundeckJobsImportMethod} +707 * @return a {@link RundeckJobsImportResult} instance - won't be null +708 * @throws RundeckApiException in case of error when calling the API +709 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +710 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +711 * @throws IllegalArgumentException if the stream or fileType is null +712 * @see #importJobs(String, FileType, RundeckJobsImportMethod) +713 */ +714 public RundeckJobsImportResult importJobs(InputStream stream, FileType fileType, +715 RundeckJobsImportMethod importBehavior) throws RundeckApiException, RundeckApiLoginException, +716 RundeckApiTokenException, IllegalArgumentException { +717 AssertUtil.notNull(stream, "inputStream of jobs is mandatory to import jobs !"); +718 AssertUtil.notNull(fileType, "fileType is mandatory to import jobs !"); +719 return new ApiCall(this).post(new ApiPathBuilder("/jobs/import").param("format", fileType) +720 .param("dupeOption", importBehavior) +721 .attach("xmlBatch", stream), +722 new JobsImportResultParser("result")); +723 } +724 +725 /** +726 * Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not +727 * need to belong to a group (either pass null, or an empty string). +728 * +729 * @param project name of the project - mandatory +730 * @param groupPath group to which the job belongs (if it belongs to a group) - optional +731 * @param name of the job to find - mandatory +732 * @return a {@link RundeckJob} instance - null if not found +733 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +734 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +735 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +736 * @throws IllegalArgumentException if the project or the name is blank (null, empty or whitespace) +737 * @see #getJob(String) +738 */ +739 public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException, +740 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +741 AssertUtil.notBlank(project, "project is mandatory to find a job !"); +742 AssertUtil.notBlank(name, "job name is mandatory to find a job !"); +743 List<RundeckJob> jobs = getJobs(project, name, groupPath, new String[0]); +744 return jobs.isEmpty() ? null : jobs.get(0); +745 } +746 +747 /** +748 * Get the definition of a single job, identified by the given ID +749 * +750 * @param jobId identifier of the job - mandatory +751 * @return a {@link RundeckJob} instance - won't be null +752 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +753 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +754 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +755 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +756 * @see #findJob(String, String, String) +757 * @see #exportJob(String, String) +758 */ +759 public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +760 RundeckApiTokenException, IllegalArgumentException { +761 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !"); +762 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId), new JobParser("joblist/job")); +763 } +764 +765 /** +766 * Delete a single job, identified by the given ID +767 * +768 * @param jobId identifier of the job - mandatory +769 * @return the success message (note that in case of error, you'll get an exception) +770 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +771 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +772 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +773 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +774 */ +775 public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +776 RundeckApiTokenException, IllegalArgumentException { +777 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !"); +778 return new ApiCall(this).delete(new ApiPathBuilder("/job/", jobId), new StringParser("result/success/message")); +779 } +780 /** +781 * Delete multiple jobs, identified by the given IDs +782 * +783 * @param jobIds List of job IDS +784 * @return the bulk delete result +785 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +786 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +787 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +788 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) 789 */ -790 public RundeckExecution triggerJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +790 public RundeckJobDeleteBulk deleteJobs(final List<String> jobIds) throws RundeckApiException, RundeckApiLoginException, 791 RundeckApiTokenException, IllegalArgumentException { -792 return triggerJob(jobId, null); -793 } -794 -795 /** -796 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the -797 * end of the job execution) -798 * -799 * @param jobId identifier of the job - mandatory -800 * @param options of the job - optional. See {@link OptionsBuilder}. -801 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -802 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -803 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -804 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -805 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -806 * @see #triggerJob(String, Properties, Properties) -807 * @see #runJob(String, Properties) -808 */ -809 public RundeckExecution triggerJob(String jobId, Properties options) throws RundeckApiException, -810 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -811 return triggerJob(jobId, options, null); -812 } -813 -814 /** -815 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the -816 * end of the job execution) -817 * -818 * @param jobId identifier of the job - mandatory -819 * @param options of the job - optional. See {@link OptionsBuilder}. -820 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See -821 * {@link NodeFiltersBuilder} -822 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -823 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -824 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -825 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -826 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -827 * @see #triggerJob(String) -828 * @see #runJob(String, Properties, Properties) -829 */ -830 public RundeckExecution triggerJob(String jobId, Properties options, Properties nodeFilters) -831 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -832 AssertUtil.notBlank(jobId, "jobId is mandatory to trigger a job !"); -833 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/run").param("argString", -834 ParametersUtil.generateArgString(options)) -835 .nodeFilters(nodeFilters), -836 new ExecutionParser("result/executions/execution")); -837 } -838 -839 /** -840 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. -841 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or -842 * aborted) or is still running. -843 * -844 * @param jobId identifier of the job - mandatory -845 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -846 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -847 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -848 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -849 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -850 * @see #triggerJob(String) -851 * @see #runJob(String, Properties, Properties, long, TimeUnit) -852 */ -853 public RundeckExecution runJob(String jobId) throws RundeckApiException, RundeckApiLoginException, -854 RundeckApiTokenException, IllegalArgumentException { -855 return runJob(jobId, null); -856 } -857 -858 /** -859 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. -860 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or -861 * aborted) or is still running. -862 * -863 * @param jobId identifier of the job - mandatory -864 * @param options of the job - optional. See {@link OptionsBuilder}. -865 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -866 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -867 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -868 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -869 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -870 * @see #triggerJob(String, Properties) -871 * @see #runJob(String, Properties, Properties, long, TimeUnit) -872 */ -873 public RundeckExecution runJob(String jobId, Properties options) throws RundeckApiException, -874 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -875 return runJob(jobId, options, null); -876 } -877 -878 /** -879 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. -880 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or -881 * aborted) or is still running. -882 * -883 * @param jobId identifier of the job - mandatory -884 * @param options of the job - optional. See {@link OptionsBuilder}. -885 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See -886 * {@link NodeFiltersBuilder} +792 if (null == jobIds || 0 == jobIds.size()) { +793 throw new IllegalArgumentException("jobIds are mandatory to delete a job"); +794 } +795 return new ApiCall(this).post(new ApiPathBuilder("/jobs/delete").field("ids",jobIds), +796 new BulkDeleteParser("result/deleteJobs")); +797 } +798 +799 /** +800 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the +801 * end of the job execution) +802 * +803 * @param jobId identifier of the job - mandatory +804 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +805 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +806 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +807 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +808 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +809 * @see #triggerJob(String, Properties, Properties) +810 * @see #runJob(String) +811 */ +812 public RundeckExecution triggerJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +813 RundeckApiTokenException, IllegalArgumentException { +814 return triggerJob(jobId, null); +815 } +816 +817 /** +818 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the +819 * end of the job execution) +820 * +821 * @param jobId identifier of the job - mandatory +822 * @param options of the job - optional. See {@link OptionsBuilder}. +823 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +824 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +825 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +826 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +827 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +828 * @see #triggerJob(String, Properties, Properties) +829 * @see #runJob(String, Properties) +830 */ +831 public RundeckExecution triggerJob(String jobId, Properties options) throws RundeckApiException, +832 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +833 return triggerJob(jobId, options, null); +834 } +835 +836 /** +837 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the +838 * end of the job execution) +839 * +840 * @param jobId identifier of the job - mandatory +841 * @param options of the job - optional. See {@link OptionsBuilder}. +842 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See +843 * {@link NodeFiltersBuilder} +844 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +845 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +846 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +847 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +848 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +849 * @see #triggerJob(String) +850 * @see #runJob(String, Properties, Properties) +851 */ +852 public RundeckExecution triggerJob(String jobId, Properties options, Properties nodeFilters) +853 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +854 AssertUtil.notBlank(jobId, "jobId is mandatory to trigger a job !"); +855 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/run").param("argString", +856 ParametersUtil.generateArgString(options)) +857 .nodeFilters(nodeFilters), +858 new ExecutionParser("result/executions/execution")); +859 } +860 +861 /** +862 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. +863 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or +864 * aborted) or is still running. +865 * +866 * @param jobId identifier of the job - mandatory +867 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +868 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +869 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +870 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +871 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +872 * @see #triggerJob(String) +873 * @see #runJob(String, Properties, Properties, long, TimeUnit) +874 */ +875 public RundeckExecution runJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +876 RundeckApiTokenException, IllegalArgumentException { +877 return runJob(jobId, null); +878 } +879 +880 /** +881 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. +882 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or +883 * aborted) or is still running. +884 * +885 * @param jobId identifier of the job - mandatory +886 * @param options of the job - optional. See {@link OptionsBuilder}. 887 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null 888 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) 889 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 890 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) 891 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -892 * @see #triggerJob(String, Properties, Properties) +892 * @see #triggerJob(String, Properties) 893 * @see #runJob(String, Properties, Properties, long, TimeUnit) 894 */ -895 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters) -896 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -897 return runJob(jobId, options, nodeFilters, DEFAULT_POOLING_INTERVAL, DEFAULT_POOLING_UNIT); +895 public RundeckExecution runJob(String jobId, Properties options) throws RundeckApiException, +896 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +897 return runJob(jobId, options, null); 898 } 899 900 /** 901 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. -902 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to -903 * know if the execution is finished (or aborted) or is still running. +902 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or +903 * aborted) or is still running. 904 * 905 * @param jobId identifier of the job - mandatory 906 * @param options of the job - optional. See {@link OptionsBuilder}. -907 * @param poolingInterval for checking the status of the execution. Must be > 0. -908 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +907 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See +908 * {@link NodeFiltersBuilder} 909 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null 910 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) 911 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 912 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) 913 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -914 * @see #triggerJob(String, Properties) +914 * @see #triggerJob(String, Properties, Properties) 915 * @see #runJob(String, Properties, Properties, long, TimeUnit) 916 */ -917 public RundeckExecution runJob(String jobId, Properties options, long poolingInterval, TimeUnit poolingUnit) +917 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters) 918 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -919 return runJob(jobId, options, null, poolingInterval, poolingUnit); +919 return runJob(jobId, options, nodeFilters, DEFAULT_POOLING_INTERVAL, DEFAULT_POOLING_UNIT); 920 } 921 922 /** @@ -936,440 +936,440 @@ 926 * 927 * @param jobId identifier of the job - mandatory 928 * @param options of the job - optional. See {@link OptionsBuilder}. -929 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See -930 * {@link NodeFiltersBuilder} -931 * @param poolingInterval for checking the status of the execution. Must be > 0. -932 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -933 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -934 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -935 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -936 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -937 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -938 * @see #triggerJob(String, Properties) -939 * @see #runJob(String, Properties, Properties, long, TimeUnit) -940 */ -941 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters, long poolingInterval, -942 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -943 IllegalArgumentException { -944 if (poolingInterval <= 0) { -945 poolingInterval = DEFAULT_POOLING_INTERVAL; -946 poolingUnit = DEFAULT_POOLING_UNIT; -947 } -948 if (poolingUnit == null) { -949 poolingUnit = DEFAULT_POOLING_UNIT; -950 } -951 -952 RundeckExecution execution = triggerJob(jobId, options, nodeFilters); -953 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { -954 try { -955 Thread.sleep(poolingUnit.toMillis(poolingInterval)); -956 } catch (InterruptedException e) { -957 break; -958 } -959 execution = getExecution(execution.getId()); -960 } -961 return execution; -962 } -963 -964 /* -965 * Ad-hoc commands -966 */ -967 -968 /** -969 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). -970 * The command will not be dispatched to nodes, but be executed on the RunDeck server. -971 * -972 * @param project name of the project - mandatory -973 * @param command to be executed - mandatory -974 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -975 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -976 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -977 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -978 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -979 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) -980 * @see #runAdhocCommand(String, String) -981 */ -982 public RundeckExecution triggerAdhocCommand(String project, String command) throws RundeckApiException, -983 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -984 return triggerAdhocCommand(project, command, null); -985 } -986 -987 /** -988 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). -989 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter. -990 * -991 * @param project name of the project - mandatory -992 * @param command to be executed - mandatory -993 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -994 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -995 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -996 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -997 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -998 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -999 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) -1000 * @see #runAdhocCommand(String, String, Properties) -1001 */ -1002 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters) -1003 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1004 return triggerAdhocCommand(project, command, nodeFilters, null, null); -1005 } -1006 -1007 /** -1008 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). -1009 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter. -1010 * -1011 * @param project name of the project - mandatory -1012 * @param command to be executed - mandatory -1013 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1014 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1015 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +929 * @param poolingInterval for checking the status of the execution. Must be > 0. +930 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +931 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +932 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +933 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +934 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +935 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +936 * @see #triggerJob(String, Properties) +937 * @see #runJob(String, Properties, Properties, long, TimeUnit) +938 */ +939 public RundeckExecution runJob(String jobId, Properties options, long poolingInterval, TimeUnit poolingUnit) +940 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +941 return runJob(jobId, options, null, poolingInterval, poolingUnit); +942 } +943 +944 /** +945 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. +946 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to +947 * know if the execution is finished (or aborted) or is still running. +948 * +949 * @param jobId identifier of the job - mandatory +950 * @param options of the job - optional. See {@link OptionsBuilder}. +951 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See +952 * {@link NodeFiltersBuilder} +953 * @param poolingInterval for checking the status of the execution. Must be > 0. +954 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +955 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +956 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +957 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +958 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +959 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +960 * @see #triggerJob(String, Properties) +961 * @see #runJob(String, Properties, Properties, long, TimeUnit) +962 */ +963 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters, long poolingInterval, +964 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +965 IllegalArgumentException { +966 if (poolingInterval <= 0) { +967 poolingInterval = DEFAULT_POOLING_INTERVAL; +968 poolingUnit = DEFAULT_POOLING_UNIT; +969 } +970 if (poolingUnit == null) { +971 poolingUnit = DEFAULT_POOLING_UNIT; +972 } +973 +974 RundeckExecution execution = triggerJob(jobId, options, nodeFilters); +975 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { +976 try { +977 Thread.sleep(poolingUnit.toMillis(poolingInterval)); +978 } catch (InterruptedException e) { +979 break; +980 } +981 execution = getExecution(execution.getId()); +982 } +983 return execution; +984 } +985 +986 /* +987 * Ad-hoc commands +988 */ +989 +990 /** +991 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). +992 * The command will not be dispatched to nodes, but be executed on the RunDeck server. +993 * +994 * @param project name of the project - mandatory +995 * @param command to be executed - mandatory +996 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +997 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +998 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +999 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1000 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1001 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) +1002 * @see #runAdhocCommand(String, String) +1003 */ +1004 public RundeckExecution triggerAdhocCommand(String project, String command) throws RundeckApiException, +1005 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1006 return triggerAdhocCommand(project, command, null); +1007 } +1008 +1009 /** +1010 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). +1011 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter. +1012 * +1013 * @param project name of the project - mandatory +1014 * @param command to be executed - mandatory +1015 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} 1016 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null 1017 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) 1018 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 1019 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) 1020 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -1021 * @see #triggerAdhocCommand(String, String) +1021 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) 1022 * @see #runAdhocCommand(String, String, Properties) 1023 */ -1024 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters, -1025 Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiLoginException, -1026 RundeckApiTokenException, IllegalArgumentException { -1027 AssertUtil.notBlank(project, "project is mandatory to trigger an ad-hoc command !"); -1028 AssertUtil.notBlank(command, "command is mandatory to trigger an ad-hoc command !"); -1029 RundeckExecution execution = new ApiCall(this).get(new ApiPathBuilder("/run/command").param("project", project) -1030 .param("exec", command) -1031 .param("nodeThreadcount", -1032 nodeThreadcount) -1033 .param("nodeKeepgoing", -1034 nodeKeepgoing) -1035 .nodeFilters(nodeFilters), -1036 new ExecutionParser("result/execution")); -1037 // the first call just returns the ID of the execution, so we need another call to get a "real" execution -1038 return getExecution(execution.getId()); -1039 } -1040 -1041 /** -1042 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1043 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1044 * running. The command will not be dispatched to nodes, but be executed on the RunDeck server. -1045 * -1046 * @param project name of the project - mandatory -1047 * @param command to be executed - mandatory -1048 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1049 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -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 project or command is blank (null, empty or whitespace) -1053 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) -1054 * @see #triggerAdhocCommand(String, String) -1055 */ -1056 public RundeckExecution runAdhocCommand(String project, String command) throws RundeckApiException, -1057 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1058 return runAdhocCommand(project, command, null); -1059 } -1060 -1061 /** -1062 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1063 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1064 * finished (or aborted) or is still running. The command will not be dispatched to nodes, but be executed on the -1065 * RunDeck server. -1066 * -1067 * @param project name of the project - mandatory -1068 * @param command to be executed - mandatory -1069 * @param poolingInterval for checking the status of the execution. Must be > 0. -1070 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1071 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1072 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1073 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1074 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1075 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -1076 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) -1077 * @see #triggerAdhocCommand(String, String) -1078 */ -1079 public RundeckExecution runAdhocCommand(String project, String command, long poolingInterval, TimeUnit poolingUnit) -1080 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1081 return runAdhocCommand(project, command, null, poolingInterval, poolingUnit); -1082 } -1083 -1084 /** -1085 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1086 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1087 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter. +1024 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters) +1025 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1026 return triggerAdhocCommand(project, command, nodeFilters, null, null); +1027 } +1028 +1029 /** +1030 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). +1031 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter. +1032 * +1033 * @param project name of the project - mandatory +1034 * @param command to be executed - mandatory +1035 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1036 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1037 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1038 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1039 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1040 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1041 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1042 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1043 * @see #triggerAdhocCommand(String, String) +1044 * @see #runAdhocCommand(String, String, Properties) +1045 */ +1046 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters, +1047 Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiLoginException, +1048 RundeckApiTokenException, IllegalArgumentException { +1049 AssertUtil.notBlank(project, "project is mandatory to trigger an ad-hoc command !"); +1050 AssertUtil.notBlank(command, "command is mandatory to trigger an ad-hoc command !"); +1051 RundeckExecution execution = new ApiCall(this).get(new ApiPathBuilder("/run/command").param("project", project) +1052 .param("exec", command) +1053 .param("nodeThreadcount", +1054 nodeThreadcount) +1055 .param("nodeKeepgoing", +1056 nodeKeepgoing) +1057 .nodeFilters(nodeFilters), +1058 new ExecutionParser("result/execution")); +1059 // the first call just returns the ID of the execution, so we need another call to get a "real" execution +1060 return getExecution(execution.getId()); +1061 } +1062 +1063 /** +1064 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1065 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1066 * running. The command will not be dispatched to nodes, but be executed on the RunDeck server. +1067 * +1068 * @param project name of the project - mandatory +1069 * @param command to be executed - mandatory +1070 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1071 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1072 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1073 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1074 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1075 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) +1076 * @see #triggerAdhocCommand(String, String) +1077 */ +1078 public RundeckExecution runAdhocCommand(String project, String command) throws RundeckApiException, +1079 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1080 return runAdhocCommand(project, command, null); +1081 } +1082 +1083 /** +1084 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1085 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1086 * finished (or aborted) or is still running. The command will not be dispatched to nodes, but be executed on the +1087 * RunDeck server. 1088 * 1089 * @param project name of the project - mandatory 1090 * @param command to be executed - mandatory -1091 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1092 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1093 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1094 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1095 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1096 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -1097 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) -1098 * @see #triggerAdhocCommand(String, String, Properties) -1099 */ -1100 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters) -1101 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1102 return runAdhocCommand(project, command, nodeFilters, null, null); -1103 } -1104 -1105 /** -1106 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1107 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1108 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the -1109 * nodeFilters parameter. +1091 * @param poolingInterval for checking the status of the execution. Must be > 0. +1092 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1093 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1094 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1095 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1096 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1097 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1098 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) +1099 * @see #triggerAdhocCommand(String, String) +1100 */ +1101 public RundeckExecution runAdhocCommand(String project, String command, long poolingInterval, TimeUnit poolingUnit) +1102 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1103 return runAdhocCommand(project, command, null, poolingInterval, poolingUnit); +1104 } +1105 +1106 /** +1107 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1108 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1109 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter. 1110 * 1111 * @param project name of the project - mandatory 1112 * @param command to be executed - mandatory 1113 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1114 * @param poolingInterval for checking the status of the execution. Must be > 0. -1115 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1116 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1117 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1118 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1119 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1120 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -1121 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) -1122 * @see #triggerAdhocCommand(String, String, Properties) -1123 */ -1124 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, -1125 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, -1126 RundeckApiTokenException, IllegalArgumentException { -1127 return runAdhocCommand(project, command, nodeFilters, null, null, poolingInterval, poolingUnit); -1128 } -1129 -1130 /** -1131 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1132 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1133 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter. -1134 * -1135 * @param project name of the project - mandatory -1136 * @param command to be executed - mandatory -1137 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1138 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1139 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1140 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1141 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1142 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1143 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1144 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -1145 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) -1146 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) -1147 */ -1148 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, -1149 Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiLoginException, -1150 RundeckApiTokenException, IllegalArgumentException { -1151 return runAdhocCommand(project, -1152 command, -1153 nodeFilters, -1154 nodeThreadcount, -1155 nodeKeepgoing, -1156 DEFAULT_POOLING_INTERVAL, -1157 DEFAULT_POOLING_UNIT); -1158 } -1159 -1160 /** -1161 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1162 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1163 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the -1164 * nodeFilters parameter. -1165 * -1166 * @param project name of the project - mandatory -1167 * @param command to be executed - mandatory -1168 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1169 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1170 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1171 * @param poolingInterval for checking the status of the execution. Must be > 0. -1172 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1173 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1174 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1175 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1176 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1177 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -1178 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) -1179 */ -1180 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, -1181 Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, TimeUnit poolingUnit) -1182 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1183 if (poolingInterval <= 0) { -1184 poolingInterval = DEFAULT_POOLING_INTERVAL; -1185 poolingUnit = DEFAULT_POOLING_UNIT; -1186 } -1187 if (poolingUnit == null) { -1188 poolingUnit = DEFAULT_POOLING_UNIT; -1189 } -1190 -1191 RundeckExecution execution = triggerAdhocCommand(project, command, nodeFilters, nodeThreadcount, nodeKeepgoing); -1192 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { -1193 try { -1194 Thread.sleep(poolingUnit.toMillis(poolingInterval)); -1195 } catch (InterruptedException e) { -1196 break; -1197 } -1198 execution = getExecution(execution.getId()); -1199 } -1200 return execution; -1201 } -1202 -1203 /* -1204 * Ad-hoc scripts -1205 */ -1206 -1207 /** -1208 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1209 * script will not be dispatched to nodes, but be executed on the RunDeck server. -1210 * -1211 * @param project name of the project - mandatory -1212 * @param scriptFilename filename of the script to be executed - mandatory -1213 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1214 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1215 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1216 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1217 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1218 * @throws IOException if we failed to read the file -1219 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1220 * @see #runAdhocScript(String, String) -1221 */ -1222 public RundeckExecution triggerAdhocScript(String project, String scriptFilename) throws RundeckApiException, -1223 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1224 return triggerAdhocScript(project, scriptFilename, null); -1225 } -1226 -1227 /** -1228 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1229 * script will not be dispatched to nodes, but be executed on the RunDeck server. -1230 * -1231 * @param project name of the project - mandatory -1232 * @param scriptFilename filename of the script to be executed - mandatory -1233 * @param options of the script - optional. See {@link OptionsBuilder}. -1234 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1235 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1236 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1237 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1238 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1239 * @throws IOException if we failed to read the file -1240 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1241 * @see #runAdhocScript(String, String, Properties) -1242 */ -1243 public RundeckExecution triggerAdhocScript(String project, String scriptFilename, Properties options) -1244 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, -1245 IOException { -1246 return triggerAdhocScript(project, scriptFilename, options, null); +1114 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1115 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1116 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1117 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1118 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1119 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) +1120 * @see #triggerAdhocCommand(String, String, Properties) +1121 */ +1122 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters) +1123 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1124 return runAdhocCommand(project, command, nodeFilters, null, null); +1125 } +1126 +1127 /** +1128 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1129 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1130 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the +1131 * nodeFilters parameter. +1132 * +1133 * @param project name of the project - mandatory +1134 * @param command to be executed - mandatory +1135 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1136 * @param poolingInterval for checking the status of the execution. Must be > 0. +1137 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1138 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1139 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1140 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1141 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1142 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1143 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) +1144 * @see #triggerAdhocCommand(String, String, Properties) +1145 */ +1146 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, +1147 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, +1148 RundeckApiTokenException, IllegalArgumentException { +1149 return runAdhocCommand(project, command, nodeFilters, null, null, poolingInterval, poolingUnit); +1150 } +1151 +1152 /** +1153 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1154 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1155 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter. +1156 * +1157 * @param project name of the project - mandatory +1158 * @param command to be executed - mandatory +1159 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1160 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1161 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1162 * @return a {@link RundeckExecution} instance for the (finished/aborted) 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 #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) +1168 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean) +1169 */ +1170 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, +1171 Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiLoginException, +1172 RundeckApiTokenException, IllegalArgumentException { +1173 return runAdhocCommand(project, +1174 command, +1175 nodeFilters, +1176 nodeThreadcount, +1177 nodeKeepgoing, +1178 DEFAULT_POOLING_INTERVAL, +1179 DEFAULT_POOLING_UNIT); +1180 } +1181 +1182 /** +1183 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1184 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1185 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the +1186 * nodeFilters parameter. +1187 * +1188 * @param project name of the project - mandatory +1189 * @param command to be executed - mandatory +1190 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1191 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1192 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1193 * @param poolingInterval for checking the status of the execution. Must be > 0. +1194 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +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 #triggerAdhocCommand(String, String, Properties, Integer, Boolean) +1201 */ +1202 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters, +1203 Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, TimeUnit poolingUnit) +1204 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1205 if (poolingInterval <= 0) { +1206 poolingInterval = DEFAULT_POOLING_INTERVAL; +1207 poolingUnit = DEFAULT_POOLING_UNIT; +1208 } +1209 if (poolingUnit == null) { +1210 poolingUnit = DEFAULT_POOLING_UNIT; +1211 } +1212 +1213 RundeckExecution execution = triggerAdhocCommand(project, command, nodeFilters, nodeThreadcount, nodeKeepgoing); +1214 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { +1215 try { +1216 Thread.sleep(poolingUnit.toMillis(poolingInterval)); +1217 } catch (InterruptedException e) { +1218 break; +1219 } +1220 execution = getExecution(execution.getId()); +1221 } +1222 return execution; +1223 } +1224 +1225 /* +1226 * Ad-hoc scripts +1227 */ +1228 +1229 /** +1230 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1231 * script will not be dispatched to nodes, but be executed on the RunDeck server. +1232 * +1233 * @param project name of the project - mandatory +1234 * @param scriptFilename filename of the script to be executed - mandatory +1235 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1236 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1237 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1238 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1239 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1240 * @throws IOException if we failed to read the file +1241 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1242 * @see #runAdhocScript(String, String) +1243 */ +1244 public RundeckExecution triggerAdhocScript(String project, String scriptFilename) throws RundeckApiException, +1245 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1246 return triggerAdhocScript(project, scriptFilename, null); 1247 } 1248 1249 /** 1250 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1251 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1251 * script will not be dispatched to nodes, but be executed on the RunDeck server. 1252 * 1253 * @param project name of the project - mandatory 1254 * @param scriptFilename filename of the script to be executed - mandatory 1255 * @param options of the script - optional. See {@link OptionsBuilder}. -1256 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1257 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1258 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1259 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1260 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1261 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1262 * @throws IOException if we failed to read the file -1263 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1264 * @see #runAdhocScript(String, String, Properties, Properties) -1265 */ -1266 public RundeckExecution triggerAdhocScript(String project, String scriptFilename, Properties options, -1267 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1268 IllegalArgumentException, IOException { -1269 return triggerAdhocScript(project, scriptFilename, options, nodeFilters, null, null); -1270 } -1271 -1272 /** -1273 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1274 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1275 * -1276 * @param project name of the project - mandatory -1277 * @param scriptFilename filename of the script to be executed - mandatory -1278 * @param options of the script - optional. See {@link OptionsBuilder}. -1279 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1280 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1281 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1282 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1283 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1284 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1285 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1286 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1287 * @throws IOException if we failed to read the file -1288 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1289 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1290 */ -1291 public RundeckExecution triggerAdhocScript(String project, String scriptFilename, Properties options, -1292 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, -1293 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1294 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to trigger an ad-hoc script !"); -1295 FileInputStream stream = null; -1296 try { -1297 stream = FileUtils.openInputStream(new File(scriptFilename)); -1298 return triggerAdhocScript(project, stream, options, nodeFilters, nodeThreadcount, nodeKeepgoing); -1299 } finally { -1300 IOUtils.closeQuietly(stream); -1301 } -1302 } -1303 -1304 /** -1305 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1306 * script will not be dispatched to nodes, but be executed on the RunDeck server. -1307 * -1308 * @param project name of the project - mandatory -1309 * @param script inputStream for reading the script to be executed - mandatory -1310 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1311 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1312 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1313 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1314 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1315 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1316 * @see #runAdhocScript(String, InputStream) -1317 */ -1318 public RundeckExecution triggerAdhocScript(String project, InputStream script) throws RundeckApiException, -1319 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1320 return triggerAdhocScript(project, script, null); -1321 } -1322 -1323 /** -1324 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1325 * script will not be dispatched to nodes, but be executed on the RunDeck server. -1326 * -1327 * @param project name of the project - mandatory -1328 * @param script inputStream for reading the script to be executed - mandatory -1329 * @param options of the script - optional. See {@link OptionsBuilder}. -1330 * @return a {@link RundeckExecution} instance for the newly created (and running) 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 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1336 * @see #runAdhocScript(String, InputStream, Properties) -1337 */ -1338 public RundeckExecution triggerAdhocScript(String project, InputStream script, Properties options) -1339 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1340 return triggerAdhocScript(project, script, options, null); -1341 } -1342 -1343 /** -1344 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1345 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1346 * -1347 * @param project name of the project - mandatory -1348 * @param script inputStream for reading the script to be executed - mandatory -1349 * @param options of the script - optional. See {@link OptionsBuilder}. -1350 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1351 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1352 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1353 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1354 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1355 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1356 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1357 * @see #runAdhocScript(String, InputStream, Properties, Properties) -1358 */ -1359 public RundeckExecution triggerAdhocScript(String project, InputStream script, Properties options, -1360 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1361 IllegalArgumentException { -1362 return triggerAdhocScript(project, script, options, nodeFilters, null, null); +1256 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1257 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1258 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1259 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1260 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1261 * @throws IOException if we failed to read the file +1262 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1263 * @see #runAdhocScript(String, String, Properties) +1264 */ +1265 public RundeckExecution triggerAdhocScript(String project, String scriptFilename, Properties options) +1266 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, +1267 IOException { +1268 return triggerAdhocScript(project, scriptFilename, options, null); +1269 } +1270 +1271 /** +1272 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1273 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1274 * +1275 * @param project name of the project - mandatory +1276 * @param scriptFilename filename of the script to be executed - mandatory +1277 * @param options of the script - optional. See {@link OptionsBuilder}. +1278 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1279 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1280 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1281 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1282 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1283 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1284 * @throws IOException if we failed to read the file +1285 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1286 * @see #runAdhocScript(String, String, Properties, Properties) +1287 */ +1288 public RundeckExecution triggerAdhocScript(String project, String scriptFilename, Properties options, +1289 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1290 IllegalArgumentException, IOException { +1291 return triggerAdhocScript(project, scriptFilename, options, nodeFilters, null, null); +1292 } +1293 +1294 /** +1295 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1296 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1297 * +1298 * @param project name of the project - mandatory +1299 * @param scriptFilename filename of the script to be executed - mandatory +1300 * @param options of the script - optional. See {@link OptionsBuilder}. +1301 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1302 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1303 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1304 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1305 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1306 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1307 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1308 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1309 * @throws IOException if we failed to read the file +1310 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1311 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1312 */ +1313 public RundeckExecution triggerAdhocScript(String project, String scriptFilename, Properties options, +1314 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, +1315 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1316 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to trigger an ad-hoc script !"); +1317 FileInputStream stream = null; +1318 try { +1319 stream = FileUtils.openInputStream(new File(scriptFilename)); +1320 return triggerAdhocScript(project, stream, options, nodeFilters, nodeThreadcount, nodeKeepgoing); +1321 } finally { +1322 IOUtils.closeQuietly(stream); +1323 } +1324 } +1325 +1326 /** +1327 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1328 * script will not be dispatched to nodes, but be executed on the RunDeck server. +1329 * +1330 * @param project name of the project - mandatory +1331 * @param script inputStream for reading the script to be executed - mandatory +1332 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1333 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1334 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1335 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1336 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1337 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1338 * @see #runAdhocScript(String, InputStream) +1339 */ +1340 public RundeckExecution triggerAdhocScript(String project, InputStream script) throws RundeckApiException, +1341 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1342 return triggerAdhocScript(project, script, null); +1343 } +1344 +1345 /** +1346 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1347 * script will not be dispatched to nodes, but be executed on the RunDeck server. +1348 * +1349 * @param project name of the project - mandatory +1350 * @param script inputStream for reading the script to be executed - mandatory +1351 * @param options of the script - optional. See {@link OptionsBuilder}. +1352 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1353 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1354 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1355 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1356 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1357 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1358 * @see #runAdhocScript(String, InputStream, Properties) +1359 */ +1360 public RundeckExecution triggerAdhocScript(String project, InputStream script, Properties options) +1361 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1362 return triggerAdhocScript(project, script, options, null); 1363 } 1364 1365 /** @@ -1380,1031 +1380,1234 @@ 1370 * @param script inputStream for reading the script to be executed - mandatory 1371 * @param options of the script - optional. See {@link OptionsBuilder}. 1372 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} -1373 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1374 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1375 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1376 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1377 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1378 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1379 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1380 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1381 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1382 */ -1383 public RundeckExecution triggerAdhocScript(String project, InputStream script, Properties options, -1384 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, -1385 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1386 AssertUtil.notBlank(project, "project is mandatory to trigger an ad-hoc script !"); -1387 AssertUtil.notNull(script, "script is mandatory to trigger an ad-hoc script !"); -1388 RundeckExecution execution = new ApiCall(this).post(new ApiPathBuilder("/run/script").param("project", project) -1389 .attach("scriptFile", -1390 script) -1391 .param("argString", -1392 ParametersUtil.generateArgString(options)) -1393 .param("nodeThreadcount", -1394 nodeThreadcount) -1395 .param("nodeKeepgoing", -1396 nodeKeepgoing) -1397 .nodeFilters(nodeFilters), -1398 new ExecutionParser("result/execution")); -1399 // the first call just returns the ID of the execution, so we need another call to get a "real" execution -1400 return getExecution(execution.getId()); -1401 } -1402 -1403 /** -1404 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1405 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1406 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. -1407 * -1408 * @param project name of the project - mandatory -1409 * @param scriptFilename filename of the script to be executed - mandatory -1410 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1411 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1412 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1413 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1414 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1415 * @throws IOException if we failed to read the file -1416 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1417 * @see #triggerAdhocScript(String, String) -1418 */ -1419 public RundeckExecution runAdhocScript(String project, String scriptFilename) throws RundeckApiException, -1420 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1421 return runAdhocScript(project, scriptFilename, null); -1422 } -1423 -1424 /** -1425 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1426 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1427 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the -1428 * RunDeck server. +1373 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1374 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1375 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1376 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1377 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1378 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1379 * @see #runAdhocScript(String, InputStream, Properties, Properties) +1380 */ +1381 public RundeckExecution triggerAdhocScript(String project, InputStream script, Properties options, +1382 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1383 IllegalArgumentException { +1384 return triggerAdhocScript(project, script, options, nodeFilters, null, null); +1385 } +1386 +1387 /** +1388 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1389 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1390 * +1391 * @param project name of the project - mandatory +1392 * @param script inputStream for reading the script to be executed - mandatory +1393 * @param options of the script - optional. See {@link OptionsBuilder}. +1394 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder} +1395 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1396 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1397 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1398 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1399 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1400 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1401 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1402 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1403 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1404 */ +1405 public RundeckExecution triggerAdhocScript(String project, InputStream script, Properties options, +1406 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, +1407 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1408 AssertUtil.notBlank(project, "project is mandatory to trigger an ad-hoc script !"); +1409 AssertUtil.notNull(script, "script is mandatory to trigger an ad-hoc script !"); +1410 RundeckExecution execution = new ApiCall(this).post(new ApiPathBuilder("/run/script").param("project", project) +1411 .attach("scriptFile", +1412 script) +1413 .param("argString", +1414 ParametersUtil.generateArgString(options)) +1415 .param("nodeThreadcount", +1416 nodeThreadcount) +1417 .param("nodeKeepgoing", +1418 nodeKeepgoing) +1419 .nodeFilters(nodeFilters), +1420 new ExecutionParser("result/execution")); +1421 // the first call just returns the ID of the execution, so we need another call to get a "real" execution +1422 return getExecution(execution.getId()); +1423 } +1424 +1425 /** +1426 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1427 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1428 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. 1429 * 1430 * @param project name of the project - mandatory 1431 * @param scriptFilename filename of the script to be executed - mandatory -1432 * @param poolingInterval for checking the status of the execution. Must be > 0. -1433 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1434 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1435 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1436 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1437 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1438 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1439 * @throws IOException if we failed to read the file -1440 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1441 * @see #triggerAdhocScript(String, String) -1442 */ -1443 public RundeckExecution runAdhocScript(String project, String scriptFilename, long poolingInterval, -1444 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1445 IllegalArgumentException, IOException { -1446 return runAdhocScript(project, scriptFilename, null, poolingInterval, poolingUnit); -1447 } -1448 -1449 /** -1450 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1451 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1452 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. -1453 * -1454 * @param project name of the project - mandatory -1455 * @param scriptFilename filename of the script to be executed - mandatory -1456 * @param options of the script - optional. See {@link OptionsBuilder}. -1457 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1458 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1459 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1460 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1461 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1462 * @throws IOException if we failed to read the file -1463 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1464 * @see #triggerAdhocScript(String, String, Properties) -1465 */ -1466 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options) -1467 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, -1468 IOException { -1469 return runAdhocScript(project, scriptFilename, options, null); -1470 } -1471 -1472 /** -1473 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1474 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1475 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the -1476 * RunDeck server. -1477 * -1478 * @param project name of the project - mandatory -1479 * @param scriptFilename filename of the script to be executed - mandatory -1480 * @param options of the script - optional. See {@link OptionsBuilder}. -1481 * @param poolingInterval for checking the status of the execution. Must be > 0. -1482 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1483 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1484 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1485 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1486 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1487 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1488 * @throws IOException if we failed to read the file -1489 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1490 * @see #triggerAdhocScript(String, String, Properties) -1491 */ -1492 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, -1493 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, -1494 RundeckApiTokenException, IllegalArgumentException, IOException { -1495 return runAdhocScript(project, scriptFilename, options, null, poolingInterval, poolingUnit); -1496 } -1497 -1498 /** -1499 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1500 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1501 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1502 * -1503 * @param project name of the project - mandatory -1504 * @param scriptFilename filename of the script to be executed - mandatory -1505 * @param options of the script - optional. See {@link OptionsBuilder}. -1506 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1507 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1508 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -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 project or scriptFilename is blank (null, empty or whitespace) -1512 * @throws IOException if we failed to read the file -1513 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1514 * @see #triggerAdhocScript(String, String, Properties, Properties) -1515 */ -1516 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, -1517 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1518 IllegalArgumentException, IOException { -1519 return runAdhocScript(project, scriptFilename, options, nodeFilters, null, null); -1520 } -1521 -1522 /** -1523 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1524 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1525 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters -1526 * parameter. -1527 * -1528 * @param project name of the project - mandatory -1529 * @param scriptFilename filename of the script to be executed - mandatory -1530 * @param options of the script - optional. See {@link OptionsBuilder}. -1531 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1532 * @param poolingInterval for checking the status of the execution. Must be > 0. -1533 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1534 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1535 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1536 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1537 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1538 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1539 * @throws IOException if we failed to read the file -1540 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1541 * @see #triggerAdhocScript(String, String, Properties, Properties) -1542 */ -1543 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, -1544 Properties nodeFilters, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, -1545 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1546 return runAdhocScript(project, scriptFilename, options, nodeFilters, null, null, poolingInterval, poolingUnit); -1547 } -1548 -1549 /** -1550 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1551 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1552 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1553 * -1554 * @param project name of the project - mandatory -1555 * @param scriptFilename filename of the script to be executed - mandatory -1556 * @param options of the script - optional. See {@link OptionsBuilder}. -1557 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1558 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1559 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1560 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1561 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1562 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1563 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1564 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1565 * @throws IOException if we failed to read the file -1566 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1567 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1568 */ -1569 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, -1570 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, -1571 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1572 return runAdhocScript(project, -1573 scriptFilename, -1574 options, -1575 nodeFilters, -1576 nodeThreadcount, -1577 nodeKeepgoing, -1578 DEFAULT_POOLING_INTERVAL, -1579 DEFAULT_POOLING_UNIT); -1580 } -1581 -1582 /** -1583 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1584 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1585 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters -1586 * parameter. -1587 * -1588 * @param project name of the project - mandatory -1589 * @param scriptFilename filename of the script to be executed - mandatory -1590 * @param options of the script - optional. See {@link OptionsBuilder}. -1591 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1592 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1593 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1594 * @param poolingInterval for checking the status of the execution. Must be > 0. -1595 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1596 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1597 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1598 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1599 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1600 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) -1601 * @throws IOException if we failed to read the file -1602 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1603 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1604 */ -1605 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, -1606 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, -1607 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1608 IllegalArgumentException, IOException { -1609 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to run an ad-hoc script !"); -1610 FileInputStream stream = null; -1611 try { -1612 stream = FileUtils.openInputStream(new File(scriptFilename)); -1613 return runAdhocScript(project, -1614 stream, -1615 options, -1616 nodeFilters, -1617 nodeThreadcount, -1618 nodeKeepgoing, -1619 poolingInterval, -1620 poolingUnit); -1621 } finally { -1622 IOUtils.closeQuietly(stream); -1623 } -1624 } -1625 -1626 /** -1627 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1628 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1629 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. -1630 * -1631 * @param project name of the project - mandatory -1632 * @param script inputStream for reading the script to be executed - mandatory -1633 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1634 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1635 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1636 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1637 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1638 * @throws IOException if we failed to read the file -1639 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1640 * @see #triggerAdhocScript(String, InputStream) -1641 */ -1642 public RundeckExecution runAdhocScript(String project, InputStream script) throws RundeckApiException, -1643 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1644 return runAdhocScript(project, script, null); -1645 } -1646 -1647 /** -1648 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1649 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1650 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the -1651 * RunDeck server. +1432 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1433 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1434 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1435 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1436 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1437 * @throws IOException if we failed to read the file +1438 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1439 * @see #triggerAdhocScript(String, String) +1440 */ +1441 public RundeckExecution runAdhocScript(String project, String scriptFilename) throws RundeckApiException, +1442 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1443 return runAdhocScript(project, scriptFilename, null); +1444 } +1445 +1446 /** +1447 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1448 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1449 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the +1450 * RunDeck server. +1451 * +1452 * @param project name of the project - mandatory +1453 * @param scriptFilename filename of the script to be executed - mandatory +1454 * @param poolingInterval for checking the status of the execution. Must be > 0. +1455 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1456 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1457 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1458 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1459 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1460 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1461 * @throws IOException if we failed to read the file +1462 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1463 * @see #triggerAdhocScript(String, String) +1464 */ +1465 public RundeckExecution runAdhocScript(String project, String scriptFilename, long poolingInterval, +1466 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1467 IllegalArgumentException, IOException { +1468 return runAdhocScript(project, scriptFilename, null, poolingInterval, poolingUnit); +1469 } +1470 +1471 /** +1472 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1473 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1474 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. +1475 * +1476 * @param project name of the project - mandatory +1477 * @param scriptFilename filename of the script to be executed - mandatory +1478 * @param options of the script - optional. See {@link OptionsBuilder}. +1479 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1480 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1481 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1482 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1483 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1484 * @throws IOException if we failed to read the file +1485 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1486 * @see #triggerAdhocScript(String, String, Properties) +1487 */ +1488 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options) +1489 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, +1490 IOException { +1491 return runAdhocScript(project, scriptFilename, options, null); +1492 } +1493 +1494 /** +1495 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1496 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1497 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the +1498 * RunDeck server. +1499 * +1500 * @param project name of the project - mandatory +1501 * @param scriptFilename filename of the script to be executed - mandatory +1502 * @param options of the script - optional. See {@link OptionsBuilder}. +1503 * @param poolingInterval for checking the status of the execution. Must be > 0. +1504 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1505 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1506 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1507 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1508 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1509 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1510 * @throws IOException if we failed to read the file +1511 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1512 * @see #triggerAdhocScript(String, String, Properties) +1513 */ +1514 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, +1515 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, +1516 RundeckApiTokenException, IllegalArgumentException, IOException { +1517 return runAdhocScript(project, scriptFilename, options, null, poolingInterval, poolingUnit); +1518 } +1519 +1520 /** +1521 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1522 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1523 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1524 * +1525 * @param project name of the project - mandatory +1526 * @param scriptFilename filename of the script to be executed - mandatory +1527 * @param options of the script - optional. See {@link OptionsBuilder}. +1528 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1529 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1530 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1531 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1532 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1533 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1534 * @throws IOException if we failed to read the file +1535 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1536 * @see #triggerAdhocScript(String, String, Properties, Properties) +1537 */ +1538 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, +1539 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1540 IllegalArgumentException, IOException { +1541 return runAdhocScript(project, scriptFilename, options, nodeFilters, null, null); +1542 } +1543 +1544 /** +1545 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1546 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1547 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters +1548 * parameter. +1549 * +1550 * @param project name of the project - mandatory +1551 * @param scriptFilename filename of the script to be executed - mandatory +1552 * @param options of the script - optional. See {@link OptionsBuilder}. +1553 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1554 * @param poolingInterval for checking the status of the execution. Must be > 0. +1555 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1556 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1557 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1558 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1559 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1560 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1561 * @throws IOException if we failed to read the file +1562 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1563 * @see #triggerAdhocScript(String, String, Properties, Properties) +1564 */ +1565 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, +1566 Properties nodeFilters, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, +1567 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1568 return runAdhocScript(project, scriptFilename, options, nodeFilters, null, null, poolingInterval, poolingUnit); +1569 } +1570 +1571 /** +1572 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1573 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1574 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1575 * +1576 * @param project name of the project - mandatory +1577 * @param scriptFilename filename of the script to be executed - mandatory +1578 * @param options of the script - optional. See {@link OptionsBuilder}. +1579 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1580 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1581 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1582 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1583 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1584 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1585 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1586 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1587 * @throws IOException if we failed to read the file +1588 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1589 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1590 */ +1591 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, +1592 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, +1593 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1594 return runAdhocScript(project, +1595 scriptFilename, +1596 options, +1597 nodeFilters, +1598 nodeThreadcount, +1599 nodeKeepgoing, +1600 DEFAULT_POOLING_INTERVAL, +1601 DEFAULT_POOLING_UNIT); +1602 } +1603 +1604 /** +1605 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1606 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1607 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters +1608 * parameter. +1609 * +1610 * @param project name of the project - mandatory +1611 * @param scriptFilename filename of the script to be executed - mandatory +1612 * @param options of the script - optional. See {@link OptionsBuilder}. +1613 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1614 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1615 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1616 * @param poolingInterval for checking the status of the execution. Must be > 0. +1617 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1618 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1619 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1620 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1621 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1622 * @throws IllegalArgumentException if the project or scriptFilename is blank (null, empty or whitespace) +1623 * @throws IOException if we failed to read the file +1624 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1625 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1626 */ +1627 public RundeckExecution runAdhocScript(String project, String scriptFilename, Properties options, +1628 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, +1629 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1630 IllegalArgumentException, IOException { +1631 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to run an ad-hoc script !"); +1632 FileInputStream stream = null; +1633 try { +1634 stream = FileUtils.openInputStream(new File(scriptFilename)); +1635 return runAdhocScript(project, +1636 stream, +1637 options, +1638 nodeFilters, +1639 nodeThreadcount, +1640 nodeKeepgoing, +1641 poolingInterval, +1642 poolingUnit); +1643 } finally { +1644 IOUtils.closeQuietly(stream); +1645 } +1646 } +1647 +1648 /** +1649 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1650 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1651 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. 1652 * 1653 * @param project name of the project - mandatory 1654 * @param script inputStream for reading the script to be executed - mandatory -1655 * @param poolingInterval for checking the status of the execution. Must be > 0. -1656 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1657 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1658 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1659 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1660 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1661 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1662 * @throws IOException if we failed to read the file -1663 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1664 * @see #triggerAdhocScript(String, InputStream) -1665 */ -1666 public RundeckExecution runAdhocScript(String project, InputStream script, long poolingInterval, -1667 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1668 IllegalArgumentException, IOException { -1669 return runAdhocScript(project, script, null, poolingInterval, poolingUnit); -1670 } -1671 -1672 /** -1673 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1674 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1675 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. -1676 * -1677 * @param project name of the project - mandatory -1678 * @param script inputStream for reading the script to be executed - mandatory -1679 * @param options of the script - optional. See {@link OptionsBuilder}. -1680 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1681 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1682 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1683 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1684 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1685 * @throws IOException if we failed to read the file -1686 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1687 * @see #triggerAdhocScript(String, InputStream, Properties) -1688 */ -1689 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options) -1690 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, -1691 IOException { -1692 return runAdhocScript(project, script, options, null); -1693 } -1694 -1695 /** -1696 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1697 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1698 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the -1699 * RunDeck server. -1700 * -1701 * @param project name of the project - mandatory -1702 * @param script inputStream for reading the script to be executed - mandatory -1703 * @param options of the script - optional. See {@link OptionsBuilder}. -1704 * @param poolingInterval for checking the status of the execution. Must be > 0. -1705 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1706 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1707 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1708 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1709 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1710 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1711 * @throws IOException if we failed to read the file -1712 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1713 * @see #triggerAdhocScript(String, InputStream, Properties) -1714 */ -1715 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, -1716 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, -1717 RundeckApiTokenException, IllegalArgumentException, IOException { -1718 return runAdhocScript(project, script, options, null, poolingInterval, poolingUnit); -1719 } -1720 -1721 /** -1722 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1723 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1724 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1725 * -1726 * @param project name of the project - mandatory -1727 * @param script inputStream for reading the script to be executed - mandatory -1728 * @param options of the script - optional. See {@link OptionsBuilder}. -1729 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1730 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1731 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1732 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1733 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1734 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1735 * @throws IOException if we failed to read the file -1736 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1737 * @see #triggerAdhocScript(String, InputStream, Properties, Properties) -1738 */ -1739 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, -1740 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1741 IllegalArgumentException, IOException { -1742 return runAdhocScript(project, script, options, nodeFilters, null, null); -1743 } -1744 -1745 /** -1746 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1747 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1748 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters -1749 * parameter. -1750 * -1751 * @param project name of the project - mandatory -1752 * @param script inputStream for reading the script to be executed - mandatory -1753 * @param options of the script - optional. See {@link OptionsBuilder}. -1754 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1755 * @param poolingInterval for checking the status of the execution. Must be > 0. -1756 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1757 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1758 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1759 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1760 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1761 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1762 * @throws IOException if we failed to read the file -1763 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1764 * @see #triggerAdhocScript(String, InputStream, Properties, Properties) -1765 */ -1766 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, -1767 Properties nodeFilters, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, -1768 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1769 return runAdhocScript(project, script, options, nodeFilters, null, null, poolingInterval, poolingUnit); -1770 } -1771 -1772 /** -1773 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1774 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1775 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1776 * -1777 * @param project name of the project - mandatory -1778 * @param script inputStream for reading the script to be executed - mandatory -1779 * @param options of the script - optional. See {@link OptionsBuilder}. -1780 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1781 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1782 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1783 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1784 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1785 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1786 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1787 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1788 * @throws IOException if we failed to read the file -1789 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1790 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1791 */ -1792 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, -1793 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, -1794 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1795 return runAdhocScript(project, -1796 script, -1797 options, -1798 nodeFilters, -1799 nodeThreadcount, -1800 nodeKeepgoing, -1801 DEFAULT_POOLING_INTERVAL, -1802 DEFAULT_POOLING_UNIT); -1803 } -1804 -1805 /** -1806 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1807 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1808 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters -1809 * parameter. -1810 * -1811 * @param project name of the project - mandatory -1812 * @param script inputStream for reading the script to be executed - mandatory -1813 * @param options of the script - optional. See {@link OptionsBuilder}. -1814 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} -1815 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional -1816 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional -1817 * @param poolingInterval for checking the status of the execution. Must be > 0. -1818 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1819 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1820 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1821 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1822 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1823 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1824 * @throws IOException if we failed to read the file -1825 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1826 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1827 */ -1828 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, -1829 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, -1830 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1831 IllegalArgumentException { -1832 if (poolingInterval <= 0) { -1833 poolingInterval = DEFAULT_POOLING_INTERVAL; -1834 poolingUnit = DEFAULT_POOLING_UNIT; -1835 } -1836 if (poolingUnit == null) { -1837 poolingUnit = DEFAULT_POOLING_UNIT; -1838 } -1839 -1840 RundeckExecution execution = triggerAdhocScript(project, -1841 script, -1842 options, -1843 nodeFilters, -1844 nodeThreadcount, -1845 nodeKeepgoing); -1846 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { -1847 try { -1848 Thread.sleep(poolingUnit.toMillis(poolingInterval)); -1849 } catch (InterruptedException e) { -1850 break; -1851 } -1852 execution = getExecution(execution.getId()); -1853 } -1854 return execution; -1855 } -1856 -1857 /* -1858 * Executions -1859 */ -1860 -1861 /** -1862 * Get all running executions (for all projects) -1863 * -1864 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1865 * @throws RundeckApiException in case of error when calling the API -1866 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1867 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1868 * @see #getRunningExecutions(String) -1869 */ -1870 public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException, -1871 RundeckApiTokenException { -1872 List<RundeckExecution> executions = new ArrayList<RundeckExecution>(); -1873 for (RundeckProject project : getProjects()) { -1874 executions.addAll(getRunningExecutions(project.getName())); +1655 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - 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) or the script is null +1660 * @throws IOException if we failed to read the file +1661 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1662 * @see #triggerAdhocScript(String, InputStream) +1663 */ +1664 public RundeckExecution runAdhocScript(String project, InputStream script) throws RundeckApiException, +1665 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1666 return runAdhocScript(project, script, null); +1667 } +1668 +1669 /** +1670 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1671 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1672 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the +1673 * RunDeck server. +1674 * +1675 * @param project name of the project - mandatory +1676 * @param script inputStream for reading the script to be executed - mandatory +1677 * @param poolingInterval for checking the status of the execution. Must be > 0. +1678 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1679 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1680 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1681 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1682 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1683 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1684 * @throws IOException if we failed to read the file +1685 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1686 * @see #triggerAdhocScript(String, InputStream) +1687 */ +1688 public RundeckExecution runAdhocScript(String project, InputStream script, long poolingInterval, +1689 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1690 IllegalArgumentException, IOException { +1691 return runAdhocScript(project, script, null, poolingInterval, poolingUnit); +1692 } +1693 +1694 /** +1695 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1696 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1697 * running. The script will not be dispatched to nodes, but be executed on the RunDeck server. +1698 * +1699 * @param project name of the project - mandatory +1700 * @param script inputStream for reading the script to be executed - mandatory +1701 * @param options of the script - optional. See {@link OptionsBuilder}. +1702 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1703 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1704 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1705 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1706 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1707 * @throws IOException if we failed to read the file +1708 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1709 * @see #triggerAdhocScript(String, InputStream, Properties) +1710 */ +1711 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options) +1712 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, +1713 IOException { +1714 return runAdhocScript(project, script, options, null); +1715 } +1716 +1717 /** +1718 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1719 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1720 * finished (or aborted) or is still running. The script will not be dispatched to nodes, but be executed on the +1721 * RunDeck server. +1722 * +1723 * @param project name of the project - mandatory +1724 * @param script inputStream for reading the script to be executed - mandatory +1725 * @param options of the script - optional. See {@link OptionsBuilder}. +1726 * @param poolingInterval for checking the status of the execution. Must be > 0. +1727 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1728 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1729 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1730 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1731 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1732 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1733 * @throws IOException if we failed to read the file +1734 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1735 * @see #triggerAdhocScript(String, InputStream, Properties) +1736 */ +1737 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, +1738 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, +1739 RundeckApiTokenException, IllegalArgumentException, IOException { +1740 return runAdhocScript(project, script, options, null, poolingInterval, poolingUnit); +1741 } +1742 +1743 /** +1744 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1745 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1746 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1747 * +1748 * @param project name of the project - mandatory +1749 * @param script inputStream for reading the script to be executed - mandatory +1750 * @param options of the script - optional. See {@link OptionsBuilder}. +1751 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1752 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - 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) or the script is null +1757 * @throws IOException if we failed to read the file +1758 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1759 * @see #triggerAdhocScript(String, InputStream, Properties, Properties) +1760 */ +1761 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, +1762 Properties nodeFilters) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1763 IllegalArgumentException, IOException { +1764 return runAdhocScript(project, script, options, nodeFilters, null, null); +1765 } +1766 +1767 /** +1768 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1769 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1770 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters +1771 * parameter. +1772 * +1773 * @param project name of the project - mandatory +1774 * @param script inputStream for reading the script to be executed - mandatory +1775 * @param options of the script - optional. See {@link OptionsBuilder}. +1776 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1777 * @param poolingInterval for checking the status of the execution. Must be > 0. +1778 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1779 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1780 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1781 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1782 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1783 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1784 * @throws IOException if we failed to read the file +1785 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1786 * @see #triggerAdhocScript(String, InputStream, Properties, Properties) +1787 */ +1788 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, +1789 Properties nodeFilters, long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, +1790 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1791 return runAdhocScript(project, script, options, nodeFilters, null, null, poolingInterval, poolingUnit); +1792 } +1793 +1794 /** +1795 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1796 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1797 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1798 * +1799 * @param project name of the project - mandatory +1800 * @param script inputStream for reading the script to be executed - mandatory +1801 * @param options of the script - optional. See {@link OptionsBuilder}. +1802 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1803 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1804 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1805 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1806 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1807 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1808 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1809 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1810 * @throws IOException if we failed to read the file +1811 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1812 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1813 */ +1814 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, +1815 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, +1816 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1817 return runAdhocScript(project, +1818 script, +1819 options, +1820 nodeFilters, +1821 nodeThreadcount, +1822 nodeKeepgoing, +1823 DEFAULT_POOLING_INTERVAL, +1824 DEFAULT_POOLING_UNIT); +1825 } +1826 +1827 /** +1828 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1829 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1830 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters +1831 * parameter. +1832 * +1833 * @param project name of the project - mandatory +1834 * @param script inputStream for reading the script to be executed - mandatory +1835 * @param options of the script - optional. See {@link OptionsBuilder}. +1836 * @param nodeFilters for selecting nodes on which the script will be executed. See {@link NodeFiltersBuilder} +1837 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional +1838 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional +1839 * @param poolingInterval for checking the status of the execution. Must be > 0. +1840 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1841 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1842 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1843 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1844 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1845 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1846 * @throws IOException if we failed to read the file +1847 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1848 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1849 */ +1850 public RundeckExecution runAdhocScript(String project, InputStream script, Properties options, +1851 Properties nodeFilters, Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, +1852 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1853 IllegalArgumentException { +1854 if (poolingInterval <= 0) { +1855 poolingInterval = DEFAULT_POOLING_INTERVAL; +1856 poolingUnit = DEFAULT_POOLING_UNIT; +1857 } +1858 if (poolingUnit == null) { +1859 poolingUnit = DEFAULT_POOLING_UNIT; +1860 } +1861 +1862 RundeckExecution execution = triggerAdhocScript(project, +1863 script, +1864 options, +1865 nodeFilters, +1866 nodeThreadcount, +1867 nodeKeepgoing); +1868 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { +1869 try { +1870 Thread.sleep(poolingUnit.toMillis(poolingInterval)); +1871 } catch (InterruptedException e) { +1872 break; +1873 } +1874 execution = getExecution(execution.getId()); 1875 } -1876 return executions; +1876 return execution; 1877 } 1878 -1879 /** -1880 * Get the running executions for the given project -1881 * -1882 * @param project name of the project - mandatory -1883 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1884 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1885 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1886 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1887 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1888 * @see #getRunningExecutions() -1889 */ -1890 public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException, -1891 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1892 AssertUtil.notBlank(project, "project is mandatory get all running executions !"); -1893 return new ApiCall(this).get(new ApiPathBuilder("/executions/running").param("project", project), -1894 new ListParser<RundeckExecution>(new ExecutionParser(), -1895 "result/executions/execution")); -1896 } -1897 -1898 /** -1899 * Get the executions of the given job -1900 * -1901 * @param jobId identifier of the job - mandatory -1902 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1903 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1904 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1905 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1906 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1907 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) -1908 */ -1909 public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException, -1910 RundeckApiTokenException, IllegalArgumentException { -1911 return getJobExecutions(jobId, (ExecutionStatus) null); -1912 } -1913 -1914 /** -1915 * Get the executions of the given job -1916 * -1917 * @param jobId identifier of the job - mandatory -1918 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1919 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1920 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1921 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1922 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1923 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is -1924 * invalid -1925 * @see #getJobExecutions(String, String, Long, Long) -1926 */ -1927 public List<RundeckExecution> getJobExecutions(String jobId, String status) throws RundeckApiException, -1928 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1929 return getJobExecutions(jobId, -1930 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status))); -1931 } -1932 -1933 /** -1934 * Get the executions of the given job -1935 * -1936 * @param jobId identifier of the job - mandatory -1937 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1938 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1939 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1940 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1941 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1942 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1943 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) -1944 */ -1945 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException, -1946 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1947 return getJobExecutions(jobId, status, null, null); -1948 } -1949 -1950 /** -1951 * Get the executions of the given job -1952 * -1953 * @param jobId identifier of the job - mandatory -1954 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1955 * @param max number of results to return - optional (null for all) -1956 * @param offset the 0-indexed offset for the first result to return - optional -1957 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1958 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1959 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1960 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1961 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is -1962 * invalid -1963 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) -1964 */ -1965 public List<RundeckExecution> getJobExecutions(String jobId, String status, Long max, Long offset) -1966 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1967 return getJobExecutions(jobId, -1968 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)), -1969 max, -1970 offset); -1971 } -1972 -1973 /** -1974 * Get the executions of the given job -1975 * -1976 * @param jobId identifier of the job - mandatory -1977 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1978 * @param max number of results to return - optional (null for all) -1979 * @param offset the 0-indexed offset for the first result to return - optional -1980 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1981 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -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 jobId is blank (null, empty or whitespace) -1985 */ -1986 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset) -1987 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1988 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !"); -1989 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/executions").param("status", status) -1990 .param("max", max) -1991 .param("offset", offset), -1992 new ListParser<RundeckExecution>(new ExecutionParser(), -1993 "result/executions/execution")); -1994 } -1995 -1996 /** -1997 * Get a single execution, identified by the given ID -1998 * -1999 * @param executionId identifier of the execution - mandatory -2000 * @return a {@link RundeckExecution} instance - won't be null -2001 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) -2002 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2003 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2004 * @throws IllegalArgumentException if the executionId is null -2005 */ -2006 public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, -2007 RundeckApiTokenException, IllegalArgumentException { -2008 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !"); -2009 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()), -2010 new ExecutionParser("result/executions/execution")); -2011 } -2012 -2013 /** -2014 * Abort an execution (identified by the given ID). The execution should be running... -2015 * -2016 * @param executionId identifier of the execution - mandatory -2017 * @return a {@link RundeckAbort} instance - won't be null -2018 * @throws RundeckApiException in case of error when calling the API (non-existent execution 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 executionId is null -2022 */ -2023 public RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, -2024 RundeckApiTokenException, IllegalArgumentException { -2025 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !"); -2026 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString(), "/abort"), -2027 new AbortParser("result/abort")); -2028 } -2029 -2030 /* -2031 * History -2032 */ -2033 -2034 /** -2035 * Get the (events) history for the given project -2036 * -2037 * @param project name of the project - mandatory -2038 * @return a {@link RundeckHistory} instance - won't be null -2039 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -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 project is blank (null, empty or whitespace) -2043 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2044 */ -2045 public RundeckHistory getHistory(String project) throws RundeckApiException, RundeckApiLoginException, -2046 RundeckApiTokenException, IllegalArgumentException { -2047 return getHistory(project, null, null, null, null, null, null, null, null); -2048 } -2049 -2050 /** -2051 * Get the (events) history for the given project -2052 * -2053 * @param project name of the project - mandatory -2054 * @param max number of results to return - optional (default to 20) -2055 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -2056 * @return a {@link RundeckHistory} instance - won't be null -2057 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2058 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2059 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2060 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2061 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2062 */ -2063 public RundeckHistory getHistory(String project, Long max, Long offset) throws RundeckApiException, -2064 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2065 return getHistory(project, null, null, null, null, null, null, max, offset); -2066 } -2067 -2068 /** -2069 * Get the (events) history for the given project -2070 * -2071 * @param project name of the project - mandatory -2072 * @param jobId include only events matching the given job ID - optional -2073 * @param reportId include only events matching the given report ID - optional -2074 * @param user include only events created by the given user - optional -2075 * @return a {@link RundeckHistory} instance - won't be null -2076 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2077 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2078 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2079 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2080 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2081 */ -2082 public RundeckHistory getHistory(String project, String jobId, String reportId, String user) -2083 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2084 return getHistory(project, jobId, reportId, user, null, null, null, null, null); -2085 } -2086 -2087 /** -2088 * Get the (events) history for the given project -2089 * -2090 * @param project name of the project - mandatory -2091 * @param jobId include only events matching the given job ID - optional -2092 * @param reportId include only events matching the given report ID - optional -2093 * @param user include only events created by the given user - optional -2094 * @param max number of results to return - optional (default to 20) -2095 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -2096 * @return a {@link RundeckHistory} instance - won't be null -2097 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -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 project is blank (null, empty or whitespace) -2101 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2102 */ -2103 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, Long max, Long offset) -2104 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2105 return getHistory(project, jobId, reportId, user, null, null, null, max, offset); -2106 } -2107 -2108 /** -2109 * Get the (events) history for the given project -2110 * -2111 * @param project name of the project - mandatory -2112 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y -2113 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 -2114 * weeks), "5d" (= last 5 days), etc. Optional. -2115 * @return a {@link RundeckHistory} instance - won't be null -2116 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2117 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2118 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2119 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2120 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2121 */ -2122 public RundeckHistory getHistory(String project, String recent) throws RundeckApiException, -2123 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2124 return getHistory(project, null, null, null, recent, null, null, null, null); -2125 } -2126 -2127 /** -2128 * Get the (events) history for the given project -2129 * -2130 * @param project name of the project - mandatory -2131 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y -2132 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 -2133 * weeks), "5d" (= last 5 days), etc. Optional. -2134 * @param max number of results to return - optional (default to 20) -2135 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -2136 * @return a {@link RundeckHistory} instance - won't be null -2137 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2138 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2139 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2140 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2141 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2142 */ -2143 public RundeckHistory getHistory(String project, String recent, Long max, Long offset) throws RundeckApiException, -2144 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2145 return getHistory(project, null, null, null, recent, null, null, max, offset); -2146 } -2147 -2148 /** -2149 * Get the (events) history for the given project -2150 * -2151 * @param project name of the project - mandatory -2152 * @param begin date for the earlier events to retrieve - optional -2153 * @param end date for the latest events to retrieve - optional -2154 * @return a {@link RundeckHistory} instance - won't be null -2155 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2156 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2157 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2158 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2159 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2160 */ -2161 public RundeckHistory getHistory(String project, Date begin, Date end) throws RundeckApiException, -2162 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2163 return getHistory(project, null, null, null, null, begin, end, null, null); -2164 } -2165 -2166 /** -2167 * Get the (events) history for the given project -2168 * -2169 * @param project name of the project - mandatory -2170 * @param begin date for the earlier events to retrieve - optional -2171 * @param end date for the latest events to retrieve - optional -2172 * @param max number of results to return - optional (default to 20) -2173 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -2174 * @return a {@link RundeckHistory} instance - won't be null -2175 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2176 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2177 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2178 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2179 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -2180 */ -2181 public RundeckHistory getHistory(String project, Date begin, Date end, Long max, Long offset) -2182 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2183 return getHistory(project, null, null, null, null, begin, end, max, offset); -2184 } -2185 -2186 /** -2187 * Get the (events) history for the given project -2188 * -2189 * @param project name of the project - mandatory -2190 * @param jobId include only events matching the given job ID - optional -2191 * @param reportId include only events matching the given report ID - optional -2192 * @param user include only events created by the given user - optional -2193 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y -2194 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 -2195 * weeks), "5d" (= last 5 days), etc. Optional. -2196 * @param begin date for the earlier events to retrieve - optional -2197 * @param end date for the latest events to retrieve - optional -2198 * @param max number of results to return - optional (default to 20) -2199 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -2200 * @return a {@link RundeckHistory} instance - won't be null -2201 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2202 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2203 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2204 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2205 */ -2206 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, String recent, -2207 Date begin, Date end, Long max, Long offset) throws RundeckApiException, RundeckApiLoginException, -2208 RundeckApiTokenException, IllegalArgumentException { -2209 AssertUtil.notBlank(project, "project is mandatory to get the history !"); -2210 return new ApiCall(this).get(new ApiPathBuilder("/history").param("project", project) -2211 .param("jobIdFilter", jobId) -2212 .param("reportIdFilter", reportId) -2213 .param("userFilter", user) -2214 .param("recentFilter", recent) -2215 .param("begin", begin) -2216 .param("end", end) -2217 .param("max", max) -2218 .param("offset", offset), -2219 new HistoryParser("result/events")); -2220 } -2221 -2222 /* -2223 * Nodes -2224 */ -2225 -2226 /** -2227 * List all nodes (for all projects) -2228 * -2229 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null -2230 * @throws RundeckApiException in case of error when calling the API -2231 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2232 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2233 */ -2234 public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { -2235 List<RundeckNode> nodes = new ArrayList<RundeckNode>(); -2236 for (RundeckProject project : getProjects()) { -2237 nodes.addAll(getNodes(project.getName())); -2238 } -2239 return nodes; -2240 } -2241 -2242 /** -2243 * List all nodes that belongs to the given project -2244 * -2245 * @param project name of the project - mandatory -2246 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null -2247 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -2248 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2249 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2250 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -2251 * @see #getNodes(String, Properties) -2252 */ -2253 public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException, -2254 RundeckApiTokenException, IllegalArgumentException { -2255 return getNodes(project, null); -2256 } -2257 -2258 /** -2259 * List nodes that belongs to the given project -2260 * -2261 * @param project name of the project - mandatory -2262 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder} -2263 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null -2264 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -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 project is blank (null, empty or whitespace) -2268 */ -2269 public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException, -2270 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -2271 AssertUtil.notBlank(project, "project is mandatory to get all nodes !"); -2272 return new ApiCall(this).get(new ApiPathBuilder("/resources").param("project", project) -2273 .nodeFilters(nodeFilters), -2274 new ListParser<RundeckNode>(new NodeParser(), "project/node")); -2275 } -2276 -2277 /** -2278 * Get the definition of a single node -2279 * -2280 * @param name of the node - mandatory -2281 * @param project name of the project - mandatory -2282 * @return a {@link RundeckNode} instance - won't be null -2283 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) -2284 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2285 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2286 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) -2287 */ -2288 public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException, -2289 RundeckApiTokenException, IllegalArgumentException { -2290 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !"); -2291 AssertUtil.notBlank(project, "project is mandatory to get a node !"); -2292 return new ApiCall(this).get(new ApiPathBuilder("/resource/", name).param("project", project), -2293 new NodeParser("project/node")); -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 */ -2308 public RundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException, -2309 RundeckApiTokenException { -2310 return new ApiCall(this).get(new ApiPathBuilder("/system/info"), new SystemInfoParser("result/system")); -2311 } -2312 -2313 /** -2314 * @return the URL of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) -2315 */ -2316 public String getUrl() { -2317 return url; +1879 /* +1880 * Executions +1881 */ +1882 +1883 /** +1884 * Get all running executions (for all projects) +1885 * +1886 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1887 * @throws RundeckApiException in case of error when calling the API +1888 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1889 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1890 * @see #getRunningExecutions(String) +1891 */ +1892 public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException, +1893 RundeckApiTokenException { +1894 List<RundeckExecution> executions = new ArrayList<RundeckExecution>(); +1895 for (RundeckProject project : getProjects()) { +1896 executions.addAll(getRunningExecutions(project.getName())); +1897 } +1898 return executions; +1899 } +1900 +1901 /** +1902 * Get the running executions for the given project +1903 * +1904 * @param project name of the project - mandatory +1905 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1906 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1907 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1908 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1909 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1910 * @see #getRunningExecutions() +1911 */ +1912 public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException, +1913 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1914 AssertUtil.notBlank(project, "project is mandatory get all running executions !"); +1915 return new ApiCall(this).get(new ApiPathBuilder("/executions/running").param("project", project), +1916 new ListParser<RundeckExecution>(new ExecutionParser(), +1917 "result/executions/execution")); +1918 } +1919 +1920 /** +1921 * Get the executions of the given job +1922 * +1923 * @param jobId identifier of the job - mandatory +1924 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1925 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1926 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1927 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1928 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1929 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) +1930 */ +1931 public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException, +1932 RundeckApiTokenException, IllegalArgumentException { +1933 return getJobExecutions(jobId, (ExecutionStatus) null); +1934 } +1935 +1936 /** +1937 * Get the executions of the given job +1938 * +1939 * @param jobId identifier of the job - mandatory +1940 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1941 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1942 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1943 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1944 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1945 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is +1946 * invalid +1947 * @see #getJobExecutions(String, String, Long, Long) +1948 */ +1949 public List<RundeckExecution> getJobExecutions(String jobId, String status) throws RundeckApiException, +1950 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1951 return getJobExecutions(jobId, +1952 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status))); +1953 } +1954 +1955 /** +1956 * Get the executions of the given job +1957 * +1958 * @param jobId identifier of the job - mandatory +1959 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1960 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1961 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1962 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1963 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1964 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1965 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) +1966 */ +1967 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException, +1968 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1969 return getJobExecutions(jobId, status, null, null); +1970 } +1971 +1972 /** +1973 * Get the executions of the given job +1974 * +1975 * @param jobId identifier of the job - mandatory +1976 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1977 * @param max number of results to return - optional (null for all) +1978 * @param offset the 0-indexed offset for the first result to return - optional +1979 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1980 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +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 jobId is blank (null, empty or whitespace), or the executionStatus is +1984 * invalid +1985 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) +1986 */ +1987 public List<RundeckExecution> getJobExecutions(String jobId, String status, Long max, Long offset) +1988 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1989 return getJobExecutions(jobId, +1990 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)), +1991 max, +1992 offset); +1993 } +1994 +1995 /** +1996 * Get the executions of the given job +1997 * +1998 * @param jobId identifier of the job - mandatory +1999 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +2000 * @param max number of results to return - optional (null for all) +2001 * @param offset the 0-indexed offset for the first result to return - optional +2002 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +2003 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2004 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2005 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2006 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2007 */ +2008 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset) +2009 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2010 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !"); +2011 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/executions").param("status", status) +2012 .param("max", max) +2013 .param("offset", offset), +2014 new ListParser<RundeckExecution>(new ExecutionParser(), +2015 "result/executions/execution")); +2016 } +2017 +2018 /** +2019 * Get executions based on query parameters +2020 * +2021 * @param query query parameters for the request +2022 * @param max number of results to return - optional (null for all) +2023 * @param offset the 0-indexed offset for the first result to return - optional +2024 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +2025 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2026 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2027 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2028 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2029 */ +2030 public PagedResults<RundeckExecution> getExecutions(ExecutionQuery query, Long max, Long offset) +2031 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2032 if (!query.notBlank()) { +2033 throw new IllegalArgumentException("Some execution query parameter must be set"); +2034 } +2035 AssertUtil.notBlank(query.getProject(), "project is required for execution query"); +2036 return new ApiCall(this).get(new ApiPathBuilder("/executions") +2037 .param(new ExecutionQueryParameters(query)) +2038 .param("max", max) +2039 .param("offset", offset), +2040 new PagedResultParser<RundeckExecution>( +2041 new ListParser<RundeckExecution>(new ExecutionParser(), "execution"), +2042 "result/executions" +2043 ) +2044 ); +2045 } +2046 +2047 /** +2048 * Get a single execution, identified by the given ID +2049 * +2050 * @param executionId identifier of the execution - mandatory +2051 * @return a {@link RundeckExecution} instance - won't be null +2052 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) +2053 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2054 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2055 * @throws IllegalArgumentException if the executionId is null +2056 */ +2057 public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, +2058 RundeckApiTokenException, IllegalArgumentException { +2059 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !"); +2060 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()), +2061 new ExecutionParser("result/executions/execution")); +2062 } +2063 +2064 /** +2065 * Abort an execution (identified by the given ID). The execution should be running... +2066 * +2067 * @param executionId identifier of the execution - mandatory +2068 * @return a {@link RundeckAbort} instance - won't be null +2069 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) +2070 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2071 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2072 * @throws IllegalArgumentException if the executionId is null +2073 */ +2074 public RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, +2075 RundeckApiTokenException, IllegalArgumentException { +2076 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !"); +2077 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString(), "/abort"), +2078 new AbortParser("result/abort")); +2079 } +2080 +2081 /* +2082 * History +2083 */ +2084 +2085 /** +2086 * Get the (events) history for the given project +2087 * +2088 * @param project name of the project - mandatory +2089 * @return a {@link RundeckHistory} instance - won't be null +2090 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2091 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2092 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2093 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2094 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2095 */ +2096 public RundeckHistory getHistory(String project) throws RundeckApiException, RundeckApiLoginException, +2097 RundeckApiTokenException, IllegalArgumentException { +2098 return getHistory(project, null, null,(String) null, (String) null, null, null, null, null); +2099 } +2100 +2101 /** +2102 * Get the (events) history for the given project +2103 * +2104 * @param project name of the project - mandatory +2105 * @param max number of results to return - optional (default to 20) +2106 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +2107 * @return a {@link RundeckHistory} instance - won't be null +2108 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2109 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2110 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2111 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2112 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2113 */ +2114 public RundeckHistory getHistory(String project, Long max, Long offset) throws RundeckApiException, +2115 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2116 return getHistory(project, null, null, (String)null, (String)null, null, null, max, offset); +2117 } +2118 +2119 /** +2120 * Get the (events) history for the given project +2121 * +2122 * @param project name of the project - mandatory +2123 * @param jobId include only events matching the given job ID - optional +2124 * @param reportId include only events matching the given report ID - optional +2125 * @param user include only events created by the given user - optional +2126 * @return a {@link RundeckHistory} instance - won't be null +2127 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2128 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2129 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2130 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2131 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2132 */ +2133 public RundeckHistory getHistory(String project, String jobId, String reportId, String user) +2134 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2135 return getHistory(project, jobId, reportId, user, null, null, null, null, null); +2136 } +2137 +2138 /** +2139 * Get the (events) history for the given project +2140 * +2141 * @param project name of the project - mandatory +2142 * @param jobId include only events matching the given job ID - optional +2143 * @param reportId include only events matching the given report ID - optional +2144 * @param user include only events created by the given user - optional +2145 * @param max number of results to return - optional (default to 20) +2146 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +2147 * @return a {@link RundeckHistory} instance - won't be null +2148 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2149 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2150 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2151 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2152 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2153 */ +2154 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, Long max, Long offset) +2155 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2156 return getHistory(project, jobId, reportId, user, null, null, null, max, offset); +2157 } +2158 +2159 /** +2160 * Get the (events) history for the given project +2161 * +2162 * @param project name of the project - mandatory +2163 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y +2164 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 +2165 * weeks), "5d" (= last 5 days), etc. Optional. +2166 * @return a {@link RundeckHistory} instance - won't be null +2167 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2168 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2169 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2170 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2171 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2172 */ +2173 public RundeckHistory getHistory(String project, String recent) throws RundeckApiException, +2174 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2175 return getHistory(project, null, null, null, recent, null, null, null, null); +2176 } +2177 +2178 /** +2179 * Get the (events) history for the given project +2180 * +2181 * @param project name of the project - mandatory +2182 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y +2183 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 +2184 * weeks), "5d" (= last 5 days), etc. Optional. +2185 * @param max number of results to return - optional (default to 20) +2186 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +2187 * @return a {@link RundeckHistory} instance - won't be null +2188 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2189 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2190 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2191 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2192 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2193 */ +2194 public RundeckHistory getHistory(String project, String recent, Long max, Long offset) throws RundeckApiException, +2195 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2196 return getHistory(project, null, null, null, recent, null, null, max, offset); +2197 } +2198 +2199 /** +2200 * Get the (events) history for the given project +2201 * +2202 * @param project name of the project - mandatory +2203 * @param begin date for the earlier events to retrieve - optional +2204 * @param end date for the latest events to retrieve - optional +2205 * @return a {@link RundeckHistory} instance - won't be null +2206 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2207 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2208 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2209 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2210 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2211 */ +2212 public RundeckHistory getHistory(String project, Date begin, Date end) throws RundeckApiException, +2213 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2214 return getHistory(project, null, null, (String)null, (String)null, begin, end, null, null); +2215 } +2216 +2217 /** +2218 * Get the (events) history for the given project +2219 * +2220 * @param project name of the project - mandatory +2221 * @param begin date for the earlier events to retrieve - optional +2222 * @param end date for the latest events to retrieve - optional +2223 * @param max number of results to return - optional (default to 20) +2224 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +2225 * @return a {@link RundeckHistory} instance - won't be null +2226 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2227 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2228 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2229 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2230 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +2231 */ +2232 public RundeckHistory getHistory(String project, Date begin, Date end, Long max, Long offset) +2233 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2234 return getHistory(project, null, null, (String)null, (String) null, begin, end, max, offset); +2235 } +2236 +2237 /** +2238 * Get the (events) history for the given project +2239 * +2240 * @param project name of the project - mandatory +2241 * @param jobId include only events matching the given job ID - optional +2242 * @param reportId include only events matching the given report ID - optional +2243 * @param user include only events created by the given user - optional +2244 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y +2245 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 +2246 * weeks), "5d" (= last 5 days), etc. Optional. +2247 * @param begin date for the earlier events to retrieve - optional +2248 * @param end date for the latest events to retrieve - optional +2249 * @param max number of results to return - optional (default to 20) +2250 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +2251 * @return a {@link RundeckHistory} instance - won't be null +2252 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2253 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2254 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2255 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2256 */ +2257 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, String recent, +2258 Date begin, Date end, Long max, Long offset) throws RundeckApiException, RundeckApiLoginException, +2259 RundeckApiTokenException, IllegalArgumentException { +2260 AssertUtil.notBlank(project, "project is mandatory to get the history !"); +2261 return new ApiCall(this).get(new ApiPathBuilder("/history").param("project", project) +2262 .param("jobIdFilter", jobId) +2263 .param("reportIdFilter", reportId) +2264 .param("userFilter", user) +2265 .param("recentFilter", recent) +2266 .param("begin", begin) +2267 .param("end", end) +2268 .param("max", max) +2269 .param("offset", offset), +2270 new HistoryParser("result/events")); +2271 } +2272 +2273 /** +2274 * Get the (events) history for the given project +2275 * +2276 * @param project name of the project - mandatory +2277 * @param includeJobNames list of job names ("group/name") to include results for +2278 * @param excludeJobNames list of job names ("group/name") to exclude results for +2279 * @param user include only events created by the given user - optional +2280 * @param recent include only events matching the given period of time. Format : "XY", where X is an +2281 * integer, and Y is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). +2282 * Example : "2w" (= last 2 weeks), "5d" (= last 5 days), etc. Optional. +2283 * @param begin date for the earlier events to retrieve - optional +2284 * @param end date for the latest events to retrieve - optional +2285 * @param max number of results to return - optional (default to 20) +2286 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +2287 * +2288 * @return a {@link RundeckHistory} instance - won't be null +2289 * +2290 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2291 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2292 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2293 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2294 */ +2295 public RundeckHistory getHistory(String project, +2296 String user, +2297 String recent, +2298 List<String> includeJobNames, +2299 List<String> excludeJobNames, +2300 Date begin, +2301 Date end, +2302 Long max, +2303 Long offset) +2304 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2305 +2306 AssertUtil.notBlank(project, "project is mandatory to get the history !"); +2307 final ApiPathBuilder builder = new ApiPathBuilder("/history").param("project", project) +2308 .field("jobListFilter", includeJobNames) +2309 .field("excludeJobListFilter", excludeJobNames) +2310 .param("userFilter", user) +2311 .param("recentFilter", recent) +2312 .param("begin", begin) +2313 .param("end", end) +2314 .param("max", max) +2315 .param("offset", offset); +2316 +2317 return new ApiCall(this).postOrGet(builder, new HistoryParser("result/events")); 2318 } 2319 -2320 /** -2321 * @return the auth-token used for authentication on the RunDeck instance (null if using login-based auth) -2322 */ -2323 public String getToken() { -2324 return token; -2325 } -2326 -2327 /** -2328 * @return the login used for authentication on the RunDeck instance (null if using token-based auth) -2329 */ -2330 public String getLogin() { -2331 return login; -2332 } -2333 -2334 /** -2335 * @return the password used for authentication on the RunDeck instance (null if using token-based auth) -2336 */ -2337 public String getPassword() { -2338 return password; -2339 } -2340 -2341 @Override -2342 public String toString() { -2343 StringBuilder str = new StringBuilder(); -2344 str.append("RundeckClient ").append(API_VERSION); -2345 str.append(" [").append(url).append("] "); -2346 if (token != null) { -2347 str.append("(token=").append(token).append(")"); -2348 } else { -2349 str.append("(credentials=").append(login).append("|").append(password).append(")"); -2350 } -2351 return str.toString(); -2352 } -2353 -2354 @Override -2355 public int hashCode() { -2356 final int prime = 31; -2357 int result = 1; -2358 result = prime * result + ((login == null) ? 0 : login.hashCode()); -2359 result = prime * result + ((password == null) ? 0 : password.hashCode()); -2360 result = prime * result + ((token == null) ? 0 : token.hashCode()); -2361 result = prime * result + ((url == null) ? 0 : url.hashCode()); -2362 return result; -2363 } -2364 -2365 @Override -2366 public boolean equals(Object obj) { -2367 if (this == obj) -2368 return true; -2369 if (obj == null) -2370 return false; -2371 if (getClass() != obj.getClass()) -2372 return false; -2373 RundeckClient other = (RundeckClient) obj; -2374 if (login == null) { -2375 if (other.login != null) -2376 return false; -2377 } else if (!login.equals(other.login)) -2378 return false; -2379 if (password == null) { -2380 if (other.password != null) -2381 return false; -2382 } else if (!password.equals(other.password)) -2383 return false; -2384 if (token == null) { -2385 if (other.token != null) -2386 return false; -2387 } else if (!token.equals(other.token)) -2388 return false; -2389 if (url == null) { -2390 if (other.url != null) -2391 return false; -2392 } else if (!url.equals(other.url)) -2393 return false; -2394 return true; -2395 } -2396 -2397 } +2320 /* +2321 * Nodes +2322 */ +2323 +2324 /** +2325 * List all nodes (for all projects) +2326 * +2327 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null +2328 * @throws RundeckApiException in case of error when calling the API +2329 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2330 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2331 */ +2332 public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { +2333 List<RundeckNode> nodes = new ArrayList<RundeckNode>(); +2334 for (RundeckProject project : getProjects()) { +2335 nodes.addAll(getNodes(project.getName())); +2336 } +2337 return nodes; +2338 } +2339 +2340 /** +2341 * List all nodes that belongs to the given project +2342 * +2343 * @param project name of the project - mandatory +2344 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null +2345 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2346 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2347 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2348 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2349 * @see #getNodes(String, Properties) +2350 */ +2351 public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException, +2352 RundeckApiTokenException, IllegalArgumentException { +2353 return getNodes(project, null); +2354 } +2355 +2356 /** +2357 * List nodes that belongs to the given project +2358 * +2359 * @param project name of the project - mandatory +2360 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder} +2361 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null +2362 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +2363 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2364 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2365 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +2366 */ +2367 public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException, +2368 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2369 AssertUtil.notBlank(project, "project is mandatory to get all nodes !"); +2370 return new ApiCall(this).get(new ApiPathBuilder("/resources").param("project", project) +2371 .nodeFilters(nodeFilters), +2372 new ListParser<RundeckNode>(new NodeParser(), "project/node")); +2373 } +2374 +2375 /** +2376 * Get the definition of a single node +2377 * +2378 * @param name of the node - mandatory +2379 * @param project name of the project - mandatory +2380 * @return a {@link RundeckNode} instance - won't be null +2381 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +2382 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2383 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2384 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +2385 */ +2386 public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException, +2387 RundeckApiTokenException, IllegalArgumentException { +2388 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !"); +2389 AssertUtil.notBlank(project, "project is mandatory to get a node !"); +2390 return new ApiCall(this).get(new ApiPathBuilder("/resource/", name).param("project", project), +2391 new NodeParser("project/node")); +2392 } +2393 +2394 /** +2395 * Get the output of a job execution +2396 * +2397 * @param id of the execution - mandatory +2398 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +2399 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +2400 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2401 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2402 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +2403 */ +2404 public InputStream getOutput(String executionId) throws RundeckApiException, RundeckApiLoginException, +2405 RundeckApiTokenException, IllegalArgumentException { +2406 AssertUtil.notBlank(executionId, "the execution id is mandatory to get execution output !"); +2407 return new ApiCall(this).getNonApi(new ApiPathBuilder("/execution/downloadOutput/", executionId)); +2408 } +2409 +2410 /** +2411 * Get the html page of the user's profile +2412 * +2413 * @param username - mandatory +2414 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +2415 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +2416 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2417 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2418 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +2419 */ +2420 public InputStream getProfilePage(String username) throws RundeckApiException, RundeckApiLoginException, +2421 RundeckApiTokenException, IllegalArgumentException { +2422 AssertUtil.notBlank(username, "the username is mandatory to get profile page !"); +2423 return new ApiCall(this).getNonApi(new ApiPathBuilder("/user/profile?login=", username)); +2424 } +2425 +2426 +2427 /** +2428 * Generate a new token and get the result page (which is the html page of the user's profile) +2429 * +2430 * @param username - mandatory +2431 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +2432 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +2433 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2434 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2435 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +2436 */ +2437 public InputStream generateToken(String username) throws RundeckApiException, RundeckApiLoginException, +2438 RundeckApiTokenException, IllegalArgumentException { +2439 AssertUtil.notBlank(username, "the username is mandatory to generate the token"); +2440 return new ApiCall(this).getNonApi(new ApiPathBuilder("/user/generateApiToken?login=", username)); +2441 } +2442 +2443 +2444 /** +2445 * Get the execution output of the given job +2446 * +2447 * @param executionId identifier of the execution - mandatory +2448 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2449 * @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. +2450 * @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 +2451 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2452 * @return {@link RundeckOutput} +2453 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2454 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2455 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2456 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2457 */ +2458 public RundeckOutput getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines) +2459 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2460 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2461 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString(), "/output.xml").param("offset", offset) +2462 .param("lastlines", lastlines) +2463 .param("lastmod", lastmod) +2464 .param("maxlines", maxlines), +2465 new OutputParser("result/output")); +2466 } +2467 +2468 +2469 /** +2470 * Get the execution output of the given job +2471 * +2472 * @param jobId identifier of the job - mandatory +2473 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2474 * @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 +2475 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2476 * @return {@link RundeckOutput} +2477 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2478 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2479 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2480 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2481 */ +2482 public RundeckOutput getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines) +2483 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2484 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2485 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString(), "/output.xml").param("offset", offset) +2486 .param("lastmod", lastmod) +2487 .param("maxlines", maxlines), +2488 new OutputParser("result/output")); +2489 } +2490 +2491 +2492 /* +2493 * System Info +2494 */ +2495 +2496 /** +2497 * Get system informations about the RunDeck server +2498 * +2499 * @return a {@link RundeckSystemInfo} instance - won't be null +2500 * @throws RundeckApiException in case of error when calling the API +2501 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2502 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2503 */ +2504 public RundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException, +2505 RundeckApiTokenException { +2506 return new ApiCall(this).get(new ApiPathBuilder("/system/info"), new SystemInfoParser("result/system")); +2507 } +2508 +2509 /** +2510 * @return the URL of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) +2511 */ +2512 public String getUrl() { +2513 return url; +2514 } +2515 +2516 /** +2517 * @return the auth-token used for authentication on the RunDeck instance (null if using login-based or session-based auth) +2518 */ +2519 public String getToken() { +2520 return token; +2521 } +2522 +2523 /** +2524 * @return the login used for authentication on the RunDeck instance (null if using token-based or session-based auth) +2525 */ +2526 public String getLogin() { +2527 return login; +2528 } +2529 +2530 /** +2531 * @return the password used for authentication on the RunDeck instance (null if using token-based or session-based auth) +2532 */ +2533 public String getPassword() { +2534 return password; +2535 } +2536 +2537 /** +2538 * @return the sessionID used for authentication on the RunDeck instance (null if using login-based or token-based auth) +2539 */ +2540 public String getSessionID() { +2541 return sessionID; +2542 } +2543 +2544 @Override +2545 public String toString() { +2546 StringBuilder str = new StringBuilder(); +2547 str.append("RundeckClient ").append(API_VERSION); +2548 str.append(" [").append(url).append("] "); +2549 if (token != null) { +2550 str.append("(token=").append(token).append(")"); +2551 } else { +2552 str.append("(credentials=").append(login).append("|").append(password).append(")"); +2553 } +2554 return str.toString(); +2555 } +2556 +2557 @Override +2558 public int hashCode() { +2559 final int prime = 31; +2560 int result = 1; +2561 result = prime * result + ((login == null) ? 0 : login.hashCode()); +2562 result = prime * result + ((password == null) ? 0 : password.hashCode()); +2563 result = prime * result + ((token == null) ? 0 : token.hashCode()); +2564 result = prime * result + ((url == null) ? 0 : url.hashCode()); +2565 return result; +2566 } +2567 +2568 @Override +2569 public boolean equals(Object obj) { +2570 if (this == obj) +2571 return true; +2572 if (obj == null) +2573 return false; +2574 if (getClass() != obj.getClass()) +2575 return false; +2576 RundeckClient other = (RundeckClient) obj; +2577 if (login == null) { +2578 if (other.login != null) +2579 return false; +2580 } else if (!login.equals(other.login)) +2581 return false; +2582 if (password == null) { +2583 if (other.password != null) +2584 return false; +2585 } else if (!password.equals(other.password)) +2586 return false; +2587 if (token == null) { +2588 if (other.token != null) +2589 return false; +2590 } else if (!token.equals(other.token)) +2591 return false; +2592 if (url == null) { +2593 if (other.url != null) +2594 return false; +2595 } else if (!url.equals(other.url)) +2596 return false; +2597 return true; +2598 } +2599 +2600 }
      diff --git a/xref/org/rundeck/api/domain/RundeckExecution.html b/xref/org/rundeck/api/domain/RundeckExecution.html index 45f8681..92d405a 100644 --- a/xref/org/rundeck/api/domain/RundeckExecution.html +++ b/xref/org/rundeck/api/domain/RundeckExecution.html @@ -60,211 +60,230 @@ 50 private String abortedBy; 51 52 private String description; -53 -54 /** -55 * @return the duration of the execution in milliseconds (or null if the duration is still running, or has been -56 * aborted) -57 */ -58 public Long getDurationInMillis() { -59 if (startedAt == null || endedAt == null) { -60 return null; -61 } -62 return endedAt.getTime() - startedAt.getTime(); -63 } -64 -65 /** -66 * @return the duration of the execution in seconds (or null if the execution is still running, or has been aborted) -67 */ -68 public Long getDurationInSeconds() { -69 Long durationInMillis = getDurationInMillis(); -70 return durationInMillis != null ? TimeUnit.MILLISECONDS.toSeconds(durationInMillis) : null; -71 } -72 -73 /** -74 * @return the duration of the execution, as a human-readable string : "3 minutes 34 seconds" (or null if the -75 * execution is still running, or has been aborted) -76 */ -77 public String getDuration() { -78 Long durationInMillis = getDurationInMillis(); -79 return durationInMillis != null ? DurationFormatUtils.formatDurationWords(durationInMillis, true, true) : null; -80 } -81 -82 /** -83 * @return the duration of the execution, as a "short" human-readable string : "0:03:34.187" (or null if the -84 * execution is still running, or has been aborted) -85 */ -86 public String getShortDuration() { -87 Long durationInMillis = getDurationInMillis(); -88 return durationInMillis != null ? DurationFormatUtils.formatDurationHMS(durationInMillis) : null; -89 } -90 -91 public Long getId() { -92 return id; -93 } -94 -95 public void setId(Long id) { -96 this.id = id; -97 } -98 -99 public String getUrl() { -100 return url; -101 } -102 -103 public void setUrl(String url) { -104 this.url = url; -105 } -106 -107 /** -108 * @return the status of the execution - see {@link ExecutionStatus} -109 */ -110 public ExecutionStatus getStatus() { -111 return status; -112 } -113 -114 public void setStatus(ExecutionStatus status) { -115 this.status = status; -116 } -117 -118 /** -119 * @return the {@link RundeckJob} associated with this execution, or null in the case of an ad-hoc execution -120 * (command or script) -121 */ -122 public RundeckJob getJob() { -123 return job; -124 } -125 -126 public void setJob(RundeckJob job) { -127 this.job = job; -128 } -129 -130 public String getStartedBy() { -131 return startedBy; -132 } -133 -134 public void setStartedBy(String startedBy) { -135 this.startedBy = startedBy; -136 } -137 -138 public Date getStartedAt() { -139 return (startedAt != null) ? new Date(startedAt.getTime()) : null; -140 } -141 -142 public void setStartedAt(Date startedAt) { -143 this.startedAt = ((startedAt != null) ? new Date(startedAt.getTime()) : null); -144 } -145 -146 public Date getEndedAt() { -147 return (endedAt != null) ? new Date(endedAt.getTime()) : null; -148 } -149 -150 public void setEndedAt(Date endedAt) { -151 this.endedAt = ((endedAt != null) ? new Date(endedAt.getTime()) : null); -152 } -153 -154 public String getAbortedBy() { -155 return abortedBy; -156 } -157 -158 public void setAbortedBy(String abortedBy) { -159 this.abortedBy = abortedBy; -160 } -161 -162 public String getDescription() { -163 return description; -164 } -165 -166 public void setDescription(String description) { -167 this.description = description; -168 } -169 -170 @Override -171 public String toString() { -172 return "RundeckExecution [id=" + id + ", description=" + description + ", url=" + url + ", status=" + status -173 + ", startedBy=" + startedBy + ", startedAt=" + startedAt + ", endedAt=" + endedAt -174 + ", durationInSeconds=" + getDurationInSeconds() + ", abortedBy=" + abortedBy + ", job=" + job + "]"; -175 } -176 -177 @Override -178 public int hashCode() { -179 final int prime = 31; -180 int result = 1; -181 result = prime * result + ((abortedBy == null) ? 0 : abortedBy.hashCode()); -182 result = prime * result + ((description == null) ? 0 : description.hashCode()); -183 result = prime * result + ((endedAt == null) ? 0 : endedAt.hashCode()); -184 result = prime * result + ((id == null) ? 0 : id.hashCode()); -185 result = prime * result + ((job == null) ? 0 : job.hashCode()); -186 result = prime * result + ((startedAt == null) ? 0 : startedAt.hashCode()); -187 result = prime * result + ((startedBy == null) ? 0 : startedBy.hashCode()); -188 result = prime * result + ((status == null) ? 0 : status.hashCode()); -189 result = prime * result + ((url == null) ? 0 : url.hashCode()); -190 return result; -191 } -192 -193 @Override -194 public boolean equals(Object obj) { -195 if (this == obj) -196 return true; -197 if (obj == null) -198 return false; -199 if (getClass() != obj.getClass()) -200 return false; -201 RundeckExecution other = (RundeckExecution) obj; -202 if (abortedBy == null) { -203 if (other.abortedBy != null) -204 return false; -205 } else if (!abortedBy.equals(other.abortedBy)) -206 return false; -207 if (description == null) { -208 if (other.description != null) -209 return false; -210 } else if (!description.equals(other.description)) -211 return false; -212 if (endedAt == null) { -213 if (other.endedAt != null) -214 return false; -215 } else if (!endedAt.equals(other.endedAt)) -216 return false; -217 if (id == null) { -218 if (other.id != null) -219 return false; -220 } else if (!id.equals(other.id)) -221 return false; -222 if (job == null) { -223 if (other.job != null) -224 return false; -225 } else if (!job.equals(other.job)) -226 return false; -227 if (startedAt == null) { -228 if (other.startedAt != null) -229 return false; -230 } else if (!startedAt.equals(other.startedAt)) -231 return false; -232 if (startedBy == null) { -233 if (other.startedBy != null) -234 return false; -235 } else if (!startedBy.equals(other.startedBy)) -236 return false; -237 if (status == null) { -238 if (other.status != null) -239 return false; -240 } else if (!status.equals(other.status)) -241 return false; -242 if (url == null) { -243 if (other.url != null) -244 return false; -245 } else if (!url.equals(other.url)) -246 return false; -247 return true; -248 } -249 -250 /** -251 * The status of an execution -252 */ -253 public static enum ExecutionStatus { -254 RUNNING, SUCCEEDED, FAILED, ABORTED; -255 } -256 -257 } +53 private String argstring; +54 +55 /** +56 * @return the duration of the execution in milliseconds (or null if the duration is still running, or has been +57 * aborted) +58 */ +59 public Long getDurationInMillis() { +60 if (startedAt == null || endedAt == null) { +61 return null; +62 } +63 return endedAt.getTime() - startedAt.getTime(); +64 } +65 +66 /** +67 * @return the duration of the execution in seconds (or null if the execution is still running, or has been aborted) +68 */ +69 public Long getDurationInSeconds() { +70 Long durationInMillis = getDurationInMillis(); +71 return durationInMillis != null ? TimeUnit.MILLISECONDS.toSeconds(durationInMillis) : null; +72 } +73 +74 /** +75 * @return the duration of the execution, as a human-readable string : "3 minutes 34 seconds" (or null if the +76 * execution is still running, or has been aborted) +77 */ +78 public String getDuration() { +79 Long durationInMillis = getDurationInMillis(); +80 return durationInMillis != null ? DurationFormatUtils.formatDurationWords(durationInMillis, true, true) : null; +81 } +82 +83 /** +84 * @return the duration of the execution, as a "short" human-readable string : "0:03:34.187" (or null if the +85 * execution is still running, or has been aborted) +86 */ +87 public String getShortDuration() { +88 Long durationInMillis = getDurationInMillis(); +89 return durationInMillis != null ? DurationFormatUtils.formatDurationHMS(durationInMillis) : null; +90 } +91 +92 public Long getId() { +93 return id; +94 } +95 +96 public void setId(Long id) { +97 this.id = id; +98 } +99 +100 public String getUrl() { +101 return url; +102 } +103 +104 public void setUrl(String url) { +105 this.url = url; +106 } +107 +108 /** +109 * @return the status of the execution - see {@link ExecutionStatus} +110 */ +111 public ExecutionStatus getStatus() { +112 return status; +113 } +114 +115 public void setStatus(ExecutionStatus status) { +116 this.status = status; +117 } +118 +119 /** +120 * @return the {@link RundeckJob} associated with this execution, or null in the case of an ad-hoc execution +121 * (command or script) +122 */ +123 public RundeckJob getJob() { +124 return job; +125 } +126 +127 public void setJob(RundeckJob job) { +128 this.job = job; +129 } +130 +131 public String getStartedBy() { +132 return startedBy; +133 } +134 +135 public void setStartedBy(String startedBy) { +136 this.startedBy = startedBy; +137 } +138 +139 public Date getStartedAt() { +140 return (startedAt != null) ? new Date(startedAt.getTime()) : null; +141 } +142 +143 public void setStartedAt(Date startedAt) { +144 this.startedAt = ((startedAt != null) ? new Date(startedAt.getTime()) : null); +145 } +146 +147 public Date getEndedAt() { +148 return (endedAt != null) ? new Date(endedAt.getTime()) : null; +149 } +150 +151 public void setEndedAt(Date endedAt) { +152 this.endedAt = ((endedAt != null) ? new Date(endedAt.getTime()) : null); +153 } +154 +155 public String getAbortedBy() { +156 return abortedBy; +157 } +158 +159 public void setAbortedBy(String abortedBy) { +160 this.abortedBy = abortedBy; +161 } +162 +163 public String getDescription() { +164 return description; +165 } +166 +167 public void setDescription(String description) { +168 this.description = description; +169 } +170 +171 @Override +172 public String toString() { +173 return "RundeckExecution [id=" + id + ", description=" + description + ", url=" + url + ", status=" + status +174 + ", argstring=" + argstring +175 + ", startedBy=" + startedBy + ", startedAt=" + startedAt + ", endedAt=" + endedAt +176 + ", durationInSeconds=" + getDurationInSeconds() + ", abortedBy=" + abortedBy + ", job=" + job + "]"; +177 } +178 +179 @Override +180 public int hashCode() { +181 final int prime = 31; +182 int result = 1; +183 result = prime * result + ((abortedBy == null) ? 0 : abortedBy.hashCode()); +184 result = prime * result + ((argstring == null) ? 0 : argstring.hashCode()); +185 result = prime * result + ((description == null) ? 0 : description.hashCode()); +186 result = prime * result + ((endedAt == null) ? 0 : endedAt.hashCode()); +187 result = prime * result + ((id == null) ? 0 : id.hashCode()); +188 result = prime * result + ((job == null) ? 0 : job.hashCode()); +189 result = prime * result + ((startedAt == null) ? 0 : startedAt.hashCode()); +190 result = prime * result + ((startedBy == null) ? 0 : startedBy.hashCode()); +191 result = prime * result + ((status == null) ? 0 : status.hashCode()); +192 result = prime * result + ((url == null) ? 0 : url.hashCode()); +193 return result; +194 } +195 +196 @Override +197 public boolean equals(Object obj) { +198 if (this == obj) +199 return true; +200 if (obj == null) +201 return false; +202 if (getClass() != obj.getClass()) +203 return false; +204 RundeckExecution other = (RundeckExecution) obj; +205 if (abortedBy == null) { +206 if (other.abortedBy != null) +207 return false; +208 } else if (!abortedBy.equals(other.abortedBy)) +209 return false; +210 if (argstring == null) { +211 if (other.argstring != null) +212 return false; +213 } else if (!argstring.equals(other.argstring)) +214 return false; +215 if (description == null) { +216 if (other.description != null) +217 return false; +218 } else if (!description.equals(other.description)) +219 return false; +220 if (endedAt == null) { +221 if (other.endedAt != null) +222 return false; +223 } else if (!endedAt.equals(other.endedAt)) +224 return false; +225 if (id == null) { +226 if (other.id != null) +227 return false; +228 } else if (!id.equals(other.id)) +229 return false; +230 if (job == null) { +231 if (other.job != null) +232 return false; +233 } else if (!job.equals(other.job)) +234 return false; +235 if (startedAt == null) { +236 if (other.startedAt != null) +237 return false; +238 } else if (!startedAt.equals(other.startedAt)) +239 return false; +240 if (startedBy == null) { +241 if (other.startedBy != null) +242 return false; +243 } else if (!startedBy.equals(other.startedBy)) +244 return false; +245 if (status == null) { +246 if (other.status != null) +247 return false; +248 } else if (!status.equals(other.status)) +249 return false; +250 if (url == null) { +251 if (other.url != null) +252 return false; +253 } else if (!url.equals(other.url)) +254 return false; +255 return true; +256 } +257 +258 /** +259 * the argument string for the execution +260 */ +261 public String getArgstring() { +262 return argstring; +263 } +264 +265 public void setArgstring(String argstring) { +266 this.argstring = argstring; +267 } +268 +269 /** +270 * The status of an execution +271 */ +272 public static enum ExecutionStatus { +273 RUNNING, SUCCEEDED, FAILED, ABORTED; +274 } +275 +276 }
      diff --git a/xref/org/rundeck/api/domain/RundeckJob.html b/xref/org/rundeck/api/domain/RundeckJob.html index 55b5059..ad3cee4 100644 --- a/xref/org/rundeck/api/domain/RundeckJob.html +++ b/xref/org/rundeck/api/domain/RundeckJob.html @@ -47,114 +47,128 @@ 37 38 private String description; 39 -40 /** -41 * @return the fullname : group + name (exact format is : "group/name") -42 */ -43 public String getFullName() { -44 StringBuilder fullName = new StringBuilder(); -45 if (StringUtils.isNotBlank(group)) { -46 fullName.append(group).append("/"); -47 } -48 fullName.append(name); -49 return fullName.toString(); -50 } -51 -52 public String getId() { -53 return id; -54 } -55 -56 public void setId(String id) { -57 this.id = id; -58 } -59 -60 public String getName() { -61 return name; -62 } -63 -64 public void setName(String name) { -65 this.name = name; -66 } -67 -68 public String getGroup() { -69 return group; -70 } -71 -72 public void setGroup(String group) { -73 this.group = group; -74 } -75 -76 public String getProject() { -77 return project; -78 } -79 -80 public void setProject(String project) { -81 this.project = project; -82 } -83 -84 public String getDescription() { -85 return description; -86 } -87 -88 public void setDescription(String description) { -89 this.description = description; -90 } -91 -92 @Override -93 public String toString() { -94 return "RundeckJob [id=" + id + ", name=" + name + ", group=" + group + ", project=" + project -95 + ", description=" + description + "]"; -96 } -97 -98 @Override -99 public int hashCode() { -100 final int prime = 31; -101 int result = 1; -102 result = prime * result + ((description == null) ? 0 : description.hashCode()); -103 result = prime * result + ((group == null) ? 0 : group.hashCode()); -104 result = prime * result + ((id == null) ? 0 : id.hashCode()); -105 result = prime * result + ((name == null) ? 0 : name.hashCode()); -106 result = prime * result + ((project == null) ? 0 : project.hashCode()); -107 return result; -108 } -109 -110 @Override -111 public boolean equals(Object obj) { -112 if (this == obj) -113 return true; -114 if (obj == null) -115 return false; -116 if (getClass() != obj.getClass()) -117 return false; -118 RundeckJob other = (RundeckJob) obj; -119 if (description == null) { -120 if (other.description != null) -121 return false; -122 } else if (!description.equals(other.description)) -123 return false; -124 if (group == null) { -125 if (other.group != null) -126 return false; -127 } else if (!group.equals(other.group)) -128 return false; -129 if (id == null) { -130 if (other.id != null) -131 return false; -132 } else if (!id.equals(other.id)) -133 return false; -134 if (name == null) { -135 if (other.name != null) -136 return false; -137 } else if (!name.equals(other.name)) -138 return false; -139 if (project == null) { -140 if (other.project != null) -141 return false; -142 } else if (!project.equals(other.project)) -143 return false; -144 return true; -145 } -146 -147 } +40 private long averageDuration = -1L; +41 +42 /** +43 * @return the fullname : group + name (exact format is : "group/name") +44 */ +45 public String getFullName() { +46 StringBuilder fullName = new StringBuilder(); +47 if (StringUtils.isNotBlank(group)) { +48 fullName.append(group).append("/"); +49 } +50 fullName.append(name); +51 return fullName.toString(); +52 } +53 +54 public String getId() { +55 return id; +56 } +57 +58 public void setId(String id) { +59 this.id = id; +60 } +61 +62 public String getName() { +63 return name; +64 } +65 +66 public void setName(String name) { +67 this.name = name; +68 } +69 +70 public String getGroup() { +71 return group; +72 } +73 +74 public void setGroup(String group) { +75 this.group = group; +76 } +77 +78 public String getProject() { +79 return project; +80 } +81 +82 public void setProject(String project) { +83 this.project = project; +84 } +85 +86 public String getDescription() { +87 return description; +88 } +89 +90 public void setDescription(String description) { +91 this.description = description; +92 } +93 +94 @Override +95 public String toString() { +96 return "RundeckJob [id=" + id + ", name=" + name + ", group=" + group + ", project=" + project +97 + ", description=" + description + ", averageDuration="+averageDuration+"]"; +98 } +99 +100 @Override +101 public int hashCode() { +102 final int prime = 31; +103 int result = 1; +104 result = prime * result + ((description == null) ? 0 : description.hashCode()); +105 result = prime * result + ((group == null) ? 0 : group.hashCode()); +106 result = prime * result + ((id == null) ? 0 : id.hashCode()); +107 result = prime * result + ((name == null) ? 0 : name.hashCode()); +108 result = prime * result + ((project == null) ? 0 : project.hashCode()); +109 result = prime * result + (int) (averageDuration ^ (averageDuration >>> 32)); +110 return result; +111 } +112 +113 @Override +114 public boolean equals(Object obj) { +115 if (this == obj) +116 return true; +117 if (obj == null) +118 return false; +119 if (getClass() != obj.getClass()) +120 return false; +121 RundeckJob other = (RundeckJob) obj; +122 if (description == null) { +123 if (other.description != null) +124 return false; +125 } else if (!description.equals(other.description)) +126 return false; +127 if (group == null) { +128 if (other.group != null) +129 return false; +130 } else if (!group.equals(other.group)) +131 return false; +132 if (id == null) { +133 if (other.id != null) +134 return false; +135 } else if (!id.equals(other.id)) +136 return false; +137 if (name == null) { +138 if (other.name != null) +139 return false; +140 } else if (!name.equals(other.name)) +141 return false; +142 if (project == null) { +143 if (other.project != null) +144 return false; +145 } else if (!project.equals(other.project)) +146 return false; +147 if (averageDuration != other.averageDuration) { +148 return false; +149 } +150 return true; +151 } +152 +153 +154 public long getAverageDuration() { +155 return averageDuration; +156 } +157 +158 public void setAverageDuration(long averageDuration) { +159 this.averageDuration = averageDuration; +160 } +161 }
      diff --git a/xref/org/rundeck/api/domain/RundeckJobDelete.html b/xref/org/rundeck/api/domain/RundeckJobDelete.html new file mode 100644 index 0000000..874b57c --- /dev/null +++ b/xref/org/rundeck/api/domain/RundeckJobDelete.html @@ -0,0 +1,147 @@ + + + + +RundeckJobDelete xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * RundeckJobDelete.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 10/1/12 3:53 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.domain;
      +26  
      +27  import java.util.*;
      +28  
      +29  
      +30  /**
      +31   * RundeckJobDelete represents a result of a job delete request.
      +32   *
      +33   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +34   */
      +35  public class RundeckJobDelete {
      +36      private String id;
      +37      private String error;
      +38      private boolean successful;
      +39      private String errorCode;
      +40      private String message;
      +41  
      +42      /**
      +43       * Job ID
      +44       */
      +45      public String getId() {
      +46          return id;
      +47      }
      +48  
      +49      public void setId(String id) {
      +50          this.id = id;
      +51      }
      +52  
      +53      /**
      +54       * Error message if the job could not be deleted
      +55       */
      +56      public String getError() {
      +57          return error;
      +58      }
      +59  
      +60      public void setError(String error) {
      +61          this.error = error;
      +62      }
      +63  
      +64      /**
      +65       * True if the job was successfully deleted
      +66       */
      +67      public boolean isSuccessful() {
      +68          return successful;
      +69      }
      +70  
      +71      public void setSuccessful(boolean successful) {
      +72          this.successful = successful;
      +73      }
      +74  
      +75      /**
      +76       * Error code string if there was a failure
      +77       */
      +78      public String getErrorCode() {
      +79          return errorCode;
      +80      }
      +81  
      +82      public void setErrorCode(String errorCode) {
      +83          this.errorCode = errorCode;
      +84      }
      +85  
      +86      /**
      +87       * Success message if it was successful
      +88       */
      +89      public String getMessage() {
      +90          return message;
      +91      }
      +92  
      +93      public void setMessage(String message) {
      +94          this.message = message;
      +95      }
      +96  
      +97      @Override
      +98      public boolean equals(Object o) {
      +99          if (this == o) { return true; }
      +100         if (o == null || getClass() != o.getClass()) { return false; }
      +101 
      +102         RundeckJobDelete delete = (RundeckJobDelete) o;
      +103 
      +104         if (successful != delete.successful) { return false; }
      +105         if (error != null ? !error.equals(delete.error) : delete.error != null) { return false; }
      +106         if (errorCode != null ? !errorCode.equals(delete.errorCode) : delete.errorCode != null) { return false; }
      +107         if (id != null ? !id.equals(delete.id) : delete.id != null) { return false; }
      +108         if (message != null ? !message.equals(delete.message) : delete.message != null) { return false; }
      +109 
      +110         return true;
      +111     }
      +112 
      +113     @Override
      +114     public int hashCode() {
      +115         int result = id != null ? id.hashCode() : 0;
      +116         result = 31 * result + (error != null ? error.hashCode() : 0);
      +117         result = 31 * result + (successful ? 1 : 0);
      +118         result = 31 * result + (errorCode != null ? errorCode.hashCode() : 0);
      +119         result = 31 * result + (message != null ? message.hashCode() : 0);
      +120         return result;
      +121     }
      +122 
      +123     @Override
      +124     public String toString() {
      +125         return "RundeckJobDelete{" +
      +126                "id='" + id + '\'' +
      +127                ", error='" + error + '\'' +
      +128                ", successful=" + successful +
      +129                ", errorCode='" + errorCode + '\'' +
      +130                ", message='" + message + '\'' +
      +131                '}';
      +132     }
      +133 }
      +
      +
      + + diff --git a/xref/org/rundeck/api/domain/RundeckJobDeleteBulk.html b/xref/org/rundeck/api/domain/RundeckJobDeleteBulk.html new file mode 100644 index 0000000..6f657d1 --- /dev/null +++ b/xref/org/rundeck/api/domain/RundeckJobDeleteBulk.html @@ -0,0 +1,96 @@ + + + + +RundeckJobDeleteBulk xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * RundeckJobDeleteBulk.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 10/1/12 4:12 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.domain;
      +26  
      +27  import java.util.*;
      +28  
      +29  
      +30  /**
      +31   * RundeckJobDeleteBulk represents the result of a bulk job delete request and contains
      +32   * a list of {@link RundeckJobDelete} objects.
      +33   *
      +34   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +35   */
      +36  public class RundeckJobDeleteBulk implements Iterable<RundeckJobDelete> {
      +37      private List<RundeckJobDelete> results;
      +38      private int requestCount;
      +39      private boolean allsuccessful;
      +40  
      +41      public RundeckJobDeleteBulk(List<RundeckJobDelete> results, int requestCount, boolean allsuccessful) {
      +42          this.results = results;
      +43          this.requestCount = requestCount;
      +44          this.allsuccessful = allsuccessful;
      +45      }
      +46  
      +47      public List<RundeckJobDelete> getResults() {
      +48          return results;
      +49      }
      +50  
      +51      /**
      +52       * The number of job delete requests processed.
      +53       */
      +54      public int getRequestCount() {
      +55          return requestCount;
      +56      }
      +57  
      +58      /**
      +59       * True if all job delete requests were successful
      +60       */
      +61      public boolean isAllsuccessful() {
      +62          return allsuccessful;
      +63      }
      +64  
      +65      @Override
      +66      public Iterator<RundeckJobDelete> iterator() {
      +67          if(null!=results){
      +68              return results.iterator();
      +69          }else{
      +70              return null;
      +71          }
      +72      }
      +73  
      +74      @Override
      +75      public String toString() {
      +76          return "RundeckJobDeleteBulk{" +
      +77                 "results=" + results +
      +78                 ", requestCount=" + requestCount +
      +79                 ", allsuccessful=" + allsuccessful +
      +80                 '}';
      +81      }
      +82  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/domain/RundeckOutput.html b/xref/org/rundeck/api/domain/RundeckOutput.html new file mode 100644 index 0000000..b7df466 --- /dev/null +++ b/xref/org/rundeck/api/domain/RundeckOutput.html @@ -0,0 +1,306 @@ + + + + +RundeckOutput xref + + + +
      +
      +1   package org.rundeck.api.domain;
      +2   
      +3   import java.util.List;
      +4   import java.util.ArrayList;
      +5   
      +6   import java.io.Serializable;
      +7   
      +8   import org.rundeck.api.domain.RundeckExecution.ExecutionStatus;
      +9   
      +10  
      +11  /**
      +12   * Represents a RunDeck output
      +13   * 
      +14   */
      +15  public class RundeckOutput implements Serializable {
      +16  
      +17  	private static final long serialVersionUID = 1L;
      +18  
      +19  	private Long executionId;
      +20  	
      +21  	//private String message = null;
      +22  
      +23  	//private String error = null;
      +24  	
      +25  	private Boolean unmodified;
      +26  	
      +27  	private Boolean empty;
      +28  	
      +29  	private int offset;
      +30  	
      +31  	private Boolean completed = false;
      +32  	
      +33  	private Boolean execCompleted = false;
      +34  	
      +35  	private Boolean hasFailedNodes = false;
      +36  	
      +37  	private RundeckExecution.ExecutionStatus status = null;
      +38  	
      +39  	private Long lastModified;
      +40  	
      +41  	private Long execDuration;
      +42  	
      +43  	private Float percentLoaded;
      +44  	
      +45  	private int totalSize;
      +46  	
      +47  	List<RundeckOutputEntry> logEntries = null;
      +48  
      +49  	public Long getExecutionId() {
      +50  		return executionId;
      +51  	}
      +52  
      +53  	public void setExecutionId(Long executionId) {
      +54  		this.executionId = executionId;
      +55  	}
      +56  
      +57  	/*public String getMessage() {
      +58  		return message;
      +59  	}
      +60  
      +61  	public void setMessage(String message) {
      +62  		this.message = message;
      +63  	}
      +64  
      +65  	public String getError() {
      +66  		return error;
      +67  	}
      +68  
      +69  	public void setError(String error) {
      +70  		this.error = error;
      +71  	}*/
      +72  
      +73  	public Boolean isUnmodified() {
      +74  		return unmodified;
      +75  	}
      +76  
      +77  	public void setUnmodified(Boolean unmodified) {
      +78  		this.unmodified = unmodified;
      +79  	}
      +80  
      +81  	public Boolean isEmpty() {
      +82  		return empty;
      +83  	}
      +84  
      +85  	public void setEmpty(Boolean empty) {
      +86  		this.empty = empty;
      +87  	}
      +88  
      +89  	public int getOffset() {
      +90  		return offset;
      +91  	}
      +92  
      +93  	public void setOffset(int offset) {
      +94  		this.offset = offset;
      +95  	}
      +96  
      +97  	public Boolean isCompleted() {
      +98  		return completed;
      +99  	}
      +100 
      +101 	public void setCompleted(Boolean completed) {
      +102 		this.completed = completed;
      +103 	}
      +104 
      +105 	public Boolean isExecCompleted() {
      +106 		return execCompleted;
      +107 	}
      +108 
      +109 	public void setExecCompleted(Boolean execCompleted) {
      +110 		this.execCompleted = execCompleted;
      +111 	}
      +112 
      +113 	public Boolean isHasFailedNodes() {
      +114 		return hasFailedNodes;
      +115 	}
      +116 
      +117 	public void setHasFailedNodes(Boolean hasFailedNodes) {
      +118 		this.hasFailedNodes = hasFailedNodes;
      +119 	}
      +120 
      +121 	public RundeckExecution.ExecutionStatus getStatus() {
      +122 		return status;
      +123 	}
      +124 
      +125 	public void setStatus(RundeckExecution.ExecutionStatus status) {
      +126 		this.status = status;
      +127 	}
      +128 
      +129 	public Long getLastModified() {
      +130 		return lastModified;
      +131 	}
      +132 
      +133 	public void setLastModified(Long lastModified) {
      +134 		this.lastModified = lastModified;
      +135 	}
      +136 
      +137 	public Long getExecDuration() {
      +138 		return execDuration;
      +139 	}
      +140 
      +141 	public void setExecDuration(Long execDuration) {
      +142 		this.execDuration = execDuration;
      +143 	}
      +144 
      +145 	public Float getPercentLoaded() {
      +146 		return percentLoaded;
      +147 	}
      +148 
      +149 	public void setPercentLoaded(Float percentLoaded) {
      +150 		this.percentLoaded = percentLoaded;
      +151 	}
      +152 
      +153 	public int getTotalSize() {
      +154 		return totalSize;
      +155 	}
      +156 
      +157 	public void setTotalSize(int totalSize) {
      +158 		this.totalSize = totalSize;
      +159 	}
      +160 
      +161 	public List<RundeckOutputEntry> getLogEntries() {
      +162 		return logEntries;
      +163 	}
      +164 
      +165 	public void setLogEntries(List<RundeckOutputEntry> logEntries) {
      +166 		this.logEntries = logEntries;
      +167 	}
      +168 	
      +169 	public void addLogEntry(RundeckOutputEntry entry){
      +170 		if(logEntries == null){
      +171 			logEntries = new ArrayList<RundeckOutputEntry>();
      +172 		}
      +173 		logEntries.add(entry);
      +174 	}
      +175 
      +176     @Override
      +177     public String toString() {
      +178         return "RundeckOutput [executionId=" + executionId + /*", message=" + message + 
      +179         	", error=" + error +*/ ", unmodified=" + unmodified + ", empty=" + empty + 
      +180         	", offset=" + offset + ", completed=" + completed +
      +181         	", execCompleted=" + execCompleted + ", hasFailedNodes=" + hasFailedNodes +
      +182         	", status=" + status + ", lastModified=" + lastModified +
      +183         	", execDuration=" + execDuration + ", percentLoaded=" + percentLoaded +
      +184         	", totalSize=" + totalSize + "]";
      +185     }
      +186 
      +187     @Override
      +188     public int hashCode() {
      +189         final int prime = 31;
      +190         int result = 1;
      +191         result = prime * result + ((executionId == null) ? 0 : executionId.hashCode());
      +192        // result = prime * result + ((message == null) ? 0 : message.hashCode());
      +193        // result = prime * result + ((error == null) ? 0 : error.hashCode());
      +194         result = prime * result + ((unmodified == null) ? 0 : unmodified.hashCode());
      +195         result = prime * result + ((empty == null) ? 0 : empty.hashCode());
      +196         result = prime * result + offset;
      +197         result = prime * result + ((completed == null) ? 0 : completed.hashCode());
      +198         result = prime * result + ((execCompleted == null) ? 0 : execCompleted.hashCode());
      +199         result = prime * result + ((hasFailedNodes == null) ? 0 : hasFailedNodes.hashCode());
      +200         result = prime * result + ((status == null) ? 0 : status.hashCode());
      +201         result = prime * result + ((lastModified == null) ? 0 : lastModified.hashCode());
      +202         result = prime * result + ((execDuration == null) ? 0 : execDuration.hashCode());
      +203         result = prime * result + ((percentLoaded == null) ? 0 : percentLoaded.hashCode());
      +204         result = prime * result + totalSize;
      +205         result = prime * result + ((logEntries == null) ? 0 : logEntries.hashCode());
      +206         return result;
      +207     }
      +208 
      +209 
      +210     @Override
      +211     public boolean equals(Object obj) {
      +212         if (this == obj)
      +213             return true;
      +214         if (obj == null)
      +215             return false;
      +216         if (getClass() != obj.getClass())
      +217             return false;
      +218         RundeckOutput other = (RundeckOutput) obj;
      +219         if (executionId == null) {
      +220             if (other.executionId != null)
      +221                 return false;
      +222         } else if (!executionId.equals(other.executionId))
      +223             return false;
      +224 /*        if (message == null) {
      +225             if (other.message != null)
      +226                 return false;
      +227         } else if (!message.equals(other.message))
      +228             return false;
      +229         if (error == null) {
      +230             if (other.error != null)
      +231                 return false;
      +232         } else if (!error.equals(other.error))
      +233             return false;
      +234 */
      +235         if (unmodified == null) {
      +236             if (other.unmodified != null)
      +237                 return false;
      +238         } else if (!unmodified.equals(other.unmodified))
      +239             return false;
      +240         if (empty == null) {
      +241             if (other.empty != null)
      +242                 return false;
      +243         } else if (!empty.equals(other.empty))
      +244             return false;
      +245         if (offset != other.offset)
      +246             return false;
      +247         if (completed == null) {
      +248             if (other.completed != null)
      +249                 return false;
      +250         } else if (!completed.equals(other.completed))
      +251             return false;
      +252         if (execCompleted == null) {
      +253             if (other.execCompleted != null)
      +254                 return false;
      +255         } else if (!execCompleted.equals(other.execCompleted))
      +256             return false;
      +257         if (hasFailedNodes == null) {
      +258             if (other.hasFailedNodes != null)
      +259                 return false;
      +260         } else if (!hasFailedNodes.equals(other.hasFailedNodes))
      +261             return false;
      +262         if (status == null) {
      +263             if (other.status != null)
      +264                 return false;
      +265         } else if (!status.equals(other.status))
      +266             return false;
      +267         if (lastModified == null) {
      +268             if (other.lastModified != null)
      +269                 return false;
      +270         } else if (!lastModified.equals(other.lastModified))
      +271             return false;
      +272         if (execDuration == null) {
      +273             if (other.execDuration != null)
      +274                 return false;
      +275         } else if (!execDuration.equals(other.execDuration))
      +276             return false;
      +277         if (percentLoaded == null) {
      +278             if (other.percentLoaded != null)
      +279                 return false;
      +280         } else if (!percentLoaded.equals(other.percentLoaded))
      +281             return false;
      +282         if (totalSize != other.totalSize)
      +283             return false;
      +284         if (logEntries == null) {
      +285             if (other.logEntries != null)
      +286                 return false;
      +287         } else if (!logEntries.equals(other.logEntries))
      +288             return false;
      +289         return true;
      +290     }
      +291 	
      +292 }
      +
      +
      + + diff --git a/xref/org/rundeck/api/domain/RundeckOutputEntry.html b/xref/org/rundeck/api/domain/RundeckOutputEntry.html new file mode 100644 index 0000000..1fc9363 --- /dev/null +++ b/xref/org/rundeck/api/domain/RundeckOutputEntry.html @@ -0,0 +1,160 @@ + + + + +RundeckOutputEntry xref + + + +
      +
      +1   package org.rundeck.api.domain;
      +2   
      +3   import java.io.Serializable;
      +4   
      +5   /**
      +6    * Represents a RunDeck output entry
      +7    * 
      +8    */
      +9   public class RundeckOutputEntry implements Serializable {
      +10  
      +11  	private static final long serialVersionUID = 1L;
      +12  
      +13  	private String time = null;
      +14  	
      +15  	private RundeckLogLevel level = null;
      +16  	
      +17  	private String message = null;
      +18  	
      +19  	private String user = null;
      +20  	
      +21  	private String command = null;
      +22  	
      +23  	private String node = null;
      +24  
      +25  
      +26  
      +27  	public String getTime() {
      +28  		return time;
      +29  	}
      +30  
      +31  	public void setTime(String time) {
      +32  		this.time = time;
      +33  	}
      +34  
      +35  	public RundeckLogLevel getLevel() {
      +36  		return level;
      +37  	}
      +38  
      +39  	public void setLevel(RundeckLogLevel level) {
      +40  		this.level = level;
      +41  	}
      +42  
      +43  	public String getMessage() {
      +44  		return message;
      +45  	}
      +46  
      +47  	public void setMessage(String message) {
      +48  		this.message = message;
      +49  	}
      +50  
      +51  	public String getUser() {
      +52  		return user;
      +53  	}
      +54  
      +55  	public void setUser(String user) {
      +56  		this.user = user;
      +57  	}
      +58  
      +59  	public String getCommand() {
      +60  		return command;
      +61  	}
      +62  
      +63  	public void setCommand(String command) {
      +64  		this.command = command;
      +65  	}
      +66  
      +67  	public String getNode() {
      +68  		return node;
      +69  	}
      +70  
      +71  	public void setNode(String node) {
      +72  		this.node = node;
      +73  	}
      +74  
      +75  
      +76  
      +77      @Override
      +78      public String toString() {
      +79          return "RundeckOutputEntry [time=" + time + ", level=" + level + 
      +80          	", message=" + message + ", user=" + user + ", command=" + 
      +81          	command + ", node=" + node + "]";
      +82      }
      +83  
      +84      @Override
      +85      public int hashCode() {
      +86          final int prime = 31;
      +87          int result = 1;
      +88          result = prime * result + ((time == null) ? 0 : time.hashCode());
      +89          result = prime * result + ((level == null) ? 0 : level.hashCode());
      +90          result = prime * result + ((message == null) ? 0 : message.hashCode());
      +91          result = prime * result + ((user == null) ? 0 : user.hashCode());
      +92          result = prime * result + ((command == null) ? 0 : command.hashCode());
      +93          result = prime * result + ((node == null) ? 0 : node.hashCode());
      +94          return result;
      +95      }
      +96  
      +97  
      +98      @Override
      +99      public boolean equals(Object obj) {
      +100         if (this == obj)
      +101             return true;
      +102         if (obj == null)
      +103             return false;
      +104         if (getClass() != obj.getClass())
      +105             return false;
      +106         RundeckOutputEntry other = (RundeckOutputEntry) obj;
      +107         if (time == null) {
      +108             if (other.time != null)
      +109                 return false;
      +110         } else if (!time.equals(other.time))
      +111             return false;
      +112         if (level == null) {
      +113             if (other.level != null)
      +114                 return false;
      +115         } else if (!level.equals(other.level))
      +116             return false;
      +117         if (message == null) {
      +118             if (other.message != null)
      +119                 return false;
      +120         } else if (!message.equals(other.message))
      +121             return false;
      +122         if (user == null) {
      +123             if (other.user != null)
      +124                 return false;
      +125         } else if (!user.equals(other.user))
      +126             return false;
      +127         if (command == null) {
      +128             if (other.command != null)
      +129                 return false;
      +130         } else if (!command.equals(other.command))
      +131             return false;
      +132         if (node == null) {
      +133             if (other.node != null)
      +134                 return false;
      +135         } else if (!node.equals(other.node))
      +136             return false;
      +137         return true;
      +138     }
      +139 
      +140 
      +141     public static enum RundeckLogLevel {
      +142         SEVERE, WARNING, INFO, CONFIG, FINEST;
      +143     }
      +144 
      +145 
      +146 }
      +
      +
      + + diff --git a/xref/org/rundeck/api/domain/package-frame.html b/xref/org/rundeck/api/domain/package-frame.html index ae4bfb3..9b4bdb0 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 2.1-SNAPSHOT Reference Package org.rundeck.api.domain + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.domain @@ -41,15 +41,30 @@
    • RundeckJob +
    • +
    • + RundeckJobDelete +
    • +
    • + RundeckJobDeleteBulk
    • RundeckJobsImportMethod
    • RundeckJobsImportResult +
    • +
    • + RundeckLogLevel
    • RundeckNode +
    • +
    • + RundeckOutput +
    • +
    • + RundeckOutputEntry
    • RundeckProject diff --git a/xref/org/rundeck/api/domain/package-summary.html b/xref/org/rundeck/api/domain/package-summary.html index 02a0e23..89b30b5 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 2.1-SNAPSHOT Reference Package org.rundeck.api.domain + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.domain @@ -79,6 +79,16 @@
    • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      RundeckJob
      + RundeckJobDelete +
      + RundeckJobDeleteBulk +
      @@ -89,11 +99,26 @@ RundeckJobsImportResult
      + RundeckLogLevel +
      RundeckNode
      + RundeckOutput +
      + RundeckOutputEntry +
      @@ -127,6 +152,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref/org/rundeck/api/package-frame.html b/xref/org/rundeck/api/package-frame.html index 6b1070b..cbc277a 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 2.1-SNAPSHOT Reference Package org.rundeck.api + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api @@ -20,6 +20,12 @@
    • ApiPathBuilder +
    • +
    • + BuildsParameters +
    • +
    • + ExecutionQueryParameters
    • FileType @@ -29,6 +35,9 @@
    • OptionsBuilder +
    • +
    • + QueryParameterBuilder
    • RundeckApiAuthException diff --git a/xref/org/rundeck/api/package-summary.html b/xref/org/rundeck/api/package-summary.html index ab07e38..b1261b9 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 2.1-SNAPSHOT Reference Package org.rundeck.api + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api @@ -44,6 +44,16 @@
    • ApiPathBuilder
      + BuildsParameters +
      + ExecutionQueryParameters +
      @@ -59,6 +69,11 @@ OptionsBuilder
      + QueryParameterBuilder +
      @@ -107,6 +122,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref/org/rundeck/api/parser/BulkDeleteParser.html b/xref/org/rundeck/api/parser/BulkDeleteParser.html new file mode 100644 index 0000000..c31a25b --- /dev/null +++ b/xref/org/rundeck/api/parser/BulkDeleteParser.html @@ -0,0 +1,94 @@ + + + + +BulkDeleteParser xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * BulkDeleteParser.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 10/1/12 3:55 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.parser;
      +26  
      +27  import org.apache.commons.lang.StringUtils;
      +28  import org.dom4j.Element;
      +29  import org.dom4j.Node;
      +30  import org.rundeck.api.domain.RundeckJobDelete;
      +31  import org.rundeck.api.domain.RundeckJobDeleteBulk;
      +32  
      +33  import java.util.*;
      +34  
      +35  
      +36  /**
      +37   * BulkDeleteParser is ...
      +38   *
      +39   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +40   */
      +41  public class BulkDeleteParser implements XmlNodeParser<RundeckJobDeleteBulk> {
      +42      private String xpath;
      +43  
      +44      public BulkDeleteParser(String xpath) {
      +45          this.xpath = xpath;
      +46      }
      +47  
      +48      public BulkDeleteParser() {
      +49      }
      +50  
      +51      @Override
      +52      public RundeckJobDeleteBulk parseXmlNode(Node node) {
      +53          Node subnode = xpath != null ? node.selectSingleNode(xpath) : node;
      +54          final ArrayList<RundeckJobDelete> deletes = new ArrayList<RundeckJobDelete>();
      +55          final List results = subnode.selectNodes("(succeeded|failed)/deleteJobResult");
      +56          final DeleteParser parser = new DeleteParser();
      +57          if (null != results && results.size() > 0) {
      +58              for (final Object o : results) {
      +59                  deletes.add(parser.parseXmlNode((Node) o));
      +60              }
      +61          }
      +62  
      +63          final String requestcount = StringUtils.trimToNull(subnode.valueOf("@requestCount"));
      +64          final String allsuccessString = StringUtils.trimToNull(subnode.valueOf("@allsuccessful"));
      +65          int count = 0;
      +66          boolean allsuccess = false;
      +67          if (null != requestcount) {
      +68              try {
      +69                  count = Integer.parseInt(requestcount);
      +70              } catch (NumberFormatException e) {
      +71  
      +72              }
      +73          }
      +74          if (null != allsuccessString) {
      +75              allsuccess = Boolean.parseBoolean(allsuccessString);
      +76          }
      +77  
      +78          return new RundeckJobDeleteBulk(deletes, count, allsuccess);
      +79      }
      +80  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/parser/DeleteParser.html b/xref/org/rundeck/api/parser/DeleteParser.html new file mode 100644 index 0000000..90f7a99 --- /dev/null +++ b/xref/org/rundeck/api/parser/DeleteParser.html @@ -0,0 +1,77 @@ + + + + +DeleteParser xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * DeleteParser.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 10/1/12 3:52 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.parser;
      +26  
      +27  import org.apache.commons.lang.StringUtils;
      +28  import org.dom4j.Element;
      +29  import org.dom4j.Node;
      +30  import org.rundeck.api.domain.RundeckJobDelete;
      +31  
      +32  import java.util.*;
      +33  
      +34  
      +35  /**
      +36   * DeleteParser is ...
      +37   *
      +38   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +39   */
      +40  public class DeleteParser implements XmlNodeParser<RundeckJobDelete> {
      +41      private String xpath;
      +42  
      +43      public DeleteParser(String xpath) {
      +44          this.xpath = xpath;
      +45      }
      +46  
      +47      public DeleteParser() {
      +48      }
      +49  
      +50      @Override
      +51      public RundeckJobDelete parseXmlNode(Node node) {
      +52          Node resultNode = xpath != null ? node.selectSingleNode(xpath) : node;
      +53  
      +54          final RundeckJobDelete delete = new RundeckJobDelete();
      +55          delete.setError(StringUtils.trimToNull(resultNode.valueOf("error")));
      +56          delete.setErrorCode(StringUtils.trimToNull(resultNode.valueOf("@errorCode")));
      +57          delete.setId(StringUtils.trimToNull(resultNode.valueOf("@id")));
      +58          delete.setMessage(StringUtils.trimToNull(resultNode.valueOf("message")));
      +59          delete.setSuccessful(null == delete.getError() && null == delete.getErrorCode());
      +60  
      +61          return delete;
      +62      }
      +63  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/parser/ExecutionParser.html b/xref/org/rundeck/api/parser/ExecutionParser.html index ca68a8a..967ad2e 100644 --- a/xref/org/rundeck/api/parser/ExecutionParser.html +++ b/xref/org/rundeck/api/parser/ExecutionParser.html @@ -67,27 +67,28 @@ 57 execution.setStatus(null); 58 } 59 execution.setDescription(StringUtils.trimToNull(execNode.valueOf("description"))); -60 execution.setStartedBy(StringUtils.trimToNull(execNode.valueOf("user"))); -61 execution.setAbortedBy(StringUtils.trimToNull(execNode.valueOf("abortedby"))); -62 String startedAt = StringUtils.trimToNull(execNode.valueOf("date-started/@unixtime")); -63 if (startedAt != null) { -64 execution.setStartedAt(new Date(Long.valueOf(startedAt))); -65 } -66 String endedAt = StringUtils.trimToNull(execNode.valueOf("date-ended/@unixtime")); -67 if (endedAt != null) { -68 execution.setEndedAt(new Date(Long.valueOf(endedAt))); -69 } -70 -71 Node jobNode = execNode.selectSingleNode("job"); -72 if (jobNode != null) { -73 RundeckJob job = new JobParser().parseXmlNode(jobNode); -74 execution.setJob(job); -75 } -76 -77 return execution; -78 } -79 -80 } +60 execution.setArgstring(StringUtils.trimToNull(execNode.valueOf("argstring"))); +61 execution.setStartedBy(StringUtils.trimToNull(execNode.valueOf("user"))); +62 execution.setAbortedBy(StringUtils.trimToNull(execNode.valueOf("abortedby"))); +63 String startedAt = StringUtils.trimToNull(execNode.valueOf("date-started/@unixtime")); +64 if (startedAt != null) { +65 execution.setStartedAt(new Date(Long.valueOf(startedAt))); +66 } +67 String endedAt = StringUtils.trimToNull(execNode.valueOf("date-ended/@unixtime")); +68 if (endedAt != null) { +69 execution.setEndedAt(new Date(Long.valueOf(endedAt))); +70 } +71 +72 Node jobNode = execNode.selectSingleNode("job"); +73 if (jobNode != null) { +74 RundeckJob job = new JobParser().parseXmlNode(jobNode); +75 execution.setJob(job); +76 } +77 +78 return execution; +79 } +80 +81 }
      diff --git a/xref/org/rundeck/api/parser/JobParser.html b/xref/org/rundeck/api/parser/JobParser.html index 1ebcb85..49d70a8 100644 --- a/xref/org/rundeck/api/parser/JobParser.html +++ b/xref/org/rundeck/api/parser/JobParser.html @@ -68,18 +68,23 @@ 58 } 59 job.setId(jobId); 60 -61 // project is either a nested element of context, or just a child element -62 Node contextNode = jobNode.selectSingleNode("context"); -63 if (contextNode != null) { -64 job.setProject(StringUtils.trimToNull(contextNode.valueOf("project"))); -65 } else { -66 job.setProject(StringUtils.trimToNull(jobNode.valueOf("project"))); -67 } -68 -69 return job; -70 } -71 -72 } +61 String averageDuration = StringUtils.trimToNull(jobNode.valueOf("@averageDuration")); +62 if (averageDuration != null) { +63 job.setAverageDuration(Long.valueOf(averageDuration)); +64 } +65 +66 // project is either a nested element of context, or just a child element +67 Node contextNode = jobNode.selectSingleNode("context"); +68 if (contextNode != null) { +69 job.setProject(StringUtils.trimToNull(contextNode.valueOf("project"))); +70 } else { +71 job.setProject(StringUtils.trimToNull(jobNode.valueOf("project"))); +72 } +73 +74 return job; +75 } +76 +77 }
      diff --git a/xref/org/rundeck/api/parser/OutputEntryParser.html b/xref/org/rundeck/api/parser/OutputEntryParser.html new file mode 100644 index 0000000..b7bb196 --- /dev/null +++ b/xref/org/rundeck/api/parser/OutputEntryParser.html @@ -0,0 +1,61 @@ + + + + +OutputEntryParser xref + + + +
      +
      +1   package org.rundeck.api.parser;
      +2   
      +3   import org.apache.commons.lang.StringUtils;
      +4   import org.dom4j.Node;
      +5   
      +6   import org.rundeck.api.domain.RundeckOutputEntry;
      +7   import org.rundeck.api.domain.RundeckOutputEntry.RundeckLogLevel;
      +8   
      +9   public class OutputEntryParser implements XmlNodeParser<RundeckOutputEntry> {
      +10  
      +11  
      +12      private String xpath;
      +13  
      +14      public OutputEntryParser() {
      +15          super();
      +16      }
      +17  
      +18      /**
      +19       * @param xpath of the event element if it is not the root node
      +20       */
      +21      public OutputEntryParser(String xpath) {
      +22          super();
      +23          this.xpath = xpath;
      +24      }
      +25  
      +26      @Override
      +27      public RundeckOutputEntry parseXmlNode(Node node) {
      +28          Node entryNode = xpath != null ? node.selectSingleNode(xpath) : node;
      +29  
      +30          RundeckOutputEntry outputEntry = new RundeckOutputEntry();
      +31          
      +32          outputEntry.setTime(StringUtils.trimToNull(entryNode.valueOf("@time")));
      +33          try {
      +34      		outputEntry.setLevel(RundeckLogLevel.valueOf(StringUtils.upperCase(entryNode.valueOf("@level"))));
      +35          } catch (IllegalArgumentException e) {
      +36              outputEntry.setLevel(null);
      +37          }
      +38  
      +39          outputEntry.setUser(StringUtils.trimToNull(entryNode.valueOf("@user")));
      +40          outputEntry.setCommand(StringUtils.trimToNull(entryNode.valueOf("@command")));
      +41          outputEntry.setNode(StringUtils.trimToNull(entryNode.valueOf("@node")));
      +42          outputEntry.setMessage(StringUtils.trimToNull(entryNode.getStringValue()));
      +43          
      +44          return outputEntry;
      +45      }
      +46  
      +47  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/parser/OutputParser.html b/xref/org/rundeck/api/parser/OutputParser.html new file mode 100644 index 0000000..d69c1d0 --- /dev/null +++ b/xref/org/rundeck/api/parser/OutputParser.html @@ -0,0 +1,115 @@ + + + + +OutputParser xref + + + +
      +
      +1   package org.rundeck.api.parser;
      +2   
      +3   import java.util.List;
      +4   import org.apache.commons.lang.StringUtils;
      +5   import org.dom4j.Node;
      +6   
      +7   import org.rundeck.api.domain.RundeckOutput;
      +8   import org.rundeck.api.domain.RundeckOutputEntry;
      +9   import org.rundeck.api.domain.RundeckExecution;
      +10  import org.rundeck.api.domain.RundeckExecution.ExecutionStatus;
      +11  
      +12  
      +13  public class OutputParser implements XmlNodeParser<RundeckOutput> {
      +14  
      +15  
      +16      private String xpath;
      +17  
      +18      public OutputParser() {
      +19          super();
      +20      }
      +21  
      +22      /**
      +23       * @param xpath of the event element if it is not the root node
      +24       */
      +25      public OutputParser(String xpath) {
      +26          super();
      +27          this.xpath = xpath;
      +28      }
      +29  
      +30      @Override
      +31      public RundeckOutput parseXmlNode(Node node) {
      +32          Node entryNode = xpath != null ? node.selectSingleNode(xpath) : node;
      +33  
      +34          RundeckOutput output = new RundeckOutput();
      +35          
      +36         	//output.setMessage(StringUtils.trimToNull(entryNode.valueOf("message")));
      +37         	//output.setError(StringUtils.trimToNull(entryNode.valueOf("error")));
      +38  
      +39  
      +40          try{
      +41          	output.setExecutionId(Long.valueOf(entryNode.valueOf("id")));
      +42          } catch (NumberFormatException e) {
      +43              output.setExecutionId(null);
      +44          }
      +45          
      +46          try{
      +47  	        output.setOffset(Integer.valueOf(entryNode.valueOf("offset")));
      +48          } catch (NumberFormatException e) {
      +49              output.setOffset(-1);
      +50          }
      +51          
      +52  	    output.setCompleted(Boolean.valueOf(entryNode.valueOf("completed")));
      +53  	    output.setExecCompleted(Boolean.valueOf(entryNode.valueOf("execCompleted")));
      +54  	    output.setHasFailedNodes(Boolean.valueOf(entryNode.valueOf("hasFailedNodes")));
      +55         
      +56          try {
      +57      		output.setStatus(RundeckExecution.ExecutionStatus.valueOf(StringUtils.upperCase(entryNode.valueOf("execState"))));
      +58          } catch (IllegalArgumentException e) {
      +59              output.setStatus(null);
      +60          }
      +61  
      +62          try{
      +63          	output.setLastModified(Long.valueOf(entryNode.valueOf("lastModified")));
      +64          } catch (NumberFormatException e) {
      +65              output.setLastModified(null);
      +66          }
      +67  
      +68          try{
      +69          	output.setExecDuration(Long.valueOf(entryNode.valueOf("execDuration")));
      +70          } catch (NumberFormatException e) {
      +71              output.setExecDuration(null);
      +72          }
      +73  
      +74          try{
      +75          	output.setPercentLoaded(Float.valueOf(entryNode.valueOf("percentLoaded")));
      +76          } catch (NumberFormatException e) {
      +77              output.setPercentLoaded(null);
      +78          }
      +79  
      +80          try{
      +81  	        output.setTotalSize(Integer.valueOf(entryNode.valueOf("totalSize")));
      +82          } catch (NumberFormatException e) {
      +83              output.setTotalSize(-1);
      +84          }
      +85          
      +86          Node entriesListNode = entryNode.selectSingleNode("entries");
      +87          
      +88          if(entriesListNode != null){
      +89          	@SuppressWarnings("unchecked")
      +90          	List<Node> entries = entriesListNode.selectNodes("entry");
      +91          	OutputEntryParser entryParser = new OutputEntryParser();
      +92  
      +93          	for (Node logEntryNode : entries) {
      +94              	RundeckOutputEntry outputEntry = entryParser.parseXmlNode(logEntryNode);
      +95              	output.addLogEntry(outputEntry);
      +96          	}
      +97          }
      +98          return output;
      +99      }
      +100 
      +101 }
      +
      +
      + + diff --git a/xref/org/rundeck/api/parser/PagedResultParser.html b/xref/org/rundeck/api/parser/PagedResultParser.html new file mode 100644 index 0000000..84c0db1 --- /dev/null +++ b/xref/org/rundeck/api/parser/PagedResultParser.html @@ -0,0 +1,130 @@ + + + + +PagedResultParser xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * PagedResultParser.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 9/28/12 10:37 AM
      +23  * 
      +24  */
      +25  package org.rundeck.api.parser;
      +26  
      +27  import org.dom4j.Element;
      +28  import org.dom4j.Node;
      +29  import org.rundeck.api.util.PagedResults;
      +30  
      +31  import java.util.*;
      +32  
      +33  
      +34  /**
      +35   * PagedResultParser extracts paging data from an xpath node, and includes the List result from a ListParser
      +36   *
      +37   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +38   */
      +39  public class PagedResultParser<T> implements XmlNodeParser<PagedResults<T>> {
      +40      ListParser<T> itemParser;
      +41      String xpath;
      +42  
      +43      /**
      +44       * Create a PagedResultParser
      +45       *
      +46       * @param itemParser the list parser
      +47       * @param xpath      xpath for list container containing paging attributes
      +48       */
      +49      public PagedResultParser(ListParser<T> itemParser, String xpath) {
      +50          this.itemParser = itemParser;
      +51          this.xpath = xpath;
      +52      }
      +53  
      +54      @Override
      +55      public PagedResults<T> parseXmlNode(Node node) {
      +56          Node pagedNodeContainer = node.selectSingleNode(xpath);
      +57  
      +58          Element el = (Element) pagedNodeContainer;
      +59          final int max = integerAttribute(el, "max", -1);
      +60          final int offset = integerAttribute(el, "offset", -1);
      +61          final int total = integerAttribute(el, "total", -1);
      +62          final int count = integerAttribute(el, "count", -1);
      +63  
      +64          final List<T> ts = itemParser.parseXmlNode(pagedNodeContainer);
      +65  
      +66  
      +67          return new PagedResults<T>() {
      +68              @Override
      +69              public int getMax() {
      +70                  return max;
      +71              }
      +72  
      +73              @Override
      +74              public int getOffset() {
      +75                  return offset;
      +76              }
      +77  
      +78              @Override
      +79              public int getTotal() {
      +80                  return total;
      +81              }
      +82  
      +83              @Override
      +84              public List<T> getResults() {
      +85                  return ts;
      +86              }
      +87  
      +88              @Override
      +89              public int getCount() {
      +90                  return count;
      +91              }
      +92  
      +93              @Override
      +94              public Iterator<T> iterator() {
      +95                  return ts.iterator();
      +96              }
      +97          };
      +98      }
      +99  
      +100     /**
      +101      * Return an integer value of an attribute of an element, or a default value if it is not found or not an integer.
      +102      *
      +103      * @param el        the element
      +104      * @param attribute attribute name
      +105      * @param defValue  default value to return
      +106      */
      +107     private int integerAttribute(Element el, final String attribute, final int defValue) {
      +108         int parseMax = defValue;
      +109         try {
      +110             final String max1 = null != el.attribute(attribute) ? el.attribute(attribute).getStringValue() : null;
      +111             parseMax = null != max1 ? Integer.parseInt(max1) : defValue;
      +112         } catch (NumberFormatException e) {
      +113         }
      +114         return parseMax;
      +115     }
      +116 }
      +
      +
      + + diff --git a/xref/org/rundeck/api/parser/package-frame.html b/xref/org/rundeck/api/parser/package-frame.html index 50b31f7..716c53e 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 2.1-SNAPSHOT Reference Package org.rundeck.api.parser + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -17,6 +17,12 @@
      • AbortParser +
      • +
      • + BulkDeleteParser +
      • +
      • + DeleteParser
      • EventParser @@ -38,6 +44,15 @@
      • NodeParser +
      • +
      • + OutputEntryParser +
      • +
      • + OutputParser +
      • +
      • + PagedResultParser
      • ParserHelper diff --git a/xref/org/rundeck/api/parser/package-summary.html b/xref/org/rundeck/api/parser/package-summary.html index 0f2c9e7..8bc8bfb 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 2.1-SNAPSHOT Reference Package org.rundeck.api.parser + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -39,6 +39,16 @@
      AbortParser
      + BulkDeleteParser +
      + DeleteParser +
      @@ -74,6 +84,21 @@ NodeParser
      + OutputEntryParser +
      + OutputParser +
      + PagedResultParser +
      @@ -122,6 +147,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref/org/rundeck/api/query/ExecutionQuery.html b/xref/org/rundeck/api/query/ExecutionQuery.html new file mode 100644 index 0000000..0f81615 --- /dev/null +++ b/xref/org/rundeck/api/query/ExecutionQuery.html @@ -0,0 +1,407 @@ + + + + +ExecutionQuery xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * ExecutionQuery.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 9/13/12 3:18 PM
      +23  * 
      +24  */
      +25  package org.rundeck.api.query;
      +26  
      +27  import org.apache.commons.lang.StringUtils;
      +28  import org.rundeck.api.domain.RundeckExecution;
      +29  
      +30  import java.util.*;
      +31  
      +32  
      +33  /**
      +34   * ExecutionQuery contains the query parameters for the /executions api, create one with the {@link Builder} class, e.g.
      +35   * using the {@link #builder()} method.
      +36   *
      +37   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +38   */
      +39  public class ExecutionQuery  {
      +40      private RundeckExecution.ExecutionStatus status;
      +41      private String abortedby;
      +42      private List<String> jobList;
      +43      private List<String> jobIdList;
      +44      private List<String> excludeJobList;
      +45      private List<String> excludeJobIdList;
      +46      private Date begin;
      +47      private Date end;
      +48      private String recent;
      +49      private String job;
      +50      private String jobExact;
      +51      private String excludeJob;
      +52      private String excludeJobExact;
      +53      private String project;
      +54      private String groupPath;
      +55      private String groupPathExact;
      +56      private String excludeGroupPath;
      +57      private String excludeGroupPathExact;
      +58      private String user;
      +59      private String description;
      +60      private Boolean adhoc;
      +61  
      +62      private ExecutionQuery() {
      +63      }
      +64  
      +65      private ExecutionQuery(ExecutionQuery query) {
      +66          this.status = query.getStatus();
      +67          this.abortedby = query.getAbortedby();
      +68          this.jobList = query.getJobList();
      +69          this.jobIdList = query.getJobIdList();
      +70          this.excludeJobList = query.getExcludeJobList();
      +71          this.excludeJobIdList = query.getExcludeJobIdList();
      +72          this.begin = query.getBegin();
      +73          this.end = query.getEnd();
      +74          this.recent = query.getRecent();
      +75          this.job = query.getJob();
      +76          this.jobExact = query.getJobExact();
      +77          this.excludeJob = query.getExcludeJob();
      +78          this.excludeJobExact = query.getExcludeJobExact();
      +79          this.project = query.getProject();
      +80          this.groupPath = query.getGroupPath();
      +81          this.groupPathExact = query.getGroupPathExact();
      +82          this.excludeGroupPath = query.getExcludeGroupPath();
      +83          this.excludeGroupPathExact = query.getExcludeGroupPathExact();
      +84          this.description = query.getDescription();
      +85          this.user = query.getUser();
      +86          this.adhoc = query.getAdhoc();
      +87      }
      +88  
      +89      /**
      +90       * Return true if some parameter is set
      +91       */
      +92      public boolean notBlank() {
      +93          return null!=status ||
      +94                 !StringUtils.isBlank(abortedby) ||
      +95                 !StringUtils.isBlank(recent) ||
      +96                 !StringUtils.isBlank(job) ||
      +97                 !StringUtils.isBlank(jobExact) ||
      +98                 !StringUtils.isBlank(excludeJob) ||
      +99                 !StringUtils.isBlank(excludeJobExact) ||
      +100                !StringUtils.isBlank(groupPath) ||
      +101                !StringUtils.isBlank(groupPathExact) ||
      +102                !StringUtils.isBlank(excludeGroupPath) ||
      +103                !StringUtils.isBlank(excludeGroupPathExact) ||
      +104                !StringUtils.isBlank(description) ||
      +105                //boolean
      +106                (null!=adhoc) ||
      +107                //lists
      +108                (null != jobList && jobList.size() > 0) ||
      +109                (null != jobIdList && jobIdList.size() > 0) ||
      +110                (null != excludeJobList && excludeJobList.size() > 0) ||
      +111                (null != excludeJobIdList && excludeJobIdList.size() > 0) ||
      +112                //dates
      +113                (null != begin ) ||
      +114                (null != end )
      +115             ;
      +116     }
      +117 
      +118     public RundeckExecution.ExecutionStatus getStatus() {
      +119         return status;
      +120     }
      +121 
      +122     public String getAbortedby() {
      +123         return abortedby;
      +124     }
      +125 
      +126     public List<String> getJobList() {
      +127         return jobList;
      +128     }
      +129 
      +130     public List<String> getExcludeJobList() {
      +131         return excludeJobList;
      +132     }
      +133 
      +134     public List<String> getExcludeJobIdList() {
      +135         return excludeJobIdList;
      +136     }
      +137 
      +138     public Date getBegin() {
      +139         return begin;
      +140     }
      +141 
      +142     public Date getEnd() {
      +143         return end;
      +144     }
      +145 
      +146     public String getRecent() {
      +147         return recent;
      +148     }
      +149 
      +150     public String getJob() {
      +151         return job;
      +152     }
      +153 
      +154     public String getJobExact() {
      +155         return jobExact;
      +156     }
      +157 
      +158     public String getProject() {
      +159         return project;
      +160     }
      +161 
      +162     public String getGroupPath() {
      +163         return groupPath;
      +164     }
      +165 
      +166     public String getGroupPathExact() {
      +167         return groupPathExact;
      +168     }
      +169 
      +170     public String getDescription() {
      +171         return description;
      +172     }
      +173 
      +174     public List<String> getJobIdList() {
      +175         return jobIdList;
      +176     }
      +177 
      +178     /**
      +179      * Create a Builder for an ExecutionQuery
      +180      */
      +181     public static Builder builder() {
      +182         return new Builder();
      +183     }
      +184 
      +185     public String getUser() {
      +186         return user;
      +187     }
      +188 
      +189     public Boolean getAdhoc() {
      +190         return adhoc;
      +191     }
      +192 
      +193     public String getExcludeJob() {
      +194         return excludeJob;
      +195     }
      +196 
      +197     public String getExcludeJobExact() {
      +198         return excludeJobExact;
      +199     }
      +200 
      +201     public String getExcludeGroupPath() {
      +202         return excludeGroupPath;
      +203     }
      +204 
      +205     public String getExcludeGroupPathExact() {
      +206         return excludeGroupPathExact;
      +207     }
      +208 
      +209 
      +210     /**
      +211      * Builder for ExecutionQueries
      +212      */
      +213     public static class Builder {
      +214         ExecutionQuery query;
      +215 
      +216         public Builder() {
      +217             query = new ExecutionQuery();
      +218         }
      +219 
      +220         /**
      +221          * Execution status to query
      +222          */
      +223         public Builder status(RundeckExecution.ExecutionStatus status) {
      +224             query.status = status;
      +225             return this;
      +226         }
      +227 
      +228         /**
      +229          * Username
      +230          */
      +231         public Builder abortedby(String abortedby) {
      +232             query.abortedby = abortedby;
      +233             return this;
      +234         }
      +235 
      +236         /**
      +237          * List of job "group/name" to query
      +238          */
      +239         public Builder jobList(List<String> list) {
      +240             query.jobList = list;
      +241             return this;
      +242         }
      +243         /**
      +244          * List of job IDs to query
      +245          */
      +246         public Builder jobIdList(List<String> list) {
      +247             query.jobIdList = list;
      +248             return this;
      +249         }
      +250 
      +251         /**
      +252          * List of job "group/name" to exclude from query
      +253          */
      +254         public Builder excludeJobList(List<String> list) {
      +255             query.excludeJobList = list;
      +256             return this;
      +257         }
      +258 
      +259         /**
      +260          * List of job IDs to exclude from query
      +261          */
      +262         public Builder excludeJobIdList(List<String> list) {
      +263             query.excludeJobIdList = list;
      +264             return this;
      +265         }
      +266 
      +267         /**
      +268          * Start date/time for execution completion time
      +269          */
      +270         public Builder begin(Date begin) {
      +271             query.begin = begin;
      +272             return this;
      +273         }
      +274 
      +275         /**
      +276          * End date/time for execution completion time
      +277          */
      +278         public Builder end(Date end) {
      +279             query.end = end;
      +280             return this;
      +281         }
      +282 
      +283         /**
      +284          * Recent time filter, in the for "XY", where X is a number, and Y
      +285          * is one of: "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year)
      +286          */
      +287         public Builder recent(String recent) {
      +288             query.recent = recent;
      +289             return this;
      +290         }
      +291 
      +292         /**
      +293          * Job name filter, which can match any part of the name
      +294          */
      +295         public Builder job(String job) {
      +296             query.job = job;
      +297             return this;
      +298         }
      +299 
      +300         /**
      +301          * Job exact name filter, much match exactly
      +302          */
      +303         public Builder jobExact(String exact) {
      +304             query.jobExact = exact;
      +305             return this;
      +306         }
      +307         /**
      +308          * Job name filter to exclude, which can match any part of the name
      +309          */
      +310         public Builder excludeJob(String job) {
      +311             query.excludeJob = job;
      +312             return this;
      +313         }
      +314 
      +315         /**
      +316          * Job exact name filter to exclude, much match exactly
      +317          */
      +318         public Builder excludeJobExact(String exact) {
      +319             query.excludeJobExact = exact;
      +320             return this;
      +321         }
      +322 
      +323         /**
      +324          * Project name
      +325          */
      +326         public Builder project(String project) {
      +327             query.project = project;
      +328             return this;
      +329         }
      +330 
      +331         /**
      +332          * Group path or super path, which will include any jobs within the subtree.
      +333          */
      +334         public Builder groupPath(String path) {
      +335             query.groupPath = path;
      +336             return this;
      +337         }
      +338 
      +339         /**
      +340          * Exact group path to include
      +341          */
      +342         public Builder groupPathExact(String exact) {
      +343             query.groupPathExact = exact;
      +344             return this;
      +345         }
      +346         /**
      +347          * Group path or super path, which will exclude any jobs within the subtree.
      +348          */
      +349         public Builder excludeGroupPath(String excludeGroupPath) {
      +350             query.excludeGroupPath = excludeGroupPath;
      +351             return this;
      +352         }
      +353 
      +354         /**
      +355          * Exact group path to exclude
      +356          */
      +357         public Builder excludeGroupPathExact(String excludeGroupPathExact) {
      +358             query.excludeGroupPathExact = excludeGroupPathExact;
      +359             return this;
      +360         }
      +361 
      +362         /**
      +363          * Job description match
      +364          */
      +365         public Builder description(String description) {
      +366             query.description = description;
      +367             return this;
      +368         }
      +369 
      +370         /**
      +371          * Name of username that started the execution
      +372          */
      +373         public Builder user(String user) {
      +374             query.user = user;
      +375             return this;
      +376         }
      +377 
      +378         /**
      +379          * True to query only adhoc executions, false to query only Job executions, null for both
      +380          */
      +381         public Builder adhoc(Boolean adhoc) {
      +382             query.adhoc = adhoc;
      +383             return this;
      +384         }
      +385 
      +386         /**
      +387          * Build the query
      +388          */
      +389         public ExecutionQuery build() {
      +390             return new ExecutionQuery(query);
      +391         }
      +392     }
      +393 }
      +
      +
      + + diff --git a/xref/org/rundeck/api/query/package-frame.html b/xref/org/rundeck/api/query/package-frame.html new file mode 100644 index 0000000..6503c6a --- /dev/null +++ b/xref/org/rundeck/api/query/package-frame.html @@ -0,0 +1,27 @@ + + + + + + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.query + + + + +

      + org.rundeck.api.query +

      + +

      Classes

      + + + + + \ No newline at end of file diff --git a/xref/org/rundeck/api/query/package-summary.html b/xref/org/rundeck/api/query/package-summary.html new file mode 100644 index 0000000..6a6dd79 --- /dev/null +++ b/xref/org/rundeck/api/query/package-summary.html @@ -0,0 +1,72 @@ + + + + + + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.query + + + +
      + +
      +
      + +
      + +

      Package org.rundeck.api.query

      + + + + + + + + + + + + + + + +
      Class Summary
      + Builder +
      + ExecutionQuery +
      + +
      + +
      +
      + +
      +
      + Copyright © 2011-2012. All Rights Reserved. + + \ No newline at end of file diff --git a/xref/org/rundeck/api/util/PagedResults.html b/xref/org/rundeck/api/util/PagedResults.html new file mode 100644 index 0000000..9a2ef6f --- /dev/null +++ b/xref/org/rundeck/api/util/PagedResults.html @@ -0,0 +1,74 @@ + + + + +PagedResults xref + + + +
      +
      +1   /*
      +2    * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
      +3    * 
      +4    * Licensed under the Apache License, Version 2.0 (the "License");
      +5    * you may not use this file except in compliance with the License.
      +6    * You may obtain a copy of the License at
      +7    *
      +8    *     http://www.apache.org/licenses/LICENSE-2.0
      +9    *
      +10   * Unless required by applicable law or agreed to in writing, software
      +11   * distributed under the License is distributed on an "AS IS" BASIS,
      +12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +13   * See the License for the specific language governing permissions and
      +14   * limitations under the License.
      +15   *
      +16   */
      +17  
      +18  /*
      +19  * PagedResults.java
      +20  * 
      +21  * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +22  * Created: 9/28/12 10:32 AM
      +23  * 
      +24  */
      +25  package org.rundeck.api.util;
      +26  
      +27  import java.util.List;
      +28  
      +29  
      +30  /**
      +31   * PagedResults contains a List of a certain type, and paging information.
      +32   *
      +33   * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
      +34   */
      +35  public interface PagedResults<T> extends Iterable<T>{
      +36      /**
      +37       * Max number of items returned in page
      +38       */
      +39      public int getMax();
      +40  
      +41      /**
      +42       * Offset into all items
      +43       */
      +44      public int getOffset();
      +45  
      +46      /**
      +47       * Total items to be paged
      +48       */
      +49      public int getTotal();
      +50  
      +51      /**
      +52       * Number of items available in page
      +53       */
      +54      public int getCount();
      +55  
      +56      /**
      +57       * Results list
      +58       */
      +59      public List<T> getResults();
      +60  }
      +
      +
      + + diff --git a/xref/org/rundeck/api/util/package-frame.html b/xref/org/rundeck/api/util/package-frame.html index 2303ac1..9839b87 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 2.1-SNAPSHOT Reference Package org.rundeck.api.util + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.util @@ -17,6 +17,9 @@
      • AssertUtil +
      • +
      • + PagedResults
      • ParametersUtil diff --git a/xref/org/rundeck/api/util/package-summary.html b/xref/org/rundeck/api/util/package-summary.html index f1509d5..b562e0b 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 2.1-SNAPSHOT Reference Package org.rundeck.api.util + RunDeck API - Java Client 5.0-SNAPSHOT Reference Package org.rundeck.api.util @@ -39,6 +39,11 @@
      AssertUtil
      + PagedResults +
      @@ -67,6 +72,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file diff --git a/xref/overview-frame.html b/xref/overview-frame.html index 8552cec..06be4f9 100644 --- a/xref/overview-frame.html +++ b/xref/overview-frame.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference + RunDeck API - Java Client 5.0-SNAPSHOT Reference @@ -23,6 +23,9 @@
    • org.rundeck.api.parser +
    • +
    • + org.rundeck.api.query
    • org.rundeck.api.util diff --git a/xref/overview-summary.html b/xref/overview-summary.html index e97c087..3ea4bf8 100644 --- a/xref/overview-summary.html +++ b/xref/overview-summary.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 2.1-SNAPSHOT Reference + RunDeck API - Java Client 5.0-SNAPSHOT Reference @@ -24,7 +24,7 @@ -

      RunDeck API - Java Client 2.1-SNAPSHOT Reference

      +

      RunDeck API - Java Client 5.0-SNAPSHOT Reference

      @@ -47,6 +47,11 @@ + + +
      org.rundeck.api.parser
      + org.rundeck.api.query +
      @@ -74,6 +79,6 @@
      - Copyright © 2011. All Rights Reserved. + Copyright © 2011-2012. All Rights Reserved. \ No newline at end of file