From 750b03fa2bf7260d355f3d605cf7cfc1e58c3d26 Mon Sep 17 00:00:00 2001 From: Greg Schueler Date: Wed, 23 Apr 2014 18:02:40 -0700 Subject: [PATCH] Wagon: Deploying site to repository --- apidocs/assets/navtree_data.js | 13 +- apidocs/packages | 1 + apidocs/proof-read.txt | 277 ++ apidocs/reference/classes.html | 167 +- apidocs/reference/current.xml | 1800 +++++++ apidocs/reference/hierarchy.html | 354 ++ apidocs/reference/lists.js | 161 +- .../org/rundeck/api/DefaultJobsImport.html | 4 + .../reference/org/rundeck/api/FileType.html | 4 + .../org/rundeck/api/NodeFiltersBuilder.html | 4 + .../org/rundeck/api/OptionsBuilder.html | 4 + .../reference/org/rundeck/api/RunAdhoc.html | 4 + .../org/rundeck/api/RunAdhocCommand.html | 4 + .../rundeck/api/RunAdhocCommandBuilder.html | 4 + .../org/rundeck/api/RunAdhocScript.html | 4 + .../rundeck/api/RunAdhocScriptBuilder.html | 4 + apidocs/reference/org/rundeck/api/RunJob.html | 4 + .../org/rundeck/api/RunJobBuilder.html | 4 + ...kApiException.RundeckApiAuthException.html | 18 + ...on.RundeckApiHttpContentTypeException.html | 1274 +++++ ...ception.RundeckApiHttpStatusException.html | 1180 +++++ ...ApiException.RundeckApiLoginException.html | 4 + ...ApiException.RundeckApiTokenException.html | 4 + .../org/rundeck/api/RundeckApiException.html | 44 + .../rundeck/api/RundeckClient.Version.html | 49 +- .../org/rundeck/api/RundeckClient.html | 1887 +++++++- .../org/rundeck/api/RundeckClientBuilder.html | 4 + .../org/rundeck/api/RundeckJobsImport.html | 4 + .../rundeck/api/RundeckJobsImportBuilder.html | 4 + .../org/rundeck/api/domain/ArchiveImport.html | 858 ++++ .../rundeck/api/domain/BaseKeyResource.html | 1481 ++++++ .../org/rundeck/api/domain/BaseState.html | 10 + .../api/domain/BaseStorageResource.html | 1560 ++++++ .../rundeck/api/domain/ConfigProperty.html | 1148 +++++ .../org/rundeck/api/domain/KeyResource.html | 746 +++ .../org/rundeck/api/domain/ProjectConfig.html | 1148 +++++ .../api/domain/RundeckAbort.AbortStatus.html | 10 + .../org/rundeck/api/domain/RundeckAbort.html | 10 + .../api/domain/RundeckEvent.EventStatus.html | 10 + .../api/domain/RundeckEvent.NodeSummary.html | 10 + .../org/rundeck/api/domain/RundeckEvent.html | 10 + .../RundeckExecution.ExecutionStatus.html | 10 + .../rundeck/api/domain/RundeckExecution.html | 10 + .../api/domain/RundeckExecutionState.html | 10 + .../rundeck/api/domain/RundeckHistory.html | 10 + .../org/rundeck/api/domain/RundeckJob.html | 10 + .../rundeck/api/domain/RundeckJobDelete.html | 10 + .../api/domain/RundeckJobDeleteBulk.html | 10 + .../api/domain/RundeckJobsImportMethod.html | 10 + .../api/domain/RundeckJobsImportResult.html | 10 + .../domain/RundeckJobsUUIDImportBehavior.html | 10 + .../org/rundeck/api/domain/RundeckNode.html | 10 + .../api/domain/RundeckNodeIdentity.html | 10 + .../org/rundeck/api/domain/RundeckOutput.html | 10 + .../RundeckOutputEntry.RundeckLogLevel.html | 10 + .../api/domain/RundeckOutputEntry.html | 10 + .../rundeck/api/domain/RundeckProject.html | 110 +- .../rundeck/api/domain/RundeckSystemInfo.html | 10 + .../org/rundeck/api/domain/RundeckToken.html | 995 ++++ .../api/domain/RundeckWFExecState.html | 10 + .../rundeck/api/domain/StorageResource.html | 798 +++ .../org/rundeck/api/domain/WorkflowState.html | 10 + .../api/domain/WorkflowStepContextState.html | 10 + .../rundeck/api/domain/WorkflowStepState.html | 10 + .../org/rundeck/api/domain/package-descr.html | 10 + .../rundeck/api/domain/package-summary.html | 70 +- .../api/generator/BaseDocGenerator.html | 897 ++++ .../api/generator/ProjectConfigGenerator.html | 907 ++++ .../ProjectConfigPropertyGenerator.html | 907 ++++ .../api/generator/ProjectGenerator.html | 907 ++++ .../api/generator/XmlDocumentGenerator.html | 584 +++ .../rundeck/api/generator/package-descr.html | 254 + .../api/generator/package-summary.html | 305 ++ .../org/rundeck/api/package-descr.html | 4 + .../org/rundeck/api/package-summary.html | 14 + .../org/rundeck/api/parser/AbortParser.html | 10 + .../api/parser/ArchiveImportParser.html | 911 ++++ .../rundeck/api/parser/BaseStateParser.html | 10 + .../rundeck/api/parser/BaseXpathParser.html | 995 ++++ .../rundeck/api/parser/BulkDeleteParser.html | 10 + .../org/rundeck/api/parser/DeleteParser.html | 10 + .../org/rundeck/api/parser/EventParser.html | 10 + .../rundeck/api/parser/ExecutionParser.html | 10 + .../api/parser/ExecutionStateParser.html | 10 + .../org/rundeck/api/parser/HistoryParser.html | 10 + .../IndexedWorkflowStepStateParser.html | 10 + .../org/rundeck/api/parser/JobParser.html | 10 + .../api/parser/JobsImportResultParser.html | 10 + .../org/rundeck/api/parser/ListParser.html | 10 + .../org/rundeck/api/parser/NodeParser.html | 10 + .../rundeck/api/parser/OutputEntryParser.html | 10 + .../api/parser/OutputEntryParserV5.html | 10 + .../org/rundeck/api/parser/OutputParser.html | 10 + .../rundeck/api/parser/PagedResultParser.html | 10 + .../org/rundeck/api/parser/ParserHelper.html | 10 + .../api/parser/ProjectConfigParser.html | 958 ++++ .../parser/ProjectConfigPropertyParser.html | 1006 ++++ .../org/rundeck/api/parser/ProjectParser.html | 105 + .../rundeck/api/parser/ProjectParserV11.html | 987 ++++ .../api/parser/RundeckTokenParser.html | 911 ++++ .../api/parser/SSHKeyResourceParser.html | 985 ++++ .../api/parser/StorageResourceParser.html | 1027 ++++ .../org/rundeck/api/parser/StringParser.html | 10 + .../rundeck/api/parser/SystemInfoParser.html | 10 + .../api/parser/WorkflowStateParser.html | 10 + .../WorkflowStepContextStateParser.html | 10 + .../api/parser/WorkflowStepStateParser.html | 10 + .../org/rundeck/api/parser/XmlNodeParser.html | 65 +- .../org/rundeck/api/parser/package-descr.html | 10 + .../rundeck/api/parser/package-summary.html | 43 + .../api/query/ExecutionQuery.Builder.html | 2 + .../org/rundeck/api/query/ExecutionQuery.html | 2 + .../org/rundeck/api/query/package-descr.html | 2 + .../rundeck/api/query/package-summary.html | 2 + .../org/rundeck/api/util/AssertUtil.html | 3 + .../api/util/DocumentContentProducer.html | 882 ++++ .../org/rundeck/api/util/PagedResults.html | 3 + .../org/rundeck/api/util/ParametersUtil.html | 3 + .../org/rundeck/api/util/package-descr.html | 3 + .../org/rundeck/api/util/package-summary.html | 7 + apidocs/reference/package-list | 1 + apidocs/reference/packages.html | 13 +- changes-report.html | 10 +- cpd.html | 8 +- dependencies.html | 24 +- dependency-updates-report.html | 10 +- distribution-management.html | 8 +- download.html | 8 +- faq.html | 8 +- findbugs.html | 10 +- groovy.html | 8 +- index.html | 8 +- integration.html | 8 +- issue-tracking.html | 8 +- jruby.html | 8 +- jython.html | 8 +- license.html | 8 +- mail-lists.html | 8 +- plugin-updates-report.html | 10 +- pmd.html | 10 +- pmd.xml | 37 +- project-info.html | 8 +- project-reports.html | 8 +- project-summary.html | 10 +- property-updates-report.html | 10 +- scripting.html | 8 +- source-repository.html | 8 +- status.html | 10 +- taglist.html | 8 +- team-list.html | 8 +- testapidocs/assets/navtree_data.js | 4 +- testapidocs/packages | 1 + testapidocs/proof-read.txt | 74 + testapidocs/reference/classes.html | 32 + testapidocs/reference/current.xml | 500 ++ testapidocs/reference/hierarchy.html | 82 + testapidocs/reference/lists.js | 54 +- .../org/rundeck/api/RundeckClientTest.html | 1550 +++++- .../generator/ProjectConfigGeneratorTest.html | 771 +++ .../api/generator/ProjectGeneratorTest.html | 762 +++ .../rundeck/api/generator/package-descr.html | 243 + .../api/generator/package-summary.html | 275 ++ .../org/rundeck/api/package-descr.html | 2 + .../org/rundeck/api/package-summary.html | 2 + .../rundeck/api/parser/AbortParserTest.html | 5 + .../api/parser/BaseStateParserTest.html | 5 + .../api/parser/BulkDeleteParserTest.html | 5 + .../rundeck/api/parser/DeleteParserTest.html | 5 + .../rundeck/api/parser/EventParserTest.html | 5 + .../api/parser/ExecutionParserTest.html | 5 + .../api/parser/ExecutionStateParserTest.html | 5 + .../rundeck/api/parser/HistoryParserTest.html | 5 + .../IndexedWorkflowStepStateParserTest.html | 5 + .../org/rundeck/api/parser/JobParserTest.html | 5 + .../parser/JobsImportResultParserTest.html | 5 + .../rundeck/api/parser/ListParserTest.html | 5 + .../rundeck/api/parser/NodeParserTest.html | 5 + .../api/parser/OutputEntryParserTest.html | 5 + .../rundeck/api/parser/OutputParserTest.html | 5 + .../rundeck/api/parser/ParserHelperTest.html | 5 + .../api/parser/ProjectConfigParserTest.html | 793 +++ .../ProjectConfigPropertyParserTest.html | 849 ++++ .../rundeck/api/parser/ProjectParserTest.html | 5 + .../api/parser/ProjectParserV11Test.html | 793 +++ .../rundeck/api/parser/StringParserTest.html | 5 + .../api/parser/SystemInfoParserTest.html | 5 + .../api/parser/WorkflowStateParserTest.html | 5 + .../parser/WorkflowStepStateParserTest.html | 5 + .../org/rundeck/api/parser/package-descr.html | 5 + .../rundeck/api/parser/package-summary.html | 23 +- .../rundeck/api/util/ParametersUtilTest.html | 2 + .../org/rundeck/api/util/package-descr.html | 2 + .../org/rundeck/api/util/package-summary.html | 2 + testapidocs/reference/package-list | 1 + testapidocs/reference/packages.html | 11 +- xref-test/allclasses-frame.html | 15 + xref-test/index.html | 2 +- .../org/rundeck/api/RundeckClientTest.html | 2492 ++++++---- .../generator/ProjectConfigGeneratorTest.html | 55 + .../api/generator/ProjectGeneratorTest.html | 39 + .../rundeck/api/generator/package-frame.html | 27 + .../api/generator/package-summary.html | 72 + xref-test/org/rundeck/api/package-frame.html | 2 +- .../org/rundeck/api/package-summary.html | 2 +- .../api/parser/ProjectConfigParserTest.html | 65 + .../ProjectConfigPropertyParserTest.html | 62 + .../api/parser/ProjectParserV11Test.html | 42 + .../org/rundeck/api/parser/package-frame.html | 11 +- .../rundeck/api/parser/package-summary.html | 17 +- .../org/rundeck/api/util/package-frame.html | 2 +- .../org/rundeck/api/util/package-summary.html | 2 +- xref-test/overview-frame.html | 5 +- xref-test/overview-summary.html | 9 +- xref/allclasses-frame.html | 90 + xref/index.html | 2 +- xref/org/rundeck/api/ApiCall.html | 1261 ++--- xref/org/rundeck/api/ApiPathBuilder.html | 730 +-- xref/org/rundeck/api/RundeckApiException.html | 64 +- xref/org/rundeck/api/RundeckClient.html | 4269 +++++++++-------- .../org/rundeck/api/domain/ArchiveImport.html | 52 + .../rundeck/api/domain/BaseKeyResource.html | 72 + .../api/domain/BaseStorageResource.html | 100 + .../rundeck/api/domain/ConfigProperty.html | 82 + xref/org/rundeck/api/domain/KeyResource.html | 37 + .../org/rundeck/api/domain/ProjectConfig.html | 78 + .../rundeck/api/domain/RundeckProject.html | 147 +- xref/org/rundeck/api/domain/RundeckToken.html | 50 + .../rundeck/api/domain/StorageResource.html | 68 + .../org/rundeck/api/domain/package-frame.html | 26 +- .../rundeck/api/domain/package-summary.html | 42 +- .../api/generator/BaseDocGenerator.html | 32 + .../api/generator/ProjectConfigGenerator.html | 48 + .../ProjectConfigPropertyGenerator.html | 42 + .../api/generator/ProjectGenerator.html | 46 + .../api/generator/XmlDocumentGenerator.html | 43 + .../rundeck/api/generator/package-frame.html | 36 + .../api/generator/package-summary.html | 87 + xref/org/rundeck/api/package-frame.html | 26 +- xref/org/rundeck/api/package-summary.html | 42 +- .../api/parser/ArchiveImportParser.html | 50 + .../rundeck/api/parser/BaseXpathParser.html | 43 + .../api/parser/ProjectConfigParser.html | 57 + .../parser/ProjectConfigPropertyParser.html | 55 + .../org/rundeck/api/parser/ProjectParser.html | 7 +- .../rundeck/api/parser/ProjectParserV11.html | 50 + .../api/parser/RundeckTokenParser.html | 47 + .../api/parser/SSHKeyResourceParser.html | 39 + .../api/parser/StorageResourceParser.html | 75 + .../org/rundeck/api/parser/package-frame.html | 26 +- .../rundeck/api/parser/package-summary.html | 42 +- xref/org/rundeck/api/query/package-frame.html | 2 +- .../rundeck/api/query/package-summary.html | 2 +- .../api/util/DocumentContentProducer.html | 52 + xref/org/rundeck/api/util/package-frame.html | 5 +- .../org/rundeck/api/util/package-summary.html | 7 +- xref/overview-frame.html | 5 +- xref/overview-summary.html | 9 +- 257 files changed, 44489 insertions(+), 4208 deletions(-) create mode 100644 apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html create mode 100644 apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.html create mode 100644 apidocs/reference/org/rundeck/api/domain/ArchiveImport.html create mode 100644 apidocs/reference/org/rundeck/api/domain/BaseKeyResource.html create mode 100644 apidocs/reference/org/rundeck/api/domain/BaseStorageResource.html create mode 100644 apidocs/reference/org/rundeck/api/domain/ConfigProperty.html create mode 100644 apidocs/reference/org/rundeck/api/domain/KeyResource.html create mode 100644 apidocs/reference/org/rundeck/api/domain/ProjectConfig.html create mode 100644 apidocs/reference/org/rundeck/api/domain/RundeckToken.html create mode 100644 apidocs/reference/org/rundeck/api/domain/StorageResource.html create mode 100644 apidocs/reference/org/rundeck/api/generator/BaseDocGenerator.html create mode 100644 apidocs/reference/org/rundeck/api/generator/ProjectConfigGenerator.html create mode 100644 apidocs/reference/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html create mode 100644 apidocs/reference/org/rundeck/api/generator/ProjectGenerator.html create mode 100644 apidocs/reference/org/rundeck/api/generator/XmlDocumentGenerator.html create mode 100644 apidocs/reference/org/rundeck/api/generator/package-descr.html create mode 100644 apidocs/reference/org/rundeck/api/generator/package-summary.html create mode 100644 apidocs/reference/org/rundeck/api/parser/ArchiveImportParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/BaseXpathParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/ProjectConfigParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/ProjectConfigPropertyParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/ProjectParserV11.html create mode 100644 apidocs/reference/org/rundeck/api/parser/RundeckTokenParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/SSHKeyResourceParser.html create mode 100644 apidocs/reference/org/rundeck/api/parser/StorageResourceParser.html create mode 100644 apidocs/reference/org/rundeck/api/util/DocumentContentProducer.html create mode 100644 testapidocs/reference/org/rundeck/api/generator/ProjectConfigGeneratorTest.html create mode 100644 testapidocs/reference/org/rundeck/api/generator/ProjectGeneratorTest.html create mode 100644 testapidocs/reference/org/rundeck/api/generator/package-descr.html create mode 100644 testapidocs/reference/org/rundeck/api/generator/package-summary.html create mode 100644 testapidocs/reference/org/rundeck/api/parser/ProjectConfigParserTest.html create mode 100644 testapidocs/reference/org/rundeck/api/parser/ProjectConfigPropertyParserTest.html create mode 100644 testapidocs/reference/org/rundeck/api/parser/ProjectParserV11Test.html create mode 100644 xref-test/org/rundeck/api/generator/ProjectConfigGeneratorTest.html create mode 100644 xref-test/org/rundeck/api/generator/ProjectGeneratorTest.html create mode 100644 xref-test/org/rundeck/api/generator/package-frame.html create mode 100644 xref-test/org/rundeck/api/generator/package-summary.html create mode 100644 xref-test/org/rundeck/api/parser/ProjectConfigParserTest.html create mode 100644 xref-test/org/rundeck/api/parser/ProjectConfigPropertyParserTest.html create mode 100644 xref-test/org/rundeck/api/parser/ProjectParserV11Test.html create mode 100644 xref/org/rundeck/api/domain/ArchiveImport.html create mode 100644 xref/org/rundeck/api/domain/BaseKeyResource.html create mode 100644 xref/org/rundeck/api/domain/BaseStorageResource.html create mode 100644 xref/org/rundeck/api/domain/ConfigProperty.html create mode 100644 xref/org/rundeck/api/domain/KeyResource.html create mode 100644 xref/org/rundeck/api/domain/ProjectConfig.html create mode 100644 xref/org/rundeck/api/domain/RundeckToken.html create mode 100644 xref/org/rundeck/api/domain/StorageResource.html create mode 100644 xref/org/rundeck/api/generator/BaseDocGenerator.html create mode 100644 xref/org/rundeck/api/generator/ProjectConfigGenerator.html create mode 100644 xref/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html create mode 100644 xref/org/rundeck/api/generator/ProjectGenerator.html create mode 100644 xref/org/rundeck/api/generator/XmlDocumentGenerator.html create mode 100644 xref/org/rundeck/api/generator/package-frame.html create mode 100644 xref/org/rundeck/api/generator/package-summary.html create mode 100644 xref/org/rundeck/api/parser/ArchiveImportParser.html create mode 100644 xref/org/rundeck/api/parser/BaseXpathParser.html create mode 100644 xref/org/rundeck/api/parser/ProjectConfigParser.html create mode 100644 xref/org/rundeck/api/parser/ProjectConfigPropertyParser.html create mode 100644 xref/org/rundeck/api/parser/ProjectParserV11.html create mode 100644 xref/org/rundeck/api/parser/RundeckTokenParser.html create mode 100644 xref/org/rundeck/api/parser/SSHKeyResourceParser.html create mode 100644 xref/org/rundeck/api/parser/StorageResourceParser.html create mode 100644 xref/org/rundeck/api/util/DocumentContentProducer.html diff --git a/apidocs/assets/navtree_data.js b/apidocs/assets/navtree_data.js index 2f7f380..585e3e1 100644 --- a/apidocs/assets/navtree_data.js +++ b/apidocs/assets/navtree_data.js @@ -2,19 +2,22 @@ var NAVTREE_DATA = [ [ "org.rundeck.api", "org/rundeck/api/package-summary.html", [ [ "Description", "org/rundeck/api/package-descr.html", null, "" ], [ "Interfaces", null, [ [ "RunAdhoc", "org/rundeck/api/RunAdhoc.html", null, "" ], [ "RunAdhocCommand", "org/rundeck/api/RunAdhocCommand.html", null, "" ], [ "RunAdhocScript", "org/rundeck/api/RunAdhocScript.html", null, "" ], [ "RunJob", "org/rundeck/api/RunJob.html", null, "" ], [ "RundeckJobsImport", "org/rundeck/api/RundeckJobsImport.html", null, "" ] ] , "" ], [ "Classes", null, [ [ "DefaultJobsImport", "org/rundeck/api/DefaultJobsImport.html", null, "" ], [ "NodeFiltersBuilder", "org/rundeck/api/NodeFiltersBuilder.html", null, "" ], [ "OptionsBuilder", "org/rundeck/api/OptionsBuilder.html", null, "" ], [ "RunAdhocCommandBuilder", "org/rundeck/api/RunAdhocCommandBuilder.html", null, "" ], [ "RunAdhocScriptBuilder", "org/rundeck/api/RunAdhocScriptBuilder.html", null, "" ], [ "RunJobBuilder", "org/rundeck/api/RunJobBuilder.html", null, "" ], [ "RundeckClient", "org/rundeck/api/RundeckClient.html", null, "" ], [ "RundeckClientBuilder", "org/rundeck/api/RundeckClientBuilder.html", null, "" ], [ "RundeckJobsImportBuilder", "org/rundeck/api/RundeckJobsImportBuilder.html", null, "" ] ] , "" ], [ "Enums", null, [ [ "FileType", "org/rundeck/api/FileType.html", null, "" ], [ "RundeckClient.Version", "org/rundeck/api/RundeckClient.Version.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, "" ] ] +, "" ], [ "Exceptions", null, [ [ "RundeckApiException", "org/rundeck/api/RundeckApiException.html", null, "" ], [ "RundeckApiException.RundeckApiAuthException", "org/rundeck/api/RundeckApiException.RundeckApiAuthException.html", null, "" ], [ "RundeckApiException.RundeckApiHttpContentTypeException", "org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html", null, "" ], [ "RundeckApiException.RundeckApiHttpStatusException", "org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.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, "" ], [ "Interfaces", null, [ [ "RundeckNodeIdentity", "org/rundeck/api/domain/RundeckNodeIdentity.html", null, "" ] ] -, "" ], [ "Classes", null, [ [ "BaseState", "org/rundeck/api/domain/BaseState.html", 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, "" ], [ "RundeckExecutionState", "org/rundeck/api/domain/RundeckExecutionState.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, "" ], [ "WorkflowState", "org/rundeck/api/domain/WorkflowState.html", null, "" ], [ "WorkflowStepContextState", "org/rundeck/api/domain/WorkflowStepContextState.html", null, "" ], [ "WorkflowStepState", "org/rundeck/api/domain/WorkflowStepState.html", null, "" ] ] +, "" ], [ "org.rundeck.api.domain", "org/rundeck/api/domain/package-summary.html", [ [ "Description", "org/rundeck/api/domain/package-descr.html", null, "" ], [ "Interfaces", null, [ [ "KeyResource", "org/rundeck/api/domain/KeyResource.html", null, "" ], [ "RundeckNodeIdentity", "org/rundeck/api/domain/RundeckNodeIdentity.html", null, "" ], [ "StorageResource", "org/rundeck/api/domain/StorageResource.html", null, "" ] ] +, "" ], [ "Classes", null, [ [ "ArchiveImport", "org/rundeck/api/domain/ArchiveImport.html", null, "" ], [ "BaseKeyResource", "org/rundeck/api/domain/BaseKeyResource.html", null, "" ], [ "BaseState", "org/rundeck/api/domain/BaseState.html", null, "" ], [ "BaseStorageResource", "org/rundeck/api/domain/BaseStorageResource.html", null, "" ], [ "ConfigProperty", "org/rundeck/api/domain/ConfigProperty.html", null, "" ], [ "ProjectConfig", "org/rundeck/api/domain/ProjectConfig.html", 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, "" ], [ "RundeckExecutionState", "org/rundeck/api/domain/RundeckExecutionState.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, "" ], [ "RundeckToken", "org/rundeck/api/domain/RundeckToken.html", null, "" ], [ "WorkflowState", "org/rundeck/api/domain/WorkflowState.html", null, "" ], [ "WorkflowStepContextState", "org/rundeck/api/domain/WorkflowStepContextState.html", null, "" ], [ "WorkflowStepState", "org/rundeck/api/domain/WorkflowStepState.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, "" ], [ "RundeckJobsUUIDImportBehavior", "org/rundeck/api/domain/RundeckJobsUUIDImportBehavior.html", null, "" ], [ "RundeckOutputEntry.RundeckLogLevel", "org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html", null, "" ], [ "RundeckWFExecState", "org/rundeck/api/domain/RundeckWFExecState.html", null, "" ] ] , "" ] ] +, "" ], [ "org.rundeck.api.generator", "org/rundeck/api/generator/package-summary.html", [ [ "Description", "org/rundeck/api/generator/package-descr.html", null, "" ], [ "Interfaces", null, [ [ "XmlDocumentGenerator", "org/rundeck/api/generator/XmlDocumentGenerator.html", null, "" ] ] +, "" ], [ "Classes", null, [ [ "BaseDocGenerator", "org/rundeck/api/generator/BaseDocGenerator.html", null, "" ], [ "ProjectConfigGenerator", "org/rundeck/api/generator/ProjectConfigGenerator.html", null, "" ], [ "ProjectConfigPropertyGenerator", "org/rundeck/api/generator/ProjectConfigPropertyGenerator.html", null, "" ], [ "ProjectGenerator", "org/rundeck/api/generator/ProjectGenerator.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, "" ], [ "BaseStateParser", "org/rundeck/api/parser/BaseStateParser.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, "" ], [ "ExecutionStateParser", "org/rundeck/api/parser/ExecutionStateParser.html", null, "" ], [ "HistoryParser", "org/rundeck/api/parser/HistoryParser.html", null, "" ], [ "IndexedWorkflowStepStateParser", "org/rundeck/api/parser/IndexedWorkflowStepStateParser.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, "" ], [ "OutputEntryParserV5", "org/rundeck/api/parser/OutputEntryParserV5.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, "" ], [ "WorkflowStateParser", "org/rundeck/api/parser/WorkflowStateParser.html", null, "" ], [ "WorkflowStepContextStateParser", "org/rundeck/api/parser/WorkflowStepContextStateParser.html", null, "" ], [ "WorkflowStepStateParser", "org/rundeck/api/parser/WorkflowStepStateParser.html", null, "" ] ] +, "" ], [ "Classes", null, [ [ "AbortParser", "org/rundeck/api/parser/AbortParser.html", null, "" ], [ "ArchiveImportParser", "org/rundeck/api/parser/ArchiveImportParser.html", null, "" ], [ "BaseStateParser", "org/rundeck/api/parser/BaseStateParser.html", null, "" ], [ "BaseXpathParser", "org/rundeck/api/parser/BaseXpathParser.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, "" ], [ "ExecutionStateParser", "org/rundeck/api/parser/ExecutionStateParser.html", null, "" ], [ "HistoryParser", "org/rundeck/api/parser/HistoryParser.html", null, "" ], [ "IndexedWorkflowStepStateParser", "org/rundeck/api/parser/IndexedWorkflowStepStateParser.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, "" ], [ "OutputEntryParserV5", "org/rundeck/api/parser/OutputEntryParserV5.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, "" ], [ "ProjectConfigParser", "org/rundeck/api/parser/ProjectConfigParser.html", null, "" ], [ "ProjectConfigPropertyParser", "org/rundeck/api/parser/ProjectConfigPropertyParser.html", null, "" ], [ "ProjectParser", "org/rundeck/api/parser/ProjectParser.html", null, "" ], [ "ProjectParserV11", "org/rundeck/api/parser/ProjectParserV11.html", null, "" ], [ "RundeckTokenParser", "org/rundeck/api/parser/RundeckTokenParser.html", null, "" ], [ "SSHKeyResourceParser", "org/rundeck/api/parser/SSHKeyResourceParser.html", null, "" ], [ "StorageResourceParser", "org/rundeck/api/parser/StorageResourceParser.html", null, "" ], [ "StringParser", "org/rundeck/api/parser/StringParser.html", null, "" ], [ "SystemInfoParser", "org/rundeck/api/parser/SystemInfoParser.html", null, "" ], [ "WorkflowStateParser", "org/rundeck/api/parser/WorkflowStateParser.html", null, "" ], [ "WorkflowStepContextStateParser", "org/rundeck/api/parser/WorkflowStepContextStateParser.html", null, "" ], [ "WorkflowStepStateParser", "org/rundeck/api/parser/WorkflowStepStateParser.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, "" ] ] +, "" ], [ "Classes", null, [ [ "AssertUtil", "org/rundeck/api/util/AssertUtil.html", null, "" ], [ "DocumentContentProducer", "org/rundeck/api/util/DocumentContentProducer.html", null, "" ], [ "ParametersUtil", "org/rundeck/api/util/ParametersUtil.html", null, "" ] ] , "" ] ] , "" ] ] diff --git a/apidocs/packages b/apidocs/packages index 1829556..0cdcf3f 100644 --- a/apidocs/packages +++ b/apidocs/packages @@ -1,5 +1,6 @@ org.rundeck.api org.rundeck.api.domain +org.rundeck.api.generator org.rundeck.api.parser org.rundeck.api.query org.rundeck.api.util \ No newline at end of file diff --git a/apidocs/proof-read.txt b/apidocs/proof-read.txt index f593f56..2f85fba 100644 --- a/apidocs/proof-read.txt +++ b/apidocs/proof-read.txt @@ -9,6 +9,9 @@ javadoc proofread file: ./proof-read.txt Domain classes that are returned to the client of the API. +=== reference/org/rundeck/api/generator/package-descr.html === + + === reference/org/rundeck/api/parser/package-descr.html === Internal parsers for parsing the RunDeck responses. @@ -158,6 +161,8 @@ FIELD: DEFAULT_POOLING_INTERVAL FIELD: DEFAULT_POOLING_UNIT Default unit of the "pooling interval" used when running jobs/commands/scripts FIELD: JOBS_IMPORT +FIELD: STORAGE_KEYS_PATH +FIELD: STORAGE_ROOT_PATH CONSTRUCTOR: RundeckClient Instantiate a new {@link ... RundeckClient} @@ -174,10 +179,21 @@ METHOD: abortExecution Abort an execution (identified by the given ID). The execution should be running... METHOD: builder Create a builder for RundeckClient +METHOD: createProject + Create a new project, and return the new definition +METHOD: deleteApiToken + Delete an existing token + @return METHOD: deleteJob Delete a single job, identified by the given ID METHOD: deleteJobs Delete multiple jobs, identified by the given IDs +METHOD: deleteKey + Delete an key file +METHOD: deleteProject + Delete a project +METHOD: deleteProjectConfig + Set a single project configuration property value METHOD: equals METHOD: exportJob Export the definition of a single job, identified by the given ID @@ -207,11 +223,20 @@ METHOD: exportJobsToFile METHOD: exportJobsToFile Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) +METHOD: exportProject + Convenience method to export the archive of a project to the specified file. +METHOD: exportProject + Export the archive of a project to the specified outputstream 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: generateApiToken + Generate an API token for a user. + @return METHOD: generateToken Generate a new token and get the result page (which is the html page of the user's profile) +METHOD: getApiToken + Return user info for an existing token METHOD: getExecution Get a single execution, identified by the given ID METHOD: getExecutionOutput @@ -272,6 +297,8 @@ METHOD: getJobs List all jobs that belongs to the given project METHOD: getJobs List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) +METHOD: getKey + Get metadata for an key file METHOD: getLogin METHOD: getNode Get the definition of a single node @@ -288,8 +315,16 @@ 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: getProjectConfig + Return the configuration of a project +METHOD: getProjectConfig + Get a single project configuration key METHOD: getProjects List all projects +METHOD: getPublicKeyContent + Get content for a public key file +METHOD: getPublicKeyContent + Get content for a public key file METHOD: getRunningExecutions Get all running executions (for all projects) METHOD: getRunningExecutions @@ -300,10 +335,20 @@ METHOD: getSystemInfo METHOD: getToken METHOD: getUrl METHOD: hashCode +METHOD: importArchive + Import a archive file to the specified project. METHOD: importJobs Import the definitions of jobs, from the given input stream, using the given behavior METHOD: importJobs Import the definitions of jobs, from the given input stream, using the given behavior +METHOD: listApiTokens + List all API tokens +METHOD: listApiTokens + List API tokens for a user. +METHOD: listKeyDirectory + List contents of key directory +METHOD: listKeyDirectoryRoot + List contents of root key directory METHOD: ping Try to "ping" the RunDeck instance to see if it is alive METHOD: runAdhocCommand @@ -337,6 +382,12 @@ METHOD: runJob Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is finished (or aborted) or is still running. +METHOD: setProjectConfig + Set a single project configuration property value +METHOD: setProjectConfig + Return the configuration of a project +METHOD: storeKey + Store an key file METHOD: testAuth Test the authentication on the RunDeck instance. METHOD: testCredentials @@ -358,6 +409,7 @@ METHOD: triggerJob === org/rundeck/api/RundeckClient.Version.html === Supported version numbers ENUM: V10 +ENUM: V11 ENUM: V5 ENUM: V6 ENUM: V7 @@ -392,6 +444,22 @@ CONSTRUCTOR: RundeckApiException.RundeckApiTokenException CONSTRUCTOR: RundeckApiException.RundeckApiTokenException +=== org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.html === + Error due to unexpected HTTP status +CONSTRUCTOR: RundeckApiException.RundeckApiHttpStatusException +CONSTRUCTOR: RundeckApiException.RundeckApiHttpStatusException +METHOD: getStatusCode + + +=== org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html === + Error due to unexpected HTTP content-type +CONSTRUCTOR: RundeckApiException.RundeckApiHttpContentTypeException +CONSTRUCTOR: RundeckApiException.RundeckApiHttpContentTypeException +CONSTRUCTOR: RundeckApiException.RundeckApiHttpContentTypeException +METHOD: getContentType +METHOD: getRequiredContentType + + === org/rundeck/api/RunAdhocScriptBuilder.html === A builder to build a {@link ... RunAdhocScript} @@ -582,6 +650,22 @@ METHOD: setSteps METHOD: setTargetNodes +=== org/rundeck/api/domain/StorageResource.html === + StorageResource represents a directory or a file +METHOD: getDirectoryContents + Return the list of directory contents if this is a directory +METHOD: getMetadata + Return the metadata for this file if this is a file +METHOD: getName + Return the file name if this is a file +METHOD: getPath + Return the storage path for this resource +METHOD: getUrl + Return the URL for this resource +METHOD: isDirectory + Return true if this is a directory, false if this is a file + + === org/rundeck/api/domain/RundeckWFExecState.html === An execution state for a workflow or node step ENUM: ABORTED @@ -606,6 +690,16 @@ METHOD: valueOf METHOD: values +=== org/rundeck/api/domain/RundeckToken.html === + RundeckToken is ... +CONSTRUCTOR: RundeckToken +CONSTRUCTOR: RundeckToken +METHOD: getToken +METHOD: getUser +METHOD: setToken +METHOD: setUser + + === org/rundeck/api/domain/RundeckSystemInfo.html === Represents the RunDeck system info CONSTRUCTOR: RundeckSystemInfo @@ -659,10 +753,12 @@ CONSTRUCTOR: RundeckProject METHOD: equals METHOD: getDescription METHOD: getName +METHOD: getProjectConfig METHOD: getResourceModelProviderUrl METHOD: hashCode METHOD: setDescription METHOD: setName +METHOD: setProjectConfig METHOD: setResourceModelProviderUrl METHOD: toString @@ -1041,6 +1137,58 @@ METHOD: valueOf METHOD: values +=== org/rundeck/api/domain/ProjectConfig.html === + ProjectConfig is ... +CONSTRUCTOR: ProjectConfig +CONSTRUCTOR: ProjectConfig +METHOD: addProperties +METHOD: equals +METHOD: getProperties +METHOD: hashCode +METHOD: setProperties +METHOD: setProperty +METHOD: toString + + +=== org/rundeck/api/domain/KeyResource.html === + KeyResource represents a directory or an SSH key file +METHOD: getDirectoryContents + Return the list of SSH Key resources if this is a directory +METHOD: isPrivateKey + Return true if this is a file and is a private SSH key file. + + +=== org/rundeck/api/domain/ConfigProperty.html === + ConfigProperty is a single configuration property key and value. +CONSTRUCTOR: ConfigProperty +CONSTRUCTOR: ConfigProperty +METHOD: equals +METHOD: getKey +METHOD: getValue +METHOD: hashCode +METHOD: setKey +METHOD: setValue +METHOD: toString + + +=== org/rundeck/api/domain/BaseStorageResource.html === + BaseStorageResource is ... +CONSTRUCTOR: BaseStorageResource +METHOD: getDirectoryContents +METHOD: getMetadata +METHOD: getName +METHOD: getPath +METHOD: getUrl +METHOD: isDirectory +METHOD: setDirectory +METHOD: setDirectoryContents +METHOD: setMetadata +METHOD: setName +METHOD: setPath +METHOD: setUrl +METHOD: toString + + === org/rundeck/api/domain/BaseState.html === Base execution status for a step CONSTRUCTOR: BaseState @@ -1058,6 +1206,63 @@ METHOD: setStartTime METHOD: setUpdateTime +=== org/rundeck/api/domain/BaseKeyResource.html === + BaseKeyResource is ... +CONSTRUCTOR: BaseKeyResource +METHOD: from +METHOD: getDirectoryContents +METHOD: isPrivateKey +METHOD: setDirectoryContents +METHOD: setPrivateKey + + +=== org/rundeck/api/domain/ArchiveImport.html === + ArchiveImport describes the result of an + {@link ... importArchive(String, java.io.File, boolean, boolean)} + request. +CONSTRUCTOR: ArchiveImport +METHOD: getErrorMessages + Return a list of error messages if unsuccessful +METHOD: isSuccessful + Return true if successful + + +=== org/rundeck/api/generator/XmlDocumentGenerator.html === + XmlDocumentGenerator is ... +METHOD: generateXmlDocument + Generate the XML + {@link/org.dom4j.Node} +METHOD: generateXmlElement + Generate the XML + {@link/org.dom4j.Node} + + +=== org/rundeck/api/generator/ProjectGenerator.html === + ProjectGenerator is ... +CONSTRUCTOR: ProjectGenerator +METHOD: generateXmlElement + + +=== org/rundeck/api/generator/ProjectConfigPropertyGenerator.html === + ProjectConfigPropertyGenerator generates a + <property/> + element representing a configuration property. +CONSTRUCTOR: ProjectConfigPropertyGenerator +METHOD: generateXmlElement + + +=== org/rundeck/api/generator/ProjectConfigGenerator.html === + ProjectConfigGenerator is ... +CONSTRUCTOR: ProjectConfigGenerator +METHOD: generateXmlElement + + +=== org/rundeck/api/generator/BaseDocGenerator.html === + BaseDocGenerator generates a document using the element as the root. +CONSTRUCTOR: BaseDocGenerator +METHOD: generateXmlDocument + + === org/rundeck/api/parser/XmlNodeParser.html === Interface to be implemented for parsers that handle XML {@link/Node} @@ -1106,11 +1311,61 @@ CONSTRUCTOR: StringParser METHOD: parseXmlNode +=== org/rundeck/api/parser/StorageResourceParser.html === + StorageResourceParser is ... +CONSTRUCTOR: StorageResourceParser +CONSTRUCTOR: StorageResourceParser +CONSTRUCTOR: StorageResourceParser +METHOD: parse + + +=== org/rundeck/api/parser/SSHKeyResourceParser.html === + SSHKeyResourceParser is ... +CONSTRUCTOR: SSHKeyResourceParser +CONSTRUCTOR: SSHKeyResourceParser +METHOD: parse + + +=== org/rundeck/api/parser/RundeckTokenParser.html === + RundeckTokenParser is ... +CONSTRUCTOR: RundeckTokenParser +CONSTRUCTOR: RundeckTokenParser +METHOD: parseXmlNode + + +=== org/rundeck/api/parser/ProjectParserV11.html === + ProjectParserV11 supports embedded "config" element. +CONSTRUCTOR: ProjectParserV11 +CONSTRUCTOR: ProjectParserV11 +METHOD: parseXmlNode + + === org/rundeck/api/parser/ProjectParser.html === Parser for a single {@link ... RundeckProject} CONSTRUCTOR: ProjectParser CONSTRUCTOR: ProjectParser +METHOD: getXpath +METHOD: parseXmlNode + + +=== org/rundeck/api/parser/ProjectConfigPropertyParser.html === + ProjectConfigPropertyParser parses a + <property/> + element representing + a configuration property. +CONSTRUCTOR: ProjectConfigPropertyParser +CONSTRUCTOR: ProjectConfigPropertyParser +METHOD: getXpath +METHOD: parseXmlNode +METHOD: setXpath + + +=== org/rundeck/api/parser/ProjectConfigParser.html === + ProjectConfigParser parses project "config" element contents +CONSTRUCTOR: ProjectConfigParser +CONSTRUCTOR: ProjectConfigParser +METHOD: getXpath METHOD: parseXmlNode @@ -1238,6 +1493,14 @@ CONSTRUCTOR: BulkDeleteParser METHOD: parseXmlNode +=== org/rundeck/api/parser/BaseXpathParser.html === + BaseXpathParser is ... +CONSTRUCTOR: BaseXpathParser +CONSTRUCTOR: BaseXpathParser +METHOD: parse +METHOD: parseXmlNode + + === org/rundeck/api/parser/BaseStateParser.html === $INTERFACE is ... User: greg Date: 1/17/14 Time: 12:19 PM CONSTRUCTOR: BaseStateParser @@ -1246,6 +1509,13 @@ METHOD: parseBaseState METHOD: parseXmlNode +=== org/rundeck/api/parser/ArchiveImportParser.html === + ArchiveImportParser is ... +CONSTRUCTOR: ArchiveImportParser +CONSTRUCTOR: ArchiveImportParser +METHOD: parseXmlNode + + === org/rundeck/api/parser/AbortParser.html === Parser for a single {@link ... RundeckAbort} @@ -1365,6 +1635,13 @@ METHOD: getTotal Total items to be paged +=== org/rundeck/api/util/DocumentContentProducer.html === + DocumentContentProducer writes XML document to a stream +CONSTRUCTOR: DocumentContentProducer +CONSTRUCTOR: DocumentContentProducer +METHOD: writeTo + + === 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 00c818f..82e35e1 100644 --- a/apidocs/reference/classes.html +++ b/apidocs/reference/classes.html @@ -146,6 +146,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -200,12 +202,14 @@
    A B + C D E F H I J + K L N O @@ -228,6 +232,18 @@ + + ArchiveImport + ArchiveImport describes the result of an importArchive(String, java.io.File, boolean, boolean) request.  + + + + + ArchiveImportParser + ArchiveImportParser is ...  + + + AssertUtil Utility class for assertions  @@ -241,6 +257,18 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -263,6 +303,19 @@
    BaseDocGeneratorBaseDocGenerator generates a document using the element as the root. 
    BaseKeyResourceBaseKeyResource is ... 
    BaseState Base execution status for a step @@ -254,6 +282,18 @@
    BaseStorageResourceBaseStorageResource is ... 
    BaseXpathParser<T>BaseXpathParser is ... 
    BulkDeleteParser BulkDeleteParser is ... 
    +

    C

    + + + + + + + + + +
    ConfigPropertyConfigProperty is a single configuration property key and value. 
    + +

    D

    @@ -279,6 +332,12 @@ + + + + + +
    DocumentContentProducerDocumentContentProducer writes XML document to a stream 
    @@ -379,6 +438,19 @@ +

    K

    + + + + + + + + + +
    KeyResourceKeyResource represents a directory or an SSH key file 
    + +

    L

    @@ -471,12 +543,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ProjectConfigProjectConfig is ... 
    ProjectConfigGeneratorProjectConfigGenerator is ... 
    ProjectConfigParserProjectConfigParser parses project "config" element contents 
    ProjectConfigPropertyGeneratorProjectConfigPropertyGenerator generates a <property/> element representing a configuration property. 
    ProjectConfigPropertyParserProjectConfigPropertyParser parses a <property/> element representing + a configuration property. 
    ProjectGeneratorProjectGenerator is ... 
    ProjectParser Parser for a single RundeckProject 
    ProjectParserV11ProjectParserV11 supports embedded "config" element. 
    @@ -545,6 +660,20 @@ + + RundeckApiException.RundeckApiHttpContentTypeException + Error due to unexpected HTTP content-type +  + + + + + RundeckApiException.RundeckApiHttpStatusException + Error due to unexpected HTTP status +  + + + RundeckApiException.RundeckApiLoginException Specific authentication-related error (in case of login-based authentication) @@ -723,6 +852,18 @@ + + RundeckToken + RundeckToken is ...  + + + + + RundeckTokenParser + RundeckTokenParser is ...  + + + RundeckWFExecState An execution state for a workflow or node step @@ -752,12 +893,30 @@ + SSHKeyResourceParser + SSHKeyResourceParser is ...  + + + + + StorageResource + StorageResource represents a directory or a file  + + + + + StorageResourceParser + StorageResourceParser is ...  + + + + StringParser Parser for a single String  - + SystemInfoParser Parser for a single RundeckSystemInfo  @@ -817,6 +976,12 @@ + XmlDocumentGenerator + XmlDocumentGenerator is ...  + + + + XmlNodeParser<T> Interface to be implemented for parsers that handle XML Nodes  diff --git a/apidocs/reference/current.xml b/apidocs/reference/current.xml index 28dc9b6..ab17ff3 100644 --- a/apidocs/reference/current.xml +++ b/apidocs/reference/current.xml @@ -1,6 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -381,6 +383,22 @@ + + + + + ArchiveImport + + + + +   + + + + + + @@ -461,6 +479,86 @@ + + + + + BaseStorageResource + + + + + + StorageResource +    + +   + + + + + + + + + BaseKeyResource + + + + + + KeyResource +    + +   + + + + + + + + + + + + + ConfigProperty + + + + + + Serializable +    + +   + + + + + + + + + + + ProjectConfig + + + + + + Serializable +    + +   + + + + + + @@ -741,6 +839,90 @@ + + + + + RundeckToken + + + + +   + + + + + + + + + + + BaseDocGenerator + + + + + + XmlDocumentGenerator +    + +   + + + + + + + + + ProjectConfigGenerator + + + + +   + + + + + + + + + + + ProjectConfigPropertyGenerator + + + + +   + + + + + + + + + + + ProjectGenerator + + + + +   + + + + + + + + @@ -761,6 +943,26 @@ + + + + + ArchiveImportParser + + + + + + XmlNodeParser +    + +   + + + + + + @@ -781,6 +983,62 @@ + + + + + BaseXpathParser + + + + + + XmlNodeParser +    + +   + + + + + + + + + SSHKeyResourceParser + + + + + + XmlNodeParser +    + +   + + + + + + + + + + + StorageResourceParser + + + + +   + + + + + + + + @@ -1097,6 +1355,46 @@ + + + + + ProjectConfigParser + + + + + + XmlNodeParser +    + +   + + + + + + + + + + + ProjectConfigPropertyParser + + + + + + XmlNodeParser +    + +   + + + + + + @@ -1115,6 +1413,42 @@ + + + + + ProjectParserV11 + + + + +   + + + + + + + + + + + + + RundeckTokenParser + + + + + + XmlNodeParser +    + +   + + + + @@ -1265,6 +1599,26 @@ + + + + + DocumentContentProducer + + + + + + ContentProducer +    + +   + + + + + + diff --git a/apidocs/reference/lists.js b/apidocs/reference/lists.js index fdb78c5..1c5269f 100644 --- a/apidocs/reference/lists.js +++ b/apidocs/reference/lists.js @@ -13,73 +13,98 @@ var DATA = [ { id:11, label:"org.rundeck.api.RunJobBuilder", link:"org/rundeck/api/RunJobBuilder.html", type:"class" }, { id:12, label:"org.rundeck.api.RundeckApiException", link:"org/rundeck/api/RundeckApiException.html", type:"class" }, { id:13, label:"org.rundeck.api.RundeckApiException.RundeckApiAuthException", link:"org/rundeck/api/RundeckApiException.RundeckApiAuthException.html", type:"class" }, - { id:14, label:"org.rundeck.api.RundeckApiException.RundeckApiLoginException", link:"org/rundeck/api/RundeckApiException.RundeckApiLoginException.html", type:"class" }, - { id:15, label:"org.rundeck.api.RundeckApiException.RundeckApiTokenException", link:"org/rundeck/api/RundeckApiException.RundeckApiTokenException.html", type:"class" }, - { id:16, label:"org.rundeck.api.RundeckClient", link:"org/rundeck/api/RundeckClient.html", type:"class" }, - { id:17, label:"org.rundeck.api.RundeckClient.Version", link:"org/rundeck/api/RundeckClient.Version.html", type:"class" }, - { id:18, label:"org.rundeck.api.RundeckClientBuilder", link:"org/rundeck/api/RundeckClientBuilder.html", type:"class" }, - { id:19, label:"org.rundeck.api.RundeckJobsImport", link:"org/rundeck/api/RundeckJobsImport.html", type:"class" }, - { id:20, label:"org.rundeck.api.RundeckJobsImportBuilder", link:"org/rundeck/api/RundeckJobsImportBuilder.html", type:"class" }, - { id:21, label:"org.rundeck.api.domain", link:"org/rundeck/api/domain/package-summary.html", type:"package" }, - { id:22, label:"org.rundeck.api.domain.BaseState", link:"org/rundeck/api/domain/BaseState.html", type:"class" }, - { id:23, label:"org.rundeck.api.domain.RundeckAbort", link:"org/rundeck/api/domain/RundeckAbort.html", type:"class" }, - { id:24, label:"org.rundeck.api.domain.RundeckAbort.AbortStatus", link:"org/rundeck/api/domain/RundeckAbort.AbortStatus.html", type:"class" }, - { id:25, label:"org.rundeck.api.domain.RundeckEvent", link:"org/rundeck/api/domain/RundeckEvent.html", type:"class" }, - { id:26, label:"org.rundeck.api.domain.RundeckEvent.EventStatus", link:"org/rundeck/api/domain/RundeckEvent.EventStatus.html", type:"class" }, - { id:27, label:"org.rundeck.api.domain.RundeckEvent.NodeSummary", link:"org/rundeck/api/domain/RundeckEvent.NodeSummary.html", type:"class" }, - { id:28, label:"org.rundeck.api.domain.RundeckExecution", link:"org/rundeck/api/domain/RundeckExecution.html", type:"class" }, - { id:29, label:"org.rundeck.api.domain.RundeckExecution.ExecutionStatus", link:"org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html", type:"class" }, - { id:30, label:"org.rundeck.api.domain.RundeckExecutionState", link:"org/rundeck/api/domain/RundeckExecutionState.html", type:"class" }, - { id:31, label:"org.rundeck.api.domain.RundeckHistory", link:"org/rundeck/api/domain/RundeckHistory.html", type:"class" }, - { id:32, label:"org.rundeck.api.domain.RundeckJob", link:"org/rundeck/api/domain/RundeckJob.html", type:"class" }, - { id:33, label:"org.rundeck.api.domain.RundeckJobDelete", link:"org/rundeck/api/domain/RundeckJobDelete.html", type:"class" }, - { id:34, label:"org.rundeck.api.domain.RundeckJobDeleteBulk", link:"org/rundeck/api/domain/RundeckJobDeleteBulk.html", type:"class" }, - { id:35, label:"org.rundeck.api.domain.RundeckJobsImportMethod", link:"org/rundeck/api/domain/RundeckJobsImportMethod.html", type:"class" }, - { id:36, label:"org.rundeck.api.domain.RundeckJobsImportResult", link:"org/rundeck/api/domain/RundeckJobsImportResult.html", type:"class" }, - { id:37, label:"org.rundeck.api.domain.RundeckJobsUUIDImportBehavior", link:"org/rundeck/api/domain/RundeckJobsUUIDImportBehavior.html", type:"class" }, - { id:38, label:"org.rundeck.api.domain.RundeckNode", link:"org/rundeck/api/domain/RundeckNode.html", type:"class" }, - { id:39, label:"org.rundeck.api.domain.RundeckNodeIdentity", link:"org/rundeck/api/domain/RundeckNodeIdentity.html", type:"class" }, - { id:40, label:"org.rundeck.api.domain.RundeckOutput", link:"org/rundeck/api/domain/RundeckOutput.html", type:"class" }, - { id:41, label:"org.rundeck.api.domain.RundeckOutputEntry", link:"org/rundeck/api/domain/RundeckOutputEntry.html", type:"class" }, - { id:42, label:"org.rundeck.api.domain.RundeckOutputEntry.RundeckLogLevel", link:"org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html", type:"class" }, - { id:43, label:"org.rundeck.api.domain.RundeckProject", link:"org/rundeck/api/domain/RundeckProject.html", type:"class" }, - { id:44, label:"org.rundeck.api.domain.RundeckSystemInfo", link:"org/rundeck/api/domain/RundeckSystemInfo.html", type:"class" }, - { id:45, label:"org.rundeck.api.domain.RundeckWFExecState", link:"org/rundeck/api/domain/RundeckWFExecState.html", type:"class" }, - { id:46, label:"org.rundeck.api.domain.WorkflowState", link:"org/rundeck/api/domain/WorkflowState.html", type:"class" }, - { id:47, label:"org.rundeck.api.domain.WorkflowStepContextState", link:"org/rundeck/api/domain/WorkflowStepContextState.html", type:"class" }, - { id:48, label:"org.rundeck.api.domain.WorkflowStepState", link:"org/rundeck/api/domain/WorkflowStepState.html", type:"class" }, - { id:49, label:"org.rundeck.api.parser", link:"org/rundeck/api/parser/package-summary.html", type:"package" }, - { id:50, label:"org.rundeck.api.parser.AbortParser", link:"org/rundeck/api/parser/AbortParser.html", type:"class" }, - { id:51, label:"org.rundeck.api.parser.BaseStateParser", link:"org/rundeck/api/parser/BaseStateParser.html", type:"class" }, - { id:52, label:"org.rundeck.api.parser.BulkDeleteParser", link:"org/rundeck/api/parser/BulkDeleteParser.html", type:"class" }, - { id:53, label:"org.rundeck.api.parser.DeleteParser", link:"org/rundeck/api/parser/DeleteParser.html", type:"class" }, - { id:54, label:"org.rundeck.api.parser.EventParser", link:"org/rundeck/api/parser/EventParser.html", type:"class" }, - { id:55, label:"org.rundeck.api.parser.ExecutionParser", link:"org/rundeck/api/parser/ExecutionParser.html", type:"class" }, - { id:56, label:"org.rundeck.api.parser.ExecutionStateParser", link:"org/rundeck/api/parser/ExecutionStateParser.html", type:"class" }, - { id:57, label:"org.rundeck.api.parser.HistoryParser", link:"org/rundeck/api/parser/HistoryParser.html", type:"class" }, - { id:58, label:"org.rundeck.api.parser.IndexedWorkflowStepStateParser", link:"org/rundeck/api/parser/IndexedWorkflowStepStateParser.html", type:"class" }, - { id:59, label:"org.rundeck.api.parser.JobParser", link:"org/rundeck/api/parser/JobParser.html", type:"class" }, - { id:60, label:"org.rundeck.api.parser.JobsImportResultParser", link:"org/rundeck/api/parser/JobsImportResultParser.html", type:"class" }, - { id:61, label:"org.rundeck.api.parser.ListParser", link:"org/rundeck/api/parser/ListParser.html", type:"class" }, - { id:62, label:"org.rundeck.api.parser.NodeParser", link:"org/rundeck/api/parser/NodeParser.html", type:"class" }, - { id:63, label:"org.rundeck.api.parser.OutputEntryParser", link:"org/rundeck/api/parser/OutputEntryParser.html", type:"class" }, - { id:64, label:"org.rundeck.api.parser.OutputEntryParserV5", link:"org/rundeck/api/parser/OutputEntryParserV5.html", type:"class" }, - { id:65, label:"org.rundeck.api.parser.OutputParser", link:"org/rundeck/api/parser/OutputParser.html", type:"class" }, - { id:66, label:"org.rundeck.api.parser.PagedResultParser", link:"org/rundeck/api/parser/PagedResultParser.html", type:"class" }, - { id:67, label:"org.rundeck.api.parser.ParserHelper", link:"org/rundeck/api/parser/ParserHelper.html", type:"class" }, - { id:68, label:"org.rundeck.api.parser.ProjectParser", link:"org/rundeck/api/parser/ProjectParser.html", type:"class" }, - { id:69, label:"org.rundeck.api.parser.StringParser", link:"org/rundeck/api/parser/StringParser.html", type:"class" }, - { id:70, label:"org.rundeck.api.parser.SystemInfoParser", link:"org/rundeck/api/parser/SystemInfoParser.html", type:"class" }, - { id:71, label:"org.rundeck.api.parser.WorkflowStateParser", link:"org/rundeck/api/parser/WorkflowStateParser.html", type:"class" }, - { id:72, label:"org.rundeck.api.parser.WorkflowStepContextStateParser", link:"org/rundeck/api/parser/WorkflowStepContextStateParser.html", type:"class" }, - { id:73, label:"org.rundeck.api.parser.WorkflowStepStateParser", link:"org/rundeck/api/parser/WorkflowStepStateParser.html", type:"class" }, - { id:74, label:"org.rundeck.api.parser.XmlNodeParser", link:"org/rundeck/api/parser/XmlNodeParser.html", type:"class" }, - { id:75, label:"org.rundeck.api.query", link:"org/rundeck/api/query/package-summary.html", type:"package" }, - { id:76, label:"org.rundeck.api.query.ExecutionQuery", link:"org/rundeck/api/query/ExecutionQuery.html", type:"class" }, - { id:77, label:"org.rundeck.api.query.ExecutionQuery.Builder", link:"org/rundeck/api/query/ExecutionQuery.Builder.html", type:"class" }, - { id:78, label:"org.rundeck.api.util", link:"org/rundeck/api/util/package-summary.html", type:"package" }, - { id:79, label:"org.rundeck.api.util.AssertUtil", link:"org/rundeck/api/util/AssertUtil.html", type:"class" }, - { id:80, label:"org.rundeck.api.util.PagedResults", link:"org/rundeck/api/util/PagedResults.html", type:"class" }, - { id:81, label:"org.rundeck.api.util.ParametersUtil", link:"org/rundeck/api/util/ParametersUtil.html", type:"class" } + { id:14, label:"org.rundeck.api.RundeckApiException.RundeckApiHttpContentTypeException", link:"org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html", type:"class" }, + { id:15, label:"org.rundeck.api.RundeckApiException.RundeckApiHttpStatusException", link:"org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.html", type:"class" }, + { id:16, label:"org.rundeck.api.RundeckApiException.RundeckApiLoginException", link:"org/rundeck/api/RundeckApiException.RundeckApiLoginException.html", type:"class" }, + { id:17, label:"org.rundeck.api.RundeckApiException.RundeckApiTokenException", link:"org/rundeck/api/RundeckApiException.RundeckApiTokenException.html", type:"class" }, + { id:18, label:"org.rundeck.api.RundeckClient", link:"org/rundeck/api/RundeckClient.html", type:"class" }, + { id:19, label:"org.rundeck.api.RundeckClient.Version", link:"org/rundeck/api/RundeckClient.Version.html", type:"class" }, + { id:20, label:"org.rundeck.api.RundeckClientBuilder", link:"org/rundeck/api/RundeckClientBuilder.html", type:"class" }, + { id:21, label:"org.rundeck.api.RundeckJobsImport", link:"org/rundeck/api/RundeckJobsImport.html", type:"class" }, + { id:22, label:"org.rundeck.api.RundeckJobsImportBuilder", link:"org/rundeck/api/RundeckJobsImportBuilder.html", type:"class" }, + { id:23, label:"org.rundeck.api.domain", link:"org/rundeck/api/domain/package-summary.html", type:"package" }, + { id:24, label:"org.rundeck.api.domain.ArchiveImport", link:"org/rundeck/api/domain/ArchiveImport.html", type:"class" }, + { id:25, label:"org.rundeck.api.domain.BaseKeyResource", link:"org/rundeck/api/domain/BaseKeyResource.html", type:"class" }, + { id:26, label:"org.rundeck.api.domain.BaseState", link:"org/rundeck/api/domain/BaseState.html", type:"class" }, + { id:27, label:"org.rundeck.api.domain.BaseStorageResource", link:"org/rundeck/api/domain/BaseStorageResource.html", type:"class" }, + { id:28, label:"org.rundeck.api.domain.ConfigProperty", link:"org/rundeck/api/domain/ConfigProperty.html", type:"class" }, + { id:29, label:"org.rundeck.api.domain.KeyResource", link:"org/rundeck/api/domain/KeyResource.html", type:"class" }, + { id:30, label:"org.rundeck.api.domain.ProjectConfig", link:"org/rundeck/api/domain/ProjectConfig.html", type:"class" }, + { id:31, label:"org.rundeck.api.domain.RundeckAbort", link:"org/rundeck/api/domain/RundeckAbort.html", type:"class" }, + { id:32, label:"org.rundeck.api.domain.RundeckAbort.AbortStatus", link:"org/rundeck/api/domain/RundeckAbort.AbortStatus.html", type:"class" }, + { id:33, label:"org.rundeck.api.domain.RundeckEvent", link:"org/rundeck/api/domain/RundeckEvent.html", type:"class" }, + { id:34, label:"org.rundeck.api.domain.RundeckEvent.EventStatus", link:"org/rundeck/api/domain/RundeckEvent.EventStatus.html", type:"class" }, + { id:35, label:"org.rundeck.api.domain.RundeckEvent.NodeSummary", link:"org/rundeck/api/domain/RundeckEvent.NodeSummary.html", type:"class" }, + { id:36, label:"org.rundeck.api.domain.RundeckExecution", link:"org/rundeck/api/domain/RundeckExecution.html", type:"class" }, + { id:37, label:"org.rundeck.api.domain.RundeckExecution.ExecutionStatus", link:"org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html", type:"class" }, + { id:38, label:"org.rundeck.api.domain.RundeckExecutionState", link:"org/rundeck/api/domain/RundeckExecutionState.html", type:"class" }, + { id:39, label:"org.rundeck.api.domain.RundeckHistory", link:"org/rundeck/api/domain/RundeckHistory.html", type:"class" }, + { id:40, label:"org.rundeck.api.domain.RundeckJob", link:"org/rundeck/api/domain/RundeckJob.html", type:"class" }, + { id:41, label:"org.rundeck.api.domain.RundeckJobDelete", link:"org/rundeck/api/domain/RundeckJobDelete.html", type:"class" }, + { id:42, label:"org.rundeck.api.domain.RundeckJobDeleteBulk", link:"org/rundeck/api/domain/RundeckJobDeleteBulk.html", type:"class" }, + { id:43, label:"org.rundeck.api.domain.RundeckJobsImportMethod", link:"org/rundeck/api/domain/RundeckJobsImportMethod.html", type:"class" }, + { id:44, label:"org.rundeck.api.domain.RundeckJobsImportResult", link:"org/rundeck/api/domain/RundeckJobsImportResult.html", type:"class" }, + { id:45, label:"org.rundeck.api.domain.RundeckJobsUUIDImportBehavior", link:"org/rundeck/api/domain/RundeckJobsUUIDImportBehavior.html", type:"class" }, + { id:46, label:"org.rundeck.api.domain.RundeckNode", link:"org/rundeck/api/domain/RundeckNode.html", type:"class" }, + { id:47, label:"org.rundeck.api.domain.RundeckNodeIdentity", link:"org/rundeck/api/domain/RundeckNodeIdentity.html", type:"class" }, + { id:48, label:"org.rundeck.api.domain.RundeckOutput", link:"org/rundeck/api/domain/RundeckOutput.html", type:"class" }, + { id:49, label:"org.rundeck.api.domain.RundeckOutputEntry", link:"org/rundeck/api/domain/RundeckOutputEntry.html", type:"class" }, + { id:50, label:"org.rundeck.api.domain.RundeckOutputEntry.RundeckLogLevel", link:"org/rundeck/api/domain/RundeckOutputEntry.RundeckLogLevel.html", type:"class" }, + { id:51, label:"org.rundeck.api.domain.RundeckProject", link:"org/rundeck/api/domain/RundeckProject.html", type:"class" }, + { id:52, label:"org.rundeck.api.domain.RundeckSystemInfo", link:"org/rundeck/api/domain/RundeckSystemInfo.html", type:"class" }, + { id:53, label:"org.rundeck.api.domain.RundeckToken", link:"org/rundeck/api/domain/RundeckToken.html", type:"class" }, + { id:54, label:"org.rundeck.api.domain.RundeckWFExecState", link:"org/rundeck/api/domain/RundeckWFExecState.html", type:"class" }, + { id:55, label:"org.rundeck.api.domain.StorageResource", link:"org/rundeck/api/domain/StorageResource.html", type:"class" }, + { id:56, label:"org.rundeck.api.domain.WorkflowState", link:"org/rundeck/api/domain/WorkflowState.html", type:"class" }, + { id:57, label:"org.rundeck.api.domain.WorkflowStepContextState", link:"org/rundeck/api/domain/WorkflowStepContextState.html", type:"class" }, + { id:58, label:"org.rundeck.api.domain.WorkflowStepState", link:"org/rundeck/api/domain/WorkflowStepState.html", type:"class" }, + { id:59, label:"org.rundeck.api.generator", link:"org/rundeck/api/generator/package-summary.html", type:"package" }, + { id:60, label:"org.rundeck.api.generator.BaseDocGenerator", link:"org/rundeck/api/generator/BaseDocGenerator.html", type:"class" }, + { id:61, label:"org.rundeck.api.generator.ProjectConfigGenerator", link:"org/rundeck/api/generator/ProjectConfigGenerator.html", type:"class" }, + { id:62, label:"org.rundeck.api.generator.ProjectConfigPropertyGenerator", link:"org/rundeck/api/generator/ProjectConfigPropertyGenerator.html", type:"class" }, + { id:63, label:"org.rundeck.api.generator.ProjectGenerator", link:"org/rundeck/api/generator/ProjectGenerator.html", type:"class" }, + { id:64, label:"org.rundeck.api.generator.XmlDocumentGenerator", link:"org/rundeck/api/generator/XmlDocumentGenerator.html", type:"class" }, + { id:65, label:"org.rundeck.api.parser", link:"org/rundeck/api/parser/package-summary.html", type:"package" }, + { id:66, label:"org.rundeck.api.parser.AbortParser", link:"org/rundeck/api/parser/AbortParser.html", type:"class" }, + { id:67, label:"org.rundeck.api.parser.ArchiveImportParser", link:"org/rundeck/api/parser/ArchiveImportParser.html", type:"class" }, + { id:68, label:"org.rundeck.api.parser.BaseStateParser", link:"org/rundeck/api/parser/BaseStateParser.html", type:"class" }, + { id:69, label:"org.rundeck.api.parser.BaseXpathParser", link:"org/rundeck/api/parser/BaseXpathParser.html", type:"class" }, + { id:70, label:"org.rundeck.api.parser.BulkDeleteParser", link:"org/rundeck/api/parser/BulkDeleteParser.html", type:"class" }, + { id:71, label:"org.rundeck.api.parser.DeleteParser", link:"org/rundeck/api/parser/DeleteParser.html", type:"class" }, + { id:72, label:"org.rundeck.api.parser.EventParser", link:"org/rundeck/api/parser/EventParser.html", type:"class" }, + { id:73, label:"org.rundeck.api.parser.ExecutionParser", link:"org/rundeck/api/parser/ExecutionParser.html", type:"class" }, + { id:74, label:"org.rundeck.api.parser.ExecutionStateParser", link:"org/rundeck/api/parser/ExecutionStateParser.html", type:"class" }, + { id:75, label:"org.rundeck.api.parser.HistoryParser", link:"org/rundeck/api/parser/HistoryParser.html", type:"class" }, + { id:76, label:"org.rundeck.api.parser.IndexedWorkflowStepStateParser", link:"org/rundeck/api/parser/IndexedWorkflowStepStateParser.html", type:"class" }, + { id:77, label:"org.rundeck.api.parser.JobParser", link:"org/rundeck/api/parser/JobParser.html", type:"class" }, + { id:78, label:"org.rundeck.api.parser.JobsImportResultParser", link:"org/rundeck/api/parser/JobsImportResultParser.html", type:"class" }, + { id:79, label:"org.rundeck.api.parser.ListParser", link:"org/rundeck/api/parser/ListParser.html", type:"class" }, + { id:80, label:"org.rundeck.api.parser.NodeParser", link:"org/rundeck/api/parser/NodeParser.html", type:"class" }, + { id:81, label:"org.rundeck.api.parser.OutputEntryParser", link:"org/rundeck/api/parser/OutputEntryParser.html", type:"class" }, + { id:82, label:"org.rundeck.api.parser.OutputEntryParserV5", link:"org/rundeck/api/parser/OutputEntryParserV5.html", type:"class" }, + { id:83, label:"org.rundeck.api.parser.OutputParser", link:"org/rundeck/api/parser/OutputParser.html", type:"class" }, + { id:84, label:"org.rundeck.api.parser.PagedResultParser", link:"org/rundeck/api/parser/PagedResultParser.html", type:"class" }, + { id:85, label:"org.rundeck.api.parser.ParserHelper", link:"org/rundeck/api/parser/ParserHelper.html", type:"class" }, + { id:86, label:"org.rundeck.api.parser.ProjectConfigParser", link:"org/rundeck/api/parser/ProjectConfigParser.html", type:"class" }, + { id:87, label:"org.rundeck.api.parser.ProjectConfigPropertyParser", link:"org/rundeck/api/parser/ProjectConfigPropertyParser.html", type:"class" }, + { id:88, label:"org.rundeck.api.parser.ProjectParser", link:"org/rundeck/api/parser/ProjectParser.html", type:"class" }, + { id:89, label:"org.rundeck.api.parser.ProjectParserV11", link:"org/rundeck/api/parser/ProjectParserV11.html", type:"class" }, + { id:90, label:"org.rundeck.api.parser.RundeckTokenParser", link:"org/rundeck/api/parser/RundeckTokenParser.html", type:"class" }, + { id:91, label:"org.rundeck.api.parser.SSHKeyResourceParser", link:"org/rundeck/api/parser/SSHKeyResourceParser.html", type:"class" }, + { id:92, label:"org.rundeck.api.parser.StorageResourceParser", link:"org/rundeck/api/parser/StorageResourceParser.html", type:"class" }, + { id:93, label:"org.rundeck.api.parser.StringParser", link:"org/rundeck/api/parser/StringParser.html", type:"class" }, + { id:94, label:"org.rundeck.api.parser.SystemInfoParser", link:"org/rundeck/api/parser/SystemInfoParser.html", type:"class" }, + { id:95, label:"org.rundeck.api.parser.WorkflowStateParser", link:"org/rundeck/api/parser/WorkflowStateParser.html", type:"class" }, + { id:96, label:"org.rundeck.api.parser.WorkflowStepContextStateParser", link:"org/rundeck/api/parser/WorkflowStepContextStateParser.html", type:"class" }, + { id:97, label:"org.rundeck.api.parser.WorkflowStepStateParser", link:"org/rundeck/api/parser/WorkflowStepStateParser.html", type:"class" }, + { id:98, label:"org.rundeck.api.parser.XmlNodeParser", link:"org/rundeck/api/parser/XmlNodeParser.html", type:"class" }, + { id:99, label:"org.rundeck.api.query", link:"org/rundeck/api/query/package-summary.html", type:"package" }, + { id:100, label:"org.rundeck.api.query.ExecutionQuery", link:"org/rundeck/api/query/ExecutionQuery.html", type:"class" }, + { id:101, label:"org.rundeck.api.query.ExecutionQuery.Builder", link:"org/rundeck/api/query/ExecutionQuery.Builder.html", type:"class" }, + { id:102, label:"org.rundeck.api.util", link:"org/rundeck/api/util/package-summary.html", type:"package" }, + { id:103, label:"org.rundeck.api.util.AssertUtil", link:"org/rundeck/api/util/AssertUtil.html", type:"class" }, + { id:104, label:"org.rundeck.api.util.DocumentContentProducer", link:"org/rundeck/api/util/DocumentContentProducer.html", type:"class" }, + { id:105, label:"org.rundeck.api.util.PagedResults", link:"org/rundeck/api/util/PagedResults.html", type:"class" }, + { id:106, label:"org.rundeck.api.util.ParametersUtil", link:"org/rundeck/api/util/ParametersUtil.html", type:"class" } ]; diff --git a/apidocs/reference/org/rundeck/api/DefaultJobsImport.html b/apidocs/reference/org/rundeck/api/DefaultJobsImport.html index a660b27..c3effb2 100644 --- a/apidocs/reference/org/rundeck/api/DefaultJobsImport.html +++ b/apidocs/reference/org/rundeck/api/DefaultJobsImport.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/FileType.html b/apidocs/reference/org/rundeck/api/FileType.html index 0bc1caa..e428c34 100644 --- a/apidocs/reference/org/rundeck/api/FileType.html +++ b/apidocs/reference/org/rundeck/api/FileType.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html b/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html index 543f65f..d4c998e 100644 --- a/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html +++ b/apidocs/reference/org/rundeck/api/NodeFiltersBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/OptionsBuilder.html b/apidocs/reference/org/rundeck/api/OptionsBuilder.html index a0295d7..49917ae 100644 --- a/apidocs/reference/org/rundeck/api/OptionsBuilder.html +++ b/apidocs/reference/org/rundeck/api/OptionsBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunAdhoc.html b/apidocs/reference/org/rundeck/api/RunAdhoc.html index 50de283..77a3743 100644 --- a/apidocs/reference/org/rundeck/api/RunAdhoc.html +++ b/apidocs/reference/org/rundeck/api/RunAdhoc.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunAdhocCommand.html b/apidocs/reference/org/rundeck/api/RunAdhocCommand.html index 2d453b3..42cbc0c 100644 --- a/apidocs/reference/org/rundeck/api/RunAdhocCommand.html +++ b/apidocs/reference/org/rundeck/api/RunAdhocCommand.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunAdhocCommandBuilder.html b/apidocs/reference/org/rundeck/api/RunAdhocCommandBuilder.html index e4e16cd..1ba5029 100644 --- a/apidocs/reference/org/rundeck/api/RunAdhocCommandBuilder.html +++ b/apidocs/reference/org/rundeck/api/RunAdhocCommandBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunAdhocScript.html b/apidocs/reference/org/rundeck/api/RunAdhocScript.html index 5d08f95..0aeb6d6 100644 --- a/apidocs/reference/org/rundeck/api/RunAdhocScript.html +++ b/apidocs/reference/org/rundeck/api/RunAdhocScript.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunAdhocScriptBuilder.html b/apidocs/reference/org/rundeck/api/RunAdhocScriptBuilder.html index 6605b78..3049f09 100644 --- a/apidocs/reference/org/rundeck/api/RunAdhocScriptBuilder.html +++ b/apidocs/reference/org/rundeck/api/RunAdhocScriptBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunJob.html b/apidocs/reference/org/rundeck/api/RunJob.html index efde87c..683990a 100644 --- a/apidocs/reference/org/rundeck/api/RunJob.html +++ b/apidocs/reference/org/rundeck/api/RunJob.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RunJobBuilder.html b/apidocs/reference/org/rundeck/api/RunJobBuilder.html index 8c1310d..9720ba5 100644 --- a/apidocs/reference/org/rundeck/api/RunJobBuilder.html +++ b/apidocs/reference/org/rundeck/api/RunJobBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html index 3c8e302..c8c4bd4 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiAuthException.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ @@ -438,6 +442,10 @@ Summary: > + RundeckApiException.RundeckApiHttpContentTypeException, + + RundeckApiException.RundeckApiHttpStatusException, + RundeckApiException.RundeckApiLoginException, RundeckApiException.RundeckApiTokenException @@ -448,6 +456,16 @@ Summary: style="display: none;" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apidocs/reference/package-list b/apidocs/reference/package-list index 2ce964d..e4203a2 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.generator 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 945ffcc..d5a678b 100644 --- a/apidocs/reference/packages.html +++ b/apidocs/reference/packages.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -221,19 +223,26 @@ + + + + + + - + - + diff --git a/changes-report.html b/changes-report.html index 10f6dc1..923c40f 100644 --- a/changes-report.html +++ b/changes-report.html @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ - + @@ -51,8 +51,8 @@
  • Changelog
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -158,7 +158,7 @@
    -

    Changelog

    Release History

    RundeckApiException.RundeckApiHttpContentTypeExceptionError due to unexpected HTTP content-type + 
    RundeckApiException.RundeckApiHttpStatusExceptionError due to unexpected HTTP status + 
    RundeckApiException.RundeckApiLoginException Specific authentication-related error (in case of login-based authentication) diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html new file mode 100644 index 0000000..8717aab --- /dev/null +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpContentTypeException.html @@ -0,0 +1,1274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + static + + + class +

    RundeckApiException.RundeckApiHttpContentTypeException

    + + + + + + + + + + + + + + + + + + + + + + + + + extends RundeckApiException.RundeckApiAuthException
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳java.lang.Throwable
        ↳java.lang.Exception
         ↳java.lang.RuntimeException
          ↳org.rundeck.api.RundeckApiException
           ↳org.rundeck.api.RundeckApiException.RundeckApiAuthException
            ↳org.rundeck.api.RundeckApiException.RundeckApiHttpContentTypeException
    + + + + + + + +
    + + +

    Class Overview

    +

    Error due to unexpected HTTP content-type +

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException(String contentType, String requiredContentType) + +
    + + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException(String message, String contentType, String requiredContentType) + +
    + + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException(String message, Throwable cause, String contentType, String requiredContentType) + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + String + + getContentType() + +
    + + + + + + String + + getRequiredContentType() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Throwable + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException + (String contentType, String requiredContentType) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException + (String message, String contentType, String requiredContentType) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + + + RundeckApiException.RundeckApiHttpContentTypeException + (String message, Throwable cause, String contentType, String requiredContentType) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + String + + getContentType + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getRequiredContentType + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.html new file mode 100644 index 0000000..43e61ff --- /dev/null +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiHttpStatusException.html @@ -0,0 +1,1180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RundeckApiException.RundeckApiHttpStatusException + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + static + + + class +

    RundeckApiException.RundeckApiHttpStatusException

    + + + + + + + + + + + + + + + + + + + + + + + + + extends RundeckApiException.RundeckApiAuthException
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳java.lang.Throwable
        ↳java.lang.Exception
         ↳java.lang.RuntimeException
          ↳org.rundeck.api.RundeckApiException
           ↳org.rundeck.api.RundeckApiException.RundeckApiAuthException
            ↳org.rundeck.api.RundeckApiException.RundeckApiHttpStatusException
    + + + + + + + +
    + + +

    Class Overview

    +

    Error due to unexpected HTTP status +

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + RundeckApiException.RundeckApiHttpStatusException(String message, int statusCode) + +
    + + + + + + + + RundeckApiException.RundeckApiHttpStatusException(String message, Throwable cause, int statusCode) + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + int + + getStatusCode() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Throwable + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + RundeckApiException.RundeckApiHttpStatusException + (String message, int statusCode) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + + + RundeckApiException.RundeckApiHttpStatusException + (String message, Throwable cause, int statusCode) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + int + + getStatusCode + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html index 37d968b..4a8c05f 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiLoginException.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html index 19d5b62..bfc7347 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.RundeckApiTokenException.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RundeckApiException.html b/apidocs/reference/org/rundeck/api/RundeckApiException.html index b706a07..005fc38 100644 --- a/apidocs/reference/org/rundeck/api/RundeckApiException.html +++ b/apidocs/reference/org/rundeck/api/RundeckApiException.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ @@ -449,6 +453,10 @@ Summary: > + RundeckApiException.RundeckApiHttpContentTypeException, + + RundeckApiException.RundeckApiHttpStatusException, + RundeckApiException.RundeckApiLoginException, RundeckApiException.RundeckApiTokenException @@ -459,6 +467,16 @@ Summary: style="display: none;" > + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + - + - + @@ -1035,6 +1046,36 @@ From interface + +
    + +

    + + +
    + + + + + + +
    +

    + + public + static + final + RundeckClient.Version + + V11 +

    +
    + + + + + +
    diff --git a/apidocs/reference/org/rundeck/api/RundeckClient.html b/apidocs/reference/org/rundeck/api/RundeckClient.html index 2b64f63..e34622c 100644 --- a/apidocs/reference/org/rundeck/api/RundeckClient.html +++ b/apidocs/reference/org/rundeck/api/RundeckClient.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ @@ -492,6 +496,20 @@ Summary:
    + + + + + + + + + + + + + +
    RundeckApiException.RundeckApiHttpContentTypeExceptionError due to unexpected HTTP content-type + 
    RundeckApiException.RundeckApiHttpStatusExceptionError due to unexpected HTTP status + 
    RundeckApiException.RundeckApiLoginException Specific authentication-related error (in case of login-based authentication) @@ -532,6 +550,32 @@ Summary: + classRundeckApiException.RundeckApiHttpContentTypeExceptionError due to unexpected HTTP content-type + 
    + + + + + classRundeckApiException.RundeckApiHttpStatusExceptionError due to unexpected HTTP status + 
    + + + + class RundeckApiException.RundeckApiLoginException Specific authentication-related error (in case of login-based authentication) diff --git a/apidocs/reference/org/rundeck/api/RundeckClient.Version.html b/apidocs/reference/org/rundeck/api/RundeckClient.Version.html index 197cd78..d1a2db1 100644 --- a/apidocs/reference/org/rundeck/api/RundeckClient.Version.html +++ b/apidocs/reference/org/rundeck/api/RundeckClient.Version.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ @@ -424,33 +428,40 @@ Summary:
    RundeckClient.Version V5 V11   
    RundeckClient.Version V5  
    RundeckClient.Version  V6   
    RundeckClient.Version  V7   
    RundeckClient.Version  V8   
    RundeckClient.Version  V9   
    StringSTORAGE_KEYS_PATH
    StringSTORAGE_ROOT_PATH
    @@ -634,6 +652,42 @@ Summary: + RundeckProject +
    + createProject(String projectName, Map<StringString> configuration) + +
    Create a new project, and return the new definition
    + +
    + + + + + + boolean + + deleteApiToken(String token) + +
    Delete an existing token@return
    + +
    + + + + + String @@ -670,6 +724,60 @@ Summary: + void + + deleteKey(String path) + +
    Delete an key file
    + +
    + + + + + + void + + deleteProject(String projectName) + +
    Delete a project
    + +
    + + + + + + void + + deleteProjectConfig(String projectName, String key) + +
    Set a single project configuration property value
    + +
    + + + + + boolean @@ -679,7 +787,7 @@ Summary: -
    @@ -697,7 +805,7 @@ Summary: -
    @@ -715,7 +823,7 @@ Summary: -
    @@ -733,7 +841,7 @@ Summary: -
    @@ -751,7 +859,7 @@ Summary: -
    @@ -769,7 +877,7 @@ Summary: -
    @@ -788,7 +896,7 @@ Summary: -
    @@ -806,7 +914,7 @@ Summary: -
    @@ -825,7 +933,7 @@ Summary: -
    @@ -843,7 +951,7 @@ Summary: -
    @@ -862,7 +970,7 @@ Summary: -
    @@ -880,7 +988,7 @@ Summary: -
    @@ -899,6 +1007,24 @@ Summary: +
    + + + + + + int + + exportProject(String projectName, File out) + +
    Convenience method to export the archive of a project to the specified file.
    + +
    @@ -906,6 +1032,24 @@ Summary: + int + + exportProject(String projectName, OutputStream out) + +
    Export the archive of a project to the specified outputstream
    + +
    + + + + + RundeckJob @@ -917,6 +1061,24 @@ Summary: +
    + + + + + + String + + generateApiToken(String user) + +
    Generate an API token for a user.@return
    + +
    @@ -942,6 +1104,24 @@ Summary: + RundeckToken + + getApiToken(String token) + +
    Return user info for an existing token
    + +
    + + + + + RundeckExecution @@ -953,7 +1133,7 @@ Summary: -
    @@ -971,7 +1151,7 @@ Summary: -
    @@ -989,7 +1169,7 @@ Summary: -
    @@ -1007,7 +1187,7 @@ Summary: -
    @@ -1025,7 +1205,7 @@ Summary: -
    @@ -1043,7 +1223,7 @@ Summary: -
    @@ -1061,7 +1241,7 @@ Summary: -
    @@ -1079,7 +1259,7 @@ Summary: -
    @@ -1097,7 +1277,7 @@ Summary: -
    @@ -1115,7 +1295,7 @@ Summary: -
    @@ -1133,7 +1313,7 @@ Summary: -
    @@ -1151,7 +1331,7 @@ Summary: -
    @@ -1169,7 +1349,7 @@ Summary: -
    @@ -1187,7 +1367,7 @@ Summary: -
    @@ -1205,7 +1385,7 @@ Summary: -
    @@ -1223,7 +1403,7 @@ Summary: -
    @@ -1241,7 +1421,7 @@ Summary: -
    @@ -1259,7 +1439,7 @@ Summary: -
    @@ -1277,7 +1457,7 @@ Summary: -
    @@ -1295,7 +1475,7 @@ Summary: -
    @@ -1318,7 +1498,7 @@ Summary: -
    @@ -1341,7 +1521,7 @@ Summary: -
    @@ -1359,7 +1539,7 @@ Summary: -
    @@ -1377,7 +1557,7 @@ Summary: -
    @@ -1395,7 +1575,7 @@ Summary: -
    @@ -1413,7 +1593,7 @@ Summary: -
    @@ -1431,7 +1611,7 @@ Summary: -
    @@ -1449,7 +1629,7 @@ Summary: -
    @@ -1467,7 +1647,7 @@ Summary: -
    @@ -1485,6 +1665,24 @@ Summary: +
    + + + + + + KeyResource + + getKey(String path) + +
    Get metadata for an key file
    + +
    @@ -1650,6 +1848,42 @@ Summary: + ProjectConfig + + getProjectConfig(String projectName) + +
    Return the configuration of a project
    + +
    + + + + + + String + + getProjectConfig(String projectName, String key) + +
    Get a single project configuration key
    + +
    + + + + + List<RundeckProject> @@ -1668,6 +1902,42 @@ Summary: + int + + getPublicKeyContent(String path, File out) + +
    Get content for a public key file
    + +
    + + + + + + int + + getPublicKeyContent(String path, OutputStream out) + +
    Get content for a public key file
    + +
    + + + + + List<RundeckExecution> @@ -1786,6 +2056,24 @@ Summary: + ArchiveImport + + importArchive(String projectName, File archiveFile, boolean includeExecutions, boolean preserveJobUuids) + +
    Import a archive file to the specified project.
    + +
    + + + + + RundeckJobsImportResult @@ -1797,7 +2085,7 @@ Summary: -
    @@ -1815,6 +2103,24 @@ Summary: +
    + + + + + + List<RundeckToken> + + listApiTokens() + +
    List all API tokens
    + +
    @@ -1822,6 +2128,60 @@ Summary: + List<RundeckToken> + + listApiTokens(String user) + +
    List API tokens for a user.
    + +
    + + + + + + List<KeyResource> + + listKeyDirectory(String path) + +
    List contents of key directory
    + +
    + + + + + + List<KeyResource> + + listKeyDirectoryRoot() + +
    List contents of root key directory
    + +
    + + + + + void @@ -1833,7 +2193,7 @@ Summary: -
    @@ -1851,7 +2211,7 @@ Summary: -
    @@ -1869,7 +2229,7 @@ Summary: -
    @@ -1887,7 +2247,7 @@ Summary: -
    @@ -1905,7 +2265,7 @@ Summary: -
    @@ -1923,7 +2283,7 @@ Summary: -
    @@ -1941,7 +2301,7 @@ Summary: -
    @@ -1959,6 +2319,60 @@ Summary: +
    + + + + + + String + + setProjectConfig(String projectName, String key, String value) + +
    Set a single project configuration property value
    + +
    + + + + + + ProjectConfig + + setProjectConfig(String projectName, Map<StringString> configuration) + +
    Return the configuration of a project
    + +
    + + + + + + KeyResource + + storeKey(String path, File keyfile, boolean privateKey) + +
    Store an key file
    + +
    @@ -2503,6 +2917,84 @@ From class + + +
    +

    + + public + static + final + String + + STORAGE_KEYS_PATH +

    +
    + + + + + + +
    +
    + +

    + + +
    + Constant Value: + + + "keys/" + + +
    + +
    +
    + + + + + +
    +

    + + public + static + final + String + + STORAGE_ROOT_PATH +

    +
    + + + + + + +
    +
    + +

    + + +
    + Constant Value: + + + "/storage/" + + +
    + +
    +
    + + + @@ -2823,6 +3315,116 @@ From class + + +
    +

    + + public + + + + + RundeckProject + + createProject + (String projectName, Map<StringString> configuration) +

    +
    +
    + +
    + + + +
    +
    + +

    Create a new project, and return the new definition

    +
    +
    Parameters
    + + + + + + + +
    projectName + name of the project - mandatory
    configuration + project configuration properties
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + boolean + + deleteApiToken + (String token) +

    +
    +
    + +
    + + + +
    +
    + +

    Delete an existing token@return

    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + +
    @@ -2955,6 +3557,179 @@ From class
    + + +
    +

    + + public + + + + + void + + deleteKey + (String path) +

    +
    +
    + +
    + + + +
    +
    + +

    Delete an key file

    +
    +
    Parameters
    + + + + +
    path + a path to a key file, must start with "keys/" +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + void + + deleteProject + (String projectName) +

    +
    +
    + +
    + + + +
    +
    + +

    Delete a project

    +
    +
    Parameters
    + + + + +
    projectName + name of the project - mandatory
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + void + + deleteProjectConfig + (String projectName, String key) +

    +
    +
    + +
    + + + +
    +
    + +

    Set a single project configuration property value

    +
    +
    Parameters
    + + + + + + + +
    projectName + name of the project - mandatory
    key + name of the configuration property
    +
    +
    +
    Returns
    +
    • new value
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -3958,6 +4733,150 @@ From class
    + + +
    +

    + + public + + + + + int + + exportProject + (String projectName, File out) +

    +
    +
    + +
    + + + +
    +
    + +

    Convenience method to export the archive of a project to the specified file.

    +
    +
    Parameters
    + + + + + + + +
    projectName + name of the project - mandatory
    out + file to write to
    +
    +
    +
    Returns
    +
    • number of bytes written to the stream
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    IOException +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + int + + exportProject + (String projectName, OutputStream out) +

    +
    +
    + +
    + + + +
    +
    + +

    Export the archive of a project to the specified outputstream

    +
    +
    Parameters
    + + + + +
    projectName + name of the project - mandatory
    +
    +
    +
    Returns
    +
    • number of bytes written to the stream
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    IOException +
    +
    + +
    +
    + +
    @@ -4037,6 +4956,46 @@ From class
    + + +
    +

    + + public + + + + + String + + generateApiToken + (String user) +

    +
    +
    + +
    + + + +
    +
    + +

    Generate an API token for a user.@return

    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + +
    @@ -4103,6 +5062,50 @@ From class
    + + +
    +

    + + public + + + + + RundeckToken + + getApiToken + (String token) +

    +
    +
    + +
    + + + +
    +
    + +

    Return user info for an existing token

    +
    +
    Returns
    +
    • token info
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + +
    @@ -6487,6 +7490,60 @@ From class
    + + +
    +

    + + public + + + + + KeyResource + + getKey + (String path) +

    +
    +
    + +
    + + + +
    +
    + +

    Get metadata for an key file

    +
    +
    Parameters
    + + + + +
    path + ssh key storage path, must start with "keys/"
    +
    +
    +
    Returns
    +
    • the ssh key resource
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException + if there is an error, or if the path is a directory not a file +
    +
    + +
    +
    + +
    @@ -7020,6 +8077,142 @@ From class
    + + +
    +

    + + public + + + + + ProjectConfig + + getProjectConfig + (String projectName) +

    +
    +
    + +
    + + + +
    +
    + +

    Return the configuration of a project

    +
    +
    Parameters
    + + + + +
    projectName + name of the project - mandatory
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + String + + getProjectConfig + (String projectName, String key) +

    +
    +
    + +
    + + + +
    +
    + +

    Get a single project configuration key

    +
    +
    Parameters
    + + + + + + + +
    projectName + name of the project - mandatory
    key + name of the configuration key
    +
    +
    +
    Returns
    +
    • value, or null if the value is not set
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + +
    @@ -7073,6 +8266,128 @@ From class
    + + +
    +

    + + public + + + + + int + + getPublicKeyContent + (String path, File out) +

    +
    +
    + +
    + + + +
    +
    + +

    Get content for a public key file

    +
    +
    Parameters
    + + + + + + + +
    path + ssh key storage path, must start with "keys/"
    out + file to write data to
    +
    +
    +
    Returns
    +
    • length of written data
    +
    +
    +
    Throws
    + + + + + + + +
    RundeckApiException +
    IOException +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + int + + getPublicKeyContent + (String path, OutputStream out) +

    +
    +
    + +
    + + + +
    +
    + +

    Get content for a public key file

    +
    +
    Parameters
    + + + + + + + +
    path + ssh key storage path, must start with "keys/"
    out + outputstream to write data to
    +
    +
    +
    Returns
    +
    • length of written data
    +
    +
    +
    Throws
    + + + + + + + +
    RundeckApiException +
    IOException +
    +
    + +
    +
    + +
    @@ -7392,6 +8707,88 @@ From class
    + + +
    +

    + + public + + + + + ArchiveImport + + importArchive + (String projectName, File archiveFile, boolean includeExecutions, boolean preserveJobUuids) +

    +
    +
    + +
    + + + +
    +
    + +

    Import a archive file to the specified project.

    +
    +
    Parameters
    + + + + + + + + + + + + + +
    projectName + name of the project - mandatory
    archiveFile + zip archive file
    includeExecutions + if true, import executions defined in the archive, otherwise skip them
    preserveJobUuids + if true, do not remove UUIDs from imported jobs, otherwise remove them
    +
    +
    +
    Returns
    +
    • Result of the import request, may contain a list of import error messages
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    IOException +
    +
    + +
    +
    + +
    @@ -7536,6 +8933,197 @@ From class
    + + +
    +

    + + public + + + + + List<RundeckToken> + + listApiTokens + () +

    +
    +
    + +
    + + + +
    +
    + +

    List all API tokens

    +
    +
    Returns
    +
    • list of tokens
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + List<RundeckToken> + + listApiTokens + (String user) +

    +
    +
    + +
    + + + +
    +
    + +

    List API tokens for a user.

    +
    +
    Parameters
    + + + + +
    user + username
    +
    +
    +
    Returns
    +
    • list of tokens
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + List<KeyResource> + + listKeyDirectory + (String path) +

    +
    +
    + +
    + + + +
    +
    + +

    List contents of key directory

    +
    +
    Parameters
    + + + + +
    path + ssh key storage path, must start with "keys/"
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException + if there is an error, or if the path is a file not a directory +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + List<KeyResource> + + listKeyDirectoryRoot + () +

    +
    +
    + +
    + + + +
    +
    + +

    List contents of root key directory

    +
    +
    Returns
    +
    • list of key resources
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + +
    @@ -8132,6 +9720,207 @@ From class
    + + +
    +

    + + public + + + + + String + + setProjectConfig + (String projectName, String key, String value) +

    +
    +
    + +
    + + + +
    +
    + +

    Set a single project configuration property value

    +
    +
    Parameters
    + + + + + + + + + + +
    projectName + name of the project - mandatory
    key + name of the configuration property
    value + value of the property
    +
    +
    +
    Returns
    +
    • new value
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + ProjectConfig + + setProjectConfig + (String projectName, Map<StringString> configuration) +

    +
    +
    + +
    + + + +
    +
    + +

    Return the configuration of a project

    +
    +
    Parameters
    + + + + +
    projectName + name of the project - mandatory
    +
    +
    +
    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 projectName is blank (null, empty or whitespace) +
    +
    + +
    +
    + + + + +
    +

    + + public + + + + + KeyResource + + storeKey + (String path, File keyfile, boolean privateKey) +

    +
    +
    + +
    + + + +
    +
    + +

    Store an key file

    +
    +
    Parameters
    + + + + + + + + + + +
    path + ssh key storage path, must start with "keys/"
    keyfile + key file
    privateKey + true to store private key, false to store public key
    +
    +
    +
    Returns
    +
    • the key resource
    +
    +
    +
    Throws
    + + + + +
    RundeckApiException +
    +
    + +
    +
    + +
    diff --git a/apidocs/reference/org/rundeck/api/RundeckClientBuilder.html b/apidocs/reference/org/rundeck/api/RundeckClientBuilder.html index f6a7eb3..b407f6f 100644 --- a/apidocs/reference/org/rundeck/api/RundeckClientBuilder.html +++ b/apidocs/reference/org/rundeck/api/RundeckClientBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RundeckJobsImport.html b/apidocs/reference/org/rundeck/api/RundeckJobsImport.html index 909f5f9..dcc75a9 100644 --- a/apidocs/reference/org/rundeck/api/RundeckJobsImport.html +++ b/apidocs/reference/org/rundeck/api/RundeckJobsImport.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/RundeckJobsImportBuilder.html b/apidocs/reference/org/rundeck/api/RundeckJobsImportBuilder.html index 36820be..27d6280 100644 --- a/apidocs/reference/org/rundeck/api/RundeckJobsImportBuilder.html +++ b/apidocs/reference/org/rundeck/api/RundeckJobsImportBuilder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/domain/ArchiveImport.html b/apidocs/reference/org/rundeck/api/domain/ArchiveImport.html new file mode 100644 index 0000000..30124e8 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/domain/ArchiveImport.html @@ -0,0 +1,858 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ArchiveImport + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ArchiveImport

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

    Class Overview

    +

    ArchiveImport describes the result of an importArchive(String, java.io.File, boolean, boolean) request.

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ArchiveImport(boolean successful, List<String> errorMessages) + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + List<String> + + getErrorMessages() + +
    Return a list of error messages if unsuccessful
    + +
    + + + + + + boolean + + isSuccessful() + +
    Return true if successful
    + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ArchiveImport + (boolean successful, List<String> errorMessages) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

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

    +
    +
    + +
    + + + +
    +
    + +

    Return a list of error messages if unsuccessful

    + +
    +
    + + + + +
    +

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

    +
    +
    + +
    + + + +
    +
    + +

    Return true if successful

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

    BaseKeyResource

    + + + + + + + + + extends BaseStorageResource
    + + + + + + + implements + + KeyResource + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.domain.BaseStorageResource
        ↳org.rundeck.api.domain.BaseKeyResource
    + + + + + + + +
    + + +

    Class Overview

    +

    BaseKeyResource is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + BaseKeyResource() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + static + + BaseKeyResource + + from(StorageResource source) + +
    + + + + + + List<KeyResource> + + getDirectoryContents() + +
    Return the list of directory contents if this is a directory
    + +
    + + + + + + boolean + + isPrivateKey() + +
    Return true if this is a file and is a private SSH key file.
    + +
    + + + + + + void + + setDirectoryContents(List<? extends StorageResource> directoryContents) + +
    + + + + + + void + + setPrivateKey(boolean privateKey) + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + org.rundeck.api.domain.BaseStorageResource + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + org.rundeck.api.domain.KeyResource + +
    + + +
    +
    + +From interface + + org.rundeck.api.domain.StorageResource + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + BaseKeyResource + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + static + + + + BaseKeyResource + + from + (StorageResource source) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + List<KeyResource> + + getDirectoryContents + () +

    +
    +
    + +
    + + + +
    +
    + +

    Return the list of directory contents if this is a directory

    + +
    +
    + + + + +
    +

    + + public + + + + + boolean + + isPrivateKey + () +

    +
    +
    + +
    + + + +
    +
    + +

    Return true if this is a file and is a private SSH key file.

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setDirectoryContents + (List<? extends StorageResource> directoryContents) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + void + + setPrivateKey + (boolean privateKey) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/domain/BaseState.html b/apidocs/reference/org/rundeck/api/domain/BaseState.html index ade02c9..9d53962 100644 --- a/apidocs/reference/org/rundeck/api/domain/BaseState.html +++ b/apidocs/reference/org/rundeck/api/domain/BaseState.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -160,13 +162,20 @@
  • Interfaces

  • Classes

  • + getProjectConfig() + +
    + + + + + String @@ -501,7 +527,7 @@ Summary: -
    @@ -517,7 +543,7 @@ Summary: -
    @@ -533,7 +559,7 @@ Summary: -
    @@ -549,6 +575,22 @@ Summary: +
    + + + + + + void + + setProjectConfig(ProjectConfig projectConfig) + +
    @@ -971,6 +1013,37 @@ From class + + +
    +

    + + public + + + + + ProjectConfig + + getProjectConfig + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + +
    @@ -1095,6 +1168,37 @@ From class
    + + +
    +

    + + public + + + + + void + + setProjectConfig + (ProjectConfig projectConfig) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + +
    diff --git a/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html b/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html index e54d655..29e7378 100644 --- a/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html +++ b/apidocs/reference/org/rundeck/api/domain/RundeckSystemInfo.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -160,13 +162,20 @@
  • Interfaces

  • Classes

  • @@ -292,78 +310,102 @@
    + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + @@ -473,10 +491,35 @@ Summary: + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apidocs/reference/org/rundeck/api/parser/package-descr.html b/apidocs/reference/org/rundeck/api/parser/package-descr.html index 7d895b5..dd01126 100644 --- a/apidocs/reference/org/rundeck/api/parser/package-descr.html +++ b/apidocs/reference/org/rundeck/api/parser/package-descr.html @@ -146,6 +146,8 @@ org.rundeck.api
  • org.rundeck.api.domain
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -167,7 +169,9 @@
  • Classes

  • + + + + + + + + @@ -359,10 +377,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html index 6242341..01ff4b7 100644 --- a/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html +++ b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.Builder.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • diff --git a/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html index d198644..36d60f9 100644 --- a/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html +++ b/apidocs/reference/org/rundeck/api/query/ExecutionQuery.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • diff --git a/apidocs/reference/org/rundeck/api/query/package-descr.html b/apidocs/reference/org/rundeck/api/query/package-descr.html index a5a3758..df107e9 100644 --- a/apidocs/reference/org/rundeck/api/query/package-descr.html +++ b/apidocs/reference/org/rundeck/api/query/package-descr.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • diff --git a/apidocs/reference/org/rundeck/api/query/package-summary.html b/apidocs/reference/org/rundeck/api/query/package-summary.html index 9929a01..665b05f 100644 --- a/apidocs/reference/org/rundeck/api/query/package-summary.html +++ b/apidocs/reference/org/rundeck/api/query/package-summary.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • diff --git a/apidocs/reference/org/rundeck/api/util/AssertUtil.html b/apidocs/reference/org/rundeck/api/util/AssertUtil.html index 863565c..2f797d1 100644 --- a/apidocs/reference/org/rundeck/api/util/AssertUtil.html +++ b/apidocs/reference/org/rundeck/api/util/AssertUtil.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -167,6 +169,7 @@
  • Classes

  • diff --git a/apidocs/reference/org/rundeck/api/util/DocumentContentProducer.html b/apidocs/reference/org/rundeck/api/util/DocumentContentProducer.html new file mode 100644 index 0000000..494b061 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/util/DocumentContentProducer.html @@ -0,0 +1,882 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DocumentContentProducer + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + +
    ArchiveImportArchiveImport describes the result of an importArchive(String, java.io.File, boolean, boolean) request. 
    BaseKeyResourceBaseKeyResource is ... 
    BaseState Base execution status for a step  
    BaseStorageResourceBaseStorageResource is ... 
    ConfigPropertyConfigProperty is a single configuration property key and value. 
    ProjectConfigProjectConfig is ... 
    RundeckAbort Represents an abort of a RundeckExecution 
    RundeckEvent Represents a RunDeck event 
    RundeckEvent.NodeSummary Summary for nodes  
    RundeckExecution Represents a RunDeck execution, usually triggered by an API call. 
    RundeckExecutionState The state of an Execution  
    RundeckHistory Represents a portion of the RunDeck (events) history 
    RundeckJob Represents a RunDeck job 
    RundeckJobDelete RundeckJobDelete represents a result of a job delete request. 
    RundeckJobDeleteBulk RundeckJobDeleteBulk 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) 
    RundeckOutput Represents a RunDeck output  
    RundeckOutputEntry Represents a RunDeck output entry  
    RundeckProject Represents a RunDeck project 
    RundeckSystemInfo Represents the RunDeck system info 
    RundeckTokenRundeckToken is ... 
    WorkflowState Represents the state of a workflow of steps diff --git a/apidocs/reference/org/rundeck/api/generator/BaseDocGenerator.html b/apidocs/reference/org/rundeck/api/generator/BaseDocGenerator.html new file mode 100644 index 0000000..b15a7fc --- /dev/null +++ b/apidocs/reference/org/rundeck/api/generator/BaseDocGenerator.html @@ -0,0 +1,897 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BaseDocGenerator + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + abstract + class +

    BaseDocGenerator

    + + + + + extends Object
    + + + + + + + implements + + XmlDocumentGenerator + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.generator.BaseDocGenerator
    + + + + +
    + + Known Direct Subclasses + +
    + + +
    +
    + + + + +
    + + +

    Class Overview

    +

    BaseDocGenerator generates a document using the element as the root.

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + BaseDocGenerator() + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + Document + + generateXmlDocument() + +
    Generate the XML org.dom4j.Node
    + +
    + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + org.rundeck.api.generator.XmlDocumentGenerator + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + BaseDocGenerator + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + Document + + generateXmlDocument + () +

    +
    +
    + +
    + + + +
    +
    + +

    Generate the XML org.dom4j.Node

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

    ProjectConfigGenerator

    + + + + + + + + + extends BaseDocGenerator
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.generator.BaseDocGenerator
        ↳org.rundeck.api.generator.ProjectConfigGenerator
    + + + + + + + +
    + + +

    Class Overview

    +

    ProjectConfigGenerator is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectConfigGenerator(ProjectConfig config) + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + Element + + generateXmlElement() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + org.rundeck.api.generator.BaseDocGenerator + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + org.rundeck.api.generator.XmlDocumentGenerator + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectConfigGenerator + (ProjectConfig config) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + Element + + generateXmlElement + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html b/apidocs/reference/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html new file mode 100644 index 0000000..94ce70f --- /dev/null +++ b/apidocs/reference/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html @@ -0,0 +1,907 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ProjectConfigPropertyGenerator + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ProjectConfigPropertyGenerator

    + + + + + + + + + extends BaseDocGenerator
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.generator.BaseDocGenerator
        ↳org.rundeck.api.generator.ProjectConfigPropertyGenerator
    + + + + + + + +
    + + +

    Class Overview

    +

    ProjectConfigPropertyGenerator generates a <property/> element representing a configuration property.

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectConfigPropertyGenerator(ConfigProperty property) + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + Element + + generateXmlElement() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + org.rundeck.api.generator.BaseDocGenerator + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + org.rundeck.api.generator.XmlDocumentGenerator + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectConfigPropertyGenerator + (ConfigProperty property) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + Element + + generateXmlElement + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/generator/ProjectGenerator.html b/apidocs/reference/org/rundeck/api/generator/ProjectGenerator.html new file mode 100644 index 0000000..2fad08a --- /dev/null +++ b/apidocs/reference/org/rundeck/api/generator/ProjectGenerator.html @@ -0,0 +1,907 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ProjectGenerator + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ProjectGenerator

    + + + + + + + + + extends BaseDocGenerator
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.generator.BaseDocGenerator
        ↳org.rundeck.api.generator.ProjectGenerator
    + + + + + + + +
    + + +

    Class Overview

    +

    ProjectGenerator is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectGenerator(RundeckProject project) + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + Element + + generateXmlElement() + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + org.rundeck.api.generator.BaseDocGenerator + +
    + + +
    +
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + org.rundeck.api.generator.XmlDocumentGenerator + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectGenerator + (RundeckProject project) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + Element + + generateXmlElement + () +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/generator/XmlDocumentGenerator.html b/apidocs/reference/org/rundeck/api/generator/XmlDocumentGenerator.html new file mode 100644 index 0000000..2c0e688 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/generator/XmlDocumentGenerator.html @@ -0,0 +1,584 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XmlDocumentGenerator + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + interface +

    XmlDocumentGenerator

    + + + + + + + + +
    + +
    + +
    + + + + + + + + + +
    org.rundeck.api.generator.XmlDocumentGenerator
    + + + + + + +
    + + Known Indirect Subclasses + +
    + + +
    +
    + + +
    + + +

    Class Overview

    +

    XmlDocumentGenerator is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + abstract + + + + + Document + + generateXmlDocument() + +
    Generate the XML org.dom4j.Node
    + +
    + abstract + + + + + Element + + generateXmlElement() + +
    Generate the XML org.dom4j.Node
    + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Methods

    + + + + + +
    +

    + + public + + + abstract + + Document + + generateXmlDocument + () +

    +
    +
    + +
    + + + +
    +
    + +

    Generate the XML org.dom4j.Node

    +
    +
    Returns
    +
    • any object holding the converted value +
    +
    + +
    +
    + + + + +
    +

    + + public + + + abstract + + Element + + generateXmlElement + () +

    +
    +
    + +
    + + + +
    +
    + +

    Generate the XML org.dom4j.Node

    +
    +
    Returns
    +
    • any object holding the converted value +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/generator/package-descr.html b/apidocs/reference/org/rundeck/api/generator/package-descr.html new file mode 100644 index 0000000..fd58144 --- /dev/null +++ b/apidocs/reference/org/rundeck/api/generator/package-descr.html @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api.generator Details + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    + + + + + + +
    +
    + +
    + package +

    org.rundeck.api.generator

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

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

    org.rundeck.api.generator

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

    Interfaces

    +
    + + + + + + +
    XmlDocumentGeneratorXmlDocumentGenerator is ... 
    +
    + + + + +

    Classes

    +
    + + + + + + + + + + + + + + + + + + +
    BaseDocGeneratorBaseDocGenerator generates a document using the element as the root. 
    ProjectConfigGeneratorProjectConfigGenerator is ... 
    ProjectConfigPropertyGeneratorProjectConfigPropertyGenerator generates a <property/> element representing a configuration property. 
    ProjectGeneratorProjectGenerator is ... 
    +
    + + + + + + + + + + + + + + +
    +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/package-descr.html b/apidocs/reference/org/rundeck/api/package-descr.html index 569d0a9..a11d14b 100644 --- a/apidocs/reference/org/rundeck/api/package-descr.html +++ b/apidocs/reference/org/rundeck/api/package-descr.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ diff --git a/apidocs/reference/org/rundeck/api/package-summary.html b/apidocs/reference/org/rundeck/api/package-summary.html index d2206ac..9ffd860 100644 --- a/apidocs/reference/org/rundeck/api/package-summary.html +++ b/apidocs/reference/org/rundeck/api/package-summary.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -194,6 +196,8 @@ @@ -388,6 +392,16 @@
    RundeckApiException.RundeckApiAuthException Specific authentication-related error (either login or token). 
    RundeckApiException.RundeckApiHttpContentTypeExceptionError due to unexpected HTTP content-type + 
    RundeckApiException.RundeckApiHttpStatusExceptionError due to unexpected HTTP status + 
    RundeckApiException.RundeckApiLoginException Specific authentication-related error (in case of login-based authentication) diff --git a/apidocs/reference/org/rundeck/api/parser/AbortParser.html b/apidocs/reference/org/rundeck/api/parser/AbortParser.html index ae7ab59..a4198a4 100644 --- a/apidocs/reference/org/rundeck/api/parser/AbortParser.html +++ b/apidocs/reference/org/rundeck/api/parser/AbortParser.html @@ -146,6 +146,8 @@ org.rundeck.api
  • org.rundeck.api.domain
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -167,7 +169,9 @@
  • Classes

  • Parser for a single RundeckAbort 
    ArchiveImportParserArchiveImportParser is ... 
    BaseStateParser $INTERFACE is ... 
    BaseXpathParser<T>BaseXpathParser is ... 
    BulkDeleteParser BulkDeleteParser is ... PagedResultParser<T> PagedResultParser extracts paging data from an xpath node, and includes the List result from a ListParser 
    ProjectConfigParserProjectConfigParser parses project "config" element contents 
    ProjectConfigPropertyParserProjectConfigPropertyParser parses a <property/> element representing + a configuration property. 
    ProjectParser Parser for a single RundeckProject 
    ProjectParserV11ProjectParserV11 supports embedded "config" element. 
    RundeckTokenParserRundeckTokenParser is ... 
    SSHKeyResourceParserSSHKeyResourceParser is ... 
    StorageResourceParserStorageResourceParser is ... 
    StringParser Parser for a single String  Parser for a single RundeckAbort 
    ArchiveImportParserArchiveImportParser is ... 
    BaseStateParser $INTERFACE is ... 
    BaseXpathParser<T>BaseXpathParser is ... 
    BulkDeleteParser BulkDeleteParser is ... ParserHelper Helper for parsing RunDeck responses 
    ProjectConfigParserProjectConfigParser parses project "config" element contents 
    ProjectConfigPropertyParserProjectConfigPropertyParser parses a <property/> element representing + a configuration property. 
    ProjectParser Parser for a single RundeckProject 
    ProjectParserV11ProjectParserV11 supports embedded "config" element. 
    RundeckTokenParserRundeckTokenParser is ... 
    SSHKeyResourceParserSSHKeyResourceParser is ... 
    StorageResourceParserStorageResourceParser is ... 
    StringParser Parser for a single String 
    + + + + + + + +
    + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    DocumentContentProducer

    + + + + + extends Object
    + + + + + + + implements + + ContentProducer + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.util.DocumentContentProducer
    + + + + + + + +
    + + +

    Class Overview

    +

    DocumentContentProducer writes XML document to a stream

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + DocumentContentProducer(Document document) + +
    + + + + + + + + DocumentContentProducer(Document document, OutputFormat format) + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + writeTo(OutputStream outstream) + +
    + + + + + + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + +From interface + + org.apache.http.entity.ContentProducer + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + DocumentContentProducer + (Document document) +

    +
    +
    + +
    + + + +
    +
    + +

    + +
    +
    + + + + +
    +

    + + public + + + + + + + DocumentContentProducer + (Document document, OutputFormat format) +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + writeTo + (OutputStream outstream) +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    IOException +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/apidocs/reference/org/rundeck/api/util/PagedResults.html b/apidocs/reference/org/rundeck/api/util/PagedResults.html index 3525ae5..7bf46e8 100644 --- a/apidocs/reference/org/rundeck/api/util/PagedResults.html +++ b/apidocs/reference/org/rundeck/api/util/PagedResults.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -167,6 +169,7 @@
  • Classes

  • diff --git a/apidocs/reference/org/rundeck/api/util/ParametersUtil.html b/apidocs/reference/org/rundeck/api/util/ParametersUtil.html index 4197039..9582771 100644 --- a/apidocs/reference/org/rundeck/api/util/ParametersUtil.html +++ b/apidocs/reference/org/rundeck/api/util/ParametersUtil.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -167,6 +169,7 @@
  • Classes

  • diff --git a/apidocs/reference/org/rundeck/api/util/package-descr.html b/apidocs/reference/org/rundeck/api/util/package-descr.html index 4c351ae..1a854bf 100644 --- a/apidocs/reference/org/rundeck/api/util/package-descr.html +++ b/apidocs/reference/org/rundeck/api/util/package-descr.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -167,6 +169,7 @@
  • Classes

  • diff --git a/apidocs/reference/org/rundeck/api/util/package-summary.html b/apidocs/reference/org/rundeck/api/util/package-summary.html index bccc216..b078751 100644 --- a/apidocs/reference/org/rundeck/api/util/package-summary.html +++ b/apidocs/reference/org/rundeck/api/util/package-summary.html @@ -147,6 +147,8 @@
  • org.rundeck.api.domain
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.query
  • @@ -167,6 +169,7 @@
  • Classes

  • @@ -268,6 +271,10 @@
    Utility class for assertions 
    DocumentContentProducerDocumentContentProducer writes XML document to a stream 
    ParametersUtil Utility class for API parameters that should be passed in URLs. 
    + org.rundeck.api.generator 
    org.rundeck.api.parser Internal parsers for parsing the RunDeck responses. 
    org.rundeck.api.query  
    org.rundeck.api.util Some utility classes. 
    VersionDateDescription
    10.0-SNAPSHOTTBDRundeck API version 10
    9.32014-01-24Bugfix
    9.22014-01-23Bugfix
    9.12014-01-16Complete Rundeck API version 9
    9.02013-08-26Update for Rundeck API version 9
    8.02013-08-06Update for Rundeck API version 8
    6.02013-02-21Update for Rundeck API version 6
    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 10.0-SNAPSHOT - TBD

    TypeChangesBy

    add

    Execution State - Retrieve workflow step and node state informationgschueler

    add

    Execution Output with State - Retrieve log output with state change informationgschueler

    add

    Execution Output - Retrieve log output for a particular node or step.gschueler

    add

    Execution Info - added successfulNodes and failedNodes detail.gschueler

    remove

    Remove deprecated RundeckClient methods.gschueler

    Release 9.3 - 2014-01-24

    TypeChangesBy

    fix

    Issue #7: Fix authentication to Tomcat container (thanks @katanafleet)gschueler

    Release 9.2 - 2014-01-23

    TypeChangesBy

    fix

    Bugfix. If apiVersion is set to 0, request defaults to current API version.gschueler

    Release 9.1 - 2014-01-16

    TypeChangesBy

    add

    Add uuidOption support to jobs import, API v9gschueler

    Release 9.0 - 2013-08-26

    TypeChangesBy

    add

    Add project to parsed execution result, API v9gschueler

    add

    Add project=* all projects executions now running query, API v9gschueler

    Release 8.0 - 2013-08-06

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeChangesBy

    add

    Support script interpreter parameters, API v8gschueler

    add

    Support project parameter for imported jobs, API v8gschueler

    update

    Replace unwieldy methods with many arguments with Builder based interfaces, deprecating the old methods. +

    Changelog

    Release History

    VersionDateDescription
    11.02014-04-24Rundeck API version 11
    10.02014-02-27Rundeck API version 10
    9.32014-01-24Bugfix
    9.22014-01-23Bugfix
    9.12014-01-16Complete Rundeck API version 9
    9.02013-08-26Update for Rundeck API version 9
    8.02013-08-06Update for Rundeck API version 8
    6.02013-02-21Update for Rundeck API version 6
    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 11.0 - 2014-04-24

    TypeChangesBy

    add

    Project creationgschueler

    add

    Get Project configurationgschueler

    add

    Set Project configurationgschueler

    add

    Get/Set Project configuration keysgschueler

    add

    Delete projectgschueler

    add

    Export project archivegschueler

    add

    Import project archivegschueler

    add

    Key file uploadgschueler

    add

    Key file deletegschueler

    add

    Key file listgschueler

    add

    Key file getgschueler

    add

    API Token creategschueler

    add

    API Token listgschueler

    add

    API Token deletegschueler

    Release 10.0 - 2014-02-27

    TypeChangesBy

    add

    Execution State - Retrieve workflow step and node state informationgschueler

    add

    Execution Output with State - Retrieve log output with state change informationgschueler

    add

    Execution Output - Retrieve log output for a particular node or step.gschueler

    add

    Execution Info - added successfulNodes and failedNodes detail.gschueler

    remove

    Remove deprecated RundeckClient methods.gschueler

    Release 9.3 - 2014-01-24

    TypeChangesBy

    fix

    Issue #7: Fix authentication to Tomcat container (thanks @katanafleet)gschueler

    Release 9.2 - 2014-01-23

    TypeChangesBy

    fix

    Bugfix. If apiVersion is set to 0, request defaults to current API version.gschueler

    Release 9.1 - 2014-01-16

    TypeChangesBy

    add

    Add uuidOption support to jobs import, API v9gschueler

    Release 9.0 - 2013-08-26

    TypeChangesBy

    add

    Add project to parsed execution result, API v9gschueler

    add

    Add project=* all projects executions now running query, API v9gschueler

    Release 8.0 - 2013-08-06

    TypeChangesBy

    add

    Support script interpreter parameters, API v8gschueler

    add

    Support project parameter for imported jobs, API v8gschueler

    update

    Replace unwieldy methods with many arguments with Builder based interfaces, deprecating the old methods. The old methods will be removed completely in version 10 of this library. Fixes 2.gschueler

    Release 6.0 - 2013-02-21

    TypeChangesBy

    add

    Support update for output entry format, API v6 #1gschueler

    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
    diff --git a/cpd.html b/cpd.html index 091cfaf..65c9bda 100644 --- a/cpd.html +++ b/cpd.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • CPD Results
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/dependencies.html b/dependencies.html index 9b8b40d..353b384 100644 --- a/dependencies.html +++ b/dependencies.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Project Dependencies
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -168,29 +168,29 @@ } } -

    Dependency Tree

    • org.rundeck:rundeck-api-java-client:jar:10.0 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, Unnamed - com.ibm.icu:icu4j:jar:2.6.1, Unnamed - javax.servlet:servlet-api:jar:2.5, Unnamed - jdom:jdom:jar:1.0, Unnamed - xalan:xalan:jar:2.6.0, Unnamed - xerces:xercesImpl:jar:2.6.2, Unnamed - xerces:xmlParserAPIs:jar:2.6.2, dom4j, jaxen

    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
    repo.jenkins-ci.orghttp://repo.jenkins-ci.org/public/YesYes-
    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-
    sonatype-public-gridhttp://repository.sonatype.org/content/groups/sonatype-public-grid/YesYes-
    centralhttp://repo1.maven.org/maven2Yes--

    Repository locations for each of the Dependencies.

    Artifactrepo.jenkins-ci.orgsonatype-snapshotsapache.snapshotssonatype-nexus-snapshotssonatype-public-gridcentral
    com.github.robfletcher:betamax:jar:1.0Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    com.ibm.icu:icu4j:jar:2.6.1Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    commons-codec:commons-codec:jar:1.4Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    commons-io:commons-io:jar:2.1Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    commons-lang:commons-lang:jar:2.6Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    commons-logging:commons-logging:jar:1.1.1Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    dom4j:dom4j:jar:1.6.1Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    javax.servlet:servlet-api:jar:2.5Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    jaxen:jaxen:jar:1.1.1Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    jdom:jdom:jar:1.0Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    junit:junit:jar:4.10Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    log4j:log4j:jar:1.2.16Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.apache.httpcomponents:httpclient:jar:4.1.2Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.apache.httpcomponents:httpcore:jar:4.1.2Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.apache.httpcomponents:httpmime:jar:4.1.2Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.codehaus.groovy:groovy-all:jar:1.8.4Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.eclipse.jetty:jetty-continuation:jar:7.5.1.v20110908Found at http://repo.jenkins-ci.org/public/Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.eclipse.jetty:jetty-http:jar:7.5.1.v20110908Found at http://repo.jenkins-ci.org/public/Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.eclipse.jetty:jetty-io:jar:7.5.1.v20110908Found at http://repo.jenkins-ci.org/public/Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.eclipse.jetty:jetty-server:jar:7.5.1.v20110908Found at http://repo.jenkins-ci.org/public/Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.eclipse.jetty:jetty-util:jar:7.5.1.v20110908Found at http://repo.jenkins-ci.org/public/Found at http://oss.sonatype.org/content/groups/jetty--Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.hamcrest:hamcrest-core:jar:1.1Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    org.yaml:snakeyaml:jar:1.9Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    xalan:xalan:jar:2.6.0Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    xerces:xercesImpl:jar:2.6.2Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    xerces:xmlParserAPIs:jar:2.6.2Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    xml-apis:xml-apis:jar:1.0.b2Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    xom:xom:jar:1.0Found at http://repo.jenkins-ci.org/public/---Found at http://repository.sonatype.org/content/groups/sonatype-public-grid/Found at http://repo1.maven.org/maven2
    Totalrepo.jenkins-ci.orgsonatype-snapshotsapache.snapshotssonatype-nexus-snapshotssonatype-public-gridcentral
    28 (compile: 16, test: 12)285002828
    diff --git a/dependency-updates-report.html b/dependency-updates-report.html index d2913ae..fad5e22 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -157,7 +157,7 @@
    -

    Overview

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

    # of dependencies using the latest version available3
    # 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 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.1compilejar2.2
    commons-langcommons-lang2.6compilejar
    dom4jdom4j1.6.1compilejar
    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 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
    1.1.4
    1.1.6 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-atlassian-1
    4.2.1-atlassian-2
    4.2.1-atlassian-5
    4.2.1
    4.2.2
    4.2.3
    4.2.4
    4.2.5
    4.2.6
    4.3-alpha1
    4.3-beta1
    4.3-beta2
    4.3
    4.3.1
    4.3.2
    4.3.3 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-atlassian-1
    4.2.1-atlassian-2
    4.2.1
    4.2.2
    4.2.3
    4.2.4
    4.2.5
    4.2.6
    4.3-alpha1
    4.3-beta1
    4.3-beta2
    4.3
    4.3.1
    4.3.2
    4.3.3 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.8.9
    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.0.7
    2.0.8
    2.1.0-beta-1
    2.1.0-rc-1
    2.1.0-rc-2
    2.1.0-rc-3
    2.1.0
    2.1.1
    2.1.2
    2.1.3
    2.1.4
    2.1.5
    2.1.6
    2.1.7
    2.1.8
    2.1.9
    2.2.0-beta-1
    2.2.0-beta-2
    2.2.0-rc-1
    2.2.0-rc-2
    2.2.0-rc-3
    2.2.0
    2.2.1
    2.2.2 Latest Major
    +

    Overview

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

    # of dependencies using the latest version available3
    # 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 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.1compilejar2.2
    commons-langcommons-lang2.6compilejar
    dom4jdom4j1.6.1compilejar
    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 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
    1.1.4
    1.1.6 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-atlassian-1
    4.2.1-atlassian-2
    4.2.1-atlassian-5
    4.2.1
    4.2.2
    4.2.3
    4.2.4
    4.2.5
    4.2.6
    4.3-alpha1
    4.3-beta1
    4.3-beta2
    4.3
    4.3.1
    4.3.2
    4.3.3 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-atlassian-1
    4.2.1-atlassian-2
    4.2.1
    4.2.2
    4.2.3
    4.2.4
    4.2.5
    4.2.6
    4.3-alpha1
    4.3-beta1
    4.3-beta2
    4.3
    4.3.1
    4.3.2
    4.3.3 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.8.9
    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.0.7
    2.0.8
    2.1.0-beta-1
    2.1.0-rc-1
    2.1.0-rc-2
    2.1.0-rc-3
    2.1.0
    2.1.1
    2.1.2
    2.1.3
    2.1.4
    2.1.5
    2.1.6
    2.1.7
    2.1.8
    2.1.9
    2.2.0-beta-1
    2.2.0-beta-2
    2.2.0-rc-1
    2.2.0-rc-2
    2.2.0-rc-3
    2.2.0
    2.2.1
    2.2.2
    2.3.0-beta-1
    2.3.0-beta-2 Latest Major
    diff --git a/distribution-management.html b/distribution-management.html index 70b65f7..8c611e3 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/download.html b/download.html index 69656e0..3a4efd6 100644 --- a/download.html +++ b/download.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/faq.html b/faq.html index 944e3bf..c3f5a2e 100644 --- a/faq.html +++ b/faq.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Frequently Asked Questions
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/findbugs.html b/findbugs.html index 0f74a0c..9c2da51 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -157,7 +157,7 @@
    -

    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
    911000

    org.rundeck.api.domain.BaseState

    BugCategoryDetailsLinePriority
    org.rundeck.api.domain.BaseState.getEndTime() may expose internal representation by returning BaseState.endTimeMALICIOUS_CODEEI_EXPOSE_REP33Medium
    org.rundeck.api.domain.BaseState.getStartTime() may expose internal representation by returning BaseState.startTimeMALICIOUS_CODEEI_EXPOSE_REP21Medium
    org.rundeck.api.domain.BaseState.getUpdateTime() may expose internal representation by returning BaseState.updateTimeMALICIOUS_CODEEI_EXPOSE_REP57Medium
    org.rundeck.api.domain.BaseState.setEndTime(Date) may expose internal representation by storing an externally mutable object into BaseState.endTimeMALICIOUS_CODEEI_EXPOSE_REP237Medium
    org.rundeck.api.domain.BaseState.setStartTime(Date) may expose internal representation by storing an externally mutable object into BaseState.startTimeMALICIOUS_CODEEI_EXPOSE_REP225Medium
    org.rundeck.api.domain.BaseState.setUpdateTime(Date) may expose internal representation by storing an externally mutable object into BaseState.updateTimeMALICIOUS_CODEEI_EXPOSE_REP261Medium

    org.rundeck.api.domain.RundeckOutputEntry

    BugCategoryDetailsLinePriority
    org.rundeck.api.domain.RundeckOutputEntry.getAbsoluteTime() may expose internal representation by returning RundeckOutputEntry.absoluteTimeMALICIOUS_CODEEI_EXPOSE_REP180Medium
    org.rundeck.api.domain.RundeckOutputEntry.setAbsoluteTime(Date) may expose internal representation by storing an externally mutable object into RundeckOutputEntry.absoluteTimeMALICIOUS_CODEEI_EXPOSE_REP2184Medium

    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
    +

    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
    1211000

    org.rundeck.api.domain.BaseState

    BugCategoryDetailsLinePriority
    org.rundeck.api.domain.BaseState.getEndTime() may expose internal representation by returning BaseState.endTimeMALICIOUS_CODEEI_EXPOSE_REP33Medium
    org.rundeck.api.domain.BaseState.getStartTime() may expose internal representation by returning BaseState.startTimeMALICIOUS_CODEEI_EXPOSE_REP21Medium
    org.rundeck.api.domain.BaseState.getUpdateTime() may expose internal representation by returning BaseState.updateTimeMALICIOUS_CODEEI_EXPOSE_REP57Medium
    org.rundeck.api.domain.BaseState.setEndTime(Date) may expose internal representation by storing an externally mutable object into BaseState.endTimeMALICIOUS_CODEEI_EXPOSE_REP237Medium
    org.rundeck.api.domain.BaseState.setStartTime(Date) may expose internal representation by storing an externally mutable object into BaseState.startTimeMALICIOUS_CODEEI_EXPOSE_REP225Medium
    org.rundeck.api.domain.BaseState.setUpdateTime(Date) may expose internal representation by storing an externally mutable object into BaseState.updateTimeMALICIOUS_CODEEI_EXPOSE_REP261Medium

    org.rundeck.api.domain.RundeckOutputEntry

    BugCategoryDetailsLinePriority
    org.rundeck.api.domain.RundeckOutputEntry.getAbsoluteTime() may expose internal representation by returning RundeckOutputEntry.absoluteTimeMALICIOUS_CODEEI_EXPOSE_REP180Medium
    org.rundeck.api.domain.RundeckOutputEntry.setAbsoluteTime(Date) may expose internal representation by storing an externally mutable object into RundeckOutputEntry.absoluteTimeMALICIOUS_CODEEI_EXPOSE_REP2184Medium

    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
    diff --git a/groovy.html b/groovy.html index 2074151..3337467 100644 --- a/groovy.html +++ b/groovy.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/index.html b/index.html index 0e5cccc..e7a3a7e 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/integration.html b/integration.html index 7eb93af..3db37fb 100644 --- a/integration.html +++ b/integration.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Continuous Integration
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/issue-tracking.html b/issue-tracking.html index 1a3823c..d5ad342 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/jruby.html b/jruby.html index f51e02f..3b61e04 100644 --- a/jruby.html +++ b/jruby.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/jython.html b/jython.html index 8d5ef66..b28f959 100644 --- a/jython.html +++ b/jython.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/license.html b/license.html index a9842d1..ccef1ba 100644 --- a/license.html +++ b/license.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Project License
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/mail-lists.html b/mail-lists.html index 82433e2..188ad2a 100644 --- a/mail-lists.html +++ b/mail-lists.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Project Mailing Lists
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/plugin-updates-report.html b/plugin-updates-report.html index 0145e67..08e75b4 100644 --- a/plugin-updates-report.html +++ b/plugin-updates-report.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Plugin Updates Report
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -157,7 +157,7 @@
    -

    Overview

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

    # of plugins using the latest version available2
    # of plugins where the next version available is smaller than an incremental version update2
    # of plugins where the next version available is an incremental version update3
    # of plugins where the next version available is a minor version update24
    # 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.72.8
    org.apache.maven.pluginsmaven-ear-plugin2.3.12.3.22.4
    org.apache.maven.pluginsmaven-eclipse-plugin2.82.9
    org.apache.maven.pluginsmaven-ejb-plugin2.12.2
    org.apache.maven.pluginsmaven-enforcer-plugin1.0.11.1
    org.apache.maven.pluginsmaven-gpg-plugin1.41.5
    org.apache.maven.pluginsmaven-help-plugin2.1.12.2
    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.1-atlassian-32.8.12.9
    org.apache.maven.pluginsmaven-plugin-plugin2.4.32.53.0
    org.apache.maven.pluginsmaven-pmd-plugin2.62.73.0
    org.apache.maven.pluginsmaven-rar-plugin2.22.3
    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.apache.maven.pluginsmaven-war-plugin2.1-alpha-22.1-beta-12.1.12.2
    org.codehaus.mojofindbugs-maven-plugin2.3.22.3.32.4.0
    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.62.7
    org.apache.maven.pluginsmaven-jxr-plugin2.32.4
    org.apache.maven.pluginsmaven-project-info-reports-plugin2.42.5
    org.codehaus.mojotaglist-maven-plugin2.4
    org.codehaus.mojoversions-maven-plugin1.21.32.0
    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 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-changes-plugin

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-changes-plugin
    Current Version2.6
    Newer versions2.7 Next Minor
    2.7.1
    2.8
    2.9 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
    2.10
    2.11 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-jenkins-1
    2.5
    2.5.1 Latest Minor
    3.0 Next Major
    3.1 Latest 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
    2.7
    2.8 Latest Minor

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

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

    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
    2.7
    2.8
    2.9 Latest Minor

    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-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 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
    1.3
    1.3.1 Latest Minor

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

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-gpg-plugin
    Current Version1.4
    Newer versions1.5 Next Minor

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

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

    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
    2.5
    2.5.1 Latest 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 version available.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-javadoc-plugin
    Current Version2.8
    Newer versions2.8.1-atlassian-3 Next Version
    2.8.1 Next Incremental
    2.9 Next Minor
    2.9.1 Latest Minor

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

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

    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
    2.9 Latest Minor
    3.0 Next Major
    3.1
    3.2 Latest Major

    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
    3.0 Next Major
    3.0.1 Latest Major

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

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

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

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-rar-plugin
    Current Version2.2
    Newer versions2.3 Next 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
    2.4.1
    2.4.2 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
    3.3 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
    2.14
    2.14.1
    2.15
    2.16 Latest Minor

    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
    2.2 Next Minor
    2.3
    2.4 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
    2.5.3 Latest Minor

    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 There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.codehaus.mojo
    Artifact Idversions-maven-plugin
    Current Version1.2
    Newer versions1.3 Next Minor
    1.3.1 Latest Minor
    2.0 Next Major
    2.1 Latest Major
    +

    Overview

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

    # of plugins using the latest version available2
    # of plugins where the next version available is smaller than an incremental version update2
    # of plugins where the next version available is an incremental version update3
    # of plugins where the next version available is a minor version update24
    # 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.72.8
    org.apache.maven.pluginsmaven-ear-plugin2.3.12.3.22.4
    org.apache.maven.pluginsmaven-eclipse-plugin2.82.9
    org.apache.maven.pluginsmaven-ejb-plugin2.12.2
    org.apache.maven.pluginsmaven-enforcer-plugin1.0.11.1
    org.apache.maven.pluginsmaven-gpg-plugin1.41.5
    org.apache.maven.pluginsmaven-help-plugin2.1.12.2
    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.1-atlassian-32.8.12.9
    org.apache.maven.pluginsmaven-plugin-plugin2.4.32.53.0
    org.apache.maven.pluginsmaven-pmd-plugin2.62.73.0
    org.apache.maven.pluginsmaven-rar-plugin2.22.3
    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.apache.maven.pluginsmaven-war-plugin2.1-alpha-22.1-beta-12.1.12.2
    org.codehaus.mojofindbugs-maven-plugin2.3.22.3.32.4.0
    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.62.7
    org.apache.maven.pluginsmaven-jxr-plugin2.32.4
    org.apache.maven.pluginsmaven-project-info-reports-plugin2.42.5
    org.codehaus.mojotaglist-maven-plugin2.4
    org.codehaus.mojoversions-maven-plugin1.21.32.0
    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 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-changes-plugin

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-changes-plugin
    Current Version2.6
    Newer versions2.7 Next Minor
    2.7.1
    2.8
    2.9
    2.10 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
    2.10
    2.11
    2.12
    2.12.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-jenkins-1
    2.5
    2.5.1 Latest Minor
    3.0 Next Major
    3.1 Latest 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
    2.7
    2.8 Latest Minor

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

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

    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
    2.7
    2.8
    2.9 Latest Minor

    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-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 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
    1.3
    1.3.1 Latest Minor

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

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-gpg-plugin
    Current Version1.4
    Newer versions1.5 Next Minor

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

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

    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
    2.5
    2.5.1 Latest 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 version available.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-javadoc-plugin
    Current Version2.8
    Newer versions2.8.1-atlassian-3 Next Version
    2.8.1 Next Incremental
    2.9 Next Minor
    2.9.1 Latest Minor

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

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

    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
    2.9 Latest Minor
    3.0 Next Major
    3.1
    3.2 Latest Major

    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
    3.0 Next Major
    3.0.1
    3.1 Latest Major

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

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

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

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.apache.maven.plugins
    Artifact Idmaven-rar-plugin
    Current Version2.2
    Newer versions2.3 Next 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
    2.4.1
    2.4.2
    2.5 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
    3.3 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
    2.14
    2.14.1
    2.15
    2.16
    2.17 Latest Minor

    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
    2.2 Next Minor
    2.3
    2.4 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
    2.5.3 Latest Minor

    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 There is at least one newer minor version available. Minor updates are sometimes passive.
    Group Idorg.codehaus.mojo
    Artifact Idversions-maven-plugin
    Current Version1.2
    Newer versions1.3 Next Minor
    1.3.1 Latest Minor
    2.0 Next Major
    2.1 Latest Major
    diff --git a/pmd.html b/pmd.html index 05a904c..1c303f3 100644 --- a/pmd.html +++ b/pmd.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • PMD Results
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -157,7 +157,7 @@
    -

    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.NameValuePair'24

    org/rundeck/api/domain/BaseState.java

    ViolationLine
    Avoid unused imports such as 'java.util.List'4
    Avoid unused imports such as 'java.util.Set'5

    org/rundeck/api/domain/RundeckOutput.java

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

    org/rundeck/api/domain/WorkflowState.java

    ViolationLine
    Avoid unused imports such as 'java.util.Date'3
    Avoid unused imports such as 'java.util.Map'5

    org/rundeck/api/domain/WorkflowStepState.java

    ViolationLine
    Avoid unused imports such as 'java.util.List'3

    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/PagedResultParser.java

    ViolationLine
    Avoid empty catch blocks112 - 113

    org/rundeck/api/parser/WorkflowStateParser.java

    ViolationLine
    Avoid empty catch blocks49 - 50

    org/rundeck/api/parser/WorkflowStepContextStateParser.java

    ViolationLine
    Avoid unused imports such as 'org.rundeck.api.domain.WorkflowStepState'5

    org/rundeck/api/parser/WorkflowStepStateParser.java

    ViolationLine
    Avoid unused imports such as 'org.rundeck.api.domain.BaseState'5
    +

    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.dom4j.Document'40
    Avoid empty if statements313 - 315

    org/rundeck/api/RundeckClient.java

    ViolationLine
    An empty statement (semicolon) not part of a loop442

    org/rundeck/api/domain/BaseState.java

    ViolationLine
    Avoid unused imports such as 'java.util.List'4
    Avoid unused imports such as 'java.util.Set'5

    org/rundeck/api/domain/RundeckOutput.java

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

    org/rundeck/api/domain/WorkflowState.java

    ViolationLine
    Avoid unused imports such as 'java.util.Date'3
    Avoid unused imports such as 'java.util.Map'5

    org/rundeck/api/domain/WorkflowStepState.java

    ViolationLine
    Avoid unused imports such as 'java.util.List'3

    org/rundeck/api/generator/ProjectConfigGenerator.java

    ViolationLine
    Avoid unused imports such as 'org.dom4j.Document'3

    org/rundeck/api/generator/ProjectGenerator.java

    ViolationLine
    Avoid unused imports such as 'org.dom4j.Document'3

    org/rundeck/api/generator/XmlDocumentGenerator.java

    ViolationLine
    Avoid unused imports such as 'org.dom4j.Node'5

    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/PagedResultParser.java

    ViolationLine
    Avoid empty catch blocks112 - 113

    org/rundeck/api/parser/ProjectParserV11.java

    ViolationLine
    Avoid unused imports such as 'org.rundeck.api.domain.ProjectConfig'4
    Avoid unused imports such as 'java.util.List'7

    org/rundeck/api/parser/WorkflowStateParser.java

    ViolationLine
    Avoid empty catch blocks49 - 50

    org/rundeck/api/parser/WorkflowStepContextStateParser.java

    ViolationLine
    Avoid unused imports such as 'org.rundeck.api.domain.WorkflowStepState'5

    org/rundeck/api/parser/WorkflowStepStateParser.java

    ViolationLine
    Avoid unused imports such as 'org.rundeck.api.domain.BaseState'5
    diff --git a/pmd.xml b/pmd.xml index 291ac2c..7692733 100644 --- a/pmd.xml +++ b/pmd.xml @@ -1,8 +1,16 @@ - + - -Avoid unused imports such as 'org.apache.http.NameValuePair' + +Avoid unused imports such as 'org.dom4j.Document' + + +Avoid empty if statements + + + + +An empty statement (semicolon) not part of a loop @@ -31,6 +39,21 @@ Avoid unused imports such as 'java.util.Map' Avoid unused imports such as 'java.util.List' + + +Avoid unused imports such as 'org.dom4j.Document' + + + + +Avoid unused imports such as 'org.dom4j.Document' + + + + +Avoid unused imports such as 'org.dom4j.Node' + + Avoid unused imports such as 'org.dom4j.Element' @@ -49,6 +72,14 @@ Avoid unused imports such as 'org.dom4j.Element' Avoid empty catch blocks + + +Avoid unused imports such as 'org.rundeck.api.domain.ProjectConfig' + + +Avoid unused imports such as 'java.util.List' + + Avoid empty catch blocks diff --git a/project-info.html b/project-info.html index 809bd73..d8ddf24 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/project-reports.html b/project-reports.html index bff31f5..2fd1605 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/project-summary.html b/project-summary.html index 72810d6..738b6d1 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -151,7 +151,7 @@
    -

    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
    Version10.0
    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
    Version11.0-SNAPSHOT
    Typejar
    JDK Rev1.6
    diff --git a/property-updates-report.html b/property-updates-report.html index 5d2dbff..e7d83ec 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -157,7 +157,7 @@
    -

    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 available2
    # of properties where the next version available is smaller than an incremental version update1
    # of properties where the next version available is an incremental version update2
    # of properties where the next version available is a minor version update21
    # 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.1-atlassian-32.8.12.9
    ${plugin.taglist.version}2.4
    ${plugin.eclipse.version}2.82.9
    ${plugin.help.version}2.1.12.2
    ${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.73.0
    ${plugin.jxr.version}2.32.4
    ${plugin.gpg.version}1.41.5
    ${plugin.checkstyle.version}2.82.9
    ${plugin.changes.version}2.62.7
    ${plugin.deploy.version}2.72.8
    ${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
    2.9 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
    2.10
    2.11 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-jenkins-1
    2.5
    2.5.1 Latest Minor
    3.0 Next Major
    3.1 Latest 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
    2.7
    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.deploy.version}

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.deploy.version}
    Associated artifactsorg.apache.maven.plugins:maven-deploy-plugin
    Current Version2.7
    Newer versions2.8 Next Minor
    2.8.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.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
    1.3
    1.3.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.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
    2.5.3 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 There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.gpg.version}
    Associated artifactsorg.apache.maven.plugins:maven-gpg-plugin
    Current Version1.4
    Newer versions1.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.help.version}

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.help.version}
    Associated artifactsorg.apache.maven.plugins:maven-help-plugin
    Current Version2.1.1
    Newer versions2.2 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.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
    2.5
    2.5.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.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 version available.
    Property${plugin.javadoc.version}
    Associated artifactsorg.apache.maven.plugins:maven-javadoc-plugin
    Current Version2.8
    Newer versions2.8.1-atlassian-3 Next Version
    2.8.1 Next Incremental
    2.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.jxr.version}

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.jxr.version}
    Associated artifactsorg.apache.maven.plugins:maven-jxr-plugin
    Current Version2.3
    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.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
    3.0 Next Major
    3.0.1 Latest 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.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
    2.7 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
    2.4.1
    2.4.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.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
    3.3 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
    2.14
    2.14.1
    2.15
    2.16 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
    2.1 Latest 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
    +

    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 available2
    # of properties where the next version available is smaller than an incremental version update1
    # of properties where the next version available is an incremental version update2
    # of properties where the next version available is a minor version update21
    # 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.1-atlassian-32.8.12.9
    ${plugin.taglist.version}2.4
    ${plugin.eclipse.version}2.82.9
    ${plugin.help.version}2.1.12.2
    ${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.73.0
    ${plugin.jxr.version}2.32.4
    ${plugin.gpg.version}1.41.5
    ${plugin.checkstyle.version}2.82.9
    ${plugin.changes.version}2.62.7
    ${plugin.deploy.version}2.72.8
    ${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
    2.9
    2.10 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
    2.10
    2.11
    2.12
    2.12.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-jenkins-1
    2.5
    2.5.1 Latest Minor
    3.0 Next Major
    3.1 Latest 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
    2.7
    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.deploy.version}

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.deploy.version}
    Associated artifactsorg.apache.maven.plugins:maven-deploy-plugin
    Current Version2.7
    Newer versions2.8 Next Minor
    2.8.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.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
    1.3
    1.3.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.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
    2.5.3 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 There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.gpg.version}
    Associated artifactsorg.apache.maven.plugins:maven-gpg-plugin
    Current Version1.4
    Newer versions1.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.help.version}

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.help.version}
    Associated artifactsorg.apache.maven.plugins:maven-help-plugin
    Current Version2.1.1
    Newer versions2.2 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.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
    2.5
    2.5.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.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 version available.
    Property${plugin.javadoc.version}
    Associated artifactsorg.apache.maven.plugins:maven-javadoc-plugin
    Current Version2.8
    Newer versions2.8.1-atlassian-3 Next Version
    2.8.1 Next Incremental
    2.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.jxr.version}

    Status There is at least one newer minor version available. Minor updates are sometimes passive.
    Property${plugin.jxr.version}
    Associated artifactsorg.apache.maven.plugins:maven-jxr-plugin
    Current Version2.3
    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.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
    3.0 Next Major
    3.0.1
    3.1 Latest 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.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
    2.7 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
    2.4.1
    2.4.2
    2.5 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
    3.3 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
    2.14
    2.14.1
    2.15
    2.16
    2.17 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
    2.1 Latest 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
    diff --git a/scripting.html b/scripting.html index 40cfcc5..f731643 100644 --- a/scripting.html +++ b/scripting.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/source-repository.html b/source-repository.html index deb9498..91fa4ef 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: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/status.html b/status.html index dcdf259..298e902 100644 --- a/status.html +++ b/status.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • @@ -119,7 +119,7 @@
    -

    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

    RunDeck API version 6

    Documentation of the RunDeck API version 6

    • Execution Output format fixed - OK

    RunDeck API version 7

    Documentation of the RunDeck API version 7

    • Incubator for cluster mode job takeover - TODO

    RunDeck API version 8

    Documentation of the RunDeck API version 8

    • scriptInterpreter addition to run script and run url - OK
    • project parameter added to jobs import - OK

    RunDeck API version 9

    Documentation of the RunDeck API version 9

    • list running executions across all projects - OK
    • include project name in execution results - OK
    • Add uuidOption parameter to allow removing imported UUIDs to avoid creation conflicts - OK

    RunDeck API version 10

    Documentation of the RunDeck API version 10

    • Execution State - Retrieve workflow step and node state information - OK
    • Execution Output with State - Retrieve log output with state change information - OK
    • Execution Output - Retrieve log output for a particular node or step - OK
    • Execution Info - added successfulNodes and failedNodes detail. - OK
    • Deprecation: Remove methods deprecated until version 10. - OK
    +

    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

    RunDeck API version 6

    Documentation of the RunDeck API version 6

    • Execution Output format fixed - OK

    RunDeck API version 7

    Documentation of the RunDeck API version 7

    • Incubator for cluster mode job takeover - TODO

    RunDeck API version 8

    Documentation of the RunDeck API version 8

    • scriptInterpreter addition to run script and run url - OK
    • project parameter added to jobs import - OK

    RunDeck API version 9

    Documentation of the RunDeck API version 9

    • list running executions across all projects - OK
    • include project name in execution results - OK
    • Add uuidOption parameter to allow removing imported UUIDs to avoid creation conflicts - OK

    RunDeck API version 10

    Documentation of the RunDeck API version 10

    • Execution State - Retrieve workflow step and node state information - OK
    • Execution Output with State - Retrieve log output with state change information - OK
    • Execution Output - Retrieve log output for a particular node or step - OK
    • Execution Info - added successfulNodes and failedNodes detail. - OK
    • Deprecation: Remove methods deprecated until version 10. - OK

    RunDeck API version 11

    Documentation of the RunDeck API version 11

    • Project creation - OK
    • Get Project configuration - OK
    • Set Project configuration - OK
    • Get/Set Project configuration keys - OK
    • Delete project - OK
    • Export project archive - OK
    • Import project archive - OK
    • Key file upload - OK
    • Key file delete - OK
    • Key file list - OK
    • Key file get - OK
    • API Token create - OK
    • API Token list - OK
    • API Token delete - OK
    diff --git a/taglist.html b/taglist.html index 335a585..3bc923a 100644 --- a/taglist.html +++ b/taglist.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Tag List report
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/team-list.html b/team-list.html index b709b25..8c5a0ee 100644 --- a/team-list.html +++ b/team-list.html @@ -1,5 +1,5 @@ - + @@ -12,7 +12,7 @@ - + @@ -50,8 +50,8 @@
  • Team list
  • -
  • Last Published: 2014-02-27
  • |
  • -
  • Version: 10.0
  • +
  • Last Published: 2014-04-23
  • |
  • +
  • Version: 11.0-SNAPSHOT
  • diff --git a/testapidocs/assets/navtree_data.js b/testapidocs/assets/navtree_data.js index faaa59e..bcd009e 100644 --- a/testapidocs/assets/navtree_data.js +++ b/testapidocs/assets/navtree_data.js @@ -1,7 +1,9 @@ var NAVTREE_DATA = [ [ "org.rundeck.api", "org/rundeck/api/package-summary.html", [ [ "Description", "org/rundeck/api/package-descr.html", null, "" ], [ "Classes", null, [ [ "RundeckClientTest", "org/rundeck/api/RundeckClientTest.html", null, "" ] ] , "" ] ] -, "" ], [ "org.rundeck.api.parser", "org/rundeck/api/parser/package-summary.html", [ [ "Description", "org/rundeck/api/parser/package-descr.html", null, "" ], [ "Classes", null, [ [ "AbortParserTest", "org/rundeck/api/parser/AbortParserTest.html", null, "" ], [ "BaseStateParserTest", "org/rundeck/api/parser/BaseStateParserTest.html", null, "" ], [ "BulkDeleteParserTest", "org/rundeck/api/parser/BulkDeleteParserTest.html", null, "" ], [ "DeleteParserTest", "org/rundeck/api/parser/DeleteParserTest.html", null, "" ], [ "EventParserTest", "org/rundeck/api/parser/EventParserTest.html", null, "" ], [ "ExecutionParserTest", "org/rundeck/api/parser/ExecutionParserTest.html", null, "" ], [ "ExecutionStateParserTest", "org/rundeck/api/parser/ExecutionStateParserTest.html", null, "" ], [ "HistoryParserTest", "org/rundeck/api/parser/HistoryParserTest.html", null, "" ], [ "IndexedWorkflowStepStateParserTest", "org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html", null, "" ], [ "JobParserTest", "org/rundeck/api/parser/JobParserTest.html", null, "" ], [ "JobsImportResultParserTest", "org/rundeck/api/parser/JobsImportResultParserTest.html", null, "" ], [ "ListParserTest", "org/rundeck/api/parser/ListParserTest.html", null, "" ], [ "NodeParserTest", "org/rundeck/api/parser/NodeParserTest.html", null, "" ], [ "OutputEntryParserTest", "org/rundeck/api/parser/OutputEntryParserTest.html", null, "" ], [ "OutputParserTest", "org/rundeck/api/parser/OutputParserTest.html", null, "" ], [ "ParserHelperTest", "org/rundeck/api/parser/ParserHelperTest.html", null, "" ], [ "ProjectParserTest", "org/rundeck/api/parser/ProjectParserTest.html", null, "" ], [ "StringParserTest", "org/rundeck/api/parser/StringParserTest.html", null, "" ], [ "SystemInfoParserTest", "org/rundeck/api/parser/SystemInfoParserTest.html", null, "" ], [ "WorkflowStateParserTest", "org/rundeck/api/parser/WorkflowStateParserTest.html", null, "" ], [ "WorkflowStepStateParserTest", "org/rundeck/api/parser/WorkflowStepStateParserTest.html", null, "" ] ] +, "" ], [ "org.rundeck.api.generator", "org/rundeck/api/generator/package-summary.html", [ [ "Description", "org/rundeck/api/generator/package-descr.html", null, "" ], [ "Classes", null, [ [ "ProjectConfigGeneratorTest", "org/rundeck/api/generator/ProjectConfigGeneratorTest.html", null, "" ], [ "ProjectGeneratorTest", "org/rundeck/api/generator/ProjectGeneratorTest.html", null, "" ] ] +, "" ] ] +, "" ], [ "org.rundeck.api.parser", "org/rundeck/api/parser/package-summary.html", [ [ "Description", "org/rundeck/api/parser/package-descr.html", null, "" ], [ "Classes", null, [ [ "AbortParserTest", "org/rundeck/api/parser/AbortParserTest.html", null, "" ], [ "BaseStateParserTest", "org/rundeck/api/parser/BaseStateParserTest.html", null, "" ], [ "BulkDeleteParserTest", "org/rundeck/api/parser/BulkDeleteParserTest.html", null, "" ], [ "DeleteParserTest", "org/rundeck/api/parser/DeleteParserTest.html", null, "" ], [ "EventParserTest", "org/rundeck/api/parser/EventParserTest.html", null, "" ], [ "ExecutionParserTest", "org/rundeck/api/parser/ExecutionParserTest.html", null, "" ], [ "ExecutionStateParserTest", "org/rundeck/api/parser/ExecutionStateParserTest.html", null, "" ], [ "HistoryParserTest", "org/rundeck/api/parser/HistoryParserTest.html", null, "" ], [ "IndexedWorkflowStepStateParserTest", "org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html", null, "" ], [ "JobParserTest", "org/rundeck/api/parser/JobParserTest.html", null, "" ], [ "JobsImportResultParserTest", "org/rundeck/api/parser/JobsImportResultParserTest.html", null, "" ], [ "ListParserTest", "org/rundeck/api/parser/ListParserTest.html", null, "" ], [ "NodeParserTest", "org/rundeck/api/parser/NodeParserTest.html", null, "" ], [ "OutputEntryParserTest", "org/rundeck/api/parser/OutputEntryParserTest.html", null, "" ], [ "OutputParserTest", "org/rundeck/api/parser/OutputParserTest.html", null, "" ], [ "ParserHelperTest", "org/rundeck/api/parser/ParserHelperTest.html", null, "" ], [ "ProjectConfigParserTest", "org/rundeck/api/parser/ProjectConfigParserTest.html", null, "" ], [ "ProjectConfigPropertyParserTest", "org/rundeck/api/parser/ProjectConfigPropertyParserTest.html", null, "" ], [ "ProjectParserTest", "org/rundeck/api/parser/ProjectParserTest.html", null, "" ], [ "ProjectParserV11Test", "org/rundeck/api/parser/ProjectParserV11Test.html", null, "" ], [ "StringParserTest", "org/rundeck/api/parser/StringParserTest.html", null, "" ], [ "SystemInfoParserTest", "org/rundeck/api/parser/SystemInfoParserTest.html", null, "" ], [ "WorkflowStateParserTest", "org/rundeck/api/parser/WorkflowStateParserTest.html", null, "" ], [ "WorkflowStepStateParserTest", "org/rundeck/api/parser/WorkflowStepStateParserTest.html", null, "" ] ] , "" ] ] , "" ], [ "org.rundeck.api.util", "org/rundeck/api/util/package-summary.html", [ [ "Description", "org/rundeck/api/util/package-descr.html", null, "" ], [ "Classes", null, [ [ "ParametersUtilTest", "org/rundeck/api/util/ParametersUtilTest.html", null, "" ] ] , "" ] ] diff --git a/testapidocs/packages b/testapidocs/packages index 4dc9fc0..6e67149 100644 --- a/testapidocs/packages +++ b/testapidocs/packages @@ -1,3 +1,4 @@ +org.rundeck.api.generator org.rundeck.api.parser org.rundeck.api org.rundeck.api.util \ No newline at end of file diff --git a/testapidocs/proof-read.txt b/testapidocs/proof-read.txt index 2b53b24..c891adc 100644 --- a/testapidocs/proof-read.txt +++ b/testapidocs/proof-read.txt @@ -4,6 +4,9 @@ javadoc proofread file: ./proof-read.txt === reference/org/rundeck/api/package-descr.html === +=== reference/org/rundeck/api/generator/package-descr.html === + + === reference/org/rundeck/api/parser/package-descr.html === @@ -13,6 +16,18 @@ javadoc proofread file: ./proof-read.txt === reference/packages.html === +=== org/rundeck/api/generator/ProjectGeneratorTest.html === + ProjectGeneratorTest is ... +CONSTRUCTOR: ProjectGeneratorTest +METHOD: generate + + +=== org/rundeck/api/generator/ProjectConfigGeneratorTest.html === + ProjectConfigGeneratorTest is ... +CONSTRUCTOR: ProjectConfigGeneratorTest +METHOD: generate + + === org/rundeck/api/parser/WorkflowStepStateParserTest.html === $INTERFACE is ... User: greg Date: 1/18/14 Time: 9:00 AM CONSTRUCTOR: WorkflowStepStateParserTest @@ -42,6 +57,12 @@ CONSTRUCTOR: StringParserTest METHOD: parseJob +=== org/rundeck/api/parser/ProjectParserV11Test.html === + ProjectParserV11Test is ... +CONSTRUCTOR: ProjectParserV11Test +METHOD: parseProject + + === org/rundeck/api/parser/ProjectParserTest.html === Test the {@link/ProjectParser} @@ -49,6 +70,19 @@ CONSTRUCTOR: ProjectParserTest METHOD: parseProject +=== org/rundeck/api/parser/ProjectConfigPropertyParserTest.html === + Test +CONSTRUCTOR: ProjectConfigPropertyParserTest +METHOD: parseFromProject +METHOD: parseProperty + + +=== org/rundeck/api/parser/ProjectConfigParserTest.html === + ProjectConfigParserTest is ... +CONSTRUCTOR: ProjectConfigParserTest +METHOD: parseProject + + === org/rundeck/api/parser/ParserHelperTest.html === Test the {@link/ParserHelper} @@ -198,6 +232,7 @@ FIELD: TEST_TOKEN_3 FIELD: TEST_TOKEN_4 FIELD: TEST_TOKEN_5 FIELD: TEST_TOKEN_6 +FIELD: TEST_TOKEN_7 FIELD: recorder CONSTRUCTOR: RundeckClientTest METHOD: abortExecution @@ -207,6 +242,13 @@ METHOD: apiVersionDefaultLatest METHOD: bulkDelete METHOD: bulkDeleteFailDNE METHOD: bulkDeleteFailUnauthorized +METHOD: createProject +METHOD: deleteApiToken + get api token +METHOD: deleteKey + delete ssh key +METHOD: deleteProject +METHOD: deleteProjectConfigKeyed METHOD: executionOutputBasic Execution output METHOD: executionOutputForNode @@ -221,6 +263,11 @@ METHOD: executionOutputStateOnly Execution output state sequence METHOD: executionState Execution state structure +METHOD: exportProject +METHOD: generateApiToken + generate api token +METHOD: getApiToken + get api token METHOD: getExecutions METHOD: getExecutionsPaging Test paging values from results @@ -228,6 +275,17 @@ METHOD: getHistory METHOD: getHistoryExcludeJoblist METHOD: getHistoryJoblist METHOD: getHistoryUser +METHOD: getKeyData_private + get ssh key data +METHOD: getKeyData_public + get ssh key data +METHOD: getKey_private + get ssh key +METHOD: getKey_public + get ssh key +METHOD: getProjectConfig +METHOD: getProjectConfigKeyed +METHOD: getProjectConfigKeyedDNE METHOD: getProjects METHOD: importJobsContextProject Import jobs, xml contains project context @@ -243,12 +301,28 @@ METHOD: importJobsUUIDParamPreserveV9 Import jobs, project parameter v7 doesn' use parameter METHOD: importJobsUUIDParamRemoveV9 Import jobs, project parameter v7 doesn' use parameter +METHOD: importProjectFailure +METHOD: importProjectSuccess +METHOD: listApiTokens + list api tokens all +METHOD: listApiTokens_user + list api tokens for user +METHOD: listKeyDirectory + list directory +METHOD: listKeyDirectoryRoot + list root METHOD: runningExecutionsV8 Running executions for all projects using API v8, which queries for project list and then individually queries each project's now running METHOD: runningExecutionsV9 Running executions for all projects using API v9 +METHOD: setProjectConfig +METHOD: setProjectConfigKeyed METHOD: setUp +METHOD: storeKey_private + Store ssh key +METHOD: storeKey_public + Store ssh key METHOD: triggerAdhocCommand METHOD: triggerAdhocCommandAsUser METHOD: triggerAdhocCommandAsUserUnauthorized diff --git a/testapidocs/reference/classes.html b/testapidocs/reference/classes.html index b93a7ec..143a1ca 100644 --- a/testapidocs/reference/classes.html +++ b/testapidocs/reference/classes.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • @@ -388,12 +390,42 @@
    ProjectConfigGeneratorTestProjectConfigGeneratorTest is ... 
    ProjectConfigParserTestProjectConfigParserTest is ... 
    ProjectConfigPropertyParserTestTest 
    ProjectGeneratorTestProjectGeneratorTest is ... 
    ProjectParserTest Test the ProjectParser 
    ProjectParserV11TestProjectParserV11Test is ... 
    diff --git a/testapidocs/reference/current.xml b/testapidocs/reference/current.xml index aae1fe1..ed2d269 100644 --- a/testapidocs/reference/current.xml +++ b/testapidocs/reference/current.xml @@ -106,6 +106,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • @@ -241,6 +243,38 @@ + + + + + ProjectConfigGeneratorTest + + + + +   + + + + + + + + + + + ProjectGeneratorTest + + + + +   + + + + + + @@ -497,6 +531,38 @@ + + + + + ProjectConfigParserTest + + + + +   + + + + + + + + + + + ProjectConfigPropertyParserTest + + + + +   + + + + + + @@ -513,6 +579,22 @@ + + + + + ProjectParserV11Test + + + + +   + + + + + + diff --git a/testapidocs/reference/lists.js b/testapidocs/reference/lists.js index b9bc0f8..fe0aa40 100644 --- a/testapidocs/reference/lists.js +++ b/testapidocs/reference/lists.js @@ -1,29 +1,35 @@ var DATA = [ { id:0, label:"org.rundeck.api", link:"org/rundeck/api/package-summary.html", type:"package" }, { id:1, label:"org.rundeck.api.RundeckClientTest", link:"org/rundeck/api/RundeckClientTest.html", type:"class" }, - { id:2, label:"org.rundeck.api.parser", link:"org/rundeck/api/parser/package-summary.html", type:"package" }, - { id:3, label:"org.rundeck.api.parser.AbortParserTest", link:"org/rundeck/api/parser/AbortParserTest.html", type:"class" }, - { id:4, label:"org.rundeck.api.parser.BaseStateParserTest", link:"org/rundeck/api/parser/BaseStateParserTest.html", type:"class" }, - { id:5, label:"org.rundeck.api.parser.BulkDeleteParserTest", link:"org/rundeck/api/parser/BulkDeleteParserTest.html", type:"class" }, - { id:6, label:"org.rundeck.api.parser.DeleteParserTest", link:"org/rundeck/api/parser/DeleteParserTest.html", type:"class" }, - { id:7, label:"org.rundeck.api.parser.EventParserTest", link:"org/rundeck/api/parser/EventParserTest.html", type:"class" }, - { id:8, label:"org.rundeck.api.parser.ExecutionParserTest", link:"org/rundeck/api/parser/ExecutionParserTest.html", type:"class" }, - { id:9, label:"org.rundeck.api.parser.ExecutionStateParserTest", link:"org/rundeck/api/parser/ExecutionStateParserTest.html", type:"class" }, - { id:10, label:"org.rundeck.api.parser.HistoryParserTest", link:"org/rundeck/api/parser/HistoryParserTest.html", type:"class" }, - { id:11, label:"org.rundeck.api.parser.IndexedWorkflowStepStateParserTest", link:"org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html", type:"class" }, - { id:12, label:"org.rundeck.api.parser.JobParserTest", link:"org/rundeck/api/parser/JobParserTest.html", type:"class" }, - { id:13, label:"org.rundeck.api.parser.JobsImportResultParserTest", link:"org/rundeck/api/parser/JobsImportResultParserTest.html", type:"class" }, - { id:14, label:"org.rundeck.api.parser.ListParserTest", link:"org/rundeck/api/parser/ListParserTest.html", type:"class" }, - { id:15, label:"org.rundeck.api.parser.NodeParserTest", link:"org/rundeck/api/parser/NodeParserTest.html", type:"class" }, - { id:16, label:"org.rundeck.api.parser.OutputEntryParserTest", link:"org/rundeck/api/parser/OutputEntryParserTest.html", type:"class" }, - { id:17, label:"org.rundeck.api.parser.OutputParserTest", link:"org/rundeck/api/parser/OutputParserTest.html", type:"class" }, - { id:18, label:"org.rundeck.api.parser.ParserHelperTest", link:"org/rundeck/api/parser/ParserHelperTest.html", type:"class" }, - { id:19, label:"org.rundeck.api.parser.ProjectParserTest", link:"org/rundeck/api/parser/ProjectParserTest.html", type:"class" }, - { id:20, label:"org.rundeck.api.parser.StringParserTest", link:"org/rundeck/api/parser/StringParserTest.html", type:"class" }, - { id:21, label:"org.rundeck.api.parser.SystemInfoParserTest", link:"org/rundeck/api/parser/SystemInfoParserTest.html", type:"class" }, - { id:22, label:"org.rundeck.api.parser.WorkflowStateParserTest", link:"org/rundeck/api/parser/WorkflowStateParserTest.html", type:"class" }, - { id:23, label:"org.rundeck.api.parser.WorkflowStepStateParserTest", link:"org/rundeck/api/parser/WorkflowStepStateParserTest.html", type:"class" }, - { id:24, label:"org.rundeck.api.util", link:"org/rundeck/api/util/package-summary.html", type:"package" }, - { id:25, label:"org.rundeck.api.util.ParametersUtilTest", link:"org/rundeck/api/util/ParametersUtilTest.html", type:"class" } + { id:2, label:"org.rundeck.api.generator", link:"org/rundeck/api/generator/package-summary.html", type:"package" }, + { id:3, label:"org.rundeck.api.generator.ProjectConfigGeneratorTest", link:"org/rundeck/api/generator/ProjectConfigGeneratorTest.html", type:"class" }, + { id:4, label:"org.rundeck.api.generator.ProjectGeneratorTest", link:"org/rundeck/api/generator/ProjectGeneratorTest.html", type:"class" }, + { id:5, label:"org.rundeck.api.parser", link:"org/rundeck/api/parser/package-summary.html", type:"package" }, + { id:6, label:"org.rundeck.api.parser.AbortParserTest", link:"org/rundeck/api/parser/AbortParserTest.html", type:"class" }, + { id:7, label:"org.rundeck.api.parser.BaseStateParserTest", link:"org/rundeck/api/parser/BaseStateParserTest.html", type:"class" }, + { id:8, label:"org.rundeck.api.parser.BulkDeleteParserTest", link:"org/rundeck/api/parser/BulkDeleteParserTest.html", type:"class" }, + { id:9, label:"org.rundeck.api.parser.DeleteParserTest", link:"org/rundeck/api/parser/DeleteParserTest.html", type:"class" }, + { id:10, label:"org.rundeck.api.parser.EventParserTest", link:"org/rundeck/api/parser/EventParserTest.html", type:"class" }, + { id:11, label:"org.rundeck.api.parser.ExecutionParserTest", link:"org/rundeck/api/parser/ExecutionParserTest.html", type:"class" }, + { id:12, label:"org.rundeck.api.parser.ExecutionStateParserTest", link:"org/rundeck/api/parser/ExecutionStateParserTest.html", type:"class" }, + { id:13, label:"org.rundeck.api.parser.HistoryParserTest", link:"org/rundeck/api/parser/HistoryParserTest.html", type:"class" }, + { id:14, label:"org.rundeck.api.parser.IndexedWorkflowStepStateParserTest", link:"org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html", type:"class" }, + { id:15, label:"org.rundeck.api.parser.JobParserTest", link:"org/rundeck/api/parser/JobParserTest.html", type:"class" }, + { id:16, label:"org.rundeck.api.parser.JobsImportResultParserTest", link:"org/rundeck/api/parser/JobsImportResultParserTest.html", type:"class" }, + { id:17, label:"org.rundeck.api.parser.ListParserTest", link:"org/rundeck/api/parser/ListParserTest.html", type:"class" }, + { id:18, label:"org.rundeck.api.parser.NodeParserTest", link:"org/rundeck/api/parser/NodeParserTest.html", type:"class" }, + { id:19, label:"org.rundeck.api.parser.OutputEntryParserTest", link:"org/rundeck/api/parser/OutputEntryParserTest.html", type:"class" }, + { id:20, label:"org.rundeck.api.parser.OutputParserTest", link:"org/rundeck/api/parser/OutputParserTest.html", type:"class" }, + { id:21, label:"org.rundeck.api.parser.ParserHelperTest", link:"org/rundeck/api/parser/ParserHelperTest.html", type:"class" }, + { id:22, label:"org.rundeck.api.parser.ProjectConfigParserTest", link:"org/rundeck/api/parser/ProjectConfigParserTest.html", type:"class" }, + { id:23, label:"org.rundeck.api.parser.ProjectConfigPropertyParserTest", link:"org/rundeck/api/parser/ProjectConfigPropertyParserTest.html", type:"class" }, + { id:24, label:"org.rundeck.api.parser.ProjectParserTest", link:"org/rundeck/api/parser/ProjectParserTest.html", type:"class" }, + { id:25, label:"org.rundeck.api.parser.ProjectParserV11Test", link:"org/rundeck/api/parser/ProjectParserV11Test.html", type:"class" }, + { id:26, label:"org.rundeck.api.parser.StringParserTest", link:"org/rundeck/api/parser/StringParserTest.html", type:"class" }, + { id:27, label:"org.rundeck.api.parser.SystemInfoParserTest", link:"org/rundeck/api/parser/SystemInfoParserTest.html", type:"class" }, + { id:28, label:"org.rundeck.api.parser.WorkflowStateParserTest", link:"org/rundeck/api/parser/WorkflowStateParserTest.html", type:"class" }, + { id:29, label:"org.rundeck.api.parser.WorkflowStepStateParserTest", link:"org/rundeck/api/parser/WorkflowStepStateParserTest.html", type:"class" }, + { id:30, label:"org.rundeck.api.util", link:"org/rundeck/api/util/package-summary.html", type:"package" }, + { id:31, label:"org.rundeck.api.util.ParametersUtilTest", link:"org/rundeck/api/util/ParametersUtilTest.html", type:"class" } ]; diff --git a/testapidocs/reference/org/rundeck/api/RundeckClientTest.html b/testapidocs/reference/org/rundeck/api/RundeckClientTest.html index 491eaa9..97e1979 100644 --- a/testapidocs/reference/org/rundeck/api/RundeckClientTest.html +++ b/testapidocs/reference/org/rundeck/api/RundeckClientTest.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • @@ -408,6 +410,13 @@ Summary: + + String + TEST_TOKEN_7 + + + + @@ -596,6 +605,92 @@ Summary: + void + + + createProject() + + + + + + + + + + + + + void + + + deleteApiToken() + +
    get api token +
    + + + + + + + + + + + + + void + + + deleteKey() + +
    delete ssh key +
    + + + + + + + + + + + + + void + + + deleteProject() + + + + + + + + + + + + + void + + + deleteProjectConfigKeyed() + + + + + + + + + + + + void @@ -608,7 +703,7 @@ Summary: - + @@ -627,7 +722,7 @@ Summary: - + @@ -646,7 +741,7 @@ Summary: - + @@ -665,7 +760,7 @@ Summary: - + @@ -684,7 +779,7 @@ Summary: - + @@ -703,7 +798,7 @@ Summary: - + @@ -722,6 +817,60 @@ Summary: + + + + + + + + void + + + exportProject() + + + + + + + + + + + + + void + + + generateApiToken() + +
    generate api token +
    + + + + + + + + + + + + + void + + + getApiToken() + +
    get api token +
    + + + + + @@ -831,7 +980,83 @@ Summary: void - getProjects() + getKeyData_private() + +
    get ssh key data +
    + + + + + + + + + + + + + void + + + getKeyData_public() + +
    get ssh key data +
    + + + + + + + + + + + + + void + + + getKey_private() + +
    get ssh key +
    + + + + + + + + + + + + + void + + + getKey_public() + +
    get ssh key +
    + + + + + + + + + + + + + void + + + getProjectConfig() @@ -844,6 +1069,54 @@ Summary: + void + + + getProjectConfigKeyed() + + + + + + + + + + + + + void + + + getProjectConfigKeyedDNE() + + + + + + + + + + + + + void + + + getProjects() + + + + + + + + + + + + void @@ -855,7 +1128,7 @@ Summary: - + @@ -873,7 +1146,7 @@ Summary: - + @@ -891,7 +1164,7 @@ Summary: - + @@ -909,7 +1182,7 @@ Summary: - + @@ -927,7 +1200,7 @@ Summary: - + @@ -945,7 +1218,7 @@ Summary: - + @@ -963,6 +1236,22 @@ Summary: + + + + + + + + void + + + importProjectFailure() + + + + + @@ -970,6 +1259,98 @@ Summary: + void + + + importProjectSuccess() + + + + + + + + + + + + + void + + + listApiTokens() + +
    list api tokens all +
    + + + + + + + + + + + + + void + + + listApiTokens_user() + +
    list api tokens for user +
    + + + + + + + + + + + + + void + + + listKeyDirectory() + +
    list directory +
    + + + + + + + + + + + + + void + + + listKeyDirectoryRoot() + +
    list root +
    + + + + + + + + + + + + void @@ -982,7 +1363,7 @@ Summary: - + @@ -1000,6 +1381,22 @@ Summary: + + + + + + + + void + + + setProjectConfig() + + + + + @@ -1007,6 +1404,22 @@ Summary: + void + + + setProjectConfigKeyed() + + + + + + + + + + + + void @@ -1016,6 +1429,25 @@ Summary: + + + + + + + + void + + + storeKey_private() + +
    Store ssh key +
    + + + + + @@ -1023,6 +1455,25 @@ Summary: + void + + + storeKey_public() + +
    Store ssh key +
    + + + + + + + + + + + + void @@ -1032,7 +1483,7 @@ Summary: - + @@ -1048,7 +1499,7 @@ Summary: - + @@ -1064,7 +1515,7 @@ Summary: - + @@ -1080,7 +1531,7 @@ Summary: - + @@ -1096,7 +1547,7 @@ Summary: - + @@ -1112,7 +1563,7 @@ Summary: - + @@ -1128,7 +1579,7 @@ Summary: - + @@ -1144,7 +1595,7 @@ Summary: - + @@ -1160,7 +1611,7 @@ Summary: - + @@ -1702,6 +2153,45 @@ From class + + +
    +

    + + public + static + final + String + + TEST_TOKEN_7 +

    +
    + + + + + + +
    +
    + +

    + + +
    + Constant Value: + + + "8Dp9op111ER6opsDRkddvE86K9sE499s" + + +
    + +
    +
    + + + @@ -2068,6 +2558,208 @@ From class
    + + +
    +

    + + public + + + + + void + + createProject + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + deleteApiToken + () +

    +
    +
    + +
    + + + +
    +
    + +

    get api token +

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

    + + public + + + + + void + + deleteKey + () +

    +
    +
    + +
    + + + +
    +
    + +

    delete ssh key +

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

    + + public + + + + + void + + deleteProject + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + deleteProjectConfigKeyed + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + +
    @@ -2355,6 +3047,128 @@ From class
    + + +
    +

    + + public + + + + + void + + exportProject + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + generateApiToken + () +

    +
    +
    + +
    + + + +
    +
    + +

    generate api token +

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

    + + public + + + + + void + + getApiToken + () +

    +
    +
    + +
    + + + +
    +
    + +

    get api token +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + +
    @@ -2596,6 +3410,290 @@ From class
    + + +
    +

    + + public + + + + + void + + getKeyData_private + () +

    +
    +
    + +
    + + + +
    +
    + +

    get ssh key data +

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

    + + public + + + + + void + + getKeyData_public + () +

    +
    +
    + +
    + + + +
    +
    + +

    get ssh key data +

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

    + + public + + + + + void + + getKey_private + () +

    +
    +
    + +
    + + + +
    +
    + +

    get ssh key +

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

    + + public + + + + + void + + getKey_public + () +

    +
    +
    + +
    + + + +
    +
    + +

    get ssh key +

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

    + + public + + + + + void + + getProjectConfig + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + getProjectConfigKeyed + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + getProjectConfigKeyedDNE + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + +
    @@ -2916,6 +4014,250 @@ From class
    + + +
    +

    + + public + + + + + void + + importProjectFailure + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + importProjectSuccess + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + listApiTokens + () +

    +
    +
    + +
    + + + +
    +
    + +

    list api tokens all +

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

    + + public + + + + + void + + listApiTokens_user + () +

    +
    +
    + +
    + + + +
    +
    + +

    list api tokens for user +

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

    + + public + + + + + void + + listKeyDirectory + () +

    +
    +
    + +
    + + + +
    +
    + +

    list directory +

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

    + + public + + + + + void + + listKeyDirectoryRoot + () +

    +
    +
    + +
    + + + +
    +
    + +

    list root +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + +
    @@ -2997,6 +4339,86 @@ From class
    + + +
    +

    + + public + + + + + void + + setProjectConfig + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + setProjectConfigKeyed + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + +
    @@ -3037,6 +4459,88 @@ From class
    + + +
    +

    + + public + + + + + void + + storeKey_private + () +

    +
    +
    + +
    + + + +
    +
    + +

    Store ssh key +

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

    + + public + + + + + void + + storeKey_public + () +

    +
    +
    + +
    + + + +
    +
    + +

    Store ssh key +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + +
    diff --git a/testapidocs/reference/org/rundeck/api/generator/ProjectConfigGeneratorTest.html b/testapidocs/reference/org/rundeck/api/generator/ProjectConfigGeneratorTest.html new file mode 100644 index 0000000..9539077 --- /dev/null +++ b/testapidocs/reference/org/rundeck/api/generator/ProjectConfigGeneratorTest.html @@ -0,0 +1,771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ProjectConfigGeneratorTest + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ProjectConfigGeneratorTest

    + + + + + extends Object
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.generator.ProjectConfigGeneratorTest
    + + + + + + + +
    + + +

    Class Overview

    +

    ProjectConfigGeneratorTest is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectConfigGeneratorTest() + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + generate() + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectConfigGeneratorTest + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + generate + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/testapidocs/reference/org/rundeck/api/generator/ProjectGeneratorTest.html b/testapidocs/reference/org/rundeck/api/generator/ProjectGeneratorTest.html new file mode 100644 index 0000000..b398e7b --- /dev/null +++ b/testapidocs/reference/org/rundeck/api/generator/ProjectGeneratorTest.html @@ -0,0 +1,762 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ProjectGeneratorTest + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ProjectGeneratorTest

    + + + + + extends Object
    + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + +
    java.lang.Object
       ↳org.rundeck.api.generator.ProjectGeneratorTest
    + + + + + + + +
    + + +

    Class Overview

    +

    ProjectGeneratorTest is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectGeneratorTest() + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + generate() + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectGeneratorTest + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + generate + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    org.rundeck.api.generator

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

    +
    + + + +
    +
    + +
    + + + + + diff --git a/testapidocs/reference/org/rundeck/api/generator/package-summary.html b/testapidocs/reference/org/rundeck/api/generator/package-summary.html new file mode 100644 index 0000000..7226f83 --- /dev/null +++ b/testapidocs/reference/org/rundeck/api/generator/package-summary.html @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.rundeck.api.generator + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    + + + + + + +
    +
    + +
    + package +

    org.rundeck.api.generator

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

    Classes

    +
    + + + + + + + + + + +
    ProjectConfigGeneratorTestProjectConfigGeneratorTest is ... 
    ProjectGeneratorTestProjectGeneratorTest is ... 
    +
    + + + + + + + + + + + + + + +
    +
    + +
    + + + + + diff --git a/testapidocs/reference/org/rundeck/api/package-descr.html b/testapidocs/reference/org/rundeck/api/package-descr.html index ae38ab5..0dca300 100644 --- a/testapidocs/reference/org/rundeck/api/package-descr.html +++ b/testapidocs/reference/org/rundeck/api/package-descr.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • diff --git a/testapidocs/reference/org/rundeck/api/package-summary.html b/testapidocs/reference/org/rundeck/api/package-summary.html index 073d564..13a77dd 100644 --- a/testapidocs/reference/org/rundeck/api/package-summary.html +++ b/testapidocs/reference/org/rundeck/api/package-summary.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/AbortParserTest.html b/testapidocs/reference/org/rundeck/api/parser/AbortParserTest.html index f7a467c..58aed18 100644 --- a/testapidocs/reference/org/rundeck/api/parser/AbortParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/AbortParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/BaseStateParserTest.html b/testapidocs/reference/org/rundeck/api/parser/BaseStateParserTest.html index a6b847a..a96d2cc 100644 --- a/testapidocs/reference/org/rundeck/api/parser/BaseStateParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/BaseStateParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/BulkDeleteParserTest.html b/testapidocs/reference/org/rundeck/api/parser/BulkDeleteParserTest.html index d3da00a..277d55e 100644 --- a/testapidocs/reference/org/rundeck/api/parser/BulkDeleteParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/BulkDeleteParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html b/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html index e48b2b7..634d245 100644 --- a/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/DeleteParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html b/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html index 9989eb2..d7ab344 100644 --- a/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/EventParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/ExecutionParserTest.html b/testapidocs/reference/org/rundeck/api/parser/ExecutionParserTest.html index fa88226..cabd8d4 100644 --- a/testapidocs/reference/org/rundeck/api/parser/ExecutionParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/ExecutionParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/ExecutionStateParserTest.html b/testapidocs/reference/org/rundeck/api/parser/ExecutionStateParserTest.html index 62bcd84..6e4d586 100644 --- a/testapidocs/reference/org/rundeck/api/parser/ExecutionStateParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/ExecutionStateParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/HistoryParserTest.html b/testapidocs/reference/org/rundeck/api/parser/HistoryParserTest.html index 694c00e..0f26054 100644 --- a/testapidocs/reference/org/rundeck/api/parser/HistoryParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/HistoryParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html b/testapidocs/reference/org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html index b6d8efd..a63ad0b 100644 --- a/testapidocs/reference/org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/IndexedWorkflowStepStateParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/JobParserTest.html b/testapidocs/reference/org/rundeck/api/parser/JobParserTest.html index 62b0d82..7162bf7 100644 --- a/testapidocs/reference/org/rundeck/api/parser/JobParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/JobParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html b/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html index 14e171d..f7ab1dc 100644 --- a/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/JobsImportResultParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/ListParserTest.html b/testapidocs/reference/org/rundeck/api/parser/ListParserTest.html index 6f0f459..20c93e5 100644 --- a/testapidocs/reference/org/rundeck/api/parser/ListParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/ListParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/NodeParserTest.html b/testapidocs/reference/org/rundeck/api/parser/NodeParserTest.html index cb82c01..17bf520 100644 --- a/testapidocs/reference/org/rundeck/api/parser/NodeParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/NodeParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/OutputEntryParserTest.html b/testapidocs/reference/org/rundeck/api/parser/OutputEntryParserTest.html index 8203e0f..148e793 100644 --- a/testapidocs/reference/org/rundeck/api/parser/OutputEntryParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/OutputEntryParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/OutputParserTest.html b/testapidocs/reference/org/rundeck/api/parser/OutputParserTest.html index fde2f91..7d00b70 100644 --- a/testapidocs/reference/org/rundeck/api/parser/OutputParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/OutputParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/ParserHelperTest.html b/testapidocs/reference/org/rundeck/api/parser/ParserHelperTest.html index 2165707..147b566 100644 --- a/testapidocs/reference/org/rundeck/api/parser/ParserHelperTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/ParserHelperTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/ProjectConfigParserTest.html b/testapidocs/reference/org/rundeck/api/parser/ProjectConfigParserTest.html new file mode 100644 index 0000000..5cf98f8 --- /dev/null +++ b/testapidocs/reference/org/rundeck/api/parser/ProjectConfigParserTest.html @@ -0,0 +1,793 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ProjectConfigParserTest + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ProjectConfigParserTest

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

    Class Overview

    +

    ProjectConfigParserTest is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectConfigParserTest() + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + parseProject() + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectConfigParserTest + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + parseProject + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    ProjectConfigPropertyParserTest

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

    Class Overview

    +

    Test

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectConfigPropertyParserTest() + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + parseFromProject() + +
    + + + + + + void + + parseProperty() + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectConfigPropertyParserTest + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + parseFromProject + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    + + public + + + + + void + + parseProperty + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/testapidocs/reference/org/rundeck/api/parser/ProjectParserTest.html b/testapidocs/reference/org/rundeck/api/parser/ProjectParserTest.html index 8c386fb..b646504 100644 --- a/testapidocs/reference/org/rundeck/api/parser/ProjectParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/ProjectParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/ProjectParserV11Test.html b/testapidocs/reference/org/rundeck/api/parser/ProjectParserV11Test.html new file mode 100644 index 0000000..d6a28cf --- /dev/null +++ b/testapidocs/reference/org/rundeck/api/parser/ProjectParserV11Test.html @@ -0,0 +1,793 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ProjectParserV11Test + + +| RunDeck API - Java Client + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + +
    +
    + + + + +
    + public + + + + class +

    ProjectParserV11Test

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

    Class Overview

    +

    ProjectParserV11Test is ...

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

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Public Constructors
    + + + + + + + + ProjectParserV11Test() + +
    + + + + + + + + + + + + + + + + + + +
    Public Methods
    + + + + + + void + + parseProject() + +
    + + + + + + + + + + + + + + + +
    + [Expand] +
    Inherited Methods
    + +From class + + java.lang.Object + +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Public Constructors

    + + + + + +
    +

    + + public + + + + + + + ProjectParserV11Test + () +

    +
    +
    + +
    + + + +
    +
    + +

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

    Public Methods

    + + + + + +
    +

    + + public + + + + + void + + parseProject + () +

    +
    +
    + +
    + + + +
    +
    + +

    +
    +
    Throws
    + + + + +
    Exception +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + diff --git a/testapidocs/reference/org/rundeck/api/parser/StringParserTest.html b/testapidocs/reference/org/rundeck/api/parser/StringParserTest.html index bfa9b66..331eabd 100644 --- a/testapidocs/reference/org/rundeck/api/parser/StringParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/StringParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/SystemInfoParserTest.html b/testapidocs/reference/org/rundeck/api/parser/SystemInfoParserTest.html index 56bd254..1088936 100644 --- a/testapidocs/reference/org/rundeck/api/parser/SystemInfoParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/SystemInfoParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/WorkflowStateParserTest.html b/testapidocs/reference/org/rundeck/api/parser/WorkflowStateParserTest.html index 229c489..055f5a5 100644 --- a/testapidocs/reference/org/rundeck/api/parser/WorkflowStateParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/WorkflowStateParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/WorkflowStepStateParserTest.html b/testapidocs/reference/org/rundeck/api/parser/WorkflowStepStateParserTest.html index a4a5aed..f4e47cd 100644 --- a/testapidocs/reference/org/rundeck/api/parser/WorkflowStepStateParserTest.html +++ b/testapidocs/reference/org/rundeck/api/parser/WorkflowStepStateParserTest.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/package-descr.html b/testapidocs/reference/org/rundeck/api/parser/package-descr.html index 99e919a..d705688 100644 --- a/testapidocs/reference/org/rundeck/api/parser/package-descr.html +++ b/testapidocs/reference/org/rundeck/api/parser/package-descr.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • diff --git a/testapidocs/reference/org/rundeck/api/parser/package-summary.html b/testapidocs/reference/org/rundeck/api/parser/package-summary.html index a3a9b8a..bce4d46 100644 --- a/testapidocs/reference/org/rundeck/api/parser/package-summary.html +++ b/testapidocs/reference/org/rundeck/api/parser/package-summary.html @@ -144,6 +144,8 @@
  • org.rundeck.api
  • +
  • + org.rundeck.api.generator
  • org.rundeck.api.parser
  • @@ -173,7 +175,10 @@
  • OutputEntryParserTest
  • OutputParserTest
  • ParserHelperTest
  • +
  • ProjectConfigParserTest
  • +
  • ProjectConfigPropertyParserTest
  • ProjectParserTest
  • +
  • ProjectParserV11Test
  • StringParserTest
  • SystemInfoParserTest
  • WorkflowStateParserTest
  • @@ -317,23 +322,35 @@ ParserHelperTest Test the ParserHelper  + + ProjectConfigParserTest + ProjectConfigParserTest is ...  + + + ProjectConfigPropertyParserTest + Test  + ProjectParserTest Test the ProjectParser  + ProjectParserV11Test + ProjectParserV11Test is ...  + + StringParserTest Test the StringParser  - + SystemInfoParserTest Test the SystemInfoParser  - + WorkflowStateParserTest $INTERFACE is ...  - + WorkflowStepStateParserTest $INTERFACE is ...  diff --git a/testapidocs/reference/org/rundeck/api/util/ParametersUtilTest.html b/testapidocs/reference/org/rundeck/api/util/ParametersUtilTest.html index 447a62f..2affd47 100644 --- a/testapidocs/reference/org/rundeck/api/util/ParametersUtilTest.html +++ b/testapidocs/reference/org/rundeck/api/util/ParametersUtilTest.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • diff --git a/testapidocs/reference/org/rundeck/api/util/package-descr.html b/testapidocs/reference/org/rundeck/api/util/package-descr.html index e4a1b10..cb08b15 100644 --- a/testapidocs/reference/org/rundeck/api/util/package-descr.html +++ b/testapidocs/reference/org/rundeck/api/util/package-descr.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • diff --git a/testapidocs/reference/org/rundeck/api/util/package-summary.html b/testapidocs/reference/org/rundeck/api/util/package-summary.html index e2de01d..bd14215 100644 --- a/testapidocs/reference/org/rundeck/api/util/package-summary.html +++ b/testapidocs/reference/org/rundeck/api/util/package-summary.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • diff --git a/testapidocs/reference/package-list b/testapidocs/reference/package-list index 9202a33..c877498 100644 --- a/testapidocs/reference/package-list +++ b/testapidocs/reference/package-list @@ -1,4 +1,5 @@ org.rundeck.api +org.rundeck.api.generator org.rundeck.api.parser org.rundeck.api.util diff --git a/testapidocs/reference/packages.html b/testapidocs/reference/packages.html index 1f99a66..3b1e127 100644 --- a/testapidocs/reference/packages.html +++ b/testapidocs/reference/packages.html @@ -145,6 +145,8 @@
  • org.rundeck.api
  • + org.rundeck.api.generator
  • +
  • org.rundeck.api.parser
  • org.rundeck.api.util
  • @@ -210,13 +212,20 @@ - org.rundeck.api.parser + org.rundeck.api.generator   + org.rundeck.api.parser +   + + + + + org.rundeck.api.util   diff --git a/xref-test/allclasses-frame.html b/xref-test/allclasses-frame.html index 2d0e25a..d3e9f04 100644 --- a/xref-test/allclasses-frame.html +++ b/xref-test/allclasses-frame.html @@ -61,9 +61,24 @@
  • ParserHelperTest +
  • +
  • + ProjectConfigGeneratorTest +
  • +
  • + ProjectConfigParserTest +
  • +
  • + ProjectConfigPropertyParserTest +
  • +
  • + ProjectGeneratorTest
  • ProjectParserTest +
  • +
  • + ProjectParserV11Test
  • RundeckClientTest diff --git a/xref-test/index.html b/xref-test/index.html index 2432bc4..50a4184 100644 --- a/xref-test/index.html +++ b/xref-test/index.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 10.0 Reference + RunDeck API - Java Client 11.0-SNAPSHOT Reference diff --git a/xref-test/org/rundeck/api/RundeckClientTest.html b/xref-test/org/rundeck/api/RundeckClientTest.html index 31fee35..c1cd26d 100644 --- a/xref-test/org/rundeck/api/RundeckClientTest.html +++ b/xref-test/org/rundeck/api/RundeckClientTest.html @@ -29,16 +29,16 @@ 19 import betamax.MatchRule; 20 import betamax.Recorder; 21 import betamax.TapeMode; -22 import org.junit.Assert; -23 import org.junit.Before; -24 import org.junit.Rule; -25 import org.junit.Test; -26 import org.rundeck.api.domain.*; -27 import org.rundeck.api.query.ExecutionQuery; -28 import org.rundeck.api.util.PagedResults; -29 -30 import java.io.ByteArrayInputStream; -31 import java.io.InputStream; +22 import org.apache.commons.io.IOUtils; +23 import org.junit.Assert; +24 import org.junit.Before; +25 import org.junit.Rule; +26 import org.junit.Test; +27 import org.rundeck.api.domain.*; +28 import org.rundeck.api.query.ExecutionQuery; +29 import org.rundeck.api.util.PagedResults; +30 +31 import java.io.*; 32 import java.util.*; 33 34 @@ -65,1045 +65,1463 @@ 55 public static final String TEST_TOKEN_4 = "sN5RRSNvu15DnV6EcNDdc2CkdPcv3s32"; 56 public static final String TEST_TOKEN_5 = "C3O6d5O98Kr6Dpv71sdE4ERdCuU12P6d"; 57 public static final String TEST_TOKEN_6 = "Do4d3NUD5DKk21DR4sNK755RcPk618vn"; -58 -59 @Rule -60 public Recorder recorder = new Recorder(); -61 -62 private RundeckClient client; -63 -64 @Test -65 public void apiVersionDefaultLatest() { -66 RundeckClient blah = createClient("blah", 0); -67 Assert.assertEquals("/api/" + RundeckClient.API_VERSION, blah.getApiEndpoint()); -68 Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion()); -69 blah.setApiVersion(0); -70 Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion()); -71 blah.setApiVersion(-1); -72 Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion()); -73 blah.setApiVersion(RundeckClient.Version.V9.getVersionNumber()); -74 Assert.assertEquals(RundeckClient.Version.V9.getVersionNumber(), blah.getApiVersion()); -75 } -76 @Test -77 @Betamax(tape = "get_projects") -78 public void getProjects() throws Exception { -79 List<RundeckProject> projects = client.getProjects(); -80 Assert.assertEquals(1, projects.size()); -81 Assert.assertEquals("test", projects.get(0).getName()); -82 Assert.assertNull(projects.get(0).getDescription()); -83 } -84 @Test -85 @Betamax(tape = "get_history") -86 public void getHistory() throws Exception { -87 final RundeckHistory test = client.getHistory("test"); -88 Assert.assertEquals(3, test.getCount()); -89 Assert.assertEquals(20, test.getMax()); -90 Assert.assertEquals(0, test.getOffset()); -91 Assert.assertEquals(5, test.getTotal()); -92 final List<RundeckEvent> events = test.getEvents(); -93 Assert.assertEquals(3, events.size()); +58 public static final String TEST_TOKEN_7 = "8Dp9op111ER6opsDRkddvE86K9sE499s"; +59 +60 @Rule +61 public Recorder recorder = new Recorder(); +62 +63 private RundeckClient client; +64 +65 @Test +66 public void apiVersionDefaultLatest() { +67 RundeckClient blah = createClient("blah", 0); +68 Assert.assertEquals("/api/" + RundeckClient.API_VERSION, blah.getApiEndpoint()); +69 Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion()); +70 blah.setApiVersion(0); +71 Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion()); +72 blah.setApiVersion(-1); +73 Assert.assertEquals(RundeckClient.API_VERSION, blah.getApiVersion()); +74 blah.setApiVersion(RundeckClient.Version.V9.getVersionNumber()); +75 Assert.assertEquals(RundeckClient.Version.V9.getVersionNumber(), blah.getApiVersion()); +76 } +77 @Test +78 @Betamax(tape = "get_projects") +79 public void getProjects() throws Exception { +80 List<RundeckProject> projects = client.getProjects(); +81 Assert.assertEquals(1, projects.size()); +82 Assert.assertEquals("test", projects.get(0).getName()); +83 Assert.assertNull(projects.get(0).getDescription()); +84 } +85 @Test +86 @Betamax(tape = "create_projectv11") +87 public void createProject() throws Exception { +88 +89 RundeckProject project = createClient(TEST_TOKEN_6,11).createProject("monkey1", null); +90 Assert.assertEquals("monkey1", project.getName()); +91 Assert.assertEquals(null, project.getDescription()); +92 Assert.assertNotNull(project.getProjectConfig()); +93 94 } -95 -96 @Test -97 @Betamax(tape = "get_history_joblist", -98 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query /*, MatchRule.body */}) -99 public void getHistoryJoblist() throws Exception { -100 final List<String> jobNames = Arrays.asList("malk/blah", "malk/blah2"); -101 final RundeckHistory test = client.getHistory("demo", null, null, jobNames, null, null, null, null, null); -102 Assert.assertEquals(2, test.getCount()); -103 Assert.assertEquals(20, test.getMax()); -104 Assert.assertEquals(0, test.getOffset()); -105 Assert.assertEquals(2, test.getTotal()); -106 final List<RundeckEvent> events = test.getEvents(); -107 Assert.assertEquals(2, events.size()); -108 final List<String> names = new ArrayList<String>(); -109 for (final RundeckEvent event : events) { -110 names.add(event.getTitle()); -111 } -112 Assert.assertEquals(Arrays.asList("malk/blah2", "malk/blah"), names); -113 } -114 -115 @Test -116 @Betamax(tape = "get_history_excludeJoblist", -117 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query /*, MatchRule.body */}) -118 public void getHistoryExcludeJoblist() throws Exception { -119 final List<String> jobNames = Arrays.asList("malk/blah", "malk/blah2"); -120 final RundeckHistory test = client.getHistory("demo", null, null, null, jobNames, null, null, null, null); -121 Assert.assertEquals(2, test.getCount()); -122 Assert.assertEquals(20, test.getMax()); -123 Assert.assertEquals(0, test.getOffset()); -124 Assert.assertEquals(2, test.getTotal()); -125 final List<RundeckEvent> events = test.getEvents(); -126 Assert.assertEquals(2, events.size()); -127 final List<String> names = new ArrayList<String>(); -128 for (final RundeckEvent event : events) { -129 names.add(event.getTitle()); -130 } -131 Assert.assertEquals(Arrays.asList("fliff", "malk/blah3"), names); +95 @Test +96 @Betamax(tape = "delete_projectv11") +97 public void deleteProject() throws Exception { +98 RundeckClient client1 = createClient(TEST_TOKEN_6, 11); +99 client1.deleteProject("delete_me"); +100 RundeckProject delete_me = null; +101 try { +102 delete_me = client1.getProject("delete_me"); +103 Assert.fail(); +104 } catch (RundeckApiException.RundeckApiHttpStatusException e) { +105 Assert.assertEquals(404,e.getStatusCode()); +106 } +107 +108 } +109 +110 @Test +111 @Betamax(tape = "get_project_configv11") +112 public void getProjectConfig() throws Exception { +113 ProjectConfig config = createClient(TEST_TOKEN_6, 11).getProjectConfig("monkey1"); +114 Assert.assertNotNull(config); +115 Assert.assertNotNull(config.getProperties()); +116 Assert.assertEquals(9,config.getProperties().size()); +117 Assert.assertEquals("monkey1", config.getProperties().get("project.name")); +118 } +119 @Test +120 @Betamax(tape = "set_project_configv11") +121 public void setProjectConfig() throws Exception { +122 HashMap<String, String> config = new HashMap<String, String>(); +123 config.put("alphabetty", "spaghetti"); +124 config.put("blha.blee", "a big amazing thingy so there."); +125 ProjectConfig result = createClient(TEST_TOKEN_6, 11).setProjectConfig("monkey1", config); +126 Assert.assertNotNull(result); +127 Assert.assertNotNull(result.getProperties()); +128 Assert.assertEquals(3, result.getProperties().size()); +129 Assert.assertEquals("monkey1", result.getProperties().get("project.name")); +130 Assert.assertEquals("spaghetti", result.getProperties().get("alphabetty")); +131 Assert.assertEquals("a big amazing thingy so there.", result.getProperties().get("blha.blee")); 132 } 133 134 @Test -135 @Betamax(tape = "get_history_user", -136 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query }) -137 public void getHistoryUser() throws Exception { -138 final RundeckHistory test = client.getHistory("demo", "bob", (String)null, (List)null, null, null, null, 1L, 0L); -139 Assert.assertEquals(1, test.getCount()); -140 Assert.assertEquals(20, test.getMax()); -141 Assert.assertEquals(0, test.getOffset()); -142 Assert.assertEquals(1, test.getTotal()); -143 final List<RundeckEvent> events = test.getEvents(); -144 Assert.assertEquals(1, events.size()); -145 final List<String> names = new ArrayList<String>(); -146 for (final RundeckEvent event : events) { -147 names.add(event.getUser()); -148 } -149 Assert.assertEquals(Arrays.asList("bob"), names); -150 } -151 -152 @Test -153 @Betamax(tape = "get_executions", -154 mode = TapeMode.READ_ONLY, -155 match = {MatchRule.uri, MatchRule.headers, MatchRule.method, MatchRule.path, MatchRule.query}) -156 public void getExecutions() throws Exception { -157 -158 RundeckClient client = createClient(TEST_TOKEN_1, 5); -159 -160 -161 final String projectName = "blah"; -162 final PagedResults<RundeckExecution> jobTest = client.getExecutions(ExecutionQuery.builder() -163 .project(projectName) -164 .job("test job") -165 .build(), -166 2L, -167 0L); -168 assertPageResults(jobTest, 2, 2, 2, 0, 2); -169 final PagedResults<RundeckExecution> jobExactTest = client.getExecutions(ExecutionQuery.builder() -170 .project(projectName) -171 .jobExact("test job") -172 .build(), -173 2L, -174 0L); -175 assertPageResults(jobExactTest, 2, 2, 2, 0, 2); -176 final PagedResults<RundeckExecution> excludeJobTest = client.getExecutions(ExecutionQuery.builder() -177 .project(projectName) -178 .excludeJob("test job") -179 .build(), -180 2L, -181 0L); -182 assertPageResults(excludeJobTest, 2, 2, 2, 0, 2); -183 final PagedResults<RundeckExecution> excludeJobExactTest = client.getExecutions(ExecutionQuery.builder() -184 .project(projectName) -185 .excludeJobExact("test job") -186 .build(), -187 2L, -188 0L); -189 assertPageResults(excludeJobExactTest, 2, 2, 2, 0, 2); -190 final PagedResults<RundeckExecution> descriptionTest = client.getExecutions(ExecutionQuery.builder() -191 .project(projectName) -192 .description("a description") -193 .build(), 2L, 0L); -194 assertPageResults(descriptionTest, 2, 2, 2, 0, 2); -195 final PagedResults<RundeckExecution> abortedbyTest = client.getExecutions(ExecutionQuery.builder() -196 .project(projectName) -197 .abortedby("admin") -198 .build(), -199 2L, -200 0L); -201 assertPageResults(abortedbyTest, 1, 1, 2, 0, 1); -202 final PagedResults<RundeckExecution> beginTest = client.getExecutions(ExecutionQuery.builder() -203 .project(projectName) -204 .begin(new Date(1347581178168L)) -205 .build(), 2L, 0L); -206 assertPageResults(beginTest, 2, 2, 2, 0, 2); -207 final PagedResults<RundeckExecution> endTest = client.getExecutions(ExecutionQuery.builder() -208 .project(projectName) -209 .end(new Date(1347581178168L)) -210 .build(), 2L, 0L); -211 assertPageResults(endTest, 2, 2, 2, 0, 2); -212 final List<String> excludeJobIdList = Arrays.asList("123", "456"); -213 final PagedResults<RundeckExecution> excludeJobIdListTest = client.getExecutions(ExecutionQuery.builder() -214 .project(projectName) -215 .excludeJobIdList(excludeJobIdList) -216 .build(), 2L, 0L); -217 assertPageResults(excludeJobIdListTest, 2, 2, 2, 0, 2); -218 final List<String> jobList = Arrays.asList("fruit/mango", "fruit/lemon"); -219 final PagedResults<RundeckExecution> jobListTest = client.getExecutions(ExecutionQuery.builder() -220 .project(projectName) -221 .jobList(jobList) -222 .build(), 2L, 0L); -223 assertPageResults(jobListTest, 2, 2, 2, 0, 2); -224 final List<String> excludeJobList = Arrays.asList("a/path/job1", "path/to/job2"); -225 final PagedResults<RundeckExecution> excludeJobListTest = client.getExecutions(ExecutionQuery.builder() -226 .project(projectName) -227 .excludeJobList(excludeJobList) -228 .build(), 2L, 0L); -229 assertPageResults(excludeJobListTest, 2, 2, 2, 0, 2); -230 final List<String> list = Arrays.asList("1f4415d7-3b52-4fc8-ba42-b6ac97508bff", -231 "d9fc5ee6-f1db-4d24-8808-feda18345bab"); -232 final PagedResults<RundeckExecution> jobIdListTest = client.getExecutions(ExecutionQuery.builder() -233 .project(projectName) -234 .jobIdList(list) -235 .build(), 2L, 0L); -236 assertPageResults(jobIdListTest, 2, 2, 2, 0, 2); -237 final PagedResults<RundeckExecution> groupPathTest = client.getExecutions(ExecutionQuery.builder() -238 .project(projectName) -239 .groupPath("fruit") -240 .build(), -241 2L, -242 0L); -243 assertPageResults(groupPathTest, 2, 2, 2, 0, 2); -244 final PagedResults<RundeckExecution> groupPathExactTest = client.getExecutions(ExecutionQuery.builder() -245 .project(projectName) -246 .groupPathExact("fruit") -247 .build(), 2L, 0L); -248 assertPageResults(groupPathExactTest, 2, 2, 2, 0, 2); -249 -250 final PagedResults<RundeckExecution> excludeGroupPathTest = client.getExecutions(ExecutionQuery.builder() -251 .project(projectName) -252 .excludeGroupPath("fruit") -253 .build(), -254 2L, -255 0L); -256 assertPageResults(excludeGroupPathTest, 2, 2, 2, 0, 2); -257 final PagedResults<RundeckExecution> excliudeGroupPathExactTest = client.getExecutions(ExecutionQuery.builder() -258 .project(projectName) -259 .excludeGroupPathExact("fruit") -260 .build(), 2L, 0L); -261 assertPageResults(excliudeGroupPathExactTest, 2, 2, 2, 0, 2); -262 -263 final PagedResults<RundeckExecution> recentTest = client.getExecutions(ExecutionQuery.builder() -264 .project(projectName) -265 .recent("1h").build(), 2L, 0L); -266 assertPageResults(recentTest, 2, 2, 2, 0, 2); -267 final PagedResults<RundeckExecution> statusTest = client.getExecutions(ExecutionQuery.builder() -268 .project(projectName) -269 .status(RundeckExecution.ExecutionStatus.SUCCEEDED) -270 .build(), 2L, 0L); -271 assertPageResults(statusTest, 2, 2, 2, 0, 2); -272 final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder() -273 .project(projectName) -274 .adhoc(true) -275 .build(), 2L, 0L); -276 assertPageResults(adhocTest, 2, 2, 2, 0, 2); -277 } -278 -279 /** -280 * Test paging values from results -281 */ -282 @Test -283 @Betamax(tape = "get_executions_paging") -284 public void getExecutionsPaging() throws Exception{ -285 RundeckClient client = createClient(TEST_TOKEN_1, 5); -286 final String projectName = "blah"; -287 //2 max, 1 offset -288 final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder() -289 .project(projectName) -290 .excludeGroupPathExact("fruit") -291 .build(), 2L, 1L); -292 //expect 2 count, 3 total -293 assertPageResults(adhocTest, 2, 2, 2, 1, 3); -294 -295 //FAKE results, testing paging attributes parsing -296 -297 //1 max, 1 offset -298 final PagedResults<RundeckExecution> test2 = client.getExecutions(ExecutionQuery.builder() -299 .project(projectName) -300 .excludeGroupPathExact("fruit") -301 .build(), 1L, 1L); -302 //expect no paging attributes -303 assertPageResults(test2, 2, -1, -1, -1, -1); -304 -305 //1 max, 2 offset -306 final PagedResults<RundeckExecution> test3 = client.getExecutions(ExecutionQuery.builder() -307 .project(projectName) -308 .excludeGroupPathExact("fruit") -309 .build(), 1L, 2L); -310 //invalid value for count -311 assertPageResults(test3, 2, -1, -1, -1, -1); -312 } -313 @Test -314 @Betamax(tape = "bulk_delete") -315 public void bulkDelete() throws Exception { -316 RundeckClient client = createClient(TEST_TOKEN_2, 5); -317 -318 final RundeckJobDeleteBulk deleteTest -319 = client.deleteJobs(Arrays.asList("0ce457b5-ba84-41ca-812e-02b31da355a4")); -320 Assert.assertTrue(deleteTest.isAllsuccessful()); -321 Assert.assertEquals(1, deleteTest.getRequestCount()); -322 Assert.assertEquals(1, deleteTest.getResults().size()); -323 -324 final RundeckJobDelete delete = deleteTest.getResults().get(0); -325 Assert.assertTrue(delete.isSuccessful()); -326 Assert.assertNull(delete.getError()); -327 Assert.assertNull(delete.getErrorCode()); -328 Assert.assertNotNull(delete.getMessage()); -329 Assert.assertEquals("0ce457b5-ba84-41ca-812e-02b31da355a4", delete.getId()); -330 } -331 @Test -332 @Betamax(tape = "bulk_delete_dne") -333 public void bulkDeleteFailDNE() throws Exception { -334 RundeckClient client = createClient(TEST_TOKEN_2, 5); -335 -336 final RundeckJobDeleteBulk deleteTest -337 = client.deleteJobs(Arrays.asList("does-not-exist")); -338 Assert.assertFalse(deleteTest.isAllsuccessful()); -339 Assert.assertEquals(1, deleteTest.getRequestCount()); -340 Assert.assertEquals(1, deleteTest.getResults().size()); -341 -342 final RundeckJobDelete delete = deleteTest.getResults().get(0); -343 Assert.assertFalse(delete.isSuccessful()); -344 Assert.assertNotNull(delete.getError()); -345 Assert.assertEquals("notfound", delete.getErrorCode()); -346 Assert.assertNull(delete.getMessage()); -347 Assert.assertEquals("does-not-exist", delete.getId()); -348 } -349 @Test -350 @Betamax(tape = "bulk_delete_unauthorized") -351 public void bulkDeleteFailUnauthorized() throws Exception { -352 RundeckClient client = createClient(TEST_TOKEN_2, 5); -353 -354 final RundeckJobDeleteBulk deleteTest -355 = client.deleteJobs(Arrays.asList("3a6d16be-4268-4d26-86a9-cebc1781f768")); -356 Assert.assertFalse(deleteTest.isAllsuccessful()); -357 Assert.assertEquals(1, deleteTest.getRequestCount()); -358 Assert.assertEquals(1, deleteTest.getResults().size()); -359 -360 final RundeckJobDelete delete = deleteTest.getResults().get(0); -361 Assert.assertFalse(delete.isSuccessful()); -362 Assert.assertNotNull(delete.getError()); -363 Assert.assertEquals("unauthorized", delete.getErrorCode()); -364 Assert.assertNull(delete.getMessage()); -365 Assert.assertEquals("3a6d16be-4268-4d26-86a9-cebc1781f768", delete.getId()); -366 } -367 -368 @Test -369 @Betamax(tape = "trigger_job_basic") -370 public void triggerJobBasic() throws Exception { -371 RundeckClient client = createClient(TEST_TOKEN_3, 5); -372 -373 final RundeckExecution test -374 = client.triggerJob(RunJobBuilder.builder().setJobId("3170ba0e-6093-4b58-94d2-52988aefbfc9").build()); +135 @Betamax(tape = "get_project_config_keyedv11") +136 public void getProjectConfigKeyed() throws Exception { +137 String value = createClient(TEST_TOKEN_6, 11).getProjectConfig("ABC", "project.name"); +138 Assert.assertNotNull(value); +139 Assert.assertEquals("ABC", value); +140 } +141 @Test +142 @Betamax(tape = "get_project_config_keyed_dne_v11") +143 public void getProjectConfigKeyedDNE() throws Exception { +144 String value = createClient(TEST_TOKEN_6, 11).getProjectConfig("ABC", "does-not-exist"); +145 Assert.assertNull(value); +146 } +147 @Test +148 @Betamax(tape = "set_project_config_keyedv11") +149 public void setProjectConfigKeyed() throws Exception { +150 String value = createClient(TEST_TOKEN_6, 11).setProjectConfig("ABC", "monkey-burrito", "lemon pie"); +151 Assert.assertNotNull(value); +152 Assert.assertEquals("lemon pie", value); +153 } +154 @Test +155 @Betamax(tape = "delete_project_config_keyedv11") +156 public void deleteProjectConfigKeyed() throws Exception { +157 RundeckClient client1 = createClient(TEST_TOKEN_6, 11); +158 Assert.assertEquals("7up", client1.setProjectConfig("ABC", "monkey-burrito", "7up")); +159 client1.deleteProjectConfig("ABC", "monkey-burrito"); +160 String value=client1.getProjectConfig("ABC", "monkey-burrito"); +161 Assert.assertNull(value); +162 } +163 @Test +164 @Betamax(tape = "export_projectv11") +165 public void exportProject() throws Exception { +166 RundeckClient client1 = createClient(TEST_TOKEN_6, 11); +167 File temp = File.createTempFile("test-archive", ".zip"); +168 temp.deleteOnExit(); +169 int i = client1.exportProject("DEF1", temp); +170 Assert.assertEquals(8705, i); +171 } +172 @Test +173 @Betamax(tape = "import_project_suv11",mode = TapeMode.READ_ONLY) +174 public void importProjectSuccess() throws Exception { +175 RundeckClient client1 = createClient(TEST_TOKEN_6, 11); +176 InputStream resourceAsStream = getClass().getResourceAsStream("test-archive.zip"); +177 File temp = File.createTempFile("test-archive", ".zip"); +178 temp.deleteOnExit(); +179 IOUtils.copy(resourceAsStream, new FileOutputStream(temp)); +180 ArchiveImport def1 = client1.importArchive("DEF2", temp, true, true); +181 Assert.assertTrue(def1.isSuccessful()); +182 Assert.assertEquals(0, def1.getErrorMessages().size()); +183 +184 ArchiveImport def2 = client1.importArchive("DEF2", temp, false, true); +185 Assert.assertTrue(def2.isSuccessful()); +186 Assert.assertEquals(0, def2.getErrorMessages().size()); +187 +188 ArchiveImport def3 = client1.importArchive("DEF2", temp, true, false); +189 Assert.assertTrue(def3.isSuccessful()); +190 Assert.assertEquals(0, def3.getErrorMessages().size()); +191 temp.delete(); +192 } +193 @Test +194 @Betamax(tape = "import_project_failure_v11", mode = TapeMode.READ_ONLY) +195 public void importProjectFailure() throws Exception { +196 RundeckClient client1 = createClient(TEST_TOKEN_6, 11); +197 InputStream resourceAsStream = getClass().getResourceAsStream("test-archive.zip"); +198 File temp = File.createTempFile("test-archive", ".zip"); +199 temp.deleteOnExit(); +200 IOUtils.copy(resourceAsStream, new FileOutputStream(temp)); +201 ArchiveImport def1 = client1.importArchive("DEF1", temp, false, true); +202 Assert.assertFalse(def1.isSuccessful()); +203 Assert.assertEquals(10, def1.getErrorMessages().size()); +204 Assert.assertEquals("Job at index [1] at archive path: " + +205 "rundeck-DEF1/jobs/job-6fd1808c-eafb-49ac-abf2-4de7ec75872f.xml had errors: Validation errors: Cannot" + +206 " create a Job with UUID 6fd1808c-eafb-49ac-abf2-4de7ec75872f: a Job already exists with this UUID. " + +207 "Change the UUID or delete the other Job.", def1.getErrorMessages().get(0)); +208 +209 } +210 @Test +211 @Betamax(tape = "get_history") +212 public void getHistory() throws Exception { +213 final RundeckHistory test = client.getHistory("test"); +214 Assert.assertEquals(3, test.getCount()); +215 Assert.assertEquals(20, test.getMax()); +216 Assert.assertEquals(0, test.getOffset()); +217 Assert.assertEquals(5, test.getTotal()); +218 final List<RundeckEvent> events = test.getEvents(); +219 Assert.assertEquals(3, events.size()); +220 } +221 +222 @Test +223 @Betamax(tape = "get_history_joblist", +224 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query /*, MatchRule.body */}) +225 public void getHistoryJoblist() throws Exception { +226 final List<String> jobNames = Arrays.asList("malk/blah", "malk/blah2"); +227 final RundeckHistory test = client.getHistory("demo", null, null, jobNames, null, null, null, null, null); +228 Assert.assertEquals(2, test.getCount()); +229 Assert.assertEquals(20, test.getMax()); +230 Assert.assertEquals(0, test.getOffset()); +231 Assert.assertEquals(2, test.getTotal()); +232 final List<RundeckEvent> events = test.getEvents(); +233 Assert.assertEquals(2, events.size()); +234 final List<String> names = new ArrayList<String>(); +235 for (final RundeckEvent event : events) { +236 names.add(event.getTitle()); +237 } +238 Assert.assertEquals(Arrays.asList("malk/blah2", "malk/blah"), names); +239 } +240 +241 @Test +242 @Betamax(tape = "get_history_excludeJoblist", +243 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query /*, MatchRule.body */}) +244 public void getHistoryExcludeJoblist() throws Exception { +245 final List<String> jobNames = Arrays.asList("malk/blah", "malk/blah2"); +246 final RundeckHistory test = client.getHistory("demo", null, null, null, jobNames, null, null, null, null); +247 Assert.assertEquals(2, test.getCount()); +248 Assert.assertEquals(20, test.getMax()); +249 Assert.assertEquals(0, test.getOffset()); +250 Assert.assertEquals(2, test.getTotal()); +251 final List<RundeckEvent> events = test.getEvents(); +252 Assert.assertEquals(2, events.size()); +253 final List<String> names = new ArrayList<String>(); +254 for (final RundeckEvent event : events) { +255 names.add(event.getTitle()); +256 } +257 Assert.assertEquals(Arrays.asList("fliff", "malk/blah3"), names); +258 } +259 +260 @Test +261 @Betamax(tape = "get_history_user", +262 match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query }) +263 public void getHistoryUser() throws Exception { +264 final RundeckHistory test = client.getHistory("demo", "bob", (String)null, (List)null, null, null, null, 1L, 0L); +265 Assert.assertEquals(1, test.getCount()); +266 Assert.assertEquals(20, test.getMax()); +267 Assert.assertEquals(0, test.getOffset()); +268 Assert.assertEquals(1, test.getTotal()); +269 final List<RundeckEvent> events = test.getEvents(); +270 Assert.assertEquals(1, events.size()); +271 final List<String> names = new ArrayList<String>(); +272 for (final RundeckEvent event : events) { +273 names.add(event.getUser()); +274 } +275 Assert.assertEquals(Arrays.asList("bob"), names); +276 } +277 +278 @Test +279 @Betamax(tape = "get_executions", +280 mode = TapeMode.READ_ONLY, +281 match = {MatchRule.uri, MatchRule.headers, MatchRule.method, MatchRule.path, MatchRule.query}) +282 public void getExecutions() throws Exception { +283 +284 RundeckClient client = createClient(TEST_TOKEN_1, 5); +285 +286 +287 final String projectName = "blah"; +288 final PagedResults<RundeckExecution> jobTest = client.getExecutions(ExecutionQuery.builder() +289 .project(projectName) +290 .job("test job") +291 .build(), +292 2L, +293 0L); +294 assertPageResults(jobTest, 2, 2, 2, 0, 2); +295 final PagedResults<RundeckExecution> jobExactTest = client.getExecutions(ExecutionQuery.builder() +296 .project(projectName) +297 .jobExact("test job") +298 .build(), +299 2L, +300 0L); +301 assertPageResults(jobExactTest, 2, 2, 2, 0, 2); +302 final PagedResults<RundeckExecution> excludeJobTest = client.getExecutions(ExecutionQuery.builder() +303 .project(projectName) +304 .excludeJob("test job") +305 .build(), +306 2L, +307 0L); +308 assertPageResults(excludeJobTest, 2, 2, 2, 0, 2); +309 final PagedResults<RundeckExecution> excludeJobExactTest = client.getExecutions(ExecutionQuery.builder() +310 .project(projectName) +311 .excludeJobExact("test job") +312 .build(), +313 2L, +314 0L); +315 assertPageResults(excludeJobExactTest, 2, 2, 2, 0, 2); +316 final PagedResults<RundeckExecution> descriptionTest = client.getExecutions(ExecutionQuery.builder() +317 .project(projectName) +318 .description("a description") +319 .build(), 2L, 0L); +320 assertPageResults(descriptionTest, 2, 2, 2, 0, 2); +321 final PagedResults<RundeckExecution> abortedbyTest = client.getExecutions(ExecutionQuery.builder() +322 .project(projectName) +323 .abortedby("admin") +324 .build(), +325 2L, +326 0L); +327 assertPageResults(abortedbyTest, 1, 1, 2, 0, 1); +328 final PagedResults<RundeckExecution> beginTest = client.getExecutions(ExecutionQuery.builder() +329 .project(projectName) +330 .begin(new Date(1347581178168L)) +331 .build(), 2L, 0L); +332 assertPageResults(beginTest, 2, 2, 2, 0, 2); +333 final PagedResults<RundeckExecution> endTest = client.getExecutions(ExecutionQuery.builder() +334 .project(projectName) +335 .end(new Date(1347581178168L)) +336 .build(), 2L, 0L); +337 assertPageResults(endTest, 2, 2, 2, 0, 2); +338 final List<String> excludeJobIdList = Arrays.asList("123", "456"); +339 final PagedResults<RundeckExecution> excludeJobIdListTest = client.getExecutions(ExecutionQuery.builder() +340 .project(projectName) +341 .excludeJobIdList(excludeJobIdList) +342 .build(), 2L, 0L); +343 assertPageResults(excludeJobIdListTest, 2, 2, 2, 0, 2); +344 final List<String> jobList = Arrays.asList("fruit/mango", "fruit/lemon"); +345 final PagedResults<RundeckExecution> jobListTest = client.getExecutions(ExecutionQuery.builder() +346 .project(projectName) +347 .jobList(jobList) +348 .build(), 2L, 0L); +349 assertPageResults(jobListTest, 2, 2, 2, 0, 2); +350 final List<String> excludeJobList = Arrays.asList("a/path/job1", "path/to/job2"); +351 final PagedResults<RundeckExecution> excludeJobListTest = client.getExecutions(ExecutionQuery.builder() +352 .project(projectName) +353 .excludeJobList(excludeJobList) +354 .build(), 2L, 0L); +355 assertPageResults(excludeJobListTest, 2, 2, 2, 0, 2); +356 final List<String> list = Arrays.asList("1f4415d7-3b52-4fc8-ba42-b6ac97508bff", +357 "d9fc5ee6-f1db-4d24-8808-feda18345bab"); +358 final PagedResults<RundeckExecution> jobIdListTest = client.getExecutions(ExecutionQuery.builder() +359 .project(projectName) +360 .jobIdList(list) +361 .build(), 2L, 0L); +362 assertPageResults(jobIdListTest, 2, 2, 2, 0, 2); +363 final PagedResults<RundeckExecution> groupPathTest = client.getExecutions(ExecutionQuery.builder() +364 .project(projectName) +365 .groupPath("fruit") +366 .build(), +367 2L, +368 0L); +369 assertPageResults(groupPathTest, 2, 2, 2, 0, 2); +370 final PagedResults<RundeckExecution> groupPathExactTest = client.getExecutions(ExecutionQuery.builder() +371 .project(projectName) +372 .groupPathExact("fruit") +373 .build(), 2L, 0L); +374 assertPageResults(groupPathExactTest, 2, 2, 2, 0, 2); 375 -376 Assert.assertEquals((Long) 19L, test.getId()); -377 Assert.assertEquals(null, test.getArgstring()); -378 Assert.assertEquals(null, test.getAbortedBy()); -379 Assert.assertEquals("echo hi there ${job.username} ; sleep 90", test.getDescription()); -380 Assert.assertEquals("admin", test.getStartedBy()); -381 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); -382 -383 } -384 -385 @Test -386 @Betamax(tape = "trigger_job_as_user") -387 public void triggerJobAsUser() throws Exception { -388 RundeckClient client = createClient(TEST_TOKEN_3, 5); -389 -390 final RundeckExecution test -391 = client.triggerJob(RunJobBuilder.builder() -392 .setJobId("3170ba0e-6093-4b58-94d2-52988aefbfc9") -393 .setAsUser("api-java-client-user-test1") -394 .build()); -395 -396 Assert.assertEquals((Long)20L, test.getId()); -397 Assert.assertEquals(null, test.getArgstring()); -398 Assert.assertEquals(null, test.getAbortedBy()); -399 Assert.assertEquals("echo hi there ${job.username} ; sleep 90", test.getDescription()); -400 Assert.assertEquals("api-java-client-user-test1", test.getStartedBy()); -401 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); -402 +376 final PagedResults<RundeckExecution> excludeGroupPathTest = client.getExecutions(ExecutionQuery.builder() +377 .project(projectName) +378 .excludeGroupPath("fruit") +379 .build(), +380 2L, +381 0L); +382 assertPageResults(excludeGroupPathTest, 2, 2, 2, 0, 2); +383 final PagedResults<RundeckExecution> excliudeGroupPathExactTest = client.getExecutions(ExecutionQuery.builder() +384 .project(projectName) +385 .excludeGroupPathExact("fruit") +386 .build(), 2L, 0L); +387 assertPageResults(excliudeGroupPathExactTest, 2, 2, 2, 0, 2); +388 +389 final PagedResults<RundeckExecution> recentTest = client.getExecutions(ExecutionQuery.builder() +390 .project(projectName) +391 .recent("1h").build(), 2L, 0L); +392 assertPageResults(recentTest, 2, 2, 2, 0, 2); +393 final PagedResults<RundeckExecution> statusTest = client.getExecutions(ExecutionQuery.builder() +394 .project(projectName) +395 .status(RundeckExecution.ExecutionStatus.SUCCEEDED) +396 .build(), 2L, 0L); +397 assertPageResults(statusTest, 2, 2, 2, 0, 2); +398 final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder() +399 .project(projectName) +400 .adhoc(true) +401 .build(), 2L, 0L); +402 assertPageResults(adhocTest, 2, 2, 2, 0, 2); 403 } 404 -405 @Test -406 @Betamax(tape = "trigger_job_as_user_unauthorized") -407 public void triggerJobAsUserUnauthorized() throws Exception { -408 RundeckClient client = createClient(TEST_TOKEN_3, 5); -409 -410 final RundeckExecution test; -411 try { -412 test = client.triggerJob(RunJobBuilder.builder() -413 .setJobId("3170ba0e-6093-4b58-94d2-52988aefbfc9") -414 .setAsUser("api-java-client-user-test2") -415 .build()); -416 Assert.fail("should not succeed"); -417 } catch (RundeckApiException e) { -418 Assert.assertEquals("Not authorized for action \"Run as User\" for Job ID 3170ba0e-6093-4b58-94d2-52988aefbfc9", e.getMessage()); -419 } -420 } -421 +405 /** +406 * Test paging values from results +407 */ +408 @Test +409 @Betamax(tape = "get_executions_paging") +410 public void getExecutionsPaging() throws Exception{ +411 RundeckClient client = createClient(TEST_TOKEN_1, 5); +412 final String projectName = "blah"; +413 //2 max, 1 offset +414 final PagedResults<RundeckExecution> adhocTest = client.getExecutions(ExecutionQuery.builder() +415 .project(projectName) +416 .excludeGroupPathExact("fruit") +417 .build(), 2L, 1L); +418 //expect 2 count, 3 total +419 assertPageResults(adhocTest, 2, 2, 2, 1, 3); +420 +421 //FAKE results, testing paging attributes parsing 422 -423 -424 @Test -425 @Betamax(tape = "trigger_adhoc_command") -426 public void triggerAdhocCommand() throws Exception { -427 RundeckClient client = createClient(TEST_TOKEN_3, 5); -428 -429 final RundeckExecution test -430 = client.triggerAdhocCommand(RunAdhocCommandBuilder.builder() -431 .setProject("test") -432 .setCommand("echo test trigger_adhoc_command") -433 .build()); -434 -435 Assert.assertEquals((Long) 23L, test.getId()); -436 Assert.assertEquals(null, test.getArgstring()); -437 Assert.assertEquals(null, test.getAbortedBy()); -438 Assert.assertEquals("echo test trigger_adhoc_command", test.getDescription()); -439 Assert.assertEquals("admin", test.getStartedBy()); -440 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, test.getStatus()); -441 } -442 +423 //1 max, 1 offset +424 final PagedResults<RundeckExecution> test2 = client.getExecutions(ExecutionQuery.builder() +425 .project(projectName) +426 .excludeGroupPathExact("fruit") +427 .build(), 1L, 1L); +428 //expect no paging attributes +429 assertPageResults(test2, 2, -1, -1, -1, -1); +430 +431 //1 max, 2 offset +432 final PagedResults<RundeckExecution> test3 = client.getExecutions(ExecutionQuery.builder() +433 .project(projectName) +434 .excludeGroupPathExact("fruit") +435 .build(), 1L, 2L); +436 //invalid value for count +437 assertPageResults(test3, 2, -1, -1, -1, -1); +438 } +439 @Test +440 @Betamax(tape = "bulk_delete") +441 public void bulkDelete() throws Exception { +442 RundeckClient client = createClient(TEST_TOKEN_2, 5); 443 -444 @Test -445 @Betamax(tape = "trigger_adhoc_command_as_user") -446 public void triggerAdhocCommandAsUser() throws Exception { -447 RundeckClient client = createClient(TEST_TOKEN_3, 5); -448 -449 final RundeckExecution test -450 = client.triggerAdhocCommand( -451 RunAdhocCommandBuilder.builder() -452 .setProject("test") -453 .setCommand("echo test trigger_adhoc_command_as_user") -454 .setAsUser("api-java-client-test-run-command-as-user1") -455 .build() -456 ); -457 -458 Assert.assertEquals((Long) 24L, test.getId()); -459 Assert.assertEquals(null, test.getArgstring()); -460 Assert.assertEquals(null, test.getAbortedBy()); -461 Assert.assertEquals("echo test trigger_adhoc_command_as_user", test.getDescription()); -462 Assert.assertEquals("api-java-client-test-run-command-as-user1", test.getStartedBy()); -463 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, test.getStatus()); -464 } -465 -466 @Test -467 @Betamax(tape = "trigger_adhoc_command_as_user_unauthorized") -468 public void triggerAdhocCommandAsUserUnauthorized() throws Exception { -469 RundeckClient client = createClient(TEST_TOKEN_3, 5); -470 -471 final RundeckExecution test; -472 try { -473 test = client.triggerAdhocCommand( -474 RunAdhocCommandBuilder.builder() -475 .setProject("test") -476 .setCommand("echo test trigger_adhoc_command_as_user") -477 .setAsUser("api-java-client-test-run-command-as-user1") -478 .build() -479 ); -480 Assert.fail("should not succeed"); -481 } catch (RundeckApiException e) { -482 Assert.assertEquals("Not authorized for action \"Run as User\" for Run Adhoc", e.getMessage()); -483 } -484 } +444 final RundeckJobDeleteBulk deleteTest +445 = client.deleteJobs(Arrays.asList("0ce457b5-ba84-41ca-812e-02b31da355a4")); +446 Assert.assertTrue(deleteTest.isAllsuccessful()); +447 Assert.assertEquals(1, deleteTest.getRequestCount()); +448 Assert.assertEquals(1, deleteTest.getResults().size()); +449 +450 final RundeckJobDelete delete = deleteTest.getResults().get(0); +451 Assert.assertTrue(delete.isSuccessful()); +452 Assert.assertNull(delete.getError()); +453 Assert.assertNull(delete.getErrorCode()); +454 Assert.assertNotNull(delete.getMessage()); +455 Assert.assertEquals("0ce457b5-ba84-41ca-812e-02b31da355a4", delete.getId()); +456 } +457 @Test +458 @Betamax(tape = "bulk_delete_dne") +459 public void bulkDeleteFailDNE() throws Exception { +460 RundeckClient client = createClient(TEST_TOKEN_2, 5); +461 +462 final RundeckJobDeleteBulk deleteTest +463 = client.deleteJobs(Arrays.asList("does-not-exist")); +464 Assert.assertFalse(deleteTest.isAllsuccessful()); +465 Assert.assertEquals(1, deleteTest.getRequestCount()); +466 Assert.assertEquals(1, deleteTest.getResults().size()); +467 +468 final RundeckJobDelete delete = deleteTest.getResults().get(0); +469 Assert.assertFalse(delete.isSuccessful()); +470 Assert.assertNotNull(delete.getError()); +471 Assert.assertEquals("notfound", delete.getErrorCode()); +472 Assert.assertNull(delete.getMessage()); +473 Assert.assertEquals("does-not-exist", delete.getId()); +474 } +475 @Test +476 @Betamax(tape = "bulk_delete_unauthorized") +477 public void bulkDeleteFailUnauthorized() throws Exception { +478 RundeckClient client = createClient(TEST_TOKEN_2, 5); +479 +480 final RundeckJobDeleteBulk deleteTest +481 = client.deleteJobs(Arrays.asList("3a6d16be-4268-4d26-86a9-cebc1781f768")); +482 Assert.assertFalse(deleteTest.isAllsuccessful()); +483 Assert.assertEquals(1, deleteTest.getRequestCount()); +484 Assert.assertEquals(1, deleteTest.getResults().size()); 485 -486 -487 @Test -488 @Betamax(tape = "trigger_adhoc_script") -489 public void triggerAdhocScript() throws Exception { -490 RundeckClient client = createClient(TEST_TOKEN_3, 5); -491 String script = "#!/bin/bash\n" + -492 "echo test trigger_adhoc_script\n"; -493 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); -494 -495 final RundeckExecution test -496 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript -497 (byteArrayInputStream).build()); +486 final RundeckJobDelete delete = deleteTest.getResults().get(0); +487 Assert.assertFalse(delete.isSuccessful()); +488 Assert.assertNotNull(delete.getError()); +489 Assert.assertEquals("unauthorized", delete.getErrorCode()); +490 Assert.assertNull(delete.getMessage()); +491 Assert.assertEquals("3a6d16be-4268-4d26-86a9-cebc1781f768", delete.getId()); +492 } +493 +494 @Test +495 @Betamax(tape = "trigger_job_basic") +496 public void triggerJobBasic() throws Exception { +497 RundeckClient client = createClient(TEST_TOKEN_3, 5); 498 -499 Assert.assertEquals((Long) 25L, test.getId()); -500 Assert.assertEquals(null, test.getArgstring()); -501 Assert.assertEquals(null, test.getAbortedBy()); -502 Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription()); -503 Assert.assertEquals("admin", test.getStartedBy()); -504 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); -505 } -506 -507 @Test -508 @Betamax(tape = "trigger_adhoc_script_as_user") -509 public void triggerAdhocScriptAsUser() throws Exception { -510 RundeckClient client = createClient(TEST_TOKEN_3, 5); -511 String script = "#!/bin/bash\n" + -512 "echo test trigger_adhoc_script\n"; -513 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); -514 -515 final RundeckExecution test -516 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript -517 (byteArrayInputStream).setAsUser("api-java-client-test-adhoc-script-as-user1").build()); -518 -519 Assert.assertEquals((Long) 26L, test.getId()); -520 Assert.assertEquals(null, test.getArgstring()); -521 Assert.assertEquals(null, test.getAbortedBy()); -522 Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription()); -523 Assert.assertEquals("api-java-client-test-adhoc-script-as-user1", test.getStartedBy()); -524 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); -525 } -526 -527 @Test -528 @Betamax(tape = "trigger_adhoc_script_as_user_unauthorized") -529 public void triggerAdhocScriptAsUserUnauthorized() throws Exception { -530 RundeckClient client = createClient(TEST_TOKEN_3, 5); -531 String script = "#!/bin/bash\n" + -532 "echo test trigger_adhoc_script\n"; -533 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); -534 -535 try{ -536 final RundeckExecution test -537 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript -538 (byteArrayInputStream).setAsUser("api-java-client-test-adhoc-script-as-user1").build()); -539 Assert.fail("should not succeed"); -540 } catch (RundeckApiException e) { -541 Assert.assertEquals("Not authorized for action \"Run as User\" for Run Adhoc", e.getMessage()); -542 } -543 -544 } -545 -546 @Test -547 @Betamax(tape = "trigger_adhoc_script_interpreter") -548 public void triggerAdhocScriptInpterpreter() throws Exception { -549 RundeckClient client = createClient(TEST_TOKEN_3, 8); -550 String script = "#!/bin/bash\n" + -551 "echo test trigger_adhoc_script\n"; -552 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); -553 final RundeckExecution test -554 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder() -555 .setProject("test").setScript(byteArrayInputStream) -556 .setScriptInterpreter("sudo -c bob") -557 .build()); -558 -559 Assert.assertEquals((Long) 27L, test.getId()); -560 Assert.assertEquals(null, test.getArgstring()); -561 Assert.assertEquals(null, test.getAbortedBy()); -562 Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription()); -563 Assert.assertEquals("admin", test.getStartedBy()); -564 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); -565 } -566 @Test -567 @Betamax(tape = "abort_execution") -568 public void abortExecution() throws Exception { -569 RundeckClient client = createClient(TEST_TOKEN_3, 5); -570 -571 long executionId = 21L; -572 final RundeckAbort test = client.abortExecution(executionId); -573 -574 Assert.assertEquals((Long) executionId,test.getExecution().getId()); -575 Assert.assertEquals(RundeckAbort.AbortStatus.PENDING,test.getStatus()); -576 } -577 @Test -578 @Betamax(tape = "abort_execution_as_user") -579 public void abortExecutionAsUser() throws Exception { -580 RundeckClient client = createClient(TEST_TOKEN_3, 5); -581 -582 long executionId = 22L; -583 final RundeckAbort test = client.abortExecution(executionId,"api-java-client-test-abort-as-user1"); -584 -585 Assert.assertEquals((Long) executionId,test.getExecution().getId()); -586 Assert.assertEquals(RundeckAbort.AbortStatus.PENDING,test.getStatus()); -587 } -588 @Test -589 @Betamax(tape = "abort_execution_as_user_unauthorized") -590 public void abortExecutionAsUserUnauthorized() throws Exception { -591 RundeckClient client = createClient(TEST_TOKEN_3, 5); -592 -593 long executionId = 28L; -594 final RundeckAbort test = client.abortExecution(executionId, "api-java-client-test-abort-as-user1"); -595 Assert.assertEquals(RundeckAbort.AbortStatus.FAILED, test.getStatus()); -596 } -597 private void assertPageResults(PagedResults<RundeckExecution> jobTest, -598 final int size, -599 final int count, final int max, final int offset, final int total) { -600 Assert.assertEquals(size, jobTest.getResults().size()); -601 Assert.assertEquals(count, jobTest.getCount()); -602 Assert.assertEquals(max, jobTest.getMax()); -603 Assert.assertEquals(offset, jobTest.getOffset()); -604 Assert.assertEquals(total, jobTest.getTotal()); -605 } -606 -607 /** -608 * Import jobs, xml contains project context -609 * @throws Exception -610 */ -611 @Test -612 @Betamax(tape = "import_jobs_context_project") -613 public void importJobsContextProject() throws Exception { -614 final RundeckClient client = createClient(TEST_TOKEN_4, 8); -615 InputStream stream=new ByteArrayInputStream( -616 ("<joblist>\n" + -617 " <job>\n" + -618 " <loglevel>INFO</loglevel>\n" + -619 " <sequence keepgoing='false' strategy='node-first'>\n" + -620 " <command>\n" + -621 " <exec>echo hi</exec>\n" + -622 " </command>\n" + -623 " </sequence>\n" + -624 " <description></description>\n" + -625 " <name>job1</name>\n" + -626 " <context>\n" + -627 " <project>test</project>\n" + -628 " </context>\n" + -629 " </job>\n" + -630 "</joblist>").getBytes("utf-8")); -631 -632 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -633 .setStream(stream) -634 .setFileType(FileType.XML) -635 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -636 .build(); -637 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -638 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); -639 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -640 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); -641 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); -642 Assert.assertEquals("job1", rundeckJob.getName()); -643 Assert.assertEquals("test", rundeckJob.getProject()); -644 } -645 /** -646 * Import jobs, xml no project defined -647 * @throws Exception -648 */ -649 @Test -650 @Betamax(tape = "import_jobs_no_project") -651 public void importJobsNoProject() throws Exception { -652 final RundeckClient client = createClient(TEST_TOKEN_4, 8); -653 InputStream stream=new ByteArrayInputStream( -654 ("<joblist>\n" + -655 " <job>\n" + -656 " <loglevel>INFO</loglevel>\n" + -657 " <sequence keepgoing='false' strategy='node-first'>\n" + -658 " <command>\n" + -659 " <exec>echo hi</exec>\n" + -660 " </command>\n" + -661 " </sequence>\n" + -662 " <description></description>\n" + -663 " <name>job2</name>\n" + -664 " </job>\n" + -665 "</joblist>").getBytes("utf-8")); -666 -667 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -668 .setStream(stream) -669 .setFileType(FileType.XML) -670 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -671 .build(); -672 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -673 Assert.assertEquals(1,rundeckJobsImportResult.getFailedJobs().size()); -674 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -675 Assert.assertEquals(0,rundeckJobsImportResult.getSucceededJobs().size()); -676 RundeckJob rundeckJob = rundeckJobsImportResult.getFailedJobs().entrySet().iterator().next().getKey(); -677 String reason = rundeckJobsImportResult.getFailedJobs().get(rundeckJob); -678 Assert.assertEquals("job2", rundeckJob.getName()); -679 Assert.assertEquals(null, rundeckJob.getProject()); -680 Assert.assertTrue(reason.contains("Project was not specified")); -681 } -682 /** -683 * Import jobs, using project parameter -684 * @throws Exception -685 */ -686 @Test -687 @Betamax(tape = "import_jobs_project_param") -688 public void importJobsProjectParam() throws Exception { -689 final RundeckClient client = createClient(TEST_TOKEN_4, 8); -690 InputStream stream=new ByteArrayInputStream( -691 ("<joblist>\n" + -692 " <job>\n" + -693 " <loglevel>INFO</loglevel>\n" + -694 " <sequence keepgoing='false' strategy='node-first'>\n" + -695 " <command>\n" + -696 " <exec>echo hi</exec>\n" + -697 " </command>\n" + -698 " </sequence>\n" + -699 " <description></description>\n" + -700 " <name>importJobsProjectParam</name>\n" + -701 " </job>\n" + -702 "</joblist>").getBytes("utf-8")); -703 -704 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -705 .setStream(stream) -706 .setFileType(FileType.XML) -707 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -708 .setProject("test") -709 .build(); -710 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -711 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); -712 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -713 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); -714 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); -715 Assert.assertEquals("importJobsProjectParam", rundeckJob.getName()); -716 Assert.assertEquals("test", rundeckJob.getProject()); -717 } -718 /** -719 * Import jobs, project parameter overrides xml -720 * @throws Exception -721 */ -722 @Test -723 @Betamax(tape = "import_jobs_project_param_override") -724 public void importJobsProjectParamOverride() throws Exception { -725 final RundeckClient client = createClient(TEST_TOKEN_4, 8); -726 InputStream stream=new ByteArrayInputStream( -727 ("<joblist>\n" + -728 " <job>\n" + -729 " <loglevel>INFO</loglevel>\n" + -730 " <sequence keepgoing='false' strategy='node-first'>\n" + -731 " <command>\n" + -732 " <exec>echo hi</exec>\n" + -733 " </command>\n" + -734 " </sequence>\n" + -735 " <description></description>\n" + -736 " <name>importJobsProjectParamOverride</name>\n" + -737 " <context>\n" + -738 " <project>testXYZ</project>\n" + -739 " </context>\n" + -740 " </job>\n" + -741 "</joblist>").getBytes("utf-8")); -742 -743 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -744 .setStream(stream) -745 .setFileType(FileType.XML) -746 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -747 .setProject("test") -748 .build(); -749 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -750 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); -751 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -752 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); -753 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); -754 Assert.assertEquals("importJobsProjectParamOverride", rundeckJob.getName()); -755 Assert.assertEquals("test", rundeckJob.getProject()); -756 } -757 /** -758 * Import jobs, project parameter v7 doesn' use parameter -759 * @throws Exception -760 */ -761 @Test -762 @Betamax(tape = "import_jobs_project_param_v7") -763 public void importJobsProjectParamV7() throws Exception { -764 final RundeckClient client = createClient(TEST_TOKEN_4, 7); -765 InputStream stream=new ByteArrayInputStream( -766 ("<joblist>\n" + -767 " <job>\n" + -768 " <loglevel>INFO</loglevel>\n" + -769 " <sequence keepgoing='false' strategy='node-first'>\n" + -770 " <command>\n" + -771 " <exec>echo hi</exec>\n" + -772 " </command>\n" + -773 " </sequence>\n" + -774 " <description></description>\n" + -775 " <name>importJobsProjectParamV7</name>\n" + -776 " <context>\n" + -777 " <project>testXYZ</project>\n" + -778 " </context>\n" + -779 " </job>\n" + -780 "</joblist>").getBytes("utf-8")); -781 -782 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -783 .setStream(stream) -784 .setFileType(FileType.XML) -785 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -786 .setProject("test") -787 .build(); -788 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -789 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); -790 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -791 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); -792 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); -793 Assert.assertEquals("importJobsProjectParamV7", rundeckJob.getName()); -794 Assert.assertEquals("testXYZ", rundeckJob.getProject()); -795 } -796 /** -797 * Import jobs, project parameter v7 doesn' use parameter -798 * @throws Exception -799 */ -800 @Test -801 @Betamax(tape = "import_jobs_uuid_param_remove_v9") -802 public void importJobsUUIDParamRemoveV9() throws Exception { -803 final RundeckClient client = createClient(TEST_TOKEN_6, 9); -804 InputStream stream=new ByteArrayInputStream( -805 ("<joblist>\n" + -806 " <job>\n" + -807 " <uuid>testImportUUID</uuid>\n" + -808 " <loglevel>INFO</loglevel>\n" + -809 " <sequence keepgoing='false' strategy='node-first'>\n" + -810 " <command>\n" + -811 " <exec>echo hi</exec>\n" + -812 " </command>\n" + -813 " </sequence>\n" + -814 " <description></description>\n" + -815 " <name>importJobsUUIDParamRemoveV9</name>\n" + -816 " </job>\n" + -817 "</joblist>").getBytes("utf-8")); -818 -819 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -820 .setStream(stream) -821 .setFileType(FileType.XML) -822 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -823 .setUUIDImportBehavior(RundeckJobsUUIDImportBehavior.REMOVE) -824 .setProject("test") -825 .build(); -826 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -827 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); -828 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -829 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); -830 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); -831 Assert.assertEquals("importJobsUUIDParamRemoveV9", rundeckJob.getName()); -832 Assert.assertFalse("testImportUUID".equals(rundeckJob.getId())); -833 Assert.assertEquals("b33c8bb1-4dfc-4661-a890-4164b264cc4a", rundeckJob.getId()); -834 } -835 /** -836 * Import jobs, project parameter v7 doesn' use parameter -837 * @throws Exception -838 */ -839 @Test -840 @Betamax(tape = "import_jobs_uuid_param_preserve_v9") -841 public void importJobsUUIDParamPreserveV9() throws Exception { -842 final RundeckClient client = createClient(TEST_TOKEN_6, 9); -843 InputStream stream=new ByteArrayInputStream( -844 ("<joblist>\n" + -845 " <job>\n" + -846 " <uuid>testImportUUID</uuid>\n" + -847 " <loglevel>INFO</loglevel>\n" + -848 " <sequence keepgoing='false' strategy='node-first'>\n" + -849 " <command>\n" + -850 " <exec>echo hi</exec>\n" + -851 " </command>\n" + -852 " </sequence>\n" + -853 " <description></description>\n" + -854 " <name>importJobsUUIDParamPreserveV9</name>\n" + -855 " </job>\n" + -856 "</joblist>").getBytes("utf-8")); -857 -858 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() -859 .setStream(stream) -860 .setFileType(FileType.XML) -861 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) -862 .setUUIDImportBehavior(RundeckJobsUUIDImportBehavior.PRESERVE) -863 .setProject("test") -864 .build(); -865 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); -866 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); -867 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); -868 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); -869 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); -870 Assert.assertEquals("importJobsUUIDParamPreserveV9", rundeckJob.getName()); -871 Assert.assertEquals("testImportUUID", rundeckJob.getId()); -872 } -873 /** -874 * Running executions for all projects using API v9 -875 * @throws Exception -876 */ -877 @Test -878 @Betamax(tape = "running_executions_v9") -879 public void runningExecutionsV9() throws Exception { -880 final RundeckClient client = createClient(TEST_TOKEN_5, 9); -881 List<RundeckExecution> runningExecutions = client.getRunningExecutions(); -882 Assert.assertEquals(2, runningExecutions.size()); -883 RundeckExecution exec1 = runningExecutions.get(0); -884 Assert.assertEquals("test", exec1.getProject()); -885 RundeckExecution exec2 = runningExecutions.get(1); -886 Assert.assertEquals("test2", exec2.getProject()); -887 } -888 -889 /** -890 * Running executions for all projects using API v8, which queries for project list and then individually -891 * queries each project's now running -892 * @throws Exception -893 */ -894 @Test -895 @Betamax(tape = "running_executions_v8") -896 public void runningExecutionsV8() throws Exception { -897 final RundeckClient client = createClient(TEST_TOKEN_5, 8); -898 List<RundeckExecution> runningExecutions = client.getRunningExecutions(); -899 Assert.assertEquals(2, runningExecutions.size()); -900 RundeckExecution exec1 = runningExecutions.get(0); -901 Assert.assertEquals("test", exec1.getProject()); -902 RundeckExecution exec2 = runningExecutions.get(1); -903 Assert.assertEquals("test2", exec2.getProject()); -904 } -905 /** -906 * Execution output -907 */ -908 @Test -909 @Betamax(tape = "execution_output_basic", mode = TapeMode.READ_ONLY) -910 public void executionOutputBasic() throws Exception { -911 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -912 RundeckOutput output = client.getJobExecutionOutput(146L,0,0L,-1); -913 -914 Assert.assertEquals(new Long(1602), output.getExecDuration()); -915 Assert.assertEquals(new Long(146), output.getExecutionId()); -916 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); -917 Assert.assertEquals(null, output.getFilterNode()); -918 Assert.assertEquals(null, output.getFilterStep()); -919 Assert.assertEquals(1409, output.getOffset()); -920 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); -921 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); -922 Assert.assertEquals(1415, output.getTotalSize()); -923 Assert.assertEquals(true, output.isCompleted()); -924 Assert.assertEquals(true, output.isExecCompleted()); -925 Assert.assertEquals(false, output.isEmpty()); -926 Assert.assertEquals(false, output.isHasFailedNodes()); -927 Assert.assertEquals(false, output.isUnmodified()); -928 Assert.assertEquals(3, output.getLogEntries().size()); -929 } -930 /** -931 * Execution output for a node -932 */ -933 @Test -934 @Betamax(tape = "execution_output_fornode", mode = TapeMode.READ_ONLY) -935 public void executionOutputForNode() throws Exception { -936 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -937 RundeckOutput output = client.getExecutionOutputForNode(146L, "node-14.qa.subgroup.mycompany.com", 0, -1, 0L, -1); -938 -939 Assert.assertEquals(new Long(1602), output.getExecDuration()); -940 Assert.assertEquals(new Long(146), output.getExecutionId()); -941 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); -942 Assert.assertEquals("node-14.qa.subgroup.mycompany.com", output.getFilterNode()); -943 Assert.assertEquals(null, output.getFilterStep()); -944 Assert.assertEquals(1409, output.getOffset()); -945 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); -946 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); -947 Assert.assertEquals(1415, output.getTotalSize()); -948 Assert.assertEquals(true, output.isCompleted()); -949 Assert.assertEquals(true, output.isExecCompleted()); -950 Assert.assertEquals(false, output.isEmpty()); -951 Assert.assertEquals(false, output.isHasFailedNodes()); -952 Assert.assertEquals(false, output.isUnmodified()); -953 Assert.assertEquals(1, output.getLogEntries().size()); -954 } -955 /** -956 * Execution output for a step -957 */ -958 @Test -959 @Betamax(tape = "execution_output_forstep", mode = TapeMode.READ_ONLY) -960 public void executionOutputForStep() throws Exception { -961 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -962 RundeckOutput output = client.getExecutionOutputForStep(146L, "1", 0, -1, 0L, -1); -963 -964 Assert.assertEquals(new Long(1602), output.getExecDuration()); -965 Assert.assertEquals(new Long(146), output.getExecutionId()); -966 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); -967 Assert.assertEquals(null, output.getFilterNode()); -968 Assert.assertEquals("1", output.getFilterStep()); -969 Assert.assertEquals(1409, output.getOffset()); -970 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); -971 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); -972 Assert.assertEquals(1415, output.getTotalSize()); -973 Assert.assertEquals(true, output.isCompleted()); -974 Assert.assertEquals(true, output.isExecCompleted()); -975 Assert.assertEquals(false, output.isEmpty()); -976 Assert.assertEquals(false, output.isHasFailedNodes()); -977 Assert.assertEquals(false, output.isUnmodified()); -978 Assert.assertEquals(3, output.getLogEntries().size()); -979 } -980 -981 /** -982 * Execution output for a node and step -983 */ -984 @Test -985 @Betamax(tape = "execution_output_fornodeandstep", mode = TapeMode.READ_ONLY) -986 public void executionOutputForNodeAndStep() throws Exception { -987 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -988 RundeckOutput output = client.getExecutionOutputForNodeAndStep(146L, "node-14.qa.subgroup.mycompany.com", -989 "1", 0, -1, 0L, -1); -990 -991 Assert.assertEquals(new Long(1602), output.getExecDuration()); -992 Assert.assertEquals(new Long(146), output.getExecutionId()); -993 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); -994 Assert.assertEquals("node-14.qa.subgroup.mycompany.com", output.getFilterNode()); -995 Assert.assertEquals("1", output.getFilterStep()); -996 Assert.assertEquals(1409, output.getOffset()); -997 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); -998 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); -999 Assert.assertEquals(1415, output.getTotalSize()); -1000 Assert.assertEquals(true, output.isCompleted()); -1001 Assert.assertEquals(true, output.isExecCompleted()); -1002 Assert.assertEquals(false, output.isEmpty()); -1003 Assert.assertEquals(false, output.isHasFailedNodes()); -1004 Assert.assertEquals(false, output.isUnmodified()); -1005 Assert.assertEquals(1, output.getLogEntries().size()); -1006 } -1007 -1008 /** -1009 * Execution output state sequence -1010 */ -1011 @Test -1012 @Betamax(tape = "execution_output_state", mode = TapeMode.READ_ONLY) -1013 public void executionOutputState() throws Exception { -1014 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -1015 RundeckOutput output = client.getExecutionOutputState(146L, false, 0, 0L, -1); -1016 -1017 Assert.assertEquals(new Long(1602), output.getExecDuration()); -1018 Assert.assertEquals(new Long(146), output.getExecutionId()); -1019 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); -1020 Assert.assertEquals(null, output.getFilterNode()); -1021 Assert.assertEquals(null, output.getFilterStep()); -1022 Assert.assertEquals(1409, output.getOffset()); -1023 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); -1024 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); -1025 Assert.assertEquals(1415, output.getTotalSize()); -1026 Assert.assertEquals(true, output.isCompleted()); -1027 Assert.assertEquals(true, output.isExecCompleted()); -1028 Assert.assertEquals(false, output.isEmpty()); -1029 Assert.assertEquals(false, output.isHasFailedNodes()); -1030 Assert.assertEquals(false, output.isUnmodified()); -1031 Assert.assertEquals(15, output.getLogEntries().size()); -1032 } -1033 /** -1034 * Execution output state sequence -1035 */ -1036 @Test -1037 @Betamax(tape = "execution_output_state_only", mode = TapeMode.READ_ONLY) -1038 public void executionOutputStateOnly() throws Exception { -1039 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -1040 RundeckOutput output = client.getExecutionOutputState(146L, true, 0, 0L, -1); -1041 -1042 Assert.assertEquals(new Long(1602), output.getExecDuration()); -1043 Assert.assertEquals(new Long(146), output.getExecutionId()); -1044 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); -1045 Assert.assertEquals(null, output.getFilterNode()); -1046 Assert.assertEquals(null, output.getFilterStep()); -1047 Assert.assertEquals(1409, output.getOffset()); -1048 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); -1049 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); -1050 Assert.assertEquals(1415, output.getTotalSize()); -1051 Assert.assertEquals(true, output.isCompleted()); -1052 Assert.assertEquals(true, output.isExecCompleted()); -1053 Assert.assertEquals(false, output.isEmpty()); -1054 Assert.assertEquals(false, output.isHasFailedNodes()); -1055 Assert.assertEquals(false, output.isUnmodified()); -1056 Assert.assertEquals(12, output.getLogEntries().size()); -1057 } -1058 /** -1059 * Execution state structure -1060 */ -1061 @Test -1062 @Betamax(tape = "execution_state", mode = TapeMode.READ_ONLY) -1063 public void executionState() throws Exception { -1064 final RundeckClient client = createClient(TEST_TOKEN_6, 10); -1065 RundeckExecutionState output = client.getExecutionState(149L); -1066 -1067 Assert.assertEquals(149,output.getExecutionId()); -1068 Assert.assertEquals(3,output.getTargetNodes().size()); -1069 Assert.assertEquals(3,output.getAllNodes().size()); -1070 Assert.assertEquals(1,output.getStepCount()); -1071 Assert.assertEquals(1,output.getSteps().size()); -1072 Assert.assertEquals(RundeckWFExecState.SUCCEEDED,output.getExecutionState()); -1073 } -1074 -1075 @Before -1076 public void setUp() throws Exception { -1077 // not that you can put whatever here, because we don't actually connect to the RunDeck instance -1078 // but instead use betamax as a proxy to serve the previously recorded tapes (in src/test/resources) -1079 client = createClient(TEST_TOKEN_0, 5); +499 final RundeckExecution test +500 = client.triggerJob(RunJobBuilder.builder().setJobId("3170ba0e-6093-4b58-94d2-52988aefbfc9").build()); +501 +502 Assert.assertEquals((Long) 19L, test.getId()); +503 Assert.assertEquals(null, test.getArgstring()); +504 Assert.assertEquals(null, test.getAbortedBy()); +505 Assert.assertEquals("echo hi there ${job.username} ; sleep 90", test.getDescription()); +506 Assert.assertEquals("admin", test.getStartedBy()); +507 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); +508 +509 } +510 +511 @Test +512 @Betamax(tape = "trigger_job_as_user") +513 public void triggerJobAsUser() throws Exception { +514 RundeckClient client = createClient(TEST_TOKEN_3, 5); +515 +516 final RundeckExecution test +517 = client.triggerJob(RunJobBuilder.builder() +518 .setJobId("3170ba0e-6093-4b58-94d2-52988aefbfc9") +519 .setAsUser("api-java-client-user-test1") +520 .build()); +521 +522 Assert.assertEquals((Long)20L, test.getId()); +523 Assert.assertEquals(null, test.getArgstring()); +524 Assert.assertEquals(null, test.getAbortedBy()); +525 Assert.assertEquals("echo hi there ${job.username} ; sleep 90", test.getDescription()); +526 Assert.assertEquals("api-java-client-user-test1", test.getStartedBy()); +527 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); +528 +529 } +530 +531 @Test +532 @Betamax(tape = "trigger_job_as_user_unauthorized") +533 public void triggerJobAsUserUnauthorized() throws Exception { +534 RundeckClient client = createClient(TEST_TOKEN_3, 5); +535 +536 final RundeckExecution test; +537 try { +538 test = client.triggerJob(RunJobBuilder.builder() +539 .setJobId("3170ba0e-6093-4b58-94d2-52988aefbfc9") +540 .setAsUser("api-java-client-user-test2") +541 .build()); +542 Assert.fail("should not succeed"); +543 } catch (RundeckApiException e) { +544 Assert.assertEquals("Not authorized for action \"Run as User\" for Job ID 3170ba0e-6093-4b58-94d2-52988aefbfc9", e.getMessage()); +545 } +546 } +547 +548 +549 +550 @Test +551 @Betamax(tape = "trigger_adhoc_command") +552 public void triggerAdhocCommand() throws Exception { +553 RundeckClient client = createClient(TEST_TOKEN_3, 5); +554 +555 final RundeckExecution test +556 = client.triggerAdhocCommand(RunAdhocCommandBuilder.builder() +557 .setProject("test") +558 .setCommand("echo test trigger_adhoc_command") +559 .build()); +560 +561 Assert.assertEquals((Long) 23L, test.getId()); +562 Assert.assertEquals(null, test.getArgstring()); +563 Assert.assertEquals(null, test.getAbortedBy()); +564 Assert.assertEquals("echo test trigger_adhoc_command", test.getDescription()); +565 Assert.assertEquals("admin", test.getStartedBy()); +566 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, test.getStatus()); +567 } +568 +569 +570 @Test +571 @Betamax(tape = "trigger_adhoc_command_as_user") +572 public void triggerAdhocCommandAsUser() throws Exception { +573 RundeckClient client = createClient(TEST_TOKEN_3, 5); +574 +575 final RundeckExecution test +576 = client.triggerAdhocCommand( +577 RunAdhocCommandBuilder.builder() +578 .setProject("test") +579 .setCommand("echo test trigger_adhoc_command_as_user") +580 .setAsUser("api-java-client-test-run-command-as-user1") +581 .build() +582 ); +583 +584 Assert.assertEquals((Long) 24L, test.getId()); +585 Assert.assertEquals(null, test.getArgstring()); +586 Assert.assertEquals(null, test.getAbortedBy()); +587 Assert.assertEquals("echo test trigger_adhoc_command_as_user", test.getDescription()); +588 Assert.assertEquals("api-java-client-test-run-command-as-user1", test.getStartedBy()); +589 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, test.getStatus()); +590 } +591 +592 @Test +593 @Betamax(tape = "trigger_adhoc_command_as_user_unauthorized") +594 public void triggerAdhocCommandAsUserUnauthorized() throws Exception { +595 RundeckClient client = createClient(TEST_TOKEN_3, 5); +596 +597 final RundeckExecution test; +598 try { +599 test = client.triggerAdhocCommand( +600 RunAdhocCommandBuilder.builder() +601 .setProject("test") +602 .setCommand("echo test trigger_adhoc_command_as_user") +603 .setAsUser("api-java-client-test-run-command-as-user1") +604 .build() +605 ); +606 Assert.fail("should not succeed"); +607 } catch (RundeckApiException e) { +608 Assert.assertEquals("Not authorized for action \"Run as User\" for Run Adhoc", e.getMessage()); +609 } +610 } +611 +612 +613 @Test +614 @Betamax(tape = "trigger_adhoc_script") +615 public void triggerAdhocScript() throws Exception { +616 RundeckClient client = createClient(TEST_TOKEN_3, 5); +617 String script = "#!/bin/bash\n" + +618 "echo test trigger_adhoc_script\n"; +619 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); +620 +621 final RundeckExecution test +622 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript +623 (byteArrayInputStream).build()); +624 +625 Assert.assertEquals((Long) 25L, test.getId()); +626 Assert.assertEquals(null, test.getArgstring()); +627 Assert.assertEquals(null, test.getAbortedBy()); +628 Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription()); +629 Assert.assertEquals("admin", test.getStartedBy()); +630 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); +631 } +632 +633 @Test +634 @Betamax(tape = "trigger_adhoc_script_as_user") +635 public void triggerAdhocScriptAsUser() throws Exception { +636 RundeckClient client = createClient(TEST_TOKEN_3, 5); +637 String script = "#!/bin/bash\n" + +638 "echo test trigger_adhoc_script\n"; +639 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); +640 +641 final RundeckExecution test +642 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript +643 (byteArrayInputStream).setAsUser("api-java-client-test-adhoc-script-as-user1").build()); +644 +645 Assert.assertEquals((Long) 26L, test.getId()); +646 Assert.assertEquals(null, test.getArgstring()); +647 Assert.assertEquals(null, test.getAbortedBy()); +648 Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription()); +649 Assert.assertEquals("api-java-client-test-adhoc-script-as-user1", test.getStartedBy()); +650 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); +651 } +652 +653 @Test +654 @Betamax(tape = "trigger_adhoc_script_as_user_unauthorized") +655 public void triggerAdhocScriptAsUserUnauthorized() throws Exception { +656 RundeckClient client = createClient(TEST_TOKEN_3, 5); +657 String script = "#!/bin/bash\n" + +658 "echo test trigger_adhoc_script\n"; +659 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); +660 +661 try{ +662 final RundeckExecution test +663 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder().setProject("test").setScript +664 (byteArrayInputStream).setAsUser("api-java-client-test-adhoc-script-as-user1").build()); +665 Assert.fail("should not succeed"); +666 } catch (RundeckApiException e) { +667 Assert.assertEquals("Not authorized for action \"Run as User\" for Run Adhoc", e.getMessage()); +668 } +669 +670 } +671 +672 @Test +673 @Betamax(tape = "trigger_adhoc_script_interpreter") +674 public void triggerAdhocScriptInpterpreter() throws Exception { +675 RundeckClient client = createClient(TEST_TOKEN_3, 8); +676 String script = "#!/bin/bash\n" + +677 "echo test trigger_adhoc_script\n"; +678 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(script.getBytes()); +679 final RundeckExecution test +680 = client.triggerAdhocScript(RunAdhocScriptBuilder.builder() +681 .setProject("test").setScript(byteArrayInputStream) +682 .setScriptInterpreter("sudo -c bob") +683 .build()); +684 +685 Assert.assertEquals((Long) 27L, test.getId()); +686 Assert.assertEquals(null, test.getArgstring()); +687 Assert.assertEquals(null, test.getAbortedBy()); +688 Assert.assertEquals("#!/bin/bash\necho test trigger_adhoc_script", test.getDescription()); +689 Assert.assertEquals("admin", test.getStartedBy()); +690 Assert.assertEquals(RundeckExecution.ExecutionStatus.RUNNING, test.getStatus()); +691 } +692 @Test +693 @Betamax(tape = "abort_execution") +694 public void abortExecution() throws Exception { +695 RundeckClient client = createClient(TEST_TOKEN_3, 5); +696 +697 long executionId = 21L; +698 final RundeckAbort test = client.abortExecution(executionId); +699 +700 Assert.assertEquals((Long) executionId,test.getExecution().getId()); +701 Assert.assertEquals(RundeckAbort.AbortStatus.PENDING,test.getStatus()); +702 } +703 @Test +704 @Betamax(tape = "abort_execution_as_user") +705 public void abortExecutionAsUser() throws Exception { +706 RundeckClient client = createClient(TEST_TOKEN_3, 5); +707 +708 long executionId = 22L; +709 final RundeckAbort test = client.abortExecution(executionId,"api-java-client-test-abort-as-user1"); +710 +711 Assert.assertEquals((Long) executionId,test.getExecution().getId()); +712 Assert.assertEquals(RundeckAbort.AbortStatus.PENDING,test.getStatus()); +713 } +714 @Test +715 @Betamax(tape = "abort_execution_as_user_unauthorized") +716 public void abortExecutionAsUserUnauthorized() throws Exception { +717 RundeckClient client = createClient(TEST_TOKEN_3, 5); +718 +719 long executionId = 28L; +720 final RundeckAbort test = client.abortExecution(executionId, "api-java-client-test-abort-as-user1"); +721 Assert.assertEquals(RundeckAbort.AbortStatus.FAILED, test.getStatus()); +722 } +723 private void assertPageResults(PagedResults<RundeckExecution> jobTest, +724 final int size, +725 final int count, final int max, final int offset, final int total) { +726 Assert.assertEquals(size, jobTest.getResults().size()); +727 Assert.assertEquals(count, jobTest.getCount()); +728 Assert.assertEquals(max, jobTest.getMax()); +729 Assert.assertEquals(offset, jobTest.getOffset()); +730 Assert.assertEquals(total, jobTest.getTotal()); +731 } +732 +733 /** +734 * Import jobs, xml contains project context +735 * @throws Exception +736 */ +737 @Test +738 @Betamax(tape = "import_jobs_context_project") +739 public void importJobsContextProject() throws Exception { +740 final RundeckClient client = createClient(TEST_TOKEN_4, 8); +741 InputStream stream=new ByteArrayInputStream( +742 ("<joblist>\n" + +743 " <job>\n" + +744 " <loglevel>INFO</loglevel>\n" + +745 " <sequence keepgoing='false' strategy='node-first'>\n" + +746 " <command>\n" + +747 " <exec>echo hi</exec>\n" + +748 " </command>\n" + +749 " </sequence>\n" + +750 " <description></description>\n" + +751 " <name>job1</name>\n" + +752 " <context>\n" + +753 " <project>test</project>\n" + +754 " </context>\n" + +755 " </job>\n" + +756 "</joblist>").getBytes("utf-8")); +757 +758 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +759 .setStream(stream) +760 .setFileType(FileType.XML) +761 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +762 .build(); +763 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +764 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); +765 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +766 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); +767 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); +768 Assert.assertEquals("job1", rundeckJob.getName()); +769 Assert.assertEquals("test", rundeckJob.getProject()); +770 } +771 /** +772 * Import jobs, xml no project defined +773 * @throws Exception +774 */ +775 @Test +776 @Betamax(tape = "import_jobs_no_project") +777 public void importJobsNoProject() throws Exception { +778 final RundeckClient client = createClient(TEST_TOKEN_4, 8); +779 InputStream stream=new ByteArrayInputStream( +780 ("<joblist>\n" + +781 " <job>\n" + +782 " <loglevel>INFO</loglevel>\n" + +783 " <sequence keepgoing='false' strategy='node-first'>\n" + +784 " <command>\n" + +785 " <exec>echo hi</exec>\n" + +786 " </command>\n" + +787 " </sequence>\n" + +788 " <description></description>\n" + +789 " <name>job2</name>\n" + +790 " </job>\n" + +791 "</joblist>").getBytes("utf-8")); +792 +793 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +794 .setStream(stream) +795 .setFileType(FileType.XML) +796 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +797 .build(); +798 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +799 Assert.assertEquals(1,rundeckJobsImportResult.getFailedJobs().size()); +800 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +801 Assert.assertEquals(0,rundeckJobsImportResult.getSucceededJobs().size()); +802 RundeckJob rundeckJob = rundeckJobsImportResult.getFailedJobs().entrySet().iterator().next().getKey(); +803 String reason = rundeckJobsImportResult.getFailedJobs().get(rundeckJob); +804 Assert.assertEquals("job2", rundeckJob.getName()); +805 Assert.assertEquals(null, rundeckJob.getProject()); +806 Assert.assertTrue(reason.contains("Project was not specified")); +807 } +808 /** +809 * Import jobs, using project parameter +810 * @throws Exception +811 */ +812 @Test +813 @Betamax(tape = "import_jobs_project_param") +814 public void importJobsProjectParam() throws Exception { +815 final RundeckClient client = createClient(TEST_TOKEN_4, 8); +816 InputStream stream=new ByteArrayInputStream( +817 ("<joblist>\n" + +818 " <job>\n" + +819 " <loglevel>INFO</loglevel>\n" + +820 " <sequence keepgoing='false' strategy='node-first'>\n" + +821 " <command>\n" + +822 " <exec>echo hi</exec>\n" + +823 " </command>\n" + +824 " </sequence>\n" + +825 " <description></description>\n" + +826 " <name>importJobsProjectParam</name>\n" + +827 " </job>\n" + +828 "</joblist>").getBytes("utf-8")); +829 +830 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +831 .setStream(stream) +832 .setFileType(FileType.XML) +833 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +834 .setProject("test") +835 .build(); +836 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +837 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); +838 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +839 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); +840 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); +841 Assert.assertEquals("importJobsProjectParam", rundeckJob.getName()); +842 Assert.assertEquals("test", rundeckJob.getProject()); +843 } +844 /** +845 * Import jobs, project parameter overrides xml +846 * @throws Exception +847 */ +848 @Test +849 @Betamax(tape = "import_jobs_project_param_override") +850 public void importJobsProjectParamOverride() throws Exception { +851 final RundeckClient client = createClient(TEST_TOKEN_4, 8); +852 InputStream stream=new ByteArrayInputStream( +853 ("<joblist>\n" + +854 " <job>\n" + +855 " <loglevel>INFO</loglevel>\n" + +856 " <sequence keepgoing='false' strategy='node-first'>\n" + +857 " <command>\n" + +858 " <exec>echo hi</exec>\n" + +859 " </command>\n" + +860 " </sequence>\n" + +861 " <description></description>\n" + +862 " <name>importJobsProjectParamOverride</name>\n" + +863 " <context>\n" + +864 " <project>testXYZ</project>\n" + +865 " </context>\n" + +866 " </job>\n" + +867 "</joblist>").getBytes("utf-8")); +868 +869 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +870 .setStream(stream) +871 .setFileType(FileType.XML) +872 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +873 .setProject("test") +874 .build(); +875 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +876 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); +877 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +878 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); +879 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); +880 Assert.assertEquals("importJobsProjectParamOverride", rundeckJob.getName()); +881 Assert.assertEquals("test", rundeckJob.getProject()); +882 } +883 /** +884 * Import jobs, project parameter v7 doesn' use parameter +885 * @throws Exception +886 */ +887 @Test +888 @Betamax(tape = "import_jobs_project_param_v7") +889 public void importJobsProjectParamV7() throws Exception { +890 final RundeckClient client = createClient(TEST_TOKEN_4, 7); +891 InputStream stream=new ByteArrayInputStream( +892 ("<joblist>\n" + +893 " <job>\n" + +894 " <loglevel>INFO</loglevel>\n" + +895 " <sequence keepgoing='false' strategy='node-first'>\n" + +896 " <command>\n" + +897 " <exec>echo hi</exec>\n" + +898 " </command>\n" + +899 " </sequence>\n" + +900 " <description></description>\n" + +901 " <name>importJobsProjectParamV7</name>\n" + +902 " <context>\n" + +903 " <project>testXYZ</project>\n" + +904 " </context>\n" + +905 " </job>\n" + +906 "</joblist>").getBytes("utf-8")); +907 +908 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +909 .setStream(stream) +910 .setFileType(FileType.XML) +911 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +912 .setProject("test") +913 .build(); +914 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +915 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); +916 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +917 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); +918 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); +919 Assert.assertEquals("importJobsProjectParamV7", rundeckJob.getName()); +920 Assert.assertEquals("testXYZ", rundeckJob.getProject()); +921 } +922 /** +923 * Import jobs, project parameter v7 doesn' use parameter +924 * @throws Exception +925 */ +926 @Test +927 @Betamax(tape = "import_jobs_uuid_param_remove_v9") +928 public void importJobsUUIDParamRemoveV9() throws Exception { +929 final RundeckClient client = createClient(TEST_TOKEN_6, 9); +930 InputStream stream=new ByteArrayInputStream( +931 ("<joblist>\n" + +932 " <job>\n" + +933 " <uuid>testImportUUID</uuid>\n" + +934 " <loglevel>INFO</loglevel>\n" + +935 " <sequence keepgoing='false' strategy='node-first'>\n" + +936 " <command>\n" + +937 " <exec>echo hi</exec>\n" + +938 " </command>\n" + +939 " </sequence>\n" + +940 " <description></description>\n" + +941 " <name>importJobsUUIDParamRemoveV9</name>\n" + +942 " </job>\n" + +943 "</joblist>").getBytes("utf-8")); +944 +945 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +946 .setStream(stream) +947 .setFileType(FileType.XML) +948 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +949 .setUUIDImportBehavior(RundeckJobsUUIDImportBehavior.REMOVE) +950 .setProject("test") +951 .build(); +952 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +953 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); +954 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +955 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); +956 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); +957 Assert.assertEquals("importJobsUUIDParamRemoveV9", rundeckJob.getName()); +958 Assert.assertFalse("testImportUUID".equals(rundeckJob.getId())); +959 Assert.assertEquals("b33c8bb1-4dfc-4661-a890-4164b264cc4a", rundeckJob.getId()); +960 } +961 /** +962 * Import jobs, project parameter v7 doesn' use parameter +963 * @throws Exception +964 */ +965 @Test +966 @Betamax(tape = "import_jobs_uuid_param_preserve_v9") +967 public void importJobsUUIDParamPreserveV9() throws Exception { +968 final RundeckClient client = createClient(TEST_TOKEN_6, 9); +969 InputStream stream=new ByteArrayInputStream( +970 ("<joblist>\n" + +971 " <job>\n" + +972 " <uuid>testImportUUID</uuid>\n" + +973 " <loglevel>INFO</loglevel>\n" + +974 " <sequence keepgoing='false' strategy='node-first'>\n" + +975 " <command>\n" + +976 " <exec>echo hi</exec>\n" + +977 " </command>\n" + +978 " </sequence>\n" + +979 " <description></description>\n" + +980 " <name>importJobsUUIDParamPreserveV9</name>\n" + +981 " </job>\n" + +982 "</joblist>").getBytes("utf-8")); +983 +984 final RundeckJobsImport jobsImport = RundeckJobsImportBuilder.builder() +985 .setStream(stream) +986 .setFileType(FileType.XML) +987 .setJobsImportMethod(RundeckJobsImportMethod.CREATE) +988 .setUUIDImportBehavior(RundeckJobsUUIDImportBehavior.PRESERVE) +989 .setProject("test") +990 .build(); +991 RundeckJobsImportResult rundeckJobsImportResult = client.importJobs(jobsImport); +992 Assert.assertEquals(0,rundeckJobsImportResult.getFailedJobs().size()); +993 Assert.assertEquals(0,rundeckJobsImportResult.getSkippedJobs().size()); +994 Assert.assertEquals(1,rundeckJobsImportResult.getSucceededJobs().size()); +995 RundeckJob rundeckJob = rundeckJobsImportResult.getSucceededJobs().get(0); +996 Assert.assertEquals("importJobsUUIDParamPreserveV9", rundeckJob.getName()); +997 Assert.assertEquals("testImportUUID", rundeckJob.getId()); +998 } +999 /** +1000 * Running executions for all projects using API v9 +1001 * @throws Exception +1002 */ +1003 @Test +1004 @Betamax(tape = "running_executions_v9") +1005 public void runningExecutionsV9() throws Exception { +1006 final RundeckClient client = createClient(TEST_TOKEN_5, 9); +1007 List<RundeckExecution> runningExecutions = client.getRunningExecutions(); +1008 Assert.assertEquals(2, runningExecutions.size()); +1009 RundeckExecution exec1 = runningExecutions.get(0); +1010 Assert.assertEquals("test", exec1.getProject()); +1011 RundeckExecution exec2 = runningExecutions.get(1); +1012 Assert.assertEquals("test2", exec2.getProject()); +1013 } +1014 +1015 /** +1016 * Running executions for all projects using API v8, which queries for project list and then individually +1017 * queries each project's now running +1018 * @throws Exception +1019 */ +1020 @Test +1021 @Betamax(tape = "running_executions_v8") +1022 public void runningExecutionsV8() throws Exception { +1023 final RundeckClient client = createClient(TEST_TOKEN_5, 8); +1024 List<RundeckExecution> runningExecutions = client.getRunningExecutions(); +1025 Assert.assertEquals(2, runningExecutions.size()); +1026 RundeckExecution exec1 = runningExecutions.get(0); +1027 Assert.assertEquals("test", exec1.getProject()); +1028 RundeckExecution exec2 = runningExecutions.get(1); +1029 Assert.assertEquals("test2", exec2.getProject()); +1030 } +1031 /** +1032 * Execution output +1033 */ +1034 @Test +1035 @Betamax(tape = "execution_output_basic", mode = TapeMode.READ_ONLY) +1036 public void executionOutputBasic() throws Exception { +1037 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1038 RundeckOutput output = client.getJobExecutionOutput(146L,0,0L,-1); +1039 +1040 Assert.assertEquals(new Long(1602), output.getExecDuration()); +1041 Assert.assertEquals(new Long(146), output.getExecutionId()); +1042 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); +1043 Assert.assertEquals(null, output.getFilterNode()); +1044 Assert.assertEquals(null, output.getFilterStep()); +1045 Assert.assertEquals(1409, output.getOffset()); +1046 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); +1047 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); +1048 Assert.assertEquals(1415, output.getTotalSize()); +1049 Assert.assertEquals(true, output.isCompleted()); +1050 Assert.assertEquals(true, output.isExecCompleted()); +1051 Assert.assertEquals(false, output.isEmpty()); +1052 Assert.assertEquals(false, output.isHasFailedNodes()); +1053 Assert.assertEquals(false, output.isUnmodified()); +1054 Assert.assertEquals(3, output.getLogEntries().size()); +1055 } +1056 /** +1057 * Execution output for a node +1058 */ +1059 @Test +1060 @Betamax(tape = "execution_output_fornode", mode = TapeMode.READ_ONLY) +1061 public void executionOutputForNode() throws Exception { +1062 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1063 RundeckOutput output = client.getExecutionOutputForNode(146L, "node-14.qa.subgroup.mycompany.com", 0, -1, 0L, -1); +1064 +1065 Assert.assertEquals(new Long(1602), output.getExecDuration()); +1066 Assert.assertEquals(new Long(146), output.getExecutionId()); +1067 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); +1068 Assert.assertEquals("node-14.qa.subgroup.mycompany.com", output.getFilterNode()); +1069 Assert.assertEquals(null, output.getFilterStep()); +1070 Assert.assertEquals(1409, output.getOffset()); +1071 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); +1072 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); +1073 Assert.assertEquals(1415, output.getTotalSize()); +1074 Assert.assertEquals(true, output.isCompleted()); +1075 Assert.assertEquals(true, output.isExecCompleted()); +1076 Assert.assertEquals(false, output.isEmpty()); +1077 Assert.assertEquals(false, output.isHasFailedNodes()); +1078 Assert.assertEquals(false, output.isUnmodified()); +1079 Assert.assertEquals(1, output.getLogEntries().size()); 1080 } -1081 -1082 private RundeckClient createClient(final String token, int version) { -1083 return createBuilder(token).version(version).build(); -1084 } -1085 -1086 private RundeckClient createClient(String token) { -1087 return createBuilder(token) -1088 .build(); -1089 } -1090 -1091 private RundeckClientBuilder createBuilder(String token) { -1092 return RundeckClient.builder().url("http://rundeck.local:4440") -1093 .token(token); -1094 } -1095 -1096 } +1081 /** +1082 * Execution output for a step +1083 */ +1084 @Test +1085 @Betamax(tape = "execution_output_forstep", mode = TapeMode.READ_ONLY) +1086 public void executionOutputForStep() throws Exception { +1087 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1088 RundeckOutput output = client.getExecutionOutputForStep(146L, "1", 0, -1, 0L, -1); +1089 +1090 Assert.assertEquals(new Long(1602), output.getExecDuration()); +1091 Assert.assertEquals(new Long(146), output.getExecutionId()); +1092 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); +1093 Assert.assertEquals(null, output.getFilterNode()); +1094 Assert.assertEquals("1", output.getFilterStep()); +1095 Assert.assertEquals(1409, output.getOffset()); +1096 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); +1097 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); +1098 Assert.assertEquals(1415, output.getTotalSize()); +1099 Assert.assertEquals(true, output.isCompleted()); +1100 Assert.assertEquals(true, output.isExecCompleted()); +1101 Assert.assertEquals(false, output.isEmpty()); +1102 Assert.assertEquals(false, output.isHasFailedNodes()); +1103 Assert.assertEquals(false, output.isUnmodified()); +1104 Assert.assertEquals(3, output.getLogEntries().size()); +1105 } +1106 +1107 /** +1108 * Execution output for a node and step +1109 */ +1110 @Test +1111 @Betamax(tape = "execution_output_fornodeandstep", mode = TapeMode.READ_ONLY) +1112 public void executionOutputForNodeAndStep() throws Exception { +1113 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1114 RundeckOutput output = client.getExecutionOutputForNodeAndStep(146L, "node-14.qa.subgroup.mycompany.com", +1115 "1", 0, -1, 0L, -1); +1116 +1117 Assert.assertEquals(new Long(1602), output.getExecDuration()); +1118 Assert.assertEquals(new Long(146), output.getExecutionId()); +1119 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); +1120 Assert.assertEquals("node-14.qa.subgroup.mycompany.com", output.getFilterNode()); +1121 Assert.assertEquals("1", output.getFilterStep()); +1122 Assert.assertEquals(1409, output.getOffset()); +1123 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); +1124 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); +1125 Assert.assertEquals(1415, output.getTotalSize()); +1126 Assert.assertEquals(true, output.isCompleted()); +1127 Assert.assertEquals(true, output.isExecCompleted()); +1128 Assert.assertEquals(false, output.isEmpty()); +1129 Assert.assertEquals(false, output.isHasFailedNodes()); +1130 Assert.assertEquals(false, output.isUnmodified()); +1131 Assert.assertEquals(1, output.getLogEntries().size()); +1132 } +1133 +1134 /** +1135 * Execution output state sequence +1136 */ +1137 @Test +1138 @Betamax(tape = "execution_output_state", mode = TapeMode.READ_ONLY) +1139 public void executionOutputState() throws Exception { +1140 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1141 RundeckOutput output = client.getExecutionOutputState(146L, false, 0, 0L, -1); +1142 +1143 Assert.assertEquals(new Long(1602), output.getExecDuration()); +1144 Assert.assertEquals(new Long(146), output.getExecutionId()); +1145 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); +1146 Assert.assertEquals(null, output.getFilterNode()); +1147 Assert.assertEquals(null, output.getFilterStep()); +1148 Assert.assertEquals(1409, output.getOffset()); +1149 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); +1150 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); +1151 Assert.assertEquals(1415, output.getTotalSize()); +1152 Assert.assertEquals(true, output.isCompleted()); +1153 Assert.assertEquals(true, output.isExecCompleted()); +1154 Assert.assertEquals(false, output.isEmpty()); +1155 Assert.assertEquals(false, output.isHasFailedNodes()); +1156 Assert.assertEquals(false, output.isUnmodified()); +1157 Assert.assertEquals(15, output.getLogEntries().size()); +1158 } +1159 /** +1160 * Execution output state sequence +1161 */ +1162 @Test +1163 @Betamax(tape = "execution_output_state_only", mode = TapeMode.READ_ONLY) +1164 public void executionOutputStateOnly() throws Exception { +1165 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1166 RundeckOutput output = client.getExecutionOutputState(146L, true, 0, 0L, -1); +1167 +1168 Assert.assertEquals(new Long(1602), output.getExecDuration()); +1169 Assert.assertEquals(new Long(146), output.getExecutionId()); +1170 Assert.assertEquals(new Long(1389894504000L), output.getLastModified()); +1171 Assert.assertEquals(null, output.getFilterNode()); +1172 Assert.assertEquals(null, output.getFilterStep()); +1173 Assert.assertEquals(1409, output.getOffset()); +1174 Assert.assertEquals(RundeckExecution.ExecutionStatus.SUCCEEDED, output.getStatus()); +1175 Assert.assertEquals(new Float(99.57597), output.getPercentLoaded()); +1176 Assert.assertEquals(1415, output.getTotalSize()); +1177 Assert.assertEquals(true, output.isCompleted()); +1178 Assert.assertEquals(true, output.isExecCompleted()); +1179 Assert.assertEquals(false, output.isEmpty()); +1180 Assert.assertEquals(false, output.isHasFailedNodes()); +1181 Assert.assertEquals(false, output.isUnmodified()); +1182 Assert.assertEquals(12, output.getLogEntries().size()); +1183 } +1184 /** +1185 * Execution state structure +1186 */ +1187 @Test +1188 @Betamax(tape = "execution_state", mode = TapeMode.READ_ONLY) +1189 public void executionState() throws Exception { +1190 final RundeckClient client = createClient(TEST_TOKEN_6, 10); +1191 RundeckExecutionState output = client.getExecutionState(149L); +1192 +1193 Assert.assertEquals(149,output.getExecutionId()); +1194 Assert.assertEquals(3,output.getTargetNodes().size()); +1195 Assert.assertEquals(3,output.getAllNodes().size()); +1196 Assert.assertEquals(1,output.getStepCount()); +1197 Assert.assertEquals(1,output.getSteps().size()); +1198 Assert.assertEquals(RundeckWFExecState.SUCCEEDED,output.getExecutionState()); +1199 } +1200 +1201 /** +1202 * generate api token +1203 */ +1204 @Test +1205 @Betamax(tape = "api_token_generate", mode = TapeMode.READ_ONLY) +1206 public void generateApiToken() throws Exception { +1207 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1208 String token = client.generateApiToken("bob"); +1209 +1210 Assert.assertNotNull(token); +1211 Assert.assertEquals("MiquQjELTrEaugpmdgAKs1W3a7xonAwU", token); +1212 } +1213 /** +1214 * get api token +1215 */ +1216 @Test +1217 @Betamax(tape = "api_token_get", mode = TapeMode.READ_ONLY) +1218 public void getApiToken() throws Exception { +1219 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1220 RundeckToken token = client.getApiToken("MiquQjELTrEaugpmdgAKs1W3a7xonAwU"); +1221 +1222 Assert.assertNotNull(token); +1223 Assert.assertEquals("MiquQjELTrEaugpmdgAKs1W3a7xonAwU", token.getToken()); +1224 Assert.assertEquals("bob", token.getUser()); +1225 } +1226 /** +1227 * list api tokens for user +1228 */ +1229 @Test +1230 @Betamax(tape = "api_tokens_list_user", mode = TapeMode.READ_ONLY) +1231 public void listApiTokens_user() throws Exception { +1232 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1233 List<RundeckToken> tokens = client.listApiTokens("bob"); +1234 +1235 Assert.assertNotNull(tokens); +1236 Assert.assertEquals(3, tokens.size()); +1237 Assert.assertEquals("hINp5eGzvYA9UePbUChaKHd5NiRkwWbx", tokens.get(0).getToken()); +1238 Assert.assertEquals("bob", tokens.get(0).getUser()); +1239 Assert.assertEquals("NaNnwVzAHAG83qOS7Wtwh6mjcXViyWUV", tokens.get(1).getToken()); +1240 Assert.assertEquals("bob", tokens.get(1).getUser()); +1241 Assert.assertEquals("MiquQjELTrEaugpmdgAKs1W3a7xonAwU", tokens.get(2).getToken()); +1242 Assert.assertEquals("bob", tokens.get(2).getUser()); +1243 } +1244 /** +1245 * list api tokens all +1246 */ +1247 @Test +1248 @Betamax(tape = "api_tokens_list_all", mode = TapeMode.READ_ONLY) +1249 public void listApiTokens() throws Exception { +1250 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1251 List<RundeckToken> tokens = client.listApiTokens(); +1252 +1253 Assert.assertNotNull(tokens); +1254 Assert.assertEquals(4, tokens.size()); +1255 Assert.assertEquals("8Dp9op111ER6opsDRkddvE86K9sE499s", tokens.get(0).getToken()); +1256 Assert.assertEquals("admin", tokens.get(0).getUser()); +1257 Assert.assertEquals("hINp5eGzvYA9UePbUChaKHd5NiRkwWbx", tokens.get(1).getToken()); +1258 Assert.assertEquals("bob", tokens.get(1).getUser()); +1259 Assert.assertEquals("NaNnwVzAHAG83qOS7Wtwh6mjcXViyWUV", tokens.get(2).getToken()); +1260 Assert.assertEquals("bob", tokens.get(2).getUser()); +1261 Assert.assertEquals("MiquQjELTrEaugpmdgAKs1W3a7xonAwU", tokens.get(3).getToken()); +1262 Assert.assertEquals("bob", tokens.get(3).getUser()); +1263 } +1264 +1265 /** +1266 * get api token +1267 */ +1268 @Test +1269 @Betamax(tape = "api_token_delete", mode = TapeMode.READ_ONLY) +1270 public void deleteApiToken() throws Exception { +1271 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1272 +1273 client.deleteApiToken("MiquQjELTrEaugpmdgAKs1W3a7xonAwU"); +1274 +1275 //get should now return 404 +1276 try { +1277 client.getApiToken("MiquQjELTrEaugpmdgAKs1W3a7xonAwU"); +1278 Assert.fail("expected failure"); +1279 } catch (RundeckApiException.RundeckApiHttpStatusException e) { +1280 Assert.assertEquals(404, e.getStatusCode()); +1281 } +1282 } +1283 /** +1284 * Store ssh key +1285 */ +1286 @Test +1287 @Betamax(tape = "key_store_private", mode = TapeMode.READ_ONLY) +1288 public void storeKey_private() throws Exception { +1289 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1290 File temp = File.createTempFile("test-key", ".tmp"); +1291 temp.deleteOnExit(); +1292 FileOutputStream out = new FileOutputStream(temp); +1293 try{ +1294 out.write("test1".getBytes()); +1295 }finally { +1296 out.close(); +1297 } +1298 KeyResource storageResource = client.storeKey("keys/test/example/file1.pem", temp, true); +1299 Assert.assertNotNull(storageResource); +1300 Assert.assertFalse(storageResource.isDirectory()); +1301 Assert.assertTrue(storageResource.isPrivateKey()); +1302 Assert.assertEquals("file1.pem", storageResource.getName()); +1303 Assert.assertEquals("keys/test/example/file1.pem", storageResource.getPath()); +1304 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test/example/file1.pem", +1305 storageResource.getUrl()); +1306 Assert.assertEquals(0, storageResource.getDirectoryContents().size()); +1307 Map<String, String> metadata = storageResource.getMetadata(); +1308 Assert.assertNotNull(metadata); +1309 Assert.assertEquals("application/octet-stream", metadata.get("Rundeck-content-type")); +1310 Assert.assertEquals("private", metadata.get("Rundeck-key-type")); +1311 } +1312 /** +1313 * Store ssh key +1314 */ +1315 @Test +1316 @Betamax(tape = "key_store_public", mode = TapeMode.READ_ONLY) +1317 public void storeKey_public() throws Exception { +1318 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1319 File temp = File.createTempFile("test-key", ".tmp"); +1320 temp.deleteOnExit(); +1321 FileOutputStream out = new FileOutputStream(temp); +1322 try{ +1323 out.write("test1".getBytes()); +1324 }finally { +1325 out.close(); +1326 } +1327 KeyResource storageResource = client.storeKey("keys/test/example/file2.pub", temp, false); +1328 Assert.assertNotNull(storageResource); +1329 Assert.assertFalse(storageResource.isDirectory()); +1330 Assert.assertFalse(storageResource.isPrivateKey()); +1331 Assert.assertEquals("file2.pub", storageResource.getName()); +1332 Assert.assertEquals("keys/test/example/file2.pub", storageResource.getPath()); +1333 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test/example/file2.pub", +1334 storageResource.getUrl()); +1335 Assert.assertEquals(0, storageResource.getDirectoryContents().size()); +1336 Map<String, String> metadata = storageResource.getMetadata(); +1337 Assert.assertNotNull(metadata); +1338 Assert.assertEquals("application/pgp-keys", metadata.get("Rundeck-content-type")); +1339 Assert.assertEquals("public", metadata.get("Rundeck-key-type")); +1340 } +1341 /** +1342 * get ssh key +1343 */ +1344 @Test +1345 @Betamax(tape = "key_get_public", mode = TapeMode.READ_ONLY) +1346 public void getKey_public() throws Exception { +1347 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1348 KeyResource storageResource = client.getKey("keys/test/example/file2.pub"); +1349 Assert.assertNotNull(storageResource); +1350 Assert.assertFalse(storageResource.isDirectory()); +1351 Assert.assertFalse(storageResource.isPrivateKey()); +1352 Assert.assertEquals("file2.pub", storageResource.getName()); +1353 Assert.assertEquals("keys/test/example/file2.pub", storageResource.getPath()); +1354 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test/example/file2.pub", +1355 storageResource.getUrl()); +1356 Assert.assertEquals(0, storageResource.getDirectoryContents().size()); +1357 Map<String, String> metadata = storageResource.getMetadata(); +1358 Assert.assertNotNull(metadata); +1359 Assert.assertEquals("application/pgp-keys", metadata.get("Rundeck-content-type")); +1360 Assert.assertEquals("public", metadata.get("Rundeck-key-type")); +1361 } +1362 /** +1363 * get ssh key +1364 */ +1365 @Test +1366 @Betamax(tape = "key_get_private", mode = TapeMode.READ_ONLY) +1367 public void getKey_private() throws Exception { +1368 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1369 KeyResource storageResource = client.getKey("keys/test/example/file1.pem"); +1370 Assert.assertNotNull(storageResource); +1371 Assert.assertFalse(storageResource.isDirectory()); +1372 Assert.assertTrue(storageResource.isPrivateKey()); +1373 Assert.assertEquals("file1.pem", storageResource.getName()); +1374 Assert.assertEquals("keys/test/example/file1.pem", storageResource.getPath()); +1375 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test/example/file1.pem", +1376 storageResource.getUrl()); +1377 Assert.assertEquals(0, storageResource.getDirectoryContents().size()); +1378 Map<String, String> metadata = storageResource.getMetadata(); +1379 Assert.assertNotNull(metadata); +1380 Assert.assertEquals("application/octet-stream", metadata.get("Rundeck-content-type")); +1381 Assert.assertEquals("private", metadata.get("Rundeck-key-type")); +1382 } +1383 /** +1384 * get ssh key data +1385 */ +1386 @Test +1387 @Betamax(tape = "key_get_data_private", mode = TapeMode.READ_ONLY) +1388 public void getKeyData_private() throws Exception { +1389 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1390 File temp = File.createTempFile("test-key", ".tmp"); +1391 temp.deleteOnExit(); +1392 try { +1393 int data = client.getPublicKeyContent("keys/test/example/file1.pem", temp); +1394 Assert.fail("expected failure"); +1395 } catch (RundeckApiException e) { +1396 Assert.assertEquals("Requested Key path was not a Public key: keys/test/example/file1.pem", +1397 e.getMessage()); +1398 } +1399 } +1400 /** +1401 * get ssh key data +1402 */ +1403 @Test +1404 @Betamax(tape = "key_get_data_public", mode = TapeMode.READ_ONLY) +1405 public void getKeyData_public() throws Exception { +1406 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1407 File temp = File.createTempFile("test-key", ".tmp"); +1408 temp.deleteOnExit(); +1409 int length = client.getPublicKeyContent("keys/test/example/file2.pub", temp); +1410 Assert.assertEquals(5, length); +1411 } +1412 /** +1413 * list directory +1414 */ +1415 @Test +1416 @Betamax(tape = "key_list_directory", mode = TapeMode.READ_ONLY) +1417 public void listKeyDirectory() throws Exception { +1418 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1419 List<KeyResource> list = client.listKeyDirectory("keys/test/example"); +1420 Assert.assertEquals(2, list.size()); +1421 KeyResource storageResource1 = list.get(0); +1422 KeyResource storageResource2 = list.get(1); +1423 +1424 Assert.assertFalse(storageResource2.isDirectory()); +1425 Assert.assertTrue(storageResource2.isPrivateKey()); +1426 Assert.assertEquals("file1.pem", storageResource2.getName()); +1427 Assert.assertEquals("keys/test/example/file1.pem", storageResource2.getPath()); +1428 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test/example/file1.pem", storageResource2.getUrl()); +1429 Assert.assertNotNull(storageResource2.getMetadata()); +1430 +1431 Assert.assertEquals("application/octet-stream", storageResource2.getMetadata().get("Rundeck-content-type")); +1432 Assert.assertEquals("private", storageResource2.getMetadata().get("Rundeck-key-type")); +1433 +1434 Assert.assertFalse(storageResource1.isDirectory()); +1435 Assert.assertFalse(storageResource1.isPrivateKey()); +1436 Assert.assertEquals("file2.pub", storageResource1.getName()); +1437 Assert.assertEquals("keys/test/example/file2.pub", storageResource1.getPath()); +1438 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test/example/file2.pub", +1439 storageResource1.getUrl()); +1440 Assert.assertNotNull(storageResource1.getMetadata()); +1441 Assert.assertEquals("application/pgp-keys", storageResource1.getMetadata().get("Rundeck-content-type")); +1442 Assert.assertEquals("public", storageResource1.getMetadata().get("Rundeck-key-type")); +1443 } +1444 /** +1445 * list root +1446 */ +1447 @Test +1448 @Betamax(tape = "key_list_root", mode = TapeMode.READ_ONLY) +1449 public void listKeyDirectoryRoot() throws Exception { +1450 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1451 List<KeyResource> list = client.listKeyDirectoryRoot(); +1452 Assert.assertEquals(2, list.size()); +1453 KeyResource storageResource0 = list.get(0); +1454 KeyResource storageResource1 = list.get(1); +1455 +1456 Assert.assertFalse(storageResource0.isDirectory()); +1457 Assert.assertTrue(storageResource0.isPrivateKey()); +1458 Assert.assertEquals("test1.pem", storageResource0.getName()); +1459 Assert.assertEquals("keys/test1.pem", storageResource0.getPath()); +1460 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test1.pem", storageResource0.getUrl()); +1461 Assert.assertNotNull(storageResource0.getMetadata()); +1462 +1463 Assert.assertEquals("application/octet-stream", storageResource0.getMetadata().get("Rundeck-content-type")); +1464 Assert.assertEquals("private", storageResource0.getMetadata().get("Rundeck-key-type")); +1465 +1466 Assert.assertTrue(storageResource1.toString(), storageResource1.isDirectory()); +1467 Assert.assertEquals(null, storageResource1.getName()); +1468 Assert.assertEquals("keys/test", storageResource1.getPath()); +1469 Assert.assertEquals("http://dignan.local:4440/api/11/storage/keys/test", +1470 storageResource1.getUrl()); +1471 Assert.assertNull(storageResource1.getMetadata()); +1472 +1473 +1474 } +1475 +1476 /** +1477 * delete ssh key +1478 */ +1479 @Test +1480 @Betamax(tape = "key_delete", mode = TapeMode.READ_ONLY) +1481 public void deleteKey() throws Exception { +1482 final RundeckClient client = createClient(TEST_TOKEN_7, 11); +1483 client.deleteKey("keys/test/example/file2.pub"); +1484 +1485 try { +1486 client.getKey("keys/test/example/file2.pub"); +1487 Assert.fail("expected failure"); +1488 } catch (RundeckApiException.RundeckApiHttpStatusException e) { +1489 Assert.assertEquals(404,e.getStatusCode()); +1490 } +1491 } +1492 +1493 @Before +1494 public void setUp() throws Exception { +1495 // not that you can put whatever here, because we don't actually connect to the RunDeck instance +1496 // but instead use betamax as a proxy to serve the previously recorded tapes (in src/test/resources) +1497 client = createClient(TEST_TOKEN_0, 5); +1498 } +1499 +1500 private RundeckClient createClient(final String token, int version) { +1501 return createBuilder(token).version(version).build(); +1502 } +1503 +1504 private RundeckClient createClient(String token) { +1505 return createBuilder(token) +1506 .build(); +1507 } +1508 +1509 private RundeckClientBuilder createBuilder(String token) { +1510 return RundeckClient.builder().url("http://rundeck.local:4440") +1511 .token(token); +1512 } +1513 +1514 }
    diff --git a/xref-test/org/rundeck/api/generator/ProjectConfigGeneratorTest.html b/xref-test/org/rundeck/api/generator/ProjectConfigGeneratorTest.html new file mode 100644 index 0000000..eaad25b --- /dev/null +++ b/xref-test/org/rundeck/api/generator/ProjectConfigGeneratorTest.html @@ -0,0 +1,55 @@ + + + + +ProjectConfigGeneratorTest xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import junit.framework.Assert;
    +4   import org.dom4j.Document;
    +5   import org.dom4j.Element;
    +6   import org.dom4j.io.XMLWriter;
    +7   import org.junit.Test;
    +8   import org.rundeck.api.domain.ProjectConfig;
    +9   import org.rundeck.api.domain.RundeckProject;
    +10  
    +11  import java.io.UnsupportedEncodingException;
    +12  
    +13  /**
    +14   * ProjectConfigGeneratorTest is ...
    +15   *
    +16   * @author greg
    +17   * @since 2014-02-27
    +18   */
    +19  public class ProjectConfigGeneratorTest {
    +20      @Test
    +21      public void generate() throws Exception {
    +22          ProjectConfig config = new ProjectConfig();
    +23          config.setProperty("abc", "123");
    +24          config.setProperty("monkey.bonanza", "pale\ncomparison");
    +25  
    +26          Document doc = new ProjectConfigGenerator(config).generateXmlDocument();
    +27          XMLWriter xmlWriter = new XMLWriter(System.out);
    +28          xmlWriter.write(doc);
    +29          xmlWriter.flush();
    +30          Element configElement = doc.getRootElement();
    +31          Assert.assertEquals("config", configElement.getName());
    +32          Assert.assertNotNull(configElement.selectSingleNode("property[1]"));
    +33          Assert.assertEquals("abc", configElement.selectSingleNode("property[1]/@key").getText());
    +34          Assert.assertEquals("123", configElement.selectSingleNode("property[1]/@value").getText());
    +35  
    +36          Assert.assertNotNull(configElement.selectSingleNode("property[2]"));
    +37          Assert.assertEquals("monkey.bonanza", configElement.selectSingleNode("property[2]/@key").getText());
    +38          Assert.assertEquals("pale\ncomparison", configElement.selectSingleNode("property[2]/@value").getText());
    +39  
    +40      }
    +41  }
    +
    +
    + + diff --git a/xref-test/org/rundeck/api/generator/ProjectGeneratorTest.html b/xref-test/org/rundeck/api/generator/ProjectGeneratorTest.html new file mode 100644 index 0000000..e7ea4d0 --- /dev/null +++ b/xref-test/org/rundeck/api/generator/ProjectGeneratorTest.html @@ -0,0 +1,39 @@ + + + + +ProjectGeneratorTest xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import junit.framework.Assert;
    +4   import org.dom4j.Document;
    +5   import org.junit.Test;
    +6   import org.rundeck.api.domain.RundeckProject;
    +7   
    +8   /**
    +9    * ProjectGeneratorTest is ...
    +10   *
    +11   * @author greg
    +12   * @since 2014-02-27
    +13   */
    +14  public class ProjectGeneratorTest {
    +15      @Test
    +16      public void generate() {
    +17          RundeckProject project = new RundeckProject();
    +18          project.setName("monkey1");
    +19  
    +20          Document doc = new ProjectGenerator(project).generateXmlDocument();
    +21          Assert.assertEquals("project", doc.getRootElement().getName());
    +22          Assert.assertNotNull(doc.selectSingleNode("/project/name"));
    +23          Assert.assertEquals("monkey1", doc.selectSingleNode("/project/name").getText());
    +24      }
    +25  }
    +
    +
    + + diff --git a/xref-test/org/rundeck/api/generator/package-frame.html b/xref-test/org/rundeck/api/generator/package-frame.html new file mode 100644 index 0000000..0288755 --- /dev/null +++ b/xref-test/org/rundeck/api/generator/package-frame.html @@ -0,0 +1,27 @@ + + + + + + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.generator + + + + +

    + org.rundeck.api.generator +

    + +

    Classes

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

    Package org.rundeck.api.generator

    + + + + + + + + + + + + + + + +
    Class Summary
    + ProjectConfigGeneratorTest +
    + ProjectGeneratorTest +
    + +
    + +
    +
    + +
    +
    + Copyright © 2011-2014. All Rights Reserved. + + \ No newline at end of file diff --git a/xref-test/org/rundeck/api/package-frame.html b/xref-test/org/rundeck/api/package-frame.html index 490cf35..ee16a87 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 10.0 Reference Package org.rundeck.api + RunDeck API - Java Client 11.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 851ce8b..63e77ac 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 10.0 Reference Package org.rundeck.api + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api diff --git a/xref-test/org/rundeck/api/parser/ProjectConfigParserTest.html b/xref-test/org/rundeck/api/parser/ProjectConfigParserTest.html new file mode 100644 index 0000000..9ad5311 --- /dev/null +++ b/xref-test/org/rundeck/api/parser/ProjectConfigParserTest.html @@ -0,0 +1,65 @@ + + + + +ProjectConfigParserTest xref + + + +
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Document;
    +4   import org.junit.Assert;
    +5   import org.junit.Test;
    +6   import org.rundeck.api.domain.ProjectConfig;
    +7   import org.rundeck.api.domain.RundeckProject;
    +8   
    +9   import java.io.InputStream;
    +10  
    +11  /**
    +12   * ProjectConfigParserTest is ...
    +13   *
    +14   * @author greg
    +15   * @since 2014-02-27
    +16   */
    +17  public class ProjectConfigParserTest {
    +18      @Test
    +19      public void parseProject() throws Exception {
    +20          InputStream input = getClass().getResourceAsStream("projectv11.xml");
    +21          Document document = ParserHelper.loadDocument(input);
    +22  
    +23          ProjectConfig config = new ProjectConfigParser("project/config").parseXmlNode(document);
    +24  
    +25          Assert.assertEquals(10, config.getProperties().size());
    +26          Assert.assertEquals("ziggy", config.getProperties().get("project.name"));
    +27          Assert.assertEquals("false", config.getProperties().get("resources.source.1.config.requireFileExists"));
    +28          Assert.assertEquals("privateKey", config.getProperties().get("project.ssh-authentication"));
    +29          Assert.assertEquals("jsch-ssh", config.getProperties().get("service.NodeExecutor.default.provider"));
    +30          Assert.assertEquals("false", config.getProperties().get("resources.source.1.config.includeServerNode"));
    +31          Assert.assertEquals("false", config.getProperties().get("resources.source.1.config.generateFileAutomatically"));
    +32          Assert.assertEquals("/var/rundeck/projects/${project.name}/etc/resources.xml",
    +33                  config.getProperties().get("resources.source.1.config.file"));
    +34          Assert.assertEquals("/var/lib/rundeck/.ssh/id_rsa", config.getProperties().get("project.ssh-keypath"));
    +35          Assert.assertEquals("jsch-scp", config.getProperties().get("service.FileCopier.default.provider"));
    +36          Assert.assertEquals("file", config.getProperties().get("resources.source.1.type"));
    +37          /*
    +38          <property key='project.name' value='ziggy'/>
    +39          <property key='resources.source.1.config.requireFileExists' value='false'/>
    +40          <property key='project.ssh-authentication' value='privateKey'/>
    +41          <property key='service.NodeExecutor.default.provider' value='jsch-ssh'/>
    +42          <property key='resources.source.1.config.includeServerNode' value='false'/>
    +43          <property key='resources.source.1.config.generateFileAutomatically' value='false'/>
    +44          <property key='resources.source.1.config.file'
    +45                    value='/var/rundeck/projects/${project.name}/etc/resources.xml'/>
    +46          <property key='project.ssh-keypath' value='/var/lib/rundeck/.ssh/id_rsa'/>
    +47          <property key='service.FileCopier.default.provider' value='jsch-scp'/>
    +48          <property key='resources.source.1.type' value='file'/>
    +49           */
    +50      }
    +51  }
    +
    +
    + + diff --git a/xref-test/org/rundeck/api/parser/ProjectConfigPropertyParserTest.html b/xref-test/org/rundeck/api/parser/ProjectConfigPropertyParserTest.html new file mode 100644 index 0000000..b758c6b --- /dev/null +++ b/xref-test/org/rundeck/api/parser/ProjectConfigPropertyParserTest.html @@ -0,0 +1,62 @@ + + + + +ProjectConfigPropertyParserTest xref + + + +
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import junit.framework.Assert;
    +4   import org.dom4j.Document;
    +5   import org.junit.Test;
    +6   import org.junit.runners.JUnit4;
    +7   import org.rundeck.api.domain.ConfigProperty;
    +8   import org.rundeck.api.domain.ProjectConfig;
    +9   
    +10  import java.io.ByteArrayInputStream;
    +11  import java.io.InputStream;
    +12  
    +13  /**
    +14   * Test
    +15   *
    +16   * @author greg
    +17   * @since 2014-03-07
    +18   */
    +19  public class ProjectConfigPropertyParserTest {
    +20      @Test
    +21      public void parseFromProject() throws Exception {
    +22          InputStream input = getClass().getResourceAsStream("projectv11.xml");
    +23          Document document = ParserHelper.loadDocument(input);
    +24  
    +25          ConfigProperty config = new ProjectConfigPropertyParser("project/config/property[1]").parseXmlNode(document);
    +26          Assert.assertEquals("project.name", config.getKey());
    +27          Assert.assertEquals("ziggy", config.getValue());
    +28          /**
    +29           * <property key='project.name' value='ziggy'/>
    +30           <property key='resources.source.1.config.requireFileExists' value='false'/>
    +31  
    +32           */
    +33      }
    +34      @Test
    +35      public void parseProperty() throws Exception {
    +36          Document document = ParserHelper.loadDocument(new ByteArrayInputStream(("<property key='project.name' " +
    +37                  "value='ABC' />").getBytes()));
    +38  
    +39          ConfigProperty config = new ProjectConfigPropertyParser("/property").parseXmlNode(document);
    +40          Assert.assertEquals("project.name", config.getKey());
    +41          Assert.assertEquals("ABC", config.getValue());
    +42          /**
    +43           * <property key='project.name' value='ziggy'/>
    +44           <property key='resources.source.1.config.requireFileExists' value='false'/>
    +45  
    +46           */
    +47      }
    +48  }
    +
    +
    + + diff --git a/xref-test/org/rundeck/api/parser/ProjectParserV11Test.html b/xref-test/org/rundeck/api/parser/ProjectParserV11Test.html new file mode 100644 index 0000000..6222e04 --- /dev/null +++ b/xref-test/org/rundeck/api/parser/ProjectParserV11Test.html @@ -0,0 +1,42 @@ + + + + +ProjectParserV11Test xref + + + +
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Document;
    +4   import org.junit.Assert;
    +5   import org.junit.Test;
    +6   import org.rundeck.api.domain.RundeckProject;
    +7   
    +8   import java.io.InputStream;
    +9   
    +10  /**
    +11   * ProjectParserV11Test is ...
    +12   *
    +13   * @author greg
    +14   * @since 2014-02-27
    +15   */
    +16  public class ProjectParserV11Test {
    +17      @Test
    +18      public void parseProject() throws Exception {
    +19          InputStream input = getClass().getResourceAsStream("projectv11.xml");
    +20          Document document = ParserHelper.loadDocument(input);
    +21  
    +22          RundeckProject project = new ProjectParserV11("project").parseXmlNode(document);
    +23  
    +24          Assert.assertEquals("ziggy", project.getName());
    +25          Assert.assertNull(project.getDescription());
    +26          Assert.assertNotNull(project.getProjectConfig());
    +27      }
    +28  }
    +
    +
    + + diff --git a/xref-test/org/rundeck/api/parser/package-frame.html b/xref-test/org/rundeck/api/parser/package-frame.html index 9590b54..346dfc6 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 10.0 Reference Package org.rundeck.api.parser + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -62,9 +62,18 @@
  • ParserHelperTest +
  • +
  • + ProjectConfigParserTest +
  • +
  • + ProjectConfigPropertyParserTest
  • ProjectParserTest +
  • +
  • + ProjectParserV11Test
  • StringParserTest diff --git a/xref-test/org/rundeck/api/parser/package-summary.html b/xref-test/org/rundeck/api/parser/package-summary.html index 55f83a2..a1e051b 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 10.0 Reference Package org.rundeck.api.parser + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -114,11 +114,26 @@ ParserHelperTest + + + + ProjectConfigParserTest + + + + + ProjectConfigPropertyParserTest + ProjectParserTest + + + + ProjectParserV11Test + diff --git a/xref-test/org/rundeck/api/util/package-frame.html b/xref-test/org/rundeck/api/util/package-frame.html index eed4343..8922de7 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 10.0 Reference Package org.rundeck.api.util + RunDeck API - Java Client 11.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 57eeb90..8528a12 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 10.0 Reference Package org.rundeck.api.util + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.util diff --git a/xref-test/overview-frame.html b/xref-test/overview-frame.html index 3baab01..21fdad2 100644 --- a/xref-test/overview-frame.html +++ b/xref-test/overview-frame.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 10.0 Reference + RunDeck API - Java Client 11.0-SNAPSHOT Reference @@ -17,6 +17,9 @@
    • org.rundeck.api +
    • +
    • + org.rundeck.api.generator
    • org.rundeck.api.parser diff --git a/xref-test/overview-summary.html b/xref-test/overview-summary.html index 7a8adbf..cfa0a19 100644 --- a/xref-test/overview-summary.html +++ b/xref-test/overview-summary.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 10.0 Reference + RunDeck API - Java Client 11.0-SNAPSHOT Reference @@ -24,7 +24,7 @@
  • -

    RunDeck API - Java Client 10.0 Reference

    +

    RunDeck API - Java Client 11.0-SNAPSHOT Reference

    @@ -37,6 +37,11 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    org.rundeck.api
    + org.rundeck.api.generator +
    diff --git a/xref/allclasses-frame.html b/xref/allclasses-frame.html index a61750a..7336cc1 100644 --- a/xref/allclasses-frame.html +++ b/xref/allclasses-frame.html @@ -22,15 +22,33 @@
  • ApiPathBuilder +
  • +
  • + ArchiveImport +
  • +
  • + ArchiveImportParser
  • AssertUtil +
  • +
  • + BaseDocGenerator +
  • +
  • + BaseKeyResource
  • BaseState
  • BaseStateParser +
  • +
  • + BaseStorageResource +
  • +
  • + BaseXpathParser
  • Builder @@ -40,6 +58,12 @@
  • BulkDeleteParser +
  • +
  • + ChainHandler +
  • +
  • + ConfigProperty
  • DefaultJobsImport @@ -58,6 +82,9 @@
  • DeleteParser +
  • +
  • + DocumentContentProducer
  • EventParser @@ -82,6 +109,9 @@
  • FileType +
  • +
  • + Handler
  • HistoryParser @@ -94,6 +124,9 @@
  • JobsImportResultParser +
  • +
  • + KeyResource
  • ListParser @@ -127,15 +160,45 @@
  • ParametersUtil +
  • +
  • + ParserHandler
  • ParserHelper +
  • +
  • + ProjectConfig +
  • +
  • + ProjectConfigGenerator +
  • +
  • + ProjectConfigParser +
  • +
  • + ProjectConfigPropertyGenerator +
  • +
  • + ProjectConfigPropertyParser +
  • +
  • + ProjectGenerator
  • ProjectParser +
  • +
  • + ProjectParserV11
  • QueryParameterBuilder +
  • +
  • + RequireContentTypeHandler +
  • +
  • + ResultHandler
  • RunAdhoc @@ -166,6 +229,12 @@
  • RundeckApiException +
  • +
  • + RundeckApiHttpContentTypeException +
  • +
  • + RundeckApiHttpStatusException
  • RundeckApiLoginException @@ -235,9 +304,24 @@
  • RundeckSystemInfo +
  • +
  • + RundeckToken +
  • +
  • + RundeckTokenParser
  • RundeckWFExecState +
  • +
  • + SSHKeyResourceParser +
  • +
  • + StorageResource +
  • +
  • + StorageResourceParser
  • StringParser @@ -265,6 +349,12 @@
  • WorkflowStepStateParser +
  • +
  • + WriteOutHandler +
  • +
  • + XmlDocumentGenerator
  • XmlNodeParser diff --git a/xref/index.html b/xref/index.html index 2432bc4..50a4184 100644 --- a/xref/index.html +++ b/xref/index.html @@ -3,7 +3,7 @@ - RunDeck API - Java Client 10.0 Reference + RunDeck API - Java Client 11.0-SNAPSHOT Reference diff --git a/xref/org/rundeck/api/ApiCall.html b/xref/org/rundeck/api/ApiCall.html index 76c548f..88510e0 100644 --- a/xref/org/rundeck/api/ApiCall.html +++ b/xref/org/rundeck/api/ApiCall.html @@ -25,545 +25,734 @@ 15 */ 16 package org.rundeck.api; 17 -18 import org.apache.commons.lang.StringUtils; -19 import org.apache.http.Header; -20 import org.apache.http.HttpException; -21 import org.apache.http.HttpRequest; -22 import org.apache.http.HttpRequestInterceptor; -23 import org.apache.http.HttpResponse; -24 import org.apache.http.NameValuePair; -25 import org.apache.http.ParseException; -26 import org.apache.http.client.HttpClient; -27 import org.apache.http.client.entity.UrlEncodedFormEntity; -28 import org.apache.http.client.methods.HttpDelete; -29 import org.apache.http.client.methods.HttpGet; -30 import org.apache.http.client.methods.HttpPost; -31 import org.apache.http.client.methods.HttpRequestBase; -32 import org.apache.http.conn.scheme.Scheme; -33 import org.apache.http.conn.ssl.SSLSocketFactory; -34 import org.apache.http.conn.ssl.TrustStrategy; -35 import org.apache.http.entity.mime.HttpMultipartMode; -36 import org.apache.http.entity.mime.MultipartEntity; -37 import org.apache.http.entity.mime.content.InputStreamBody; -38 import org.apache.http.impl.client.DefaultHttpClient; -39 import org.apache.http.impl.conn.ProxySelectorRoutePlanner; -40 import org.apache.http.message.BasicNameValuePair; -41 import org.apache.http.params.HttpProtocolParams; -42 import org.apache.http.protocol.HTTP; -43 import org.apache.http.protocol.HttpContext; -44 import org.apache.http.util.EntityUtils; -45 import org.dom4j.Document; -46 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; -47 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; -48 import org.rundeck.api.parser.ParserHelper; -49 import org.rundeck.api.parser.XmlNodeParser; -50 import org.rundeck.api.util.AssertUtil; -51 -52 import java.io.ByteArrayInputStream; -53 import java.io.IOException; -54 import java.io.InputStream; -55 import java.io.UnsupportedEncodingException; -56 import java.net.ProxySelector; -57 import java.security.KeyManagementException; -58 import java.security.KeyStoreException; -59 import java.security.NoSuchAlgorithmException; -60 import java.security.UnrecoverableKeyException; -61 import java.security.cert.CertificateException; -62 import java.security.cert.X509Certificate; -63 import java.util.ArrayList; -64 import java.util.List; -65 import java.util.Map.Entry; +18 import org.apache.commons.io.IOUtils; +19 import org.apache.commons.lang.StringUtils; +20 import org.apache.http.*; +21 import org.apache.http.client.HttpClient; +22 import org.apache.http.client.entity.UrlEncodedFormEntity; +23 import org.apache.http.client.methods.*; +24 import org.apache.http.conn.scheme.Scheme; +25 import org.apache.http.conn.ssl.SSLSocketFactory; +26 import org.apache.http.conn.ssl.TrustStrategy; +27 import org.apache.http.entity.BasicHttpEntity; +28 import org.apache.http.entity.EntityTemplate; +29 import org.apache.http.entity.FileEntity; +30 import org.apache.http.entity.mime.HttpMultipartMode; +31 import org.apache.http.entity.mime.MultipartEntity; +32 import org.apache.http.entity.mime.content.InputStreamBody; +33 import org.apache.http.impl.client.DefaultHttpClient; +34 import org.apache.http.impl.conn.ProxySelectorRoutePlanner; +35 import org.apache.http.message.BasicNameValuePair; +36 import org.apache.http.params.HttpProtocolParams; +37 import org.apache.http.protocol.HTTP; +38 import org.apache.http.protocol.HttpContext; +39 import org.apache.http.util.EntityUtils; +40 import org.dom4j.Document; +41 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; +42 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; +43 import org.rundeck.api.parser.ParserHelper; +44 import org.rundeck.api.parser.XmlNodeParser; +45 import org.rundeck.api.util.AssertUtil; +46 import org.rundeck.api.util.DocumentContentProducer; +47 +48 import java.io.*; +49 import java.net.ProxySelector; +50 import java.security.KeyManagementException; +51 import java.security.KeyStoreException; +52 import java.security.NoSuchAlgorithmException; +53 import java.security.UnrecoverableKeyException; +54 import java.security.cert.CertificateException; +55 import java.security.cert.X509Certificate; +56 import java.util.ArrayList; +57 import java.util.List; +58 import java.util.Map.Entry; +59 +60 /** +61 * Class responsible for making the HTTP API calls +62 * +63 * @author Vincent Behar +64 */ +65 class ApiCall { 66 -67 /** -68 * Class responsible for making the HTTP API calls -69 * -70 * @author Vincent Behar -71 */ -72 class ApiCall { -73 -74 /** RunDeck HTTP header for the auth-token (in case of token-based authentication) */ -75 private static final transient String AUTH_TOKEN_HEADER = "X-RunDeck-Auth-Token"; -76 -77 /** RunDeck HTTP header for the setting session cookie (in case of session-based authentication) */ -78 private static final transient String COOKIE_HEADER = "Cookie"; -79 -80 /** {@link RundeckClient} instance holding the RunDeck url and the credentials */ -81 private final RundeckClient client; -82 -83 /** -84 * Build a new instance, linked to the given RunDeck client -85 * -86 * @param client holding the RunDeck url and the credentials -87 * @throws IllegalArgumentException if client is null -88 */ -89 public ApiCall(RundeckClient client) throws IllegalArgumentException { -90 super(); -91 this.client = client; -92 AssertUtil.notNull(client, "The RunDeck Client must not be null !"); -93 } -94 -95 /** -96 * Try to "ping" the RunDeck instance to see if it is alive -97 * -98 * @throws RundeckApiException if the ping fails -99 */ -100 public void ping() throws RundeckApiException { -101 HttpClient httpClient = instantiateHttpClient(); -102 try { -103 HttpResponse response = httpClient.execute(new HttpGet(client.getUrl())); -104 if (response.getStatusLine().getStatusCode() / 100 != 2) { -105 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' when pinging " -106 + client.getUrl()); -107 } -108 } catch (IOException e) { -109 throw new RundeckApiException("Failed to ping RunDeck instance at " + client.getUrl(), e); -110 } finally { -111 httpClient.getConnectionManager().shutdown(); -112 } -113 } -114 -115 /** -116 * Test the authentication on the RunDeck instance. Will delegate to either {@link #testLoginAuth()} (in case of -117 * login-based auth) or {@link #testTokenAuth()} (in case of token-based auth). -118 * -119 * @return the login session ID if using login-based auth, otherwise null -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() + client.getApiEndpoint() + "/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 HttpGet request = new HttpGet(client.getUrl() + client.getApiEndpoint() + apiPath); -182 if (null != apiPath.getAccept()) { -183 request.setHeader("Accept", apiPath.getAccept()); -184 } -185 return execute(request, parser); -186 } -187 -188 /** -189 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the -190 * API call. -191 * -192 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -193 * @return a new {@link InputStream} instance, not linked with network resources -194 * @throws RundeckApiException in case of error when calling the API -195 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -196 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -197 */ -198 public InputStream get(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, -199 RundeckApiTokenException { -200 HttpGet request = new HttpGet(client.getUrl() + client.getApiEndpoint() + apiPath); -201 if (null != apiPath.getAccept()) { -202 request.setHeader("Accept", apiPath.getAccept()); -203 } -204 ByteArrayInputStream response = execute(request); +67 /** RunDeck HTTP header for the auth-token (in case of token-based authentication) */ +68 private static final transient String AUTH_TOKEN_HEADER = "X-RunDeck-Auth-Token"; +69 +70 /** RunDeck HTTP header for the setting session cookie (in case of session-based authentication) */ +71 private static final transient String COOKIE_HEADER = "Cookie"; +72 +73 /** {@link RundeckClient} instance holding the RunDeck url and the credentials */ +74 private final RundeckClient client; +75 +76 /** +77 * Build a new instance, linked to the given RunDeck client +78 * +79 * @param client holding the RunDeck url and the credentials +80 * @throws IllegalArgumentException if client is null +81 */ +82 public ApiCall(RundeckClient client) throws IllegalArgumentException { +83 super(); +84 this.client = client; +85 AssertUtil.notNull(client, "The RunDeck Client must not be null !"); +86 } +87 +88 /** +89 * Try to "ping" the RunDeck instance to see if it is alive +90 * +91 * @throws RundeckApiException if the ping fails +92 */ +93 public void ping() throws RundeckApiException { +94 HttpClient httpClient = instantiateHttpClient(); +95 try { +96 HttpResponse response = httpClient.execute(new HttpGet(client.getUrl())); +97 if (response.getStatusLine().getStatusCode() / 100 != 2) { +98 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' when pinging " +99 + client.getUrl()); +100 } +101 } catch (IOException e) { +102 throw new RundeckApiException("Failed to ping RunDeck instance at " + client.getUrl(), e); +103 } finally { +104 httpClient.getConnectionManager().shutdown(); +105 } +106 } +107 +108 /** +109 * Test the authentication on the RunDeck instance. Will delegate to either {@link #testLoginAuth()} (in case of +110 * login-based auth) or {@link #testTokenAuth()} (in case of token-based auth). +111 * +112 * @return the login session ID if using login-based auth, otherwise null +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 String testAuth() throws RundeckApiLoginException, RundeckApiTokenException { +119 String sessionID = null; +120 if (client.getToken() != null || client.getSessionID() != null) { +121 testTokenAuth(); +122 } else { +123 sessionID = testLoginAuth(); +124 } +125 return sessionID; +126 } +127 +128 /** +129 * Test the login-based authentication on the RunDeck instance +130 * +131 * @throws RundeckApiLoginException if the login fails +132 * @see #testAuth() +133 */ +134 public String testLoginAuth() throws RundeckApiLoginException { +135 String sessionID = null; +136 HttpClient httpClient = instantiateHttpClient(); +137 try { +138 sessionID = login(httpClient); +139 } finally { +140 httpClient.getConnectionManager().shutdown(); +141 } +142 return sessionID; +143 } +144 +145 /** +146 * Test the token-based authentication on the RunDeck instance +147 * +148 * @throws RundeckApiTokenException if the token is invalid +149 * @see #testAuth() +150 */ +151 public void testTokenAuth() throws RundeckApiTokenException { +152 try { +153 execute(new HttpGet(client.getUrl() + client.getApiEndpoint() + "/system/info")); +154 } catch (RundeckApiTokenException e) { +155 throw e; +156 } catch (RundeckApiException e) { +157 throw new RundeckApiTokenException("Failed to verify token", e); +158 } +159 } +160 +161 /** +162 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +163 * API call. At the end, the given parser will be used to convert the response to a more useful result object. +164 * +165 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +166 * @param parser used to parse the response +167 * @return the result of the call, as formatted by the parser +168 * @throws RundeckApiException in case of error when calling the API +169 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +170 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +171 */ +172 public <T> T get(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +173 RundeckApiLoginException, RundeckApiTokenException { +174 HttpGet request = new HttpGet(client.getUrl() + client.getApiEndpoint() + apiPath); +175 if (null != apiPath.getAccept()) { +176 request.setHeader("Accept", apiPath.getAccept()); +177 } +178 return execute(request, parser); +179 } +180 +181 /** +182 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +183 * API call. +184 * +185 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +186 * @return a new {@link InputStream} instance, not linked with network resources +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 InputStream get(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, +192 RundeckApiTokenException { +193 HttpGet request = new HttpGet(client.getUrl() + client.getApiEndpoint() + apiPath); +194 if (null != apiPath.getAccept()) { +195 request.setHeader("Accept", apiPath.getAccept()); +196 } +197 ByteArrayInputStream response = execute(request); +198 +199 // try to load the document, to throw an exception in case of error +200 ParserHelper.loadDocument(response); +201 response.reset(); +202 +203 return response; +204 } 205 -206 // try to load the document, to throw an exception in case of error -207 ParserHelper.loadDocument(response); -208 response.reset(); -209 -210 return response; -211 } -212 -213 /** -214 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the -215 * API call without appending the API_ENDPOINT to the URL. -216 * -217 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -218 * @return a new {@link InputStream} instance, not linked with network resources -219 * @throws RundeckApiException in case of error when calling the API -220 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -221 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -222 */ -223 public InputStream getNonApi(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, -224 RundeckApiTokenException { -225 HttpGet request = new HttpGet(client.getUrl() + apiPath); -226 if (null != apiPath.getAccept()) { -227 request.setHeader("Accept", apiPath.getAccept()); -228 } -229 ByteArrayInputStream response = execute(request); -230 response.reset(); -231 -232 return response; -233 } -234 -235 /** -236 * Execute an HTTP POST or GET request to the RunDeck instance, on the given path, depend ing of the {@link -237 * ApiPathBuilder} contains POST content or not (attachments or Form data). We will login first, and then execute -238 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. -239 * -240 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -241 * @param parser used to parse the response -242 * -243 * @return the result of the call, as formatted by the parser -244 * -245 * @throws RundeckApiException in case of error when calling the API -246 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -247 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -248 */ -249 public <T> T postOrGet(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, -250 RundeckApiLoginException, -251 RundeckApiTokenException { -252 if (apiPath.hasPostContent()) { -253 return post(apiPath, parser); -254 } else { -255 return get(apiPath, parser); -256 } -257 } -258 -259 /** -260 * Execute an HTTP POST request to the RunDeck instance, on the given path. We will login first, and then execute -261 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. -262 * -263 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -264 * @param parser used to parse the response -265 * @return the result of the call, as formatted by the parser -266 * @throws RundeckApiException in case of error when calling the API -267 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -268 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -269 */ -270 public <T> T post(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, -271 RundeckApiLoginException, RundeckApiTokenException { -272 HttpPost httpPost = new HttpPost(client.getUrl() + client.getApiEndpoint() + apiPath); -273 if(null!= apiPath.getAccept()) { -274 httpPost.setHeader("Accept", apiPath.getAccept()); -275 } -276 // POST a multi-part request, with all attachments -277 if(apiPath.getAttachments().size()>0){ -278 MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); -279 for (Entry<String, InputStream> attachment : apiPath.getAttachments().entrySet()) { -280 entity.addPart(attachment.getKey(), new InputStreamBody(attachment.getValue(), attachment.getKey())); -281 } -282 httpPost.setEntity(entity); -283 }else if(apiPath.getForm().size()>0){ -284 try { -285 httpPost.setEntity(new UrlEncodedFormEntity(apiPath.getForm(), HTTP.UTF_8)); -286 } catch (UnsupportedEncodingException e) { -287 throw new RundeckApiException("Unsupported encoding: " + e.getMessage(), e); -288 } -289 }else { -290 throw new IllegalArgumentException("No Form or Multipart entity for POST content-body"); -291 } -292 -293 return execute(httpPost, parser); -294 } -295 -296 /** -297 * Execute an HTTP DELETE request to the RunDeck instance, on the given path. We will login first, and then execute -298 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. -299 * -300 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} -301 * @param parser used to parse the response -302 * @return the result of the call, as formatted by the parser -303 * @throws RundeckApiException in case of error when calling the API -304 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -305 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -306 */ -307 public <T> T delete(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, -308 RundeckApiLoginException, RundeckApiTokenException { -309 return execute(new HttpDelete(client.getUrl() + client.getApiEndpoint() + apiPath), parser); -310 } -311 -312 /** -313 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. At the end, -314 * the given parser will be used to convert the response to a more useful result object. -315 * -316 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... -317 * @param parser used to parse the response -318 * @return the result of the call, as formatted by the parser -319 * @throws RundeckApiException in case of error when calling the API -320 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -321 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -322 */ -323 private <T> T execute(HttpRequestBase request, XmlNodeParser<T> parser) throws RundeckApiException, -324 RundeckApiLoginException, RundeckApiTokenException { -325 // execute the request -326 InputStream response = execute(request); -327 -328 // read and parse the response -329 Document xmlDocument = ParserHelper.loadDocument(response); -330 return parser.parseXmlNode(xmlDocument); -331 } -332 -333 /** -334 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. -335 * -336 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... -337 * @return a new {@link InputStream} instance, not linked with network resources -338 * @throws RundeckApiException in case of error when calling the API -339 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -340 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -341 */ -342 private ByteArrayInputStream execute(HttpRequestBase request) throws RundeckApiException, RundeckApiLoginException, -343 RundeckApiTokenException { -344 HttpClient httpClient = instantiateHttpClient(); -345 try { -346 // we only need to manually login in case of login-based authentication -347 // note that in case of token-based auth, the auth (via an HTTP header) is managed by an interceptor. -348 if (client.getToken() == null && client.getSessionID() == null) { -349 login(httpClient); -350 } -351 -352 // execute the HTTP request -353 HttpResponse response = null; -354 try { -355 response = httpClient.execute(request); -356 } catch (IOException e) { -357 throw new RundeckApiException("Failed to execute an HTTP " + request.getMethod() + " on url : " -358 + request.getURI(), e); -359 } -360 -361 // in case of error, we get a redirect to /api/error -362 // that we need to follow manually for POST and DELETE requests (as GET) -363 if (response.getStatusLine().getStatusCode() / 100 == 3) { -364 String newLocation = response.getFirstHeader("Location").getValue(); -365 try { -366 EntityUtils.consume(response.getEntity()); -367 } catch (IOException e) { -368 throw new RundeckApiException("Failed to consume entity (release connection)", e); -369 } -370 request = new HttpGet(newLocation); -371 try { -372 response = httpClient.execute(request); -373 } catch (IOException e) { -374 throw new RundeckApiException("Failed to execute an HTTP GET on url : " + request.getURI(), e); -375 } -376 } -377 -378 // check the response code (should be 2xx, even in case of error : error message is in the XML result) -379 if (response.getStatusLine().getStatusCode() / 100 != 2) { -380 if (response.getStatusLine().getStatusCode() == 403 && -381 (client.getToken() != null || client.getSessionID() != null)) { -382 throw new RundeckApiTokenException("Invalid Token or sessionID ! Got HTTP response '" + response.getStatusLine() -383 + "' for " + request.getURI()); -384 } else { -385 throw new RundeckApiException("Invalid HTTP response '" + response.getStatusLine() + "' for " -386 + request.getURI()); -387 } -388 } -389 if (response.getEntity() == null) { -390 throw new RundeckApiException("Empty RunDeck response ! HTTP status line is : " -391 + response.getStatusLine()); -392 } -393 -394 // return a new inputStream, so that we can close all network resources -395 try { -396 return new ByteArrayInputStream(EntityUtils.toByteArray(response.getEntity())); -397 } catch (IOException e) { -398 throw new RundeckApiException("Failed to consume entity and convert the inputStream", e); -399 } -400 } finally { -401 httpClient.getConnectionManager().shutdown(); -402 } -403 } -404 -405 /** -406 * Do the actual work of login, using the given {@link HttpClient} instance. You'll need to re-use this instance -407 * when making API calls (such as running a job). Only use this in case of login-based authentication. -408 * -409 * @param httpClient pre-instantiated -410 * @throws RundeckApiLoginException if the login failed -411 */ -412 private String login(HttpClient httpClient) throws RundeckApiLoginException { -413 String sessionID = null; +206 /** +207 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +208 * API call without appending the API_ENDPOINT to the URL. +209 * +210 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +211 * @return a new {@link InputStream} instance, not linked with network resources +212 * @throws RundeckApiException in case of error when calling the API +213 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +214 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +215 */ +216 public InputStream getNonApi(ApiPathBuilder apiPath) throws RundeckApiException, RundeckApiLoginException, +217 RundeckApiTokenException { +218 HttpGet request = new HttpGet(client.getUrl() + apiPath); +219 if (null != apiPath.getAccept()) { +220 request.setHeader("Accept", apiPath.getAccept()); +221 } +222 ByteArrayInputStream response = execute(request); +223 response.reset(); +224 +225 return response; +226 } +227 +228 /** +229 * Execute an HTTP POST or GET request to the RunDeck instance, on the given path, depend ing of the {@link +230 * ApiPathBuilder} contains POST content or not (attachments or Form data). We will login first, and then execute +231 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +232 * +233 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +234 * @param parser used to parse the response +235 * +236 * @return the result of the call, as formatted by the parser +237 * +238 * @throws RundeckApiException in case of error when calling the API +239 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +240 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +241 */ +242 public <T> T postOrGet(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +243 RundeckApiLoginException, +244 RundeckApiTokenException { +245 if (apiPath.hasPostContent()) { +246 return post(apiPath, parser); +247 } else { +248 return get(apiPath, parser); +249 } +250 } +251 +252 /** +253 * Execute an HTTP POST request to the RunDeck instance, on the given path. We will login first, and then execute +254 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +255 * +256 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +257 * @param parser used to parse the response +258 * @return the result of the call, as formatted by the parser +259 * @throws RundeckApiException in case of error when calling the API +260 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +261 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +262 */ +263 public <T> T post(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +264 RundeckApiLoginException, RundeckApiTokenException { +265 HttpPost httpPost = new HttpPost(client.getUrl() + client.getApiEndpoint() + apiPath); +266 return requestWithEntity(apiPath, parser, httpPost); +267 } +268 /** +269 * Execute an HTTP PUT request to the RunDeck instance, on the given path. We will login first, and then execute +270 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +271 * +272 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +273 * @param parser used to parse the response +274 * @return the result of the call, as formatted by the parser +275 * @throws RundeckApiException in case of error when calling the API +276 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +277 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +278 */ +279 public <T> T put(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +280 RundeckApiLoginException, RundeckApiTokenException { +281 HttpPut httpPut = new HttpPut(client.getUrl() + client.getApiEndpoint() + apiPath); +282 return requestWithEntity(apiPath, parser, httpPut); +283 } +284 +285 private <T> T requestWithEntity(ApiPathBuilder apiPath, XmlNodeParser<T> parser, HttpEntityEnclosingRequestBase +286 httpPost) { +287 if(null!= apiPath.getAccept()) { +288 httpPost.setHeader("Accept", apiPath.getAccept()); +289 } +290 // POST a multi-part request, with all attachments +291 if(apiPath.getAttachments().size()>0){ +292 MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); +293 for (Entry<String, InputStream> attachment : apiPath.getAttachments().entrySet()) { +294 entity.addPart(attachment.getKey(), new InputStreamBody(attachment.getValue(), attachment.getKey())); +295 } +296 httpPost.setEntity(entity); +297 }else if(apiPath.getForm().size()>0){ +298 try { +299 httpPost.setEntity(new UrlEncodedFormEntity(apiPath.getForm(), HTTP.UTF_8)); +300 } catch (UnsupportedEncodingException e) { +301 throw new RundeckApiException("Unsupported encoding: " + e.getMessage(), e); +302 } +303 }else if(apiPath.getContentStream() !=null && apiPath.getContentType()!=null){ +304 BasicHttpEntity entity = new BasicHttpEntity(); +305 entity.setContent(apiPath.getContentStream()); +306 entity.setContentType(apiPath.getContentType()); +307 httpPost.setEntity(entity); +308 }else if(apiPath.getContentFile() !=null && apiPath.getContentType()!=null){ +309 httpPost.setEntity(new FileEntity(apiPath.getContentFile(), apiPath.getContentType())); +310 }else if(apiPath.getXmlDocument()!=null) { +311 httpPost.setHeader("Content-Type", "application/xml"); +312 httpPost.setEntity(new EntityTemplate(new DocumentContentProducer(apiPath.getXmlDocument()))); +313 }else if(apiPath.isEmptyContent()){ +314 //empty content +315 }else { +316 throw new IllegalArgumentException("No Form or Multipart entity for POST content-body"); +317 } +318 +319 return execute(httpPost, parser); +320 } +321 +322 /** +323 * Execute an HTTP DELETE request to the RunDeck instance, on the given path. We will login first, and then execute +324 * the API call. At the end, the given parser will be used to convert the response to a more useful result object. +325 * +326 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +327 * @param parser used to parse the response +328 * @return the result of the call, as formatted by the parser +329 * @throws RundeckApiException in case of error when calling the API +330 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +331 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +332 */ +333 public <T> T delete(ApiPathBuilder apiPath, XmlNodeParser<T> parser) throws RundeckApiException, +334 RundeckApiLoginException, RundeckApiTokenException { +335 return execute(new HttpDelete(client.getUrl() + client.getApiEndpoint() + apiPath), parser); +336 } +337 /** +338 * Execute an HTTP DELETE request to the RunDeck instance, on the given path, and expect a 204 response. +339 * +340 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +341 * @throws RundeckApiException in case of error when calling the API +342 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +343 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +344 */ +345 public void delete(ApiPathBuilder apiPath) throws RundeckApiException, +346 RundeckApiLoginException, RundeckApiTokenException { +347 +348 InputStream response = execute(new HttpDelete(client.getUrl() + client.getApiEndpoint() + apiPath)); +349 if(null!=response){ +350 throw new RundeckApiException("Unexpected Rundeck response content, expected no content!"); +351 } +352 } +353 +354 /** +355 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. At the end, +356 * the given parser will be used to convert the response to a more useful result object. +357 * +358 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... +359 * @param parser used to parse the response +360 * @return the result of the call, as formatted by the parser +361 * @throws RundeckApiException in case of error when calling the API +362 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +363 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +364 */ +365 private <T> T execute(HttpRequestBase request, XmlNodeParser<T> parser) throws RundeckApiException, +366 RundeckApiLoginException, RundeckApiTokenException { +367 // execute the request +368 return new ParserHandler<T>(parser).handle(execute(request, new ResultHandler())); +369 } +370 +371 /** +372 * Execute an HTTP GET request to the RunDeck instance, on the given path. We will login first, and then execute the +373 * API call. At the end, the given parser will be used to convert the response to a more useful result object. +374 * +375 * @param apiPath on which we will make the HTTP request - see {@link ApiPathBuilder} +376 * @param parser used to parse the response +377 * +378 * @return the result of the call, as formatted by the parser +379 * +380 * @throws RundeckApiException in case of error when calling the API +381 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +382 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +383 */ +384 public int get(ApiPathBuilder apiPath, OutputStream outputStream) throws RundeckApiException, +385 RundeckApiLoginException, RundeckApiTokenException, IOException { +386 HttpGet request = new HttpGet(client.getUrl() + client.getApiEndpoint() + apiPath); +387 if (null != apiPath.getAccept()) { +388 request.setHeader("Accept", apiPath.getAccept()); +389 } +390 final WriteOutHandler writeOutHandler = new WriteOutHandler(outputStream); +391 Handler<HttpResponse,Integer> handler = writeOutHandler; +392 if(null!=apiPath.getRequiredContentType()){ +393 handler = new RequireContentTypeHandler<Integer>(apiPath.getRequiredContentType(), handler); +394 } +395 final int wrote = execute(request, handler); +396 if(writeOutHandler.thrown!=null){ +397 throw writeOutHandler.thrown; +398 } +399 return wrote; +400 } +401 /** +402 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. +403 * +404 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... +405 * @return a new {@link InputStream} instance, not linked with network resources +406 * @throws RundeckApiException in case of error when calling the API +407 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +408 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +409 */ +410 private ByteArrayInputStream execute(HttpUriRequest request) throws RundeckApiException, RundeckApiLoginException, +411 RundeckApiTokenException { +412 return execute(request, new ResultHandler() ); +413 } 414 -415 // 1. call expected GET request -416 String location = client.getUrl(); -417 -418 try { -419 HttpGet getRequest = new HttpGet(location); -420 HttpResponse response = httpClient.execute(getRequest); -421 -422 // sessionID stored in case user wants to cache it for reuse -423 Header cookieHeader = response.getFirstHeader("Set-Cookie"); -424 if (cookieHeader != null) { -425 String cookieStr = cookieHeader.getValue(); -426 if (cookieStr != null) { -427 int i1 = cookieStr.indexOf("JSESSIONID="); -428 if (i1 >= 0) { -429 cookieStr = cookieStr.substring(i1 + "JSESSIONID=".length()); -430 int i2 = cookieStr.indexOf(";"); -431 if (i2 >= 0) { -432 sessionID = cookieStr.substring(0, i2); -433 } -434 } -435 } -436 } -437 -438 try { -439 EntityUtils.consume(response.getEntity()); -440 } catch (IOException e) { -441 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); -442 } -443 } catch (IOException e) { -444 throw new RundeckApiLoginException("Failed to get request on " + location, e); -445 } -446 -447 // 2. then call POST login request -448 location += "/j_security_check"; -449 -450 while (true) { -451 try { -452 HttpPost postLogin = new HttpPost(location); -453 List params = new ArrayList(); -454 params.add(new BasicNameValuePair("j_username", client.getLogin())); -455 params.add(new BasicNameValuePair("j_password", client.getPassword())); -456 params.add(new BasicNameValuePair("action", "login")); -457 postLogin.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); -458 HttpResponse response = httpClient.execute(postLogin); -459 -460 if (response.getStatusLine().getStatusCode() / 100 == 3) { -461 // HTTP client refuses to handle redirects (code 3xx) for POST, so we have to do it manually... -462 location = response.getFirstHeader("Location").getValue(); -463 try { -464 EntityUtils.consume(response.getEntity()); -465 } catch (IOException e) { -466 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); -467 } -468 continue; -469 } -470 -471 if (response.getStatusLine().getStatusCode() / 100 != 2) { -472 throw new RundeckApiLoginException("Invalid HTTP response '" + response.getStatusLine() + "' for " -473 + location); -474 } -475 -476 try { -477 String content = EntityUtils.toString(response.getEntity(), HTTP.UTF_8); -478 if (StringUtils.contains(content, "j_security_check")) { -479 throw new RundeckApiLoginException("Login failed for user " + client.getLogin()); -480 } -481 try { -482 EntityUtils.consume(response.getEntity()); -483 } catch (IOException e) { -484 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); -485 } -486 break; -487 } catch (IOException io) { -488 throw new RundeckApiLoginException("Failed to read RunDeck result", io); -489 } catch (ParseException p) { -490 throw new RundeckApiLoginException("Failed to parse RunDeck response", p); -491 } -492 } catch (IOException e) { -493 throw new RundeckApiLoginException("Failed to post login form on " + location, e); -494 } -495 } -496 -497 return sessionID; -498 } -499 -500 -501 /** -502 * Instantiate a new {@link HttpClient} instance, configured to accept all SSL certificates -503 * -504 * @return an {@link HttpClient} instance - won't be null -505 */ -506 private HttpClient instantiateHttpClient() { -507 DefaultHttpClient httpClient = new DefaultHttpClient(); -508 -509 // configure user-agent -510 HttpProtocolParams.setUserAgent(httpClient.getParams(), "RunDeck API Java Client " + client.getApiVersion()); -511 -512 // configure SSL -513 SSLSocketFactory socketFactory = null; -514 try { -515 socketFactory = new SSLSocketFactory(new TrustStrategy() { -516 -517 @Override -518 public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { -519 return true; -520 } -521 }, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); -522 } catch (KeyManagementException e) { -523 throw new RuntimeException(e); -524 } catch (UnrecoverableKeyException e) { -525 throw new RuntimeException(e); -526 } catch (NoSuchAlgorithmException e) { -527 throw new RuntimeException(e); -528 } catch (KeyStoreException e) { -529 throw new RuntimeException(e); -530 } -531 httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, socketFactory)); -532 -533 // configure proxy (use system env : http.proxyHost / http.proxyPort) -534 System.setProperty("java.net.useSystemProxies", "true"); -535 httpClient.setRoutePlanner(new ProxySelectorRoutePlanner(httpClient.getConnectionManager().getSchemeRegistry(), -536 ProxySelector.getDefault())); -537 -538 // in case of token-based authentication, add the correct HTTP header to all requests via an interceptor -539 httpClient.addRequestInterceptor(new HttpRequestInterceptor() { -540 -541 @Override -542 public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { -543 if (client.getToken() != null) { -544 request.addHeader(AUTH_TOKEN_HEADER, client.getToken()); -545 //System.out.println("httpClient adding token header"); -546 } -547 else if(client.getSessionID() != null) { -548 request.addHeader(COOKIE_HEADER, "JSESSIONID="+client.getSessionID()); -549 //System.out.println("httpClient adding session header, sessionID="+client.getSessionID()); -550 } -551 } -552 }); -553 -554 return httpClient; -555 } -556 } +415 /** +416 * Handles one type into another +417 * @param <T> +418 * @param <V> +419 */ +420 private static interface Handler<T,V>{ +421 public V handle(T response); +422 } +423 +424 /** +425 * Handles parsing inputstream via a parser +426 * @param <S> +427 */ +428 private static class ParserHandler<S> implements Handler<InputStream,S> { +429 XmlNodeParser<S> parser; +430 +431 private ParserHandler(XmlNodeParser<S> parser) { +432 this.parser = parser; +433 } +434 +435 @Override +436 public S handle(InputStream response) { +437 // read and parse the response +438 return parser.parseXmlNode(ParserHelper.loadDocument(response)); +439 } +440 } +441 +442 /** +443 * Handles writing response to an output stream +444 */ +445 private static class ChainHandler<T> implements Handler<HttpResponse,T> { +446 Handler<HttpResponse, T> chain; +447 private ChainHandler(Handler<HttpResponse,T> chain) { +448 this.chain=chain; +449 } +450 @Override +451 public T handle(final HttpResponse response) { +452 return chain.handle(response); +453 } +454 } +455 +456 /** +457 * Handles writing response to an output stream +458 */ +459 private static class RequireContentTypeHandler<T> extends ChainHandler<T> { +460 String contentType; +461 +462 private RequireContentTypeHandler(final String contentType, final Handler<HttpResponse, T> chain) { +463 super(chain); +464 this.contentType = contentType; +465 } +466 +467 @Override +468 public T handle(final HttpResponse response) { +469 final Header firstHeader = response.getFirstHeader("Content-Type"); +470 final String[] split = firstHeader.getValue().split(";"); +471 boolean matched=false; +472 for (int i = 0; i < split.length; i++) { +473 String s = split[i]; +474 if (this.contentType.equalsIgnoreCase(s.trim())) { +475 matched=true; +476 break; +477 } +478 } +479 if(!matched) { +480 throw new RundeckApiException.RundeckApiHttpContentTypeException(firstHeader.getValue(), +481 this.contentType); +482 } +483 return super.handle(response); +484 } +485 } +486 +487 /** +488 * Handles writing response to an output stream +489 */ +490 private static class WriteOutHandler implements Handler<HttpResponse,Integer> { +491 private WriteOutHandler(OutputStream writeOut) { +492 this.writeOut = writeOut; +493 } +494 +495 OutputStream writeOut; +496 IOException thrown; +497 @Override +498 public Integer handle(final HttpResponse response) { +499 try { +500 return IOUtils.copy(response.getEntity().getContent(), writeOut); +501 } catch (IOException e) { +502 thrown=e; +503 } +504 return -1; +505 } +506 } +507 +508 /** +509 * Handles reading response into a byte array stream +510 */ +511 private static class ResultHandler implements Handler<HttpResponse,ByteArrayInputStream> { +512 @Override +513 public ByteArrayInputStream handle(final HttpResponse response) { +514 // return a new inputStream, so that we can close all network resources +515 try { +516 return new ByteArrayInputStream(EntityUtils.toByteArray(response.getEntity())); +517 } catch (IOException e) { +518 throw new RundeckApiException("Failed to consume entity and convert the inputStream", e); +519 } +520 } +521 } +522 /** +523 * Execute an HTTP request to the RunDeck instance. We will login first, and then execute the API call. +524 * +525 * @param request to execute. see {@link HttpGet}, {@link HttpDelete}, and so on... +526 * @return a new {@link InputStream} instance, not linked with network resources +527 * @throws RundeckApiException in case of error when calling the API +528 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +529 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +530 */ +531 private <T> T execute(HttpUriRequest request, Handler<HttpResponse,T> handler) throws RundeckApiException, +532 RundeckApiLoginException, +533 RundeckApiTokenException { +534 HttpClient httpClient = instantiateHttpClient(); +535 try { +536 // we only need to manually login in case of login-based authentication +537 // note that in case of token-based auth, the auth (via an HTTP header) is managed by an interceptor. +538 if (client.getToken() == null && client.getSessionID() == null) { +539 login(httpClient); +540 } +541 +542 // execute the HTTP request +543 HttpResponse response = null; +544 try { +545 response = httpClient.execute(request); +546 } catch (IOException e) { +547 throw new RundeckApiException("Failed to execute an HTTP " + request.getMethod() + " on url : " +548 + request.getURI(), e); +549 } +550 +551 // in case of error, we get a redirect to /api/error +552 // that we need to follow manually for POST and DELETE requests (as GET) +553 int statusCode = response.getStatusLine().getStatusCode(); +554 if (statusCode / 100 == 3) { +555 String newLocation = response.getFirstHeader("Location").getValue(); +556 try { +557 EntityUtils.consume(response.getEntity()); +558 } catch (IOException e) { +559 throw new RundeckApiException("Failed to consume entity (release connection)", e); +560 } +561 request = new HttpGet(newLocation); +562 try { +563 response = httpClient.execute(request); +564 statusCode = response.getStatusLine().getStatusCode(); +565 } catch (IOException e) { +566 throw new RundeckApiException("Failed to execute an HTTP GET on url : " + request.getURI(), e); +567 } +568 } +569 +570 // check the response code (should be 2xx, even in case of error : error message is in the XML result) +571 if (statusCode / 100 != 2) { +572 if (statusCode == 403 && +573 (client.getToken() != null || client.getSessionID() != null)) { +574 throw new RundeckApiTokenException("Invalid Token or sessionID ! Got HTTP response '" + response.getStatusLine() +575 + "' for " + request.getURI()); +576 } else { +577 throw new RundeckApiException.RundeckApiHttpStatusException("Invalid HTTP response '" + response.getStatusLine() + "' for " +578 + request.getURI(), statusCode); +579 } +580 } +581 if(statusCode==204){ +582 return null; +583 } +584 if (response.getEntity() == null) { +585 throw new RundeckApiException("Empty RunDeck response ! HTTP status line is : " +586 + response.getStatusLine()); +587 } +588 return handler.handle(response); +589 } finally { +590 httpClient.getConnectionManager().shutdown(); +591 } +592 } +593 +594 /** +595 * Do the actual work of login, using the given {@link HttpClient} instance. You'll need to re-use this instance +596 * when making API calls (such as running a job). Only use this in case of login-based authentication. +597 * +598 * @param httpClient pre-instantiated +599 * @throws RundeckApiLoginException if the login failed +600 */ +601 private String login(HttpClient httpClient) throws RundeckApiLoginException { +602 String sessionID = null; +603 +604 // 1. call expected GET request +605 String location = client.getUrl(); +606 +607 try { +608 HttpGet getRequest = new HttpGet(location); +609 HttpResponse response = httpClient.execute(getRequest); +610 +611 // sessionID stored in case user wants to cache it for reuse +612 Header cookieHeader = response.getFirstHeader("Set-Cookie"); +613 if (cookieHeader != null) { +614 String cookieStr = cookieHeader.getValue(); +615 if (cookieStr != null) { +616 int i1 = cookieStr.indexOf("JSESSIONID="); +617 if (i1 >= 0) { +618 cookieStr = cookieStr.substring(i1 + "JSESSIONID=".length()); +619 int i2 = cookieStr.indexOf(";"); +620 if (i2 >= 0) { +621 sessionID = cookieStr.substring(0, i2); +622 } +623 } +624 } +625 } +626 +627 try { +628 EntityUtils.consume(response.getEntity()); +629 } catch (IOException e) { +630 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); +631 } +632 } catch (IOException e) { +633 throw new RundeckApiLoginException("Failed to get request on " + location, e); +634 } +635 +636 // 2. then call POST login request +637 location += "/j_security_check"; +638 +639 while (true) { +640 try { +641 HttpPost postLogin = new HttpPost(location); +642 List params = new ArrayList(); +643 params.add(new BasicNameValuePair("j_username", client.getLogin())); +644 params.add(new BasicNameValuePair("j_password", client.getPassword())); +645 params.add(new BasicNameValuePair("action", "login")); +646 postLogin.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); +647 HttpResponse response = httpClient.execute(postLogin); +648 +649 if (response.getStatusLine().getStatusCode() / 100 == 3) { +650 // HTTP client refuses to handle redirects (code 3xx) for POST, so we have to do it manually... +651 location = response.getFirstHeader("Location").getValue(); +652 try { +653 EntityUtils.consume(response.getEntity()); +654 } catch (IOException e) { +655 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); +656 } +657 continue; +658 } +659 +660 if (response.getStatusLine().getStatusCode() / 100 != 2) { +661 throw new RundeckApiLoginException("Invalid HTTP response '" + response.getStatusLine() + "' for " +662 + location); +663 } +664 +665 try { +666 String content = EntityUtils.toString(response.getEntity(), HTTP.UTF_8); +667 if (StringUtils.contains(content, "j_security_check")) { +668 throw new RundeckApiLoginException("Login failed for user " + client.getLogin()); +669 } +670 try { +671 EntityUtils.consume(response.getEntity()); +672 } catch (IOException e) { +673 throw new RundeckApiLoginException("Failed to consume entity (release connection)", e); +674 } +675 break; +676 } catch (IOException io) { +677 throw new RundeckApiLoginException("Failed to read RunDeck result", io); +678 } catch (ParseException p) { +679 throw new RundeckApiLoginException("Failed to parse RunDeck response", p); +680 } +681 } catch (IOException e) { +682 throw new RundeckApiLoginException("Failed to post login form on " + location, e); +683 } +684 } +685 +686 return sessionID; +687 } +688 +689 +690 /** +691 * Instantiate a new {@link HttpClient} instance, configured to accept all SSL certificates +692 * +693 * @return an {@link HttpClient} instance - won't be null +694 */ +695 private HttpClient instantiateHttpClient() { +696 DefaultHttpClient httpClient = new DefaultHttpClient(); +697 +698 // configure user-agent +699 HttpProtocolParams.setUserAgent(httpClient.getParams(), "RunDeck API Java Client " + client.getApiVersion()); +700 +701 // configure SSL +702 SSLSocketFactory socketFactory = null; +703 try { +704 socketFactory = new SSLSocketFactory(new TrustStrategy() { +705 +706 @Override +707 public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { +708 return true; +709 } +710 }, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); +711 } catch (KeyManagementException e) { +712 throw new RuntimeException(e); +713 } catch (UnrecoverableKeyException e) { +714 throw new RuntimeException(e); +715 } catch (NoSuchAlgorithmException e) { +716 throw new RuntimeException(e); +717 } catch (KeyStoreException e) { +718 throw new RuntimeException(e); +719 } +720 httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, socketFactory)); +721 +722 // configure proxy (use system env : http.proxyHost / http.proxyPort) +723 System.setProperty("java.net.useSystemProxies", "true"); +724 httpClient.setRoutePlanner(new ProxySelectorRoutePlanner(httpClient.getConnectionManager().getSchemeRegistry(), +725 ProxySelector.getDefault())); +726 +727 // in case of token-based authentication, add the correct HTTP header to all requests via an interceptor +728 httpClient.addRequestInterceptor(new HttpRequestInterceptor() { +729 +730 @Override +731 public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { +732 if (client.getToken() != null) { +733 request.addHeader(AUTH_TOKEN_HEADER, client.getToken()); +734 //System.out.println("httpClient adding token header"); +735 } +736 else if(client.getSessionID() != null) { +737 request.addHeader(COOKIE_HEADER, "JSESSIONID="+client.getSessionID()); +738 //System.out.println("httpClient adding session header, sessionID="+client.getSessionID()); +739 } +740 } +741 }); +742 +743 return httpClient; +744 } +745 }
    diff --git a/xref/org/rundeck/api/ApiPathBuilder.html b/xref/org/rundeck/api/ApiPathBuilder.html index d7507fd..3be39c8 100644 --- a/xref/org/rundeck/api/ApiPathBuilder.html +++ b/xref/org/rundeck/api/ApiPathBuilder.html @@ -25,327 +25,433 @@ 15 */ 16 package org.rundeck.api; 17 -18 import java.io.InputStream; -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; +18 import java.io.File; +19 import java.io.InputStream; +20 import java.util.ArrayList; +21 import java.util.Collection; +22 import java.util.Date; +23 import java.util.HashMap; +24 import java.util.List; +25 import java.util.Map; +26 import java.util.Properties; +27 import org.apache.commons.lang.StringUtils; +28 import org.apache.http.NameValuePair; +29 import org.apache.http.message.BasicNameValuePair; +30 import org.dom4j.Document; +31 import org.rundeck.api.generator.XmlDocumentGenerator; +32 import org.rundeck.api.util.ParametersUtil; +33 +34 /** +35 * Builder for API paths +36 * +37 * @author Vincent Behar +38 */ +39 class ApiPathBuilder { 40 -41 private String accept="text/xml"; -42 -43 /** When POSTing, we can add attachments */ -44 private final Map<String, InputStream> attachments; -45 private final List<NameValuePair> form = new ArrayList<NameValuePair>(); -46 -47 /** Marker for using the right separator between parameters ("?" or "&") */ -48 private boolean firstParamDone = false; -49 -50 /** -51 * Build a new instance, for the given "path" (the "path" is the part before the parameters. The path and the -52 * parameters are separated by a "?") -53 * -54 * @param paths elements of the path -55 */ -56 public ApiPathBuilder(String... paths) { -57 apiPath = new StringBuilder(); -58 attachments = new HashMap<String, InputStream>(); -59 if (paths != null) { -60 for (String path : paths) { -61 if (StringUtils.isNotBlank(path)) { -62 append(path); -63 } -64 } -65 } -66 } -67 -68 /** -69 * Set the accept header -70 */ -71 public ApiPathBuilder accept(String mimeTypes) { -72 accept=mimeTypes; -73 return this; -74 } -75 /** -76 * Visit a {@link BuildsParameters} and add the parameters -77 */ -78 public ApiPathBuilder param(BuildsParameters params) { -79 params.buildParameters(this, false); -80 return this; -81 } +41 /** Internally, we store everything in a {@link StringBuilder} */ +42 private final StringBuilder apiPath; +43 +44 private String accept="text/xml"; +45 +46 /** When POSTing, we can add attachments */ +47 private final Map<String, InputStream> attachments; +48 private final List<NameValuePair> form = new ArrayList<NameValuePair>(); +49 private Document xmlDocument; +50 private InputStream contentStream; +51 private File contentFile; +52 private String contentType; +53 private String requiredContentType; +54 private boolean emptyContent = false; +55 +56 /** Marker for using the right separator between parameters ("?" or "&") */ +57 private boolean firstParamDone = false; +58 +59 /** +60 * Build a new instance, for the given "path" (the "path" is the part before the parameters. The path and the +61 * parameters are separated by a "?") +62 * +63 * @param paths elements of the path +64 */ +65 public ApiPathBuilder(String... paths) { +66 apiPath = new StringBuilder(); +67 attachments = new HashMap<String, InputStream>(); +68 paths(paths); +69 } +70 +71 public ApiPathBuilder paths(String... paths) { +72 if (paths != null) { +73 for (String path : paths) { +74 if (StringUtils.isNotBlank(path)) { +75 append(path); +76 } +77 } +78 } +79 return this; +80 } +81 82 /** -83 * Visit a {@link BuildsParameters} and add the parameters +83 * Set the accept header 84 */ -85 public ApiPathBuilder field(BuildsParameters params) { -86 params.buildParameters(this, true); +85 public ApiPathBuilder accept(String mimeTypes) { +86 accept=mimeTypes; 87 return this; 88 } 89 /** -90 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty -91 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated -92 * by the "=" character. Also, the value will be url-encoded. -93 * -94 * @param key of the parameter. Must not be null or empty -95 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. -96 * @return this, for method chaining -97 */ -98 public ApiPathBuilder param(String key, String value) { -99 if (StringUtils.isNotBlank(value)) { -100 appendSeparator(); -101 append(key); -102 append("="); -103 append(ParametersUtil.urlEncode(value)); -104 } -105 return this; -106 } -107 -108 /** -109 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty -110 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated -111 * by the "=" character. Also, the value will be url-encoded. -112 * -113 * @param key of the parameter. Must not be null or empty -114 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. -115 * @return this, for method chaining -116 */ -117 public ApiPathBuilder param(final String key, final Collection<String> values) { -118 for(final String value: values){ -119 if (StringUtils.isNotBlank(value)) { -120 appendSeparator(); -121 append(key); -122 append("="); -123 append(ParametersUtil.urlEncode(value)); -124 } -125 } -126 return this; -127 } -128 -129 /** -130 * Append multiple values for the given Form field. This will be appended if it is not blank (null, empty -131 * or whitespace). The form field values will only be used for a "post" request -132 * -133 * @param key of the field name. Must not be null or empty -134 * @param values of the field. May be null/empty/blank. Will be url-encoded. -135 * @return this, for method chaining -136 */ -137 public ApiPathBuilder field(final String key, final Collection<String> values) { -138 if (null!=values) { -139 for(final String value: values){ -140 if (StringUtils.isNotBlank(value)) { -141 form.add(new BasicNameValuePair(key, value)); -142 } -143 } -144 } -145 return this; -146 } -147 -148 /** -149 * Append a single value for the given Form field. This will be appended if it is not blank (null, empty -150 * or whitespace). The form field values will only be used for a "post" request -151 * -152 * @param key of the field name. Must not be null or empty -153 * @param value of the field. May be null/empty/blank. Will be url-encoded. -154 * @return this, for method chaining -155 */ -156 public ApiPathBuilder field(final String key, final String value) { -157 if (StringUtils.isNotBlank(value)) { -158 form.add(new BasicNameValuePair(key, value)); -159 } -160 return this; -161 } -162 -163 /** -164 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -165 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. Also, -166 * the value will be converted to lower-case. -167 * -168 * @param key of the parameter. Must not be null or empty -169 * @param value of the parameter. May be null -170 * @return this, for method chaining -171 */ -172 public ApiPathBuilder param(String key, Enum<?> value) { -173 if (value != null) { -174 param(key, StringUtils.lowerCase(value.toString())); -175 } -176 return this; -177 } -178 -179 /** -180 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -181 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -182 * -183 * @param key of the parameter. Must not be null or empty -184 * @param value of the parameter. May be null -185 * @return this, for method chaining -186 */ -187 public ApiPathBuilder param(String key, Date value) { -188 if (value != null) { -189 param(key, value.getTime()); -190 } -191 return this; -192 } -193 -194 /** -195 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -196 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -197 * -198 * @param key of the parameter. Must not be null or empty -199 * @param value of the parameter. May be null -200 * @return this, for method chaining -201 */ -202 public ApiPathBuilder param(String key, Long value) { -203 if (value != null) { -204 param(key, value.toString()); -205 } -206 return this; -207 } -208 -209 /** -210 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -211 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -212 * -213 * @param key of the parameter. Must not be null or empty -214 * @param value of the parameter. May be null -215 * @return this, for method chaining -216 */ -217 public ApiPathBuilder param(String key, Integer value) { -218 if (value != null) { -219 param(key, value.toString()); -220 } -221 return this; -222 } -223 -224 /** -225 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure -226 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. -227 * -228 * @param key of the parameter. Must not be null or empty -229 * @param value of the parameter. May be null -230 * @return this, for method chaining -231 */ -232 public ApiPathBuilder param(String key, Boolean value) { -233 if (value != null) { -234 param(key, value.toString()); -235 } -236 return this; -237 } -238 -239 /** -240 * Append the given node filters, only if it is not null/empty +90 * Visit a {@link BuildsParameters} and add the parameters +91 */ +92 public ApiPathBuilder param(BuildsParameters params) { +93 params.buildParameters(this, false); +94 return this; +95 } +96 /** +97 * Visit a {@link BuildsParameters} and add the parameters +98 */ +99 public ApiPathBuilder field(BuildsParameters params) { +100 params.buildParameters(this, true); +101 return this; +102 } +103 /** +104 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty +105 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated +106 * by the "=" character. Also, the value will be url-encoded. +107 * +108 * @param key of the parameter. Must not be null or empty +109 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. +110 * @return this, for method chaining +111 */ +112 public ApiPathBuilder param(String key, String value) { +113 if (StringUtils.isNotBlank(value)) { +114 appendSeparator(); +115 append(key); +116 append("="); +117 append(ParametersUtil.urlEncode(value)); +118 } +119 return this; +120 } +121 +122 /** +123 * Append the given parameter (key and value). This will only append the parameter if it is not blank (null, empty +124 * or whitespace), and make sure to add the right separator ("?" or "&") before. The key and value will be separated +125 * by the "=" character. Also, the value will be url-encoded. +126 * +127 * @param key of the parameter. Must not be null or empty +128 * @param value of the parameter. May be null/empty/blank. Will be url-encoded. +129 * @return this, for method chaining +130 */ +131 public ApiPathBuilder param(final String key, final Collection<String> values) { +132 for(final String value: values){ +133 if (StringUtils.isNotBlank(value)) { +134 appendSeparator(); +135 append(key); +136 append("="); +137 append(ParametersUtil.urlEncode(value)); +138 } +139 } +140 return this; +141 } +142 +143 /** +144 * Append multiple values for the given Form field. This will be appended if it is not blank (null, empty +145 * or whitespace). The form field values will only be used for a "post" request +146 * +147 * @param key of the field name. Must not be null or empty +148 * @param values of the field. May be null/empty/blank. Will be url-encoded. +149 * @return this, for method chaining +150 */ +151 public ApiPathBuilder field(final String key, final Collection<String> values) { +152 if (null!=values) { +153 for(final String value: values){ +154 if (StringUtils.isNotBlank(value)) { +155 form.add(new BasicNameValuePair(key, value)); +156 } +157 } +158 } +159 return this; +160 } +161 +162 /** +163 * Append a single value for the given Form field. This will be appended if it is not blank (null, empty +164 * or whitespace). The form field values will only be used for a "post" request +165 * +166 * @param key of the field name. Must not be null or empty +167 * @param value of the field. May be null/empty/blank. Will be url-encoded. +168 * @return this, for method chaining +169 */ +170 public ApiPathBuilder field(final String key, final String value) { +171 if (StringUtils.isNotBlank(value)) { +172 form.add(new BasicNameValuePair(key, value)); +173 } +174 return this; +175 } +176 +177 /** +178 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +179 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. Also, +180 * the value will be converted to lower-case. +181 * +182 * @param key of the parameter. Must not be null or empty +183 * @param value of the parameter. May be null +184 * @return this, for method chaining +185 */ +186 public ApiPathBuilder param(String key, Enum<?> value) { +187 if (value != null) { +188 param(key, StringUtils.lowerCase(value.toString())); +189 } +190 return this; +191 } +192 +193 /** +194 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +195 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +196 * +197 * @param key of the parameter. Must not be null or empty +198 * @param value of the parameter. May be null +199 * @return this, for method chaining +200 */ +201 public ApiPathBuilder param(String key, Date value) { +202 if (value != null) { +203 param(key, value.getTime()); +204 } +205 return this; +206 } +207 +208 /** +209 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +210 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +211 * +212 * @param key of the parameter. Must not be null or empty +213 * @param value of the parameter. May be null +214 * @return this, for method chaining +215 */ +216 public ApiPathBuilder param(String key, Long value) { +217 if (value != null) { +218 param(key, value.toString()); +219 } +220 return this; +221 } +222 +223 /** +224 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +225 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. +226 * +227 * @param key of the parameter. Must not be null or empty +228 * @param value of the parameter. May be null +229 * @return this, for method chaining +230 */ +231 public ApiPathBuilder param(String key, Integer value) { +232 if (value != null) { +233 param(key, value.toString()); +234 } +235 return this; +236 } +237 +238 /** +239 * Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure +240 * to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character. 241 * -242 * @param nodeFilters may be null/empty -243 * @return this, for method chaining -244 * @see ParametersUtil#generateNodeFiltersString(Properties) +242 * @param key of the parameter. Must not be null or empty +243 * @param value of the parameter. May be null +244 * @return this, for method chaining 245 */ -246 public ApiPathBuilder nodeFilters(Properties nodeFilters) { -247 String filters = ParametersUtil.generateNodeFiltersString(nodeFilters); -248 if (StringUtils.isNotBlank(filters)) { -249 appendSeparator(); -250 append(filters); -251 } -252 return this; -253 } -254 -255 /** -256 * When POSTing a request, add the given {@link InputStream} as an attachment to the content of the request. This -257 * will only add the stream if it is not null. -258 * -259 * @param name of the attachment. Must not be null or empty -260 * @param stream. May be null -261 * @return this, for method chaining -262 */ -263 public ApiPathBuilder attach(String name, InputStream stream) { -264 if (stream != null) { -265 attachments.put(name, stream); -266 } -267 return this; -268 } -269 -270 /** -271 * @return all attachments to be POSTed, with their names -272 */ -273 public Map<String, InputStream> getAttachments() { -274 return attachments; -275 } -276 -277 @Override -278 public String toString() { -279 return apiPath.toString(); -280 } -281 -282 /** -283 * Append the given string -284 * -285 * @param str to append -286 */ -287 private void append(String str) { -288 apiPath.append(str); -289 } -290 -291 /** -292 * Append the right separator "?" or "&" between 2 parameters -293 */ -294 private void appendSeparator() { -295 if (firstParamDone) { -296 append("&"); -297 } else { -298 append("?"); -299 firstParamDone = true; -300 } -301 } -302 -303 /** -304 * Form fields for POST request +246 public ApiPathBuilder param(String key, Boolean value) { +247 if (value != null) { +248 param(key, value.toString()); +249 } +250 return this; +251 } +252 +253 /** +254 * Append the given node filters, only if it is not null/empty +255 * +256 * @param nodeFilters may be null/empty +257 * @return this, for method chaining +258 * @see ParametersUtil#generateNodeFiltersString(Properties) +259 */ +260 public ApiPathBuilder nodeFilters(Properties nodeFilters) { +261 String filters = ParametersUtil.generateNodeFiltersString(nodeFilters); +262 if (StringUtils.isNotBlank(filters)) { +263 appendSeparator(); +264 append(filters); +265 } +266 return this; +267 } +268 +269 /** +270 * When POSTing a request, add the given {@link InputStream} as an attachment to the content of the request. This +271 * will only add the stream if it is not null. +272 * +273 * @param name of the attachment. Must not be null or empty +274 * @param stream. May be null +275 * @return this, for method chaining +276 */ +277 public ApiPathBuilder attach(String name, InputStream stream) { +278 if (stream != null) { +279 attachments.put(name, stream); +280 } +281 return this; +282 } +283 /** +284 * When POSTing a request, use the given {@link InputStream} as the content of the request. This +285 * will only add the stream if it is not null. +286 * +287 * @param contentType MIME content type ofr hte request +288 * @param stream content stream +289 * @return this, for method chaining +290 */ +291 public ApiPathBuilder content(final String contentType, final InputStream stream) { +292 if (stream != null && contentType != null) { +293 this.contentStream=stream; +294 this.contentType=contentType; +295 } +296 return this; +297 } +298 /** +299 * When POSTing a request, use the given {@link File} as the content of the request. This +300 * will only add the stream if it is not null. +301 * +302 * @param contentType MIME content type ofr hte request +303 * @param file content from a file +304 * @return this, for method chaining 305 */ -306 public List<NameValuePair> getForm() { -307 return form; -308 } -309 -310 /** -311 * Return true if there are any Attachments or Form data for a POST request. -312 */ -313 public boolean hasPostContent() { -314 return getAttachments().size() > 0 || getForm().size() > 0; -315 } -316 -317 /** -318 * Accept header value, default "text/xml" -319 */ -320 public String getAccept() { -321 return accept; -322 } -323 -324 /** -325 * BuildsParameters can add URL or POST parameters to an {@link ApiPathBuilder} -326 * -327 * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> -328 */ -329 public static interface BuildsParameters { -330 /** -331 * Add the parameters or form fields to the ApiPathBuilder -332 * -333 * @param builder the builder -334 * @param doPost if true, use form fields, otherwise use query parameters -335 */ -336 public boolean buildParameters(ApiPathBuilder builder, boolean doPost); -337 } -338 } +306 public ApiPathBuilder content(final String contentType, final File file) { +307 if (file != null && contentType != null) { +308 this.contentFile=file; +309 this.contentType=contentType; +310 } +311 return this; +312 } +313 /** +314 * When POSTing a request, send an empty request. +315 * +316 * @return this, for method chaining +317 */ +318 public ApiPathBuilder emptyContent() { +319 this.emptyContent=true; +320 return this; +321 } +322 /** +323 * When POSTing a request, add the given XMl Document as the content of the request. +324 * +325 * @param document XMl document to send +326 * @return this, for method chaining +327 */ +328 public ApiPathBuilder xml(final Document document) { +329 if (document != null) { +330 xmlDocument = document; +331 } +332 return this; +333 } +334 /** +335 * When POSTing a request, add the given XMl Document as the content of the request. +336 * +337 * @param document XMl document to send +338 * @return this, for method chaining +339 */ +340 public ApiPathBuilder xml(final XmlDocumentGenerator document) { +341 if (document != null) { +342 xmlDocument = document.generateXmlDocument(); +343 } +344 return this; +345 } +346 +347 /** +348 * @return all attachments to be POSTed, with their names +349 */ +350 public Map<String, InputStream> getAttachments() { +351 return attachments; +352 } +353 +354 @Override +355 public String toString() { +356 return apiPath.toString(); +357 } +358 +359 /** +360 * Append the given string +361 * +362 * @param str to append +363 */ +364 private void append(String str) { +365 apiPath.append(str); +366 } +367 +368 /** +369 * Append the right separator "?" or "&" between 2 parameters +370 */ +371 private void appendSeparator() { +372 if (firstParamDone) { +373 append("&"); +374 } else { +375 append("?"); +376 firstParamDone = true; +377 } +378 } +379 +380 /** +381 * Form fields for POST request +382 */ +383 public List<NameValuePair> getForm() { +384 return form; +385 } +386 +387 /** +388 * Return true if there are any Attachments or Form data for a POST request. +389 */ +390 public boolean hasPostContent() { +391 return getAttachments().size() > 0 || getForm().size() > 0 || null != xmlDocument; +392 } +393 +394 /** +395 * Accept header value, default "text/xml" +396 */ +397 public String getAccept() { +398 return accept; +399 } +400 +401 public Document getXmlDocument() { +402 return xmlDocument; +403 } +404 +405 public InputStream getContentStream() { +406 return contentStream; +407 } +408 +409 public String getContentType() { +410 return contentType; +411 } +412 +413 public File getContentFile() { +414 return contentFile; +415 } +416 +417 public boolean isEmptyContent() { +418 return emptyContent; +419 } +420 +421 public ApiPathBuilder requireContentType(String contentType) { +422 this.requiredContentType=contentType; +423 return this; +424 } +425 +426 public String getRequiredContentType() { +427 return requiredContentType; +428 } +429 +430 /** +431 * BuildsParameters can add URL or POST parameters to an {@link ApiPathBuilder} +432 * +433 * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> +434 */ +435 public static interface BuildsParameters { +436 /** +437 * Add the parameters or form fields to the ApiPathBuilder +438 * +439 * @param builder the builder +440 * @param doPost if true, use form fields, otherwise use query parameters +441 */ +442 public boolean buildParameters(ApiPathBuilder builder, boolean doPost); +443 } +444 }
    diff --git a/xref/org/rundeck/api/RundeckApiException.html b/xref/org/rundeck/api/RundeckApiException.html index 3854f5a..260ea86 100644 --- a/xref/org/rundeck/api/RundeckApiException.html +++ b/xref/org/rundeck/api/RundeckApiException.html @@ -92,8 +92,68 @@ 82 super(message, cause); 83 } 84 } -85 -86 } +85 /** +86 * Error due to unexpected HTTP status +87 */ +88 public static class RundeckApiHttpStatusException extends RundeckApiAuthException { +89 +90 private static final long serialVersionUID = 1L; +91 private int statusCode; +92 +93 public RundeckApiHttpStatusException(String message, int statusCode) { +94 super(message); +95 this.statusCode = statusCode; +96 } +97 +98 public RundeckApiHttpStatusException(String message, Throwable cause, int statusCode) { +99 super(message, cause); +100 this.statusCode = statusCode; +101 } +102 +103 public int getStatusCode() { +104 return statusCode; +105 } +106 } +107 +108 /** +109 * Error due to unexpected HTTP content-type +110 */ +111 public static class RundeckApiHttpContentTypeException extends RundeckApiAuthException { +112 +113 private static final long serialVersionUID = 1L; +114 private String contentType; +115 private String requiredContentType; +116 +117 public RundeckApiHttpContentTypeException(final String contentType, +118 final String requiredContentType) { +119 super("Unexpected content-type: '" + contentType + "', expected: '" + requiredContentType + "'"); +120 this.contentType = contentType; +121 this.requiredContentType = requiredContentType; +122 } +123 public RundeckApiHttpContentTypeException(final String message, final String contentType, +124 final String requiredContentType) { +125 super(message); +126 this.contentType = contentType; +127 this.requiredContentType = requiredContentType; +128 } +129 +130 public RundeckApiHttpContentTypeException(final String message, final Throwable cause, final String contentType, +131 final String requiredContentType) { +132 super(message, cause); +133 this.contentType = contentType; +134 this.requiredContentType = requiredContentType; +135 } +136 +137 public String getContentType() { +138 return contentType; +139 } +140 +141 public String getRequiredContentType() { +142 return requiredContentType; +143 } +144 } +145 +146 }
    diff --git a/xref/org/rundeck/api/RundeckClient.html b/xref/org/rundeck/api/RundeckClient.html index 1c15c37..5389546 100644 --- a/xref/org/rundeck/api/RundeckClient.html +++ b/xref/org/rundeck/api/RundeckClient.html @@ -28,83 +28,83 @@ 18 import org.apache.commons.io.FileUtils; 19 import org.apache.commons.io.IOUtils; 20 import org.apache.commons.lang.StringUtils; -21 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; -22 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; -23 import org.rundeck.api.domain.*; -24 import org.rundeck.api.domain.RundeckExecution.ExecutionStatus; -25 import org.rundeck.api.parser.*; -26 import org.rundeck.api.query.ExecutionQuery; -27 import org.rundeck.api.util.AssertUtil; -28 import org.rundeck.api.util.PagedResults; -29 import org.rundeck.api.util.ParametersUtil; -30 -31 import java.io.File; -32 import java.io.FileInputStream; -33 import java.io.IOException; -34 import java.io.InputStream; -35 import java.io.Serializable; -36 import java.util.ArrayList; -37 import java.util.Date; -38 import java.util.List; -39 import java.util.Properties; -40 import java.util.concurrent.TimeUnit; -41 -42 /** -43 * Rundeck API client. -44 * <p> -45 * There are three methods for authentication : login-based or token-based or session-based. -46 * Login authentication requires -47 * both a "login" and a "password". Token-based requires a "token" (also called "auth-token"). See the RunDeck -48 * documentation for generating such a token.</p> +21 import org.dom4j.Document; +22 import org.rundeck.api.RundeckApiException.RundeckApiLoginException; +23 import org.rundeck.api.RundeckApiException.RundeckApiTokenException; +24 import org.rundeck.api.domain.*; +25 import org.rundeck.api.domain.RundeckExecution.ExecutionStatus; +26 import org.rundeck.api.generator.ProjectConfigGenerator; +27 import org.rundeck.api.generator.ProjectConfigPropertyGenerator; +28 import org.rundeck.api.generator.ProjectGenerator; +29 import org.rundeck.api.parser.*; +30 import org.rundeck.api.query.ExecutionQuery; +31 import org.rundeck.api.util.AssertUtil; +32 import org.rundeck.api.util.PagedResults; +33 import org.rundeck.api.util.ParametersUtil; +34 +35 import java.io.*; +36 import java.util.*; +37 import java.util.concurrent.TimeUnit; +38 +39 /** +40 * Rundeck API client. +41 * <p> +42 * There are three methods for authentication : login-based or token-based or session-based. +43 * Login authentication requires +44 * both a "login" and a "password". Token-based requires a "token" (also called "auth-token"). See the RunDeck +45 * documentation for generating such a token.</p> +46 * <p> +47 * Session-based authentication allows re-use of a previous login session. See {@link #testAuth()}. +48 * </p> 49 * <p> -50 * Session-based authentication allows re-use of a previous login session. See {@link #testAuth()}. +50 * Deprecation notice: All public constructors for this class are deprecated. Use the {@link RundeckClientBuilder} or {@link #builder()} convenience method to create a RundeckClient. The public constructors will be made non-public in version 12 of this library. 51 * </p> -52 * <p> -53 * Deprecation notice: All public constructors for this class are deprecated. Use the {@link RundeckClientBuilder} or {@link #builder()} convenience method to create a RundeckClient. The public constructors will be made non-public in version 12 of this library. -54 * </p> -55 * <br> -56 * Usage : <br> -57 * <code> -58 * <pre> -59 * // using login-based authentication : -60 * RundeckClient rundeck = RundeckClient.builder() -61 * .url("http://localhost:4440") -62 * .login("admin", "admin").build(); -63 * // or for a token-based authentication : -64 * RundeckClient rundeck = RundeckClient.builder() -65 * .url("http://localhost:4440") -66 * .token("PDDNKo5VE29kpk4prOUDr2rsKdRkEvsD").build(); -67 * -68 * List&lt;RundeckProject&gt; projects = rundeck.getProjects(); -69 * -70 * RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name"); -71 * RundeckExecution execution = rundeck.triggerJob(job.getId(), -72 * new OptionsBuilder().addOption("version", "1.2.0").toProperties()); -73 * -74 * List&lt;RundeckExecution&gt; runningExecutions = rundeck.getRunningExecutions("my-project"); -75 * -76 * rundeck.exportJobsToFile("/tmp/jobs.xml", FileType.XML, "my-project"); -77 * rundeck.importJobs("/tmp/jobs.xml", FileType.XML); -78 * </pre> -79 * </code> -80 * -81 * @author Vincent Behar -82 */ -83 public class RundeckClient implements Serializable { -84 -85 private static final long serialVersionUID = 1L; -86 public static final String JOBS_IMPORT = "/jobs/import"; -87 -88 /** -89 * Supported version numbers -90 */ -91 public static enum Version { -92 V5(5), -93 V6(6), -94 V7(7), -95 V8(8), -96 V9(9), -97 V10(10), +52 * <br> +53 * Usage : <br> +54 * <code> +55 * <pre> +56 * // using login-based authentication : +57 * RundeckClient rundeck = RundeckClient.builder() +58 * .url("http://localhost:4440") +59 * .login("admin", "admin").build(); +60 * // or for a token-based authentication : +61 * RundeckClient rundeck = RundeckClient.builder() +62 * .url("http://localhost:4440") +63 * .token("PDDNKo5VE29kpk4prOUDr2rsKdRkEvsD").build(); +64 * +65 * List&lt;RundeckProject&gt; projects = rundeck.getProjects(); +66 * +67 * RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name"); +68 * RundeckExecution execution = rundeck.triggerJob(job.getId(), +69 * new OptionsBuilder().addOption("version", "1.2.0").toProperties()); +70 * +71 * List&lt;RundeckExecution&gt; runningExecutions = rundeck.getRunningExecutions("my-project"); +72 * +73 * rundeck.exportJobsToFile("/tmp/jobs.xml", FileType.XML, "my-project"); +74 * rundeck.importJobs("/tmp/jobs.xml", FileType.XML); +75 * </pre> +76 * </code> +77 * +78 * @author Vincent Behar +79 */ +80 public class RundeckClient implements Serializable { +81 +82 private static final long serialVersionUID = 1L; +83 public static final String JOBS_IMPORT = "/jobs/import"; +84 public static final String STORAGE_ROOT_PATH = "/storage/"; +85 public static final String STORAGE_KEYS_PATH = "keys/"; +86 +87 /** +88 * Supported version numbers +89 */ +90 public static enum Version { +91 V5(5), +92 V6(6), +93 V7(7), +94 V8(8), +95 V9(9), +96 V10(10), +97 V11(11), 98 ; 99 100 private int versionNumber; @@ -118,7 +118,7 @@ 108 } 109 } 110 /** Version of the API supported */ -111 public static final transient int API_VERSION = Version.V10.getVersionNumber(); +111 public static final transient int API_VERSION = Version.V11.getVersionNumber(); 112 113 private static final String API = "/api/"; 114 @@ -284,1850 +284,2331 @@ 274 testAuth(); 275 } 276 -277 /* -278 * Projects -279 */ -280 -281 /** -282 * List all projects -283 * -284 * @return a {@link List} of {@link RundeckProject} : might be empty, but won't be null -285 * @throws RundeckApiException in case of error when calling the API -286 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -287 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -288 */ -289 public List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiLoginException, -290 RundeckApiTokenException { -291 return new ApiCall(this).get(new ApiPathBuilder("/projects"), -292 new ListParser<RundeckProject>(new ProjectParser(), "result/projects/project")); -293 } -294 -295 /** -296 * Get the definition of a single project, identified by the given name -297 * -298 * @param projectName name of the project - mandatory -299 * @return a {@link RundeckProject} instance - won't be null -300 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -301 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -302 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -303 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +277 /** +278 * Return root xpath for xml api results. for v11 and later it is empty, for earlier it is "result" +279 * +280 * @return +281 */ +282 private String rootXpath() { +283 return getApiVersion() < Version.V11.getVersionNumber() ? "result" : ""; +284 } +285 /* +286 * Projects +287 */ +288 +289 private ProjectParser createProjectParser() { +290 return createProjectParser(null); +291 } +292 +293 private ProjectParser createProjectParser(final String xpath) { +294 return new ProjectParserV11(xpath); +295 } +296 +297 /** +298 * List all projects +299 * +300 * @return a {@link List} of {@link RundeckProject} : might be empty, but won't be null +301 * @throws RundeckApiException in case of error when calling the API +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 */ -305 public RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiLoginException, -306 RundeckApiTokenException, IllegalArgumentException { -307 AssertUtil.notBlank(projectName, "projectName is mandatory to get the details of a project !"); -308 return new ApiCall(this).get(new ApiPathBuilder("/project/", projectName), -309 new ProjectParser("result/projects/project")); +305 public List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiLoginException, +306 RundeckApiTokenException { +307 return new ApiCall(this).get(new ApiPathBuilder("/projects"), +308 new ListParser<RundeckProject>(createProjectParser(), rootXpath() + +309 "/projects/project")); 310 } 311 -312 /* -313 * Jobs -314 */ -315 -316 /** -317 * List all jobs (for all projects) -318 * -319 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null -320 * @throws RundeckApiException in case of error when calling the API -321 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -322 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -323 */ -324 public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { -325 List<RundeckJob> jobs = new ArrayList<RundeckJob>(); -326 for (RundeckProject project : getProjects()) { -327 jobs.addAll(getJobs(project.getName())); -328 } -329 return jobs; -330 } -331 -332 /** -333 * List all jobs that belongs to the given project -334 * -335 * @param project name of the project - mandatory -336 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null -337 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -338 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -339 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -340 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -341 * @see #getJobs(String, String, String, String...) -342 */ -343 public List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiLoginException, -344 RundeckApiTokenException, IllegalArgumentException { -345 return getJobs(project, null, null, new String[0]); -346 } -347 -348 /** -349 * List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) -350 * -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 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null -356 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -357 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -358 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -359 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -360 * @see #getJobs(String) -361 */ -362 public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds) -363 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -364 AssertUtil.notBlank(project, "project is mandatory to get all jobs !"); -365 return new ApiCall(this).get(new ApiPathBuilder("/jobs").param("project", project) -366 .param("jobFilter", jobFilter) -367 .param("groupPath", groupPath) -368 .param("idlist", StringUtils.join(jobIds, ",")), -369 new ListParser<RundeckJob>(new JobParser(), "result/jobs/job")); -370 } -371 -372 /** -373 * Export the definitions of all jobs that belongs to the given project -374 * -375 * @param filename path of the file where the content should be saved - mandatory -376 * @param format of the export. See {@link FileType} - mandatory -377 * @param project name of the project - mandatory -378 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -379 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -380 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -381 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is -382 * invalid -383 * @throws IOException if we failed to write to the file -384 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -385 * @see #exportJobs(String, String) -386 */ -387 public void exportJobsToFile(String filename, String format, String project) throws RundeckApiException, -388 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -389 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -390 exportJobsToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), project); -391 } -392 -393 /** -394 * Export the definitions of all jobs that belongs to the given project -395 * -396 * @param filename path of the file where the content should be saved - mandatory -397 * @param format of the export. See {@link FileType} - mandatory -398 * @param project name of the project - mandatory -399 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -400 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -401 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -402 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null -403 * @throws IOException if we failed to write to the file -404 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -405 * @see #exportJobs(FileType, String) -406 */ -407 public void exportJobsToFile(String filename, FileType format, String project) throws RundeckApiException, -408 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -409 exportJobsToFile(filename, format, project, null, null, new String[0]); -410 } -411 -412 /** -413 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -414 * groupPath and jobIds) -415 * -416 * @param filename path of the file where the content should be saved - mandatory -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 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -423 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -424 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -425 * @throws IllegalArgumentException if the filename, format or project is blank (null, empty or whitespace), or the -426 * format is invalid -427 * @throws IOException if we failed to write to the file -428 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -429 * @see #exportJobs(FileType, String, String, String, String...) -430 */ -431 public void exportJobsToFile(String filename, String format, String project, String jobFilter, String groupPath, -432 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -433 IllegalArgumentException, IOException { -434 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -435 exportJobsToFile(filename, -436 FileType.valueOf(StringUtils.upperCase(format)), -437 project, -438 jobFilter, -439 groupPath, -440 jobIds); -441 } -442 -443 /** -444 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -445 * groupPath and jobIds) -446 * -447 * @param filename path of the file where the content should be saved - mandatory -448 * @param format of the export. See {@link FileType} - mandatory -449 * @param project name of the project - mandatory -450 * @param jobFilter a filter for the job Name - optional -451 * @param groupPath a group or partial group path to include all jobs within that group path - optional -452 * @param jobIds a list of Job IDs to include - optional -453 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -454 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -455 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -456 * @throws IllegalArgumentException if the filename or project is blank (null, empty or whitespace), or the format -457 * is null -458 * @throws IOException if we failed to write to the file -459 * @see #exportJobs(FileType, String, String, String, String...) -460 */ -461 public void exportJobsToFile(String filename, FileType format, String project, String jobFilter, String groupPath, -462 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -463 IllegalArgumentException, IOException { -464 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); -465 InputStream inputStream = exportJobs(format, project, jobFilter, groupPath, jobIds); -466 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); -467 } -468 -469 /** -470 * Export the definitions of all jobs that belongs to the given project -471 * -472 * @param format of the export. See {@link FileType} - mandatory -473 * @param project name of the project - mandatory -474 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -475 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -476 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -477 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -478 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is -479 * invalid -480 * @see #exportJobs(FileType, String, String, String, String...) -481 * @see #exportJobsToFile(String, String, String) -482 */ -483 public InputStream exportJobs(String format, String project) throws RundeckApiException, RundeckApiLoginException, -484 RundeckApiTokenException, IllegalArgumentException { -485 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -486 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project); -487 } -488 -489 /** -490 * Export the definitions of all jobs that belongs to the given project -491 * -492 * @param format of the export. See {@link FileType} - mandatory -493 * @param project name of the project - mandatory -494 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -495 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -496 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -497 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -498 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null -499 * @see #exportJobs(FileType, String, String, String, String...) -500 * @see #exportJobsToFile(String, FileType, String) -501 */ -502 public InputStream exportJobs(FileType format, String project) throws RundeckApiException, -503 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -504 return exportJobs(format, project, null, null, new String[0]); -505 } -506 -507 /** -508 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -509 * groupPath and jobIds) -510 * -511 * @param format of the export. See {@link FileType} - mandatory -512 * @param project name of the project - mandatory -513 * @param jobFilter a filter for the job Name - optional -514 * @param groupPath a group or partial group path to include all jobs within that group path - optional -515 * @param jobIds a list of Job IDs to include - optional -516 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -517 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -518 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -519 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -520 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is -521 * invalid -522 * @see #exportJobs(FileType, String, String, String, String...) -523 * @see #exportJobsToFile(String, String, String, String, String, String...) +312 /** +313 * Get the definition of a single project, identified by the given name +314 * +315 * @param projectName name of the project - mandatory +316 * @return a {@link RundeckProject} instance - won't be null +317 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +318 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +319 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +320 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +321 */ +322 public RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiLoginException, +323 RundeckApiTokenException, IllegalArgumentException { +324 AssertUtil.notBlank(projectName, "projectName is mandatory to get the details of a project !"); +325 return new ApiCall(this).get(new ApiPathBuilder("/project/", projectName), +326 createProjectParser(rootXpath() + +327 (getApiVersion() < Version.V11.getVersionNumber() +328 ? "/projects/project" +329 : "/project" +330 ))); +331 } +332 +333 /** +334 * Create a new project, and return the new definition +335 * +336 * @param projectName name of the project - mandatory +337 * @param configuration project configuration properties +338 * +339 * @return a {@link RundeckProject} instance - won't be null +340 * +341 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +342 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +343 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +344 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +345 */ +346 public RundeckProject createProject(String projectName, Map<String, String> configuration) throws +347 RundeckApiException, RundeckApiLoginException, +348 RundeckApiTokenException, IllegalArgumentException { +349 +350 AssertUtil.notBlank(projectName, "projectName is mandatory to create a project !"); +351 return new ApiCall(this) +352 .post(new ApiPathBuilder("/projects").xml( +353 projectDocument(projectName, configuration) +354 ), createProjectParser(rootXpath() + +355 (getApiVersion() < Version.V11.getVersionNumber() +356 ? "/projects/project" +357 : "/project" +358 ))); +359 } +360 /** +361 * Delete a project +362 * +363 * @param projectName name of the project - mandatory +364 * +365 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +366 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +367 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +368 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +369 */ +370 public void deleteProject(String projectName) throws +371 RundeckApiException, RundeckApiLoginException, +372 RundeckApiTokenException, IllegalArgumentException { +373 +374 AssertUtil.notBlank(projectName, "projectName is mandatory to create a project !"); +375 new ApiCall(this).delete(new ApiPathBuilder("/project/", projectName)); +376 } +377 /** +378 * Convenience method to export the archive of a project to the specified file. +379 * +380 * @param projectName name of the project - mandatory +381 * @param out file to write to +382 * @return number of bytes written to the stream +383 * +384 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +385 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +386 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +387 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +388 */ +389 public int exportProject(final String projectName, final File out) throws +390 RundeckApiException, RundeckApiLoginException, +391 RundeckApiTokenException, IllegalArgumentException, IOException { +392 final FileOutputStream fileOutputStream = new FileOutputStream(out); +393 try { +394 return exportProject(projectName, fileOutputStream); +395 }finally { +396 fileOutputStream.close(); +397 } +398 } +399 /** +400 * Export the archive of a project to the specified outputstream +401 * +402 * @param projectName name of the project - mandatory +403 * @return number of bytes written to the stream +404 * +405 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +406 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +407 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +408 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +409 */ +410 public int exportProject(String projectName, OutputStream out) throws +411 RundeckApiException, RundeckApiLoginException, +412 RundeckApiTokenException, IllegalArgumentException, IOException { +413 +414 AssertUtil.notBlank(projectName, "projectName is mandatory to export a project archive!"); +415 return new ApiCall(this).get( +416 new ApiPathBuilder("/project/", projectName, "/export") +417 .accept("application/zip"), +418 out); +419 } +420 +421 /** +422 * Import a archive file to the specified project. +423 * +424 * @param projectName name of the project - mandatory +425 * @param archiveFile zip archive file +426 * @param includeExecutions if true, import executions defined in the archive, otherwise skip them +427 * @param preserveJobUuids if true, do not remove UUIDs from imported jobs, otherwise remove them +428 * +429 * @return Result of the import request, may contain a list of import error messages +430 * +431 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +432 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +433 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +434 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +435 */ +436 public ArchiveImport importArchive(final String projectName, final File archiveFile, +437 final boolean includeExecutions, final boolean preserveJobUuids) throws +438 RundeckApiException, RundeckApiLoginException, +439 RundeckApiTokenException, IllegalArgumentException, IOException { +440 +441 AssertUtil.notBlank(projectName, "projectName is mandatory to import a project archive!"); +442 AssertUtil.notNull(archiveFile, "archiveFile is mandatory to import a project archive!"); ; +443 return callImportProject(projectName, includeExecutions, preserveJobUuids, +444 new ApiPathBuilder().content("application/zip", archiveFile)); +445 } +446 +447 private ArchiveImport callImportProject(final String projectName, final boolean includeExecutions, final boolean preserveJobUuids, +448 final ApiPathBuilder param) { +449 param.paths("/project/", projectName, "/import") +450 .param("importExecutions", includeExecutions) +451 .param("jobUuidOption", preserveJobUuids ? "preserve" : "remove"); +452 return new ApiCall(this).put( +453 param, +454 new ArchiveImportParser() +455 ); +456 } +457 +458 /** +459 * Return the configuration of a project +460 * +461 * @param projectName name of the project - mandatory +462 * +463 * @return a {@link ProjectConfig} instance - won't be null +464 * +465 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +466 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +467 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +468 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +469 */ +470 public ProjectConfig getProjectConfig(String projectName) throws +471 RundeckApiException, RundeckApiLoginException, +472 RundeckApiTokenException, IllegalArgumentException { +473 +474 AssertUtil.notBlank(projectName, "projectName is mandatory to get the config of a project !"); +475 return new ApiCall(this) +476 .get(new ApiPathBuilder("/project/", projectName, "/config"), new ProjectConfigParser("/config")); +477 } +478 /** +479 * Get a single project configuration key +480 * +481 * @param projectName name of the project - mandatory +482 * @param key name of the configuration key +483 * +484 * @return value, or null if the value is not set +485 * +486 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +487 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +488 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +489 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +490 */ +491 public String getProjectConfig(final String projectName, final String key) throws +492 RundeckApiException, RundeckApiLoginException, +493 RundeckApiTokenException, IllegalArgumentException { +494 +495 AssertUtil.notBlank(projectName, "projectName is mandatory to get the config of a project !"); +496 AssertUtil.notBlank(key, "key is mandatory to get the config key value!"); +497 +498 ConfigProperty configProperty = null; +499 try { +500 configProperty = new ApiCall(this) +501 .get(new ApiPathBuilder("/project/", projectName, "/config/", key), +502 new ProjectConfigPropertyParser("/property")); +503 } catch (RundeckApiException.RundeckApiHttpStatusException e) { +504 if(404==e.getStatusCode()){ +505 return null; +506 } +507 throw e; +508 } +509 return configProperty.getValue(); +510 } +511 /** +512 * Set a single project configuration property value +513 * +514 * @param projectName name of the project - mandatory +515 * @param key name of the configuration property +516 * @param value value of the property +517 * +518 * @return new value +519 * +520 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +521 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +522 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +523 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) 524 */ -525 public InputStream exportJobs(String format, String project, String jobFilter, String groupPath, String... jobIds) -526 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -527 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); -528 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project, jobFilter, groupPath, jobIds); -529 } -530 -531 /** -532 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, -533 * groupPath and jobIds) -534 * -535 * @param format of the export. See {@link FileType} - mandatory -536 * @param project name of the project - mandatory -537 * @param jobFilter a filter for the job Name - optional -538 * @param groupPath a group or partial group path to include all jobs within that group path - optional -539 * @param jobIds a list of Job IDs to include - optional -540 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -541 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -542 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -543 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -544 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null -545 * @see #exportJobsToFile(String, FileType, String, String, String, String...) -546 */ -547 public InputStream exportJobs(FileType format, String project, String jobFilter, String groupPath, String... jobIds) -548 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -549 AssertUtil.notNull(format, "format is mandatory to export jobs !"); -550 AssertUtil.notBlank(project, "project is mandatory to export jobs !"); -551 return new ApiCall(this).get(new ApiPathBuilder("/jobs/export") -552 .accept(format == FileType.XML ? "text/xml" : "text/yaml") -553 .param("format", format) -554 .param("project", project) -555 .param("jobFilter", jobFilter) -556 .param("groupPath", groupPath) -557 .param("idlist", StringUtils.join(jobIds, ","))); -558 } -559 -560 /** -561 * Export the definition of a single job (identified by the given ID) -562 * -563 * @param filename path of the file where the content should be saved - mandatory -564 * @param format of the export. See {@link FileType} - mandatory -565 * @param jobId identifier of the job - mandatory -566 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -567 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -568 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -569 * @throws IllegalArgumentException if the filename, format or jobId is blank (null, empty or whitespace), or the -570 * format is invalid -571 * @throws IOException if we failed to write to the file -572 * @see #exportJobToFile(String, FileType, String) -573 * @see #exportJob(String, String) -574 * @see #getJob(String) +525 public String setProjectConfig(final String projectName, final String key, final String value) throws +526 RundeckApiException, RundeckApiLoginException, +527 RundeckApiTokenException, IllegalArgumentException { +528 +529 AssertUtil.notBlank(projectName, "projectName is mandatory to set the config of a project !"); +530 AssertUtil.notBlank(key, "key is mandatory to set the config key value!"); +531 AssertUtil.notBlank(value, "value is mandatory to set the config key value!"); +532 +533 final ConfigProperty configProperty = new ApiCall(this) +534 .put(new ApiPathBuilder("/project/", projectName, "/config/", key) +535 .xml(new ProjectConfigPropertyGenerator(new ConfigProperty(key, value))), +536 new ProjectConfigPropertyParser("/property")); +537 +538 return configProperty.getValue(); +539 } +540 /** +541 * Set a single project configuration property value +542 * +543 * @param projectName name of the project - mandatory +544 * @param key name of the configuration property +545 * @param value value of the property +546 * +547 * @return new value +548 * +549 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +550 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +551 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +552 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace) +553 */ +554 public void deleteProjectConfig(final String projectName, final String key) throws +555 RundeckApiException, RundeckApiLoginException, +556 RundeckApiTokenException, IllegalArgumentException { +557 +558 AssertUtil.notBlank(projectName, "projectName is mandatory to set the config of a project !"); +559 AssertUtil.notBlank(key, "key is mandatory to set the config key value!"); +560 +561 new ApiCall(this).delete(new ApiPathBuilder("/project/", projectName, "/config/", +562 key).accept("application/xml")); +563 } +564 /** +565 * Return the configuration of a project +566 * +567 * @param projectName name of the project - mandatory +568 * +569 * @return a {@link ProjectConfig} instance - won't be null +570 * +571 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +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 projectName is blank (null, empty or whitespace) 575 */ -576 public void exportJobToFile(String filename, String format, String jobId) throws RundeckApiException, -577 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -578 AssertUtil.notBlank(format, "format is mandatory to export a job !"); -579 exportJobToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), jobId); -580 } -581 -582 /** -583 * Export the definition of a single job (identified by the given ID) -584 * -585 * @param filename path of the file where the content should be saved - mandatory -586 * @param format of the export. See {@link FileType} - mandatory -587 * @param jobId identifier of the job - mandatory -588 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -589 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -590 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -591 * @throws IllegalArgumentException if the filename or jobId is blank (null, empty or whitespace), or the format is -592 * null -593 * @throws IOException if we failed to write to the file -594 * @see #exportJob(FileType, String) -595 * @see #getJob(String) -596 */ -597 public void exportJobToFile(String filename, FileType format, String jobId) throws RundeckApiException, -598 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -599 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); -600 InputStream inputStream = exportJob(format, jobId); -601 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); -602 } -603 -604 /** -605 * Export the definition of a single job, identified by the given ID -606 * -607 * @param format of the export. See {@link FileType} - mandatory -608 * @param jobId identifier of the job - mandatory -609 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -610 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -611 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -612 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -613 * @throws IllegalArgumentException if the format or jobId is blank (null, empty or whitespace), or the format is -614 * invalid -615 * @see #exportJobToFile(String, String, String) -616 * @see #getJob(String) -617 */ -618 public InputStream exportJob(String format, String jobId) throws RundeckApiException, RundeckApiLoginException, -619 RundeckApiTokenException, IllegalArgumentException { -620 AssertUtil.notBlank(format, "format is mandatory to export a job !"); -621 return exportJob(FileType.valueOf(StringUtils.upperCase(format)), jobId); -622 } -623 -624 /** -625 * Export the definition of a single job, identified by the given ID -626 * -627 * @param format of the export. See {@link FileType} - mandatory -628 * @param jobId identifier of the job - mandatory -629 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -630 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -631 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -632 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -633 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the format is null -634 * @see #exportJobToFile(String, FileType, String) -635 * @see #getJob(String) -636 */ -637 public InputStream exportJob(FileType format, String jobId) throws RundeckApiException, RundeckApiLoginException, -638 RundeckApiTokenException, IllegalArgumentException { -639 AssertUtil.notNull(format, "format is mandatory to export a job !"); -640 AssertUtil.notBlank(jobId, "jobId is mandatory to export a job !"); -641 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId).param("format", format)); -642 } -643 -644 -645 /** -646 * Import the definitions of jobs, from the given input stream, using the given behavior -647 * -648 * @param rundeckJobsImport import request, see {@link RundeckJobsImportBuilder} -649 * -650 * @return a {@link RundeckJobsImportResult} instance - won't be null -651 * -652 * @throws RundeckApiException in case of error when calling the API -653 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -654 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -655 * @throws IllegalArgumentException if the stream or fileType is null -656 * @see #importJobs(String, FileType, RundeckJobsImportMethod) -657 */ -658 public RundeckJobsImportResult importJobs(final String filename,final RundeckJobsImport rundeckJobsImport) throws RundeckApiException, -659 RundeckApiLoginException, -660 RundeckApiTokenException, IllegalArgumentException, IOException { -661 AssertUtil.notBlank(filename, "filename (of jobs file) is mandatory to import jobs !"); -662 FileInputStream stream = null; -663 try { -664 stream = FileUtils.openInputStream(new File(filename)); -665 return importJobs(RundeckJobsImportBuilder.builder(rundeckJobsImport).setStream(stream).build()); -666 } finally { -667 -668 IOUtils.closeQuietly(stream); -669 } -670 } -671 /** -672 * Import the definitions of jobs, from the given input stream, using the given behavior -673 * -674 * @param rundeckJobsImport import request, see {@link RundeckJobsImportBuilder} -675 * -676 * @return a {@link RundeckJobsImportResult} instance - won't be null -677 * -678 * @throws RundeckApiException in case of error when calling the API -679 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -680 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -681 * @throws IllegalArgumentException if the stream or fileType is null -682 * @see #importJobs(String, FileType, RundeckJobsImportMethod) -683 */ -684 public RundeckJobsImportResult importJobs(final RundeckJobsImport rundeckJobsImport) throws RundeckApiException, -685 RundeckApiLoginException, -686 RundeckApiTokenException, IllegalArgumentException { -687 -688 AssertUtil.notNull(rundeckJobsImport.getStream(), "inputStream of jobs is mandatory to import jobs !"); -689 AssertUtil.notNull(rundeckJobsImport.getFileType(), "fileType is mandatory to import jobs !"); -690 final ApiPathBuilder request = new ApiPathBuilder(JOBS_IMPORT) -691 .param("format", rundeckJobsImport.getFileType()) -692 .param("dupeOption", rundeckJobsImport.getImportMethod()) -693 .attach("xmlBatch", rundeckJobsImport.getStream()); -694 if(null!=rundeckJobsImport.getUuidImportBehavior()) { -695 //API v9 -696 request.param("uuidOption", rundeckJobsImport.getUuidImportBehavior()); -697 } -698 if(null!=rundeckJobsImport.getProject()) { -699 //API v8 -700 request.param("project", rundeckJobsImport.getProject()); -701 } -702 return new ApiCall(this).post(request, new JobsImportResultParser("result")); -703 } -704 -705 /** -706 * Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not -707 * need to belong to a group (either pass null, or an empty string). -708 * -709 * @param project name of the project - mandatory -710 * @param groupPath group to which the job belongs (if it belongs to a group) - optional -711 * @param name of the job to find - mandatory -712 * @return a {@link RundeckJob} instance - null if not found -713 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -714 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -715 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -716 * @throws IllegalArgumentException if the project or the name is blank (null, empty or whitespace) -717 * @see #getJob(String) -718 */ -719 public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException, -720 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -721 AssertUtil.notBlank(project, "project is mandatory to find a job !"); -722 AssertUtil.notBlank(name, "job name is mandatory to find a job !"); -723 List<RundeckJob> jobs = getJobs(project, name, groupPath, new String[0]); -724 return jobs.isEmpty() ? null : jobs.get(0); +576 public ProjectConfig setProjectConfig(String projectName, Map<String,String> configuration) throws +577 RundeckApiException, RundeckApiLoginException, +578 RundeckApiTokenException, IllegalArgumentException { +579 +580 AssertUtil.notBlank(projectName, "projectName is mandatory to get the config of a project !"); +581 return new ApiCall(this) +582 .put(new ApiPathBuilder("/project/", projectName, "/config") +583 .xml(new ProjectConfigGenerator(new ProjectConfig(configuration))) +584 , new ProjectConfigParser("/config")); +585 } +586 +587 private Document projectDocument(String projectName, Map<String, String> configuration) { +588 RundeckProject project = new RundeckProject(); +589 project.setName(projectName); +590 if (null != configuration) { +591 project.setProjectConfig(new ProjectConfig(configuration)); +592 } +593 return new ProjectGenerator(project).generateXmlDocument(); +594 } +595 +596 /* +597 * Jobs +598 */ +599 +600 /** +601 * List all jobs (for all projects) +602 * +603 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null +604 * @throws RundeckApiException in case of error when calling the API +605 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +606 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +607 */ +608 public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { +609 List<RundeckJob> jobs = new ArrayList<RundeckJob>(); +610 for (RundeckProject project : getProjects()) { +611 jobs.addAll(getJobs(project.getName())); +612 } +613 return jobs; +614 } +615 +616 /** +617 * List all jobs that belongs to the given project +618 * +619 * @param project name of the project - mandatory +620 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null +621 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +622 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +623 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +624 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +625 * @see #getJobs(String, String, String, String...) +626 */ +627 public List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiLoginException, +628 RundeckApiTokenException, IllegalArgumentException { +629 return getJobs(project, null, null, new String[0]); +630 } +631 +632 /** +633 * List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds) +634 * +635 * @param project name of the project - mandatory +636 * @param jobFilter a filter for the job Name - optional +637 * @param groupPath a group or partial group path to include all jobs within that group path - optional +638 * @param jobIds a list of Job IDs to include - optional +639 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null +640 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +641 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +642 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +643 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +644 * @see #getJobs(String) +645 */ +646 public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds) +647 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +648 AssertUtil.notBlank(project, "project is mandatory to get all jobs !"); +649 return new ApiCall(this).get(new ApiPathBuilder("/jobs").param("project", project) +650 .param("jobFilter", jobFilter) +651 .param("groupPath", groupPath) +652 .param("idlist", StringUtils.join(jobIds, ",")), +653 new ListParser<RundeckJob>(new JobParser(), rootXpath()+"/jobs/job")); +654 } +655 +656 /** +657 * Export the definitions of all jobs that belongs to the given project +658 * +659 * @param filename path of the file where the content should be saved - mandatory +660 * @param format of the export. See {@link FileType} - mandatory +661 * @param project name of the project - mandatory +662 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +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 format or project is blank (null, empty or whitespace), or the format is +666 * invalid +667 * @throws IOException if we failed to write to the file +668 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +669 * @see #exportJobs(String, String) +670 */ +671 public void exportJobsToFile(String filename, String format, String project) throws RundeckApiException, +672 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +673 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +674 exportJobsToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), project); +675 } +676 +677 /** +678 * Export the definitions of all jobs that belongs to the given project +679 * +680 * @param filename path of the file where the content should be saved - mandatory +681 * @param format of the export. See {@link FileType} - mandatory +682 * @param project name of the project - mandatory +683 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +684 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +685 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +686 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null +687 * @throws IOException if we failed to write to the file +688 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +689 * @see #exportJobs(FileType, String) +690 */ +691 public void exportJobsToFile(String filename, FileType format, String project) throws RundeckApiException, +692 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +693 exportJobsToFile(filename, format, project, null, null, new String[0]); +694 } +695 +696 /** +697 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +698 * groupPath and jobIds) +699 * +700 * @param filename path of the file where the content should be saved - mandatory +701 * @param format of the export. See {@link FileType} - mandatory +702 * @param project name of the project - mandatory +703 * @param jobFilter a filter for the job Name - optional +704 * @param groupPath a group or partial group path to include all jobs within that group path - optional +705 * @param jobIds a list of Job IDs to include - optional +706 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +707 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +708 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +709 * @throws IllegalArgumentException if the filename, format or project is blank (null, empty or whitespace), or the +710 * format is invalid +711 * @throws IOException if we failed to write to the file +712 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +713 * @see #exportJobs(FileType, String, String, String, String...) +714 */ +715 public void exportJobsToFile(String filename, String format, String project, String jobFilter, String groupPath, +716 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +717 IllegalArgumentException, IOException { +718 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +719 exportJobsToFile(filename, +720 FileType.valueOf(StringUtils.upperCase(format)), +721 project, +722 jobFilter, +723 groupPath, +724 jobIds); 725 } 726 727 /** -728 * Get the definition of a single job, identified by the given ID -729 * -730 * @param jobId identifier of the job - mandatory -731 * @return a {@link RundeckJob} instance - won't be null -732 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -733 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -734 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -735 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -736 * @see #findJob(String, String, String) -737 * @see #exportJob(String, String) -738 */ -739 public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiLoginException, -740 RundeckApiTokenException, IllegalArgumentException { -741 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !"); -742 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId), new JobParser("joblist/job")); -743 } -744 -745 /** -746 * Delete a single job, identified by the given ID -747 * -748 * @param jobId identifier of the job - mandatory -749 * @return the success message (note that in case of error, you'll get an exception) -750 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -751 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -752 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -753 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -754 */ -755 public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException, -756 RundeckApiTokenException, IllegalArgumentException { -757 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !"); -758 return new ApiCall(this).delete(new ApiPathBuilder("/job/", jobId), new StringParser("result/success/message")); -759 } -760 /** -761 * Delete multiple jobs, identified by the given IDs -762 * -763 * @param jobIds List of job IDS -764 * @return the bulk delete result -765 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -766 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -767 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -768 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -769 */ -770 public RundeckJobDeleteBulk deleteJobs(final List<String> jobIds) throws RundeckApiException, RundeckApiLoginException, -771 RundeckApiTokenException, IllegalArgumentException { -772 if (null == jobIds || 0 == jobIds.size()) { -773 throw new IllegalArgumentException("jobIds are mandatory to delete a job"); -774 } -775 return new ApiCall(this).post(new ApiPathBuilder("/jobs/delete").field("ids",jobIds), -776 new BulkDeleteParser("result/deleteJobs")); -777 } -778 -779 /** -780 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the -781 * end of the job execution) -782 * -783 * @param jobRun the RunJob, see {@link RunJobBuilder} -784 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -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 * @see #triggerJob(String) -790 * @see #runJob(String, Properties, Properties) -791 */ -792 public RundeckExecution triggerJob(final RunJob jobRun) -793 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -794 AssertUtil.notBlank(jobRun.getJobId(), "jobId is mandatory to trigger a job !"); -795 ApiPathBuilder apiPath = new ApiPathBuilder("/job/", jobRun.getJobId(), "/run").param("argString", -796 ParametersUtil.generateArgString(jobRun.getOptions())) -797 .nodeFilters(jobRun.getNodeFilters()); -798 if(null!=jobRun.getAsUser()) { -799 apiPath.param("asUser", jobRun.getAsUser()); -800 } -801 return new ApiCall(this).get(apiPath, new ExecutionParser("result/executions/execution")); -802 } -803 -804 -805 /** -806 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. -807 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or -808 * aborted) or is still running. -809 * -810 * @param runJob the RunJob, see {@link RunJobBuilder} -811 * -812 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -813 * -814 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -815 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -816 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -817 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -818 * @see #triggerJob(RunJob) -819 * @see #runJob(RunJob, long, TimeUnit) -820 */ -821 public RundeckExecution runJob(final RunJob runJob) throws RundeckApiException, RundeckApiLoginException, -822 RundeckApiTokenException, IllegalArgumentException { -823 return runJob(runJob, DEFAULT_POOLING_INTERVAL, DEFAULT_POOLING_UNIT); -824 } -825 -826 /** -827 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. -828 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to -829 * know if the execution is finished (or aborted) or is still running. -830 * -831 * @param jobRun the RunJob, see {@link RunJobBuilder} -832 * @param poolingInterval for checking the status of the execution. Must be > 0. -833 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -834 * -835 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -836 * -837 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -838 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -839 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -840 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -841 * @see #triggerJob(RunJob) -842 */ -843 public RundeckExecution runJob(final RunJob jobRun, long poolingInterval, -844 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -845 IllegalArgumentException { -846 -847 if (poolingInterval <= 0) { -848 poolingInterval = DEFAULT_POOLING_INTERVAL; -849 poolingUnit = DEFAULT_POOLING_UNIT; -850 } -851 if (poolingUnit == null) { -852 poolingUnit = DEFAULT_POOLING_UNIT; -853 } -854 -855 RundeckExecution execution = triggerJob(jobRun); -856 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { -857 try { -858 Thread.sleep(poolingUnit.toMillis(poolingInterval)); -859 } catch (InterruptedException e) { -860 break; -861 } -862 execution = getExecution(execution.getId()); -863 } -864 return execution; -865 } -866 -867 /* -868 * Ad-hoc commands -869 */ -870 -871 -872 /** -873 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). -874 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter. -875 * -876 * @param command the RunAdhocCommand. Project and command are mandatory, see {@link RunAdhocCommandBuilder} -877 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -878 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -879 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -880 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -881 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -882 * @see #triggerAdhocCommand(String, String) -883 * @see #runAdhocCommand(String, String, Properties) -884 */ -885 public RundeckExecution triggerAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException, -886 RundeckApiTokenException, IllegalArgumentException { -887 AssertUtil.notBlank(command.getProject(), "project is mandatory to trigger an ad-hoc command !"); -888 AssertUtil.notBlank(command.getCommand(), "command is mandatory to trigger an ad-hoc command !"); -889 ApiPathBuilder apiPath = new ApiPathBuilder("/run/command").param("project", command.getProject()) -890 .param("exec", command.getCommand()) -891 .param("nodeThreadcount", -892 command.getNodeThreadcount()) -893 .param("nodeKeepgoing", -894 command.getNodeKeepgoing()) -895 .nodeFilters(command.getNodeFilters()); -896 if(null!= command.getAsUser()) { -897 apiPath.param("asUser", command.getAsUser()); -898 } -899 RundeckExecution execution = new ApiCall(this).get(apiPath, new ExecutionParser("result/execution")); -900 // the first call just returns the ID of the execution, so we need another call to get a "real" execution -901 return getExecution(execution.getId()); -902 } -903 -904 -905 /** -906 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -907 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -908 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter. -909 * -910 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder} -911 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -912 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -913 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -914 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -915 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -916 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) -917 * @see #triggerAdhocCommand(RunAdhocCommand) -918 */ -919 public RundeckExecution runAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException, -920 RundeckApiTokenException, IllegalArgumentException { -921 return runAdhocCommand(command, -922 DEFAULT_POOLING_INTERVAL, -923 DEFAULT_POOLING_UNIT); -924 } -925 -926 /** -927 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -928 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -929 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the -930 * nodeFilters parameter. +728 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +729 * groupPath and jobIds) +730 * +731 * @param filename path of the file where the content should be saved - mandatory +732 * @param format of the export. See {@link FileType} - mandatory +733 * @param project name of the project - mandatory +734 * @param jobFilter a filter for the job Name - optional +735 * @param groupPath a group or partial group path to include all jobs within that group path - optional +736 * @param jobIds a list of Job IDs to include - optional +737 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +738 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +739 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +740 * @throws IllegalArgumentException if the filename or project is blank (null, empty or whitespace), or the format +741 * is null +742 * @throws IOException if we failed to write to the file +743 * @see #exportJobs(FileType, String, String, String, String...) +744 */ +745 public void exportJobsToFile(String filename, FileType format, String project, String jobFilter, String groupPath, +746 String... jobIds) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +747 IllegalArgumentException, IOException { +748 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); +749 InputStream inputStream = exportJobs(format, project, jobFilter, groupPath, jobIds); +750 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); +751 } +752 +753 /** +754 * Export the definitions of all jobs that belongs to the given project +755 * +756 * @param format of the export. See {@link FileType} - mandatory +757 * @param project name of the project - mandatory +758 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +759 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +760 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +761 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +762 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is +763 * invalid +764 * @see #exportJobs(FileType, String, String, String, String...) +765 * @see #exportJobsToFile(String, String, String) +766 */ +767 public InputStream exportJobs(String format, String project) throws RundeckApiException, RundeckApiLoginException, +768 RundeckApiTokenException, IllegalArgumentException { +769 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +770 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project); +771 } +772 +773 /** +774 * Export the definitions of all jobs that belongs to the given project +775 * +776 * @param format of the export. See {@link FileType} - mandatory +777 * @param project name of the project - mandatory +778 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +779 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +780 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +781 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +782 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null +783 * @see #exportJobs(FileType, String, String, String, String...) +784 * @see #exportJobsToFile(String, FileType, String) +785 */ +786 public InputStream exportJobs(FileType format, String project) throws RundeckApiException, +787 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +788 return exportJobs(format, project, null, null, new String[0]); +789 } +790 +791 /** +792 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +793 * groupPath and jobIds) +794 * +795 * @param format of the export. See {@link FileType} - mandatory +796 * @param project name of the project - mandatory +797 * @param jobFilter a filter for the job Name - optional +798 * @param groupPath a group or partial group path to include all jobs within that group path - optional +799 * @param jobIds a list of Job IDs to include - optional +800 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +801 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +802 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +803 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +804 * @throws IllegalArgumentException if the format or project is blank (null, empty or whitespace), or the format is +805 * invalid +806 * @see #exportJobs(FileType, String, String, String, String...) +807 * @see #exportJobsToFile(String, String, String, String, String, String...) +808 */ +809 public InputStream exportJobs(String format, String project, String jobFilter, String groupPath, String... jobIds) +810 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +811 AssertUtil.notBlank(format, "format is mandatory to export jobs !"); +812 return exportJobs(FileType.valueOf(StringUtils.upperCase(format)), project, jobFilter, groupPath, jobIds); +813 } +814 +815 /** +816 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter, +817 * groupPath and jobIds) +818 * +819 * @param format of the export. See {@link FileType} - mandatory +820 * @param project name of the project - mandatory +821 * @param jobFilter a filter for the job Name - optional +822 * @param groupPath a group or partial group path to include all jobs within that group path - optional +823 * @param jobIds a list of Job IDs to include - optional +824 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +825 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +826 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +827 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +828 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the format is null +829 * @see #exportJobsToFile(String, FileType, String, String, String, String...) +830 */ +831 public InputStream exportJobs(FileType format, String project, String jobFilter, String groupPath, String... jobIds) +832 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +833 AssertUtil.notNull(format, "format is mandatory to export jobs !"); +834 AssertUtil.notBlank(project, "project is mandatory to export jobs !"); +835 return new ApiCall(this).get(new ApiPathBuilder("/jobs/export") +836 .accept(format == FileType.XML ? "text/xml" : "text/yaml") +837 .param("format", format) +838 .param("project", project) +839 .param("jobFilter", jobFilter) +840 .param("groupPath", groupPath) +841 .param("idlist", StringUtils.join(jobIds, ","))); +842 } +843 +844 /** +845 * Export the definition of a single job (identified by the given ID) +846 * +847 * @param filename path of the file where the content should be saved - mandatory +848 * @param format of the export. See {@link FileType} - mandatory +849 * @param jobId identifier of the job - mandatory +850 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +851 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +852 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +853 * @throws IllegalArgumentException if the filename, format or jobId is blank (null, empty or whitespace), or the +854 * format is invalid +855 * @throws IOException if we failed to write to the file +856 * @see #exportJobToFile(String, FileType, String) +857 * @see #exportJob(String, String) +858 * @see #getJob(String) +859 */ +860 public void exportJobToFile(String filename, String format, String jobId) throws RundeckApiException, +861 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +862 AssertUtil.notBlank(format, "format is mandatory to export a job !"); +863 exportJobToFile(filename, FileType.valueOf(StringUtils.upperCase(format)), jobId); +864 } +865 +866 /** +867 * Export the definition of a single job (identified by the given ID) +868 * +869 * @param filename path of the file where the content should be saved - mandatory +870 * @param format of the export. See {@link FileType} - mandatory +871 * @param jobId identifier of the job - mandatory +872 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +873 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +874 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +875 * @throws IllegalArgumentException if the filename or jobId is blank (null, empty or whitespace), or the format is +876 * null +877 * @throws IOException if we failed to write to the file +878 * @see #exportJob(FileType, String) +879 * @see #getJob(String) +880 */ +881 public void exportJobToFile(String filename, FileType format, String jobId) throws RundeckApiException, +882 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +883 AssertUtil.notBlank(filename, "filename is mandatory to export a job !"); +884 InputStream inputStream = exportJob(format, jobId); +885 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream)); +886 } +887 +888 /** +889 * Export the definition of a single job, identified by the given ID +890 * +891 * @param format of the export. See {@link FileType} - mandatory +892 * @param jobId identifier of the job - mandatory +893 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +894 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +895 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +896 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +897 * @throws IllegalArgumentException if the format or jobId is blank (null, empty or whitespace), or the format is +898 * invalid +899 * @see #exportJobToFile(String, String, String) +900 * @see #getJob(String) +901 */ +902 public InputStream exportJob(String format, String jobId) throws RundeckApiException, RundeckApiLoginException, +903 RundeckApiTokenException, IllegalArgumentException { +904 AssertUtil.notBlank(format, "format is mandatory to export a job !"); +905 return exportJob(FileType.valueOf(StringUtils.upperCase(format)), jobId); +906 } +907 +908 /** +909 * Export the definition of a single job, identified by the given ID +910 * +911 * @param format of the export. See {@link FileType} - mandatory +912 * @param jobId identifier of the job - mandatory +913 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +914 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +915 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +916 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +917 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the format is null +918 * @see #exportJobToFile(String, FileType, String) +919 * @see #getJob(String) +920 */ +921 public InputStream exportJob(FileType format, String jobId) throws RundeckApiException, RundeckApiLoginException, +922 RundeckApiTokenException, IllegalArgumentException { +923 AssertUtil.notNull(format, "format is mandatory to export a job !"); +924 AssertUtil.notBlank(jobId, "jobId is mandatory to export a job !"); +925 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId).param("format", format)); +926 } +927 +928 +929 /** +930 * Import the definitions of jobs, from the given input stream, using the given behavior 931 * -932 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder} -933 * @param poolingInterval for checking the status of the execution. Must be > 0. -934 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -935 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -936 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +932 * @param rundeckJobsImport import request, see {@link RundeckJobsImportBuilder} +933 * +934 * @return a {@link RundeckJobsImportResult} instance - won't be null +935 * +936 * @throws RundeckApiException in case of error when calling the API 937 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 938 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -939 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) -940 * @see #triggerAdhocCommand(RunAdhocCommand) +939 * @throws IllegalArgumentException if the stream or fileType is null +940 * @see #importJobs(String, FileType, RundeckJobsImportMethod) 941 */ -942 public RundeckExecution runAdhocCommand(RunAdhocCommand command, long poolingInterval, TimeUnit poolingUnit) -943 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, 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 } +942 public RundeckJobsImportResult importJobs(final String filename,final RundeckJobsImport rundeckJobsImport) throws RundeckApiException, +943 RundeckApiLoginException, +944 RundeckApiTokenException, IllegalArgumentException, IOException { +945 AssertUtil.notBlank(filename, "filename (of jobs file) is mandatory to import jobs !"); +946 FileInputStream stream = null; +947 try { +948 stream = FileUtils.openInputStream(new File(filename)); +949 return importJobs(RundeckJobsImportBuilder.builder(rundeckJobsImport).setStream(stream).build()); +950 } finally { 951 -952 RundeckExecution execution = triggerAdhocCommand(command); -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 scripts -966 */ -967 -968 -969 /** -970 * Trigger the execution of an ad-hoc script read from a file, and return immediately (without waiting the end of -971 * the execution). The script will be dispatched to nodes, accordingly to the nodeFilters parameter. -972 * -973 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} -974 * @param scriptFilename a file to read as the input script stream -975 * -976 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -977 * -978 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -979 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -980 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -981 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -982 * @throws IOException if an error occurs reading the script file -983 * @see #triggerAdhocScript(RunAdhocScript) -984 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit) -985 */ -986 public RundeckExecution triggerAdhocScript(final RunAdhocScript script, final String scriptFilename) throws -987 RundeckApiException, -988 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -989 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to trigger an ad-hoc script !"); -990 FileInputStream stream = null; -991 try { -992 stream = FileUtils.openInputStream(new File(scriptFilename)); -993 return triggerAdhocScript(RunAdhocScriptBuilder.builder(script) -994 .setScript(stream) -995 .build()); -996 } finally { -997 IOUtils.closeQuietly(stream); -998 } -999 } -1000 /** -1001 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The -1002 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1003 * -1004 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} -1005 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null -1006 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1007 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1008 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1009 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1010 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) -1011 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) -1012 */ -1013 public RundeckExecution triggerAdhocScript(RunAdhocScript script) throws RundeckApiException, -1014 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1015 AssertUtil.notBlank(script.getProject(), "project is mandatory to trigger an ad-hoc script !"); -1016 AssertUtil.notNull(script.getScript(), "script is mandatory to trigger an ad-hoc script !"); -1017 ApiPathBuilder apiPath = new ApiPathBuilder("/run/script").param("project", script.getProject()) -1018 .attach("scriptFile", -1019 script.getScript()) -1020 .param("argString",script.getArgString()) -1021 .param("nodeThreadcount", -1022 script.getNodeThreadcount()) -1023 .param("nodeKeepgoing", -1024 script.getNodeKeepgoing()) -1025 .param("scriptInterpreter", -1026 script.getScriptInterpreter()) -1027 .param("interpreterArgsQuoted", -1028 script.getInterpreterArgsQuoted()) -1029 .nodeFilters(script.getNodeFilters()); -1030 if(null!=script.getAsUser()) { -1031 apiPath.param("asUser", script.getAsUser()); -1032 } -1033 RundeckExecution execution = new ApiCall(this).post(apiPath, new ExecutionParser("result/execution")); -1034 // the first call just returns the ID of the execution, so we need another call to get a "real" execution -1035 return getExecution(execution.getId()); -1036 } -1037 -1038 -1039 /** -1040 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1041 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still -1042 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. -1043 * -1044 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} -1045 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1046 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1047 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1048 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1049 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1050 * @throws IOException if we failed to read the file -1051 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit) -1052 * @see #triggerAdhocScript(RunAdhocScript) +952 IOUtils.closeQuietly(stream); +953 } +954 } +955 /** +956 * Import the definitions of jobs, from the given input stream, using the given behavior +957 * +958 * @param rundeckJobsImport import request, see {@link RundeckJobsImportBuilder} +959 * +960 * @return a {@link RundeckJobsImportResult} instance - won't be null +961 * +962 * @throws RundeckApiException in case of error when calling the API +963 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +964 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +965 * @throws IllegalArgumentException if the stream or fileType is null +966 * @see #importJobs(String, FileType, RundeckJobsImportMethod) +967 */ +968 public RundeckJobsImportResult importJobs(final RundeckJobsImport rundeckJobsImport) throws RundeckApiException, +969 RundeckApiLoginException, +970 RundeckApiTokenException, IllegalArgumentException { +971 +972 AssertUtil.notNull(rundeckJobsImport.getStream(), "inputStream of jobs is mandatory to import jobs !"); +973 AssertUtil.notNull(rundeckJobsImport.getFileType(), "fileType is mandatory to import jobs !"); +974 final ApiPathBuilder request = new ApiPathBuilder(JOBS_IMPORT) +975 .param("format", rundeckJobsImport.getFileType()) +976 .param("dupeOption", rundeckJobsImport.getImportMethod()) +977 .attach("xmlBatch", rundeckJobsImport.getStream()); +978 if(null!=rundeckJobsImport.getUuidImportBehavior()) { +979 //API v9 +980 request.param("uuidOption", rundeckJobsImport.getUuidImportBehavior()); +981 } +982 if(null!=rundeckJobsImport.getProject()) { +983 //API v8 +984 request.param("project", rundeckJobsImport.getProject()); +985 } +986 return new ApiCall(this).post(request, new JobsImportResultParser(rootXpath())); +987 } +988 +989 /** +990 * Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not +991 * need to belong to a group (either pass null, or an empty string). +992 * +993 * @param project name of the project - mandatory +994 * @param groupPath group to which the job belongs (if it belongs to a group) - optional +995 * @param name of the job to find - mandatory +996 * @return a {@link RundeckJob} instance - null if not found +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 the name is blank (null, empty or whitespace) +1001 * @see #getJob(String) +1002 */ +1003 public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException, +1004 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1005 AssertUtil.notBlank(project, "project is mandatory to find a job !"); +1006 AssertUtil.notBlank(name, "job name is mandatory to find a job !"); +1007 List<RundeckJob> jobs = getJobs(project, name, groupPath, new String[0]); +1008 return jobs.isEmpty() ? null : jobs.get(0); +1009 } +1010 +1011 /** +1012 * Get the definition of a single job, identified by the given ID +1013 * +1014 * @param jobId identifier of the job - mandatory +1015 * @return a {@link RundeckJob} instance - won't be null +1016 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1017 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1018 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1019 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1020 * @see #findJob(String, String, String) +1021 * @see #exportJob(String, String) +1022 */ +1023 public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +1024 RundeckApiTokenException, IllegalArgumentException { +1025 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !"); +1026 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId), new JobParser("joblist/job")); +1027 } +1028 +1029 /** +1030 * Delete a single job, identified by the given ID +1031 * +1032 * @param jobId identifier of the job - mandatory +1033 * @return the success message (note that in case of error, you'll get an exception) +1034 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1035 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1036 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1037 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1038 */ +1039 public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException, +1040 RundeckApiTokenException, IllegalArgumentException { +1041 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !"); +1042 return new ApiCall(this).delete(new ApiPathBuilder("/job/", jobId), new StringParser(rootXpath()+"/success/message")); +1043 } +1044 /** +1045 * Delete multiple jobs, identified by the given IDs +1046 * +1047 * @param jobIds List of job IDS +1048 * @return the bulk delete result +1049 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1050 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1051 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1052 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) 1053 */ -1054 public RundeckExecution runAdhocScript(RunAdhocScript script) throws RundeckApiException, -1055 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { -1056 return runAdhocScript(script, -1057 DEFAULT_POOLING_INTERVAL, -1058 DEFAULT_POOLING_UNIT); -1059 } -1060 -1061 /** -1062 * Run an ad-hoc script read from a file, and wait until its execution is finished (or aborted) to return. We will -1063 * poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the -1064 * execution is finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to -1065 * the nodeFilters parameter. +1054 public RundeckJobDeleteBulk deleteJobs(final List<String> jobIds) throws RundeckApiException, RundeckApiLoginException, +1055 RundeckApiTokenException, IllegalArgumentException { +1056 if (null == jobIds || 0 == jobIds.size()) { +1057 throw new IllegalArgumentException("jobIds are mandatory to delete a job"); +1058 } +1059 return new ApiCall(this).post(new ApiPathBuilder("/jobs/delete").field("ids",jobIds), +1060 new BulkDeleteParser(rootXpath()+"/deleteJobs")); +1061 } +1062 +1063 /** +1064 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the +1065 * end of the job execution) 1066 * -1067 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} -1068 * @param scriptFilename filename of a script to read -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 * -1072 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1073 * -1074 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1075 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1076 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1077 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1078 * @throws IOException if we failed to read the file -1079 * @see #runAdhocScript(RunAdhocScript) -1080 * @see #triggerAdhocScript(RunAdhocScript, String) -1081 */ -1082 public RundeckExecution runAdhocScript(final RunAdhocScript script, final String scriptFilename, -1083 final long poolingInterval, final TimeUnit poolingUnit) throws RundeckApiException, -1084 RundeckApiLoginException, RundeckApiTokenException, -1085 IllegalArgumentException, IOException { -1086 FileInputStream stream = null; -1087 try { -1088 stream = FileUtils.openInputStream(new File(scriptFilename)); -1089 return runAdhocScript(RunAdhocScriptBuilder.builder(script) -1090 .setScript(stream) -1091 .build(), poolingInterval, poolingUnit); -1092 } finally { -1093 IOUtils.closeQuietly(stream); -1094 } -1095 } -1096 /** -1097 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck -1098 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is -1099 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters -1100 * parameter. -1101 * -1102 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} -1103 * @param poolingInterval for checking the status of the execution. Must be > 0. -1104 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. -1105 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null -1106 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1107 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1108 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1109 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null -1110 * @throws IOException if we failed to read the file -1111 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) -1112 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) -1113 */ -1114 public RundeckExecution runAdhocScript(final RunAdhocScript script, long poolingInterval, -1115 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, -1116 IllegalArgumentException { -1117 if (poolingInterval <= 0) { -1118 poolingInterval = DEFAULT_POOLING_INTERVAL; -1119 poolingUnit = DEFAULT_POOLING_UNIT; -1120 } -1121 if (poolingUnit == null) { -1122 poolingUnit = DEFAULT_POOLING_UNIT; -1123 } -1124 -1125 RundeckExecution execution = triggerAdhocScript(script); -1126 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { -1127 try { -1128 Thread.sleep(poolingUnit.toMillis(poolingInterval)); -1129 } catch (InterruptedException e) { -1130 break; -1131 } -1132 execution = getExecution(execution.getId()); -1133 } -1134 return execution; -1135 } -1136 -1137 /* -1138 * Executions -1139 */ -1140 -1141 /** -1142 * Get all running executions (for all projects) -1143 * -1144 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1145 * @throws RundeckApiException in case of error when calling the API -1146 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1147 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1148 * @see #getRunningExecutions(String) -1149 */ -1150 public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException, -1151 RundeckApiTokenException { -1152 if (this.getApiVersion() >= Version.V9.getVersionNumber()) { -1153 //simply query using '*' -1154 return getRunningExecutions("*"); -1155 } else { -1156 List<RundeckExecution> executions = new ArrayList<RundeckExecution>(); -1157 for (RundeckProject project : getProjects()) { -1158 executions.addAll(getRunningExecutions(project.getName())); -1159 } -1160 return executions; -1161 } -1162 } -1163 -1164 /** -1165 * Get the running executions for the given project -1166 * -1167 * @param project name of the project - mandatory -1168 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1169 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1170 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1171 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1172 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1173 * @see #getRunningExecutions() -1174 */ -1175 public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException, -1176 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1177 AssertUtil.notBlank(project, "project is mandatory get all running executions !"); -1178 return new ApiCall(this).get(new ApiPathBuilder("/executions/running").param("project", project), -1179 new ListParser<RundeckExecution>(new ExecutionParser(), -1180 "result/executions/execution")); -1181 } -1182 -1183 /** -1184 * Get the executions of the given job -1185 * -1186 * @param jobId identifier of the job - mandatory -1187 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1188 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1189 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1190 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1191 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1192 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) -1193 */ -1194 public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException, -1195 RundeckApiTokenException, IllegalArgumentException { -1196 return getJobExecutions(jobId, (ExecutionStatus) null); -1197 } -1198 -1199 /** -1200 * Get the executions of the given job -1201 * -1202 * @param jobId identifier of the job - mandatory -1203 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1204 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1205 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1206 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1207 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1208 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is -1209 * invalid -1210 * @see #getJobExecutions(String, String, Long, Long) -1211 */ -1212 public List<RundeckExecution> getJobExecutions(String jobId, String status) throws RundeckApiException, -1213 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1214 return getJobExecutions(jobId, -1215 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status))); -1216 } -1217 -1218 /** -1219 * Get the executions of the given job -1220 * -1221 * @param jobId identifier of the job - mandatory -1222 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1223 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1224 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1225 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1226 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1227 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1228 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) -1229 */ -1230 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException, -1231 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1232 return getJobExecutions(jobId, status, null, null); -1233 } -1234 -1235 /** -1236 * Get the executions of the given job -1237 * -1238 * @param jobId identifier of the job - mandatory -1239 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1240 * @param max number of results to return - optional (null for all) -1241 * @param offset the 0-indexed offset for the first result to return - optional -1242 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1243 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1244 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1245 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1246 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is -1247 * invalid -1248 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) -1249 */ -1250 public List<RundeckExecution> getJobExecutions(String jobId, String status, Long max, Long offset) -1251 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1252 return getJobExecutions(jobId, -1253 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)), -1254 max, -1255 offset); -1256 } -1257 -1258 /** -1259 * Get the executions of the given job -1260 * -1261 * @param jobId identifier of the job - mandatory -1262 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) -1263 * @param max number of results to return - optional (null for all) -1264 * @param offset the 0-indexed offset for the first result to return - optional -1265 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1266 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1267 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1268 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1269 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1270 */ -1271 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset) -1272 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1273 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !"); -1274 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/executions").param("status", status) -1275 .param("max", max) -1276 .param("offset", offset), -1277 new ListParser<RundeckExecution>(new ExecutionParser(), -1278 "result/executions/execution")); -1279 } -1280 -1281 /** -1282 * Get executions based on query parameters -1283 * -1284 * @param query query parameters for the request -1285 * @param max number of results to return - optional (null for all) -1286 * @param offset the 0-indexed offset for the first result to return - optional -1287 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null -1288 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1289 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1290 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1291 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1292 */ -1293 public PagedResults<RundeckExecution> getExecutions(ExecutionQuery query, Long max, Long offset) -1294 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1295 if (!query.notBlank()) { -1296 throw new IllegalArgumentException("Some execution query parameter must be set"); -1297 } -1298 AssertUtil.notBlank(query.getProject(), "project is required for execution query"); -1299 return new ApiCall(this).get(new ApiPathBuilder("/executions") -1300 .param(new ExecutionQueryParameters(query)) -1301 .param("max", max) -1302 .param("offset", offset), -1303 new PagedResultParser<RundeckExecution>( -1304 new ListParser<RundeckExecution>(new ExecutionParser(), "execution"), -1305 "result/executions" -1306 ) -1307 ); -1308 } -1309 -1310 /** -1311 * Get a single execution, identified by the given ID -1312 * -1313 * @param executionId identifier of the execution - mandatory -1314 * @return a {@link RundeckExecution} instance - won't be null -1315 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) -1316 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1317 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1318 * @throws IllegalArgumentException if the executionId is null -1319 */ -1320 public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, -1321 RundeckApiTokenException, IllegalArgumentException { -1322 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !"); -1323 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()), -1324 new ExecutionParser("result/executions/execution")); -1325 } -1326 -1327 /** -1328 * Abort an execution (identified by the given ID). The execution should be running... -1329 * -1330 * @param executionId identifier of the execution - mandatory -1331 * @return a {@link RundeckAbort} instance - won't be null -1332 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) -1333 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1334 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1335 * @throws IllegalArgumentException if the executionId is null -1336 */ -1337 public RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, -1338 RundeckApiTokenException, IllegalArgumentException { -1339 return abortExecution(executionId, null); -1340 } -1341 /** -1342 * Abort an execution (identified by the given ID). The execution should be running... -1343 * -1344 * @param executionId identifier of the execution - mandatory -1345 * @param asUser specify a user name to abort the job as, must have 'killAs' permission -1346 * @return a {@link RundeckAbort} instance - won't be null -1347 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) -1348 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1349 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1350 * @throws IllegalArgumentException if the executionId is null -1351 */ -1352 public RundeckAbort abortExecution(Long executionId, final String asUser) throws RundeckApiException, RundeckApiLoginException, -1353 RundeckApiTokenException, IllegalArgumentException { -1354 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !"); -1355 ApiPathBuilder apiPath = new ApiPathBuilder("/execution/", executionId.toString(), "/abort"); -1356 if(null!=asUser) { -1357 apiPath.param("asUser", asUser); -1358 } -1359 return new ApiCall(this).get(apiPath, new AbortParser("result/abort")); -1360 } -1361 -1362 /* -1363 * History -1364 */ -1365 -1366 /** -1367 * Get the (events) history for the given project -1368 * -1369 * @param project name of the project - mandatory -1370 * @return a {@link RundeckHistory} instance - won't be null -1371 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1372 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1373 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1374 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1375 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1376 */ -1377 public RundeckHistory getHistory(String project) throws RundeckApiException, RundeckApiLoginException, -1378 RundeckApiTokenException, IllegalArgumentException { -1379 return getHistory(project, null, null,(String) null, (String) null, null, null, null, null); -1380 } -1381 -1382 /** -1383 * Get the (events) history for the given project -1384 * -1385 * @param project name of the project - mandatory -1386 * @param max number of results to return - optional (default to 20) -1387 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -1388 * @return a {@link RundeckHistory} instance - won't be null -1389 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1390 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1391 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1392 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1393 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1394 */ -1395 public RundeckHistory getHistory(String project, Long max, Long offset) throws RundeckApiException, -1396 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1397 return getHistory(project, null, null, (String)null, (String)null, null, null, max, offset); -1398 } -1399 -1400 /** -1401 * Get the (events) history for the given project -1402 * -1403 * @param project name of the project - mandatory -1404 * @param jobId include only events matching the given job ID - optional -1405 * @param reportId include only events matching the given report ID - optional -1406 * @param user include only events created by the given user - optional -1407 * @return a {@link RundeckHistory} instance - won't be null -1408 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1409 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1410 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1411 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1412 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1413 */ -1414 public RundeckHistory getHistory(String project, String jobId, String reportId, String user) -1415 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1416 return getHistory(project, jobId, reportId, user, null, null, null, null, null); -1417 } -1418 -1419 /** -1420 * Get the (events) history for the given project -1421 * -1422 * @param project name of the project - mandatory -1423 * @param jobId include only events matching the given job ID - optional -1424 * @param reportId include only events matching the given report ID - optional -1425 * @param user include only events created by the given user - optional -1426 * @param max number of results to return - optional (default to 20) -1427 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -1428 * @return a {@link RundeckHistory} instance - won't be null -1429 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1067 * @param jobRun the RunJob, see {@link RunJobBuilder} +1068 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1069 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1070 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1071 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1072 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1073 * @see #triggerJob(String) +1074 * @see #runJob(String, Properties, Properties) +1075 */ +1076 public RundeckExecution triggerJob(final RunJob jobRun) +1077 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1078 AssertUtil.notBlank(jobRun.getJobId(), "jobId is mandatory to trigger a job !"); +1079 ApiPathBuilder apiPath = new ApiPathBuilder("/job/", jobRun.getJobId(), "/run").param("argString", +1080 ParametersUtil.generateArgString(jobRun.getOptions())) +1081 .nodeFilters(jobRun.getNodeFilters()); +1082 if(null!=jobRun.getAsUser()) { +1083 apiPath.param("asUser", jobRun.getAsUser()); +1084 } +1085 return new ApiCall(this).get(apiPath, new ExecutionParser(rootXpath()+"/executions/execution")); +1086 } +1087 +1088 +1089 /** +1090 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. +1091 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or +1092 * aborted) or is still running. +1093 * +1094 * @param runJob the RunJob, see {@link RunJobBuilder} +1095 * +1096 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1097 * +1098 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1099 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1100 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1101 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1102 * @see #triggerJob(RunJob) +1103 * @see #runJob(RunJob, long, TimeUnit) +1104 */ +1105 public RundeckExecution runJob(final RunJob runJob) throws RundeckApiException, RundeckApiLoginException, +1106 RundeckApiTokenException, IllegalArgumentException { +1107 return runJob(runJob, DEFAULT_POOLING_INTERVAL, DEFAULT_POOLING_UNIT); +1108 } +1109 +1110 /** +1111 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return. +1112 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to +1113 * know if the execution is finished (or aborted) or is still running. +1114 * +1115 * @param jobRun the RunJob, see {@link RunJobBuilder} +1116 * @param poolingInterval for checking the status of the execution. Must be > 0. +1117 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1118 * +1119 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1120 * +1121 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1122 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1123 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1124 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1125 * @see #triggerJob(RunJob) +1126 */ +1127 public RundeckExecution runJob(final RunJob jobRun, long poolingInterval, +1128 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1129 IllegalArgumentException { +1130 +1131 if (poolingInterval <= 0) { +1132 poolingInterval = DEFAULT_POOLING_INTERVAL; +1133 poolingUnit = DEFAULT_POOLING_UNIT; +1134 } +1135 if (poolingUnit == null) { +1136 poolingUnit = DEFAULT_POOLING_UNIT; +1137 } +1138 +1139 RundeckExecution execution = triggerJob(jobRun); +1140 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { +1141 try { +1142 Thread.sleep(poolingUnit.toMillis(poolingInterval)); +1143 } catch (InterruptedException e) { +1144 break; +1145 } +1146 execution = getExecution(execution.getId()); +1147 } +1148 return execution; +1149 } +1150 +1151 /* +1152 * Ad-hoc commands +1153 */ +1154 +1155 +1156 /** +1157 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). +1158 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter. +1159 * +1160 * @param command the RunAdhocCommand. Project and command are mandatory, see {@link RunAdhocCommandBuilder} +1161 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1162 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1163 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1164 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1165 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1166 * @see #triggerAdhocCommand(String, String) +1167 * @see #runAdhocCommand(String, String, Properties) +1168 */ +1169 public RundeckExecution triggerAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException, +1170 RundeckApiTokenException, IllegalArgumentException { +1171 AssertUtil.notBlank(command.getProject(), "project is mandatory to trigger an ad-hoc command !"); +1172 AssertUtil.notBlank(command.getCommand(), "command is mandatory to trigger an ad-hoc command !"); +1173 ApiPathBuilder apiPath = new ApiPathBuilder("/run/command").param("project", command.getProject()) +1174 .param("exec", command.getCommand()) +1175 .param("nodeThreadcount", +1176 command.getNodeThreadcount()) +1177 .param("nodeKeepgoing", +1178 command.getNodeKeepgoing()) +1179 .nodeFilters(command.getNodeFilters()); +1180 if(null!= command.getAsUser()) { +1181 apiPath.param("asUser", command.getAsUser()); +1182 } +1183 RundeckExecution execution = new ApiCall(this).get(apiPath, new ExecutionParser(rootXpath()+"/execution")); +1184 // the first call just returns the ID of the execution, so we need another call to get a "real" execution +1185 return getExecution(execution.getId()); +1186 } +1187 +1188 +1189 /** +1190 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1191 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1192 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter. +1193 * +1194 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder} +1195 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1196 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1197 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1198 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1199 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1200 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit) +1201 * @see #triggerAdhocCommand(RunAdhocCommand) +1202 */ +1203 public RundeckExecution runAdhocCommand(RunAdhocCommand command) throws RundeckApiException, RundeckApiLoginException, +1204 RundeckApiTokenException, IllegalArgumentException { +1205 return runAdhocCommand(command, +1206 DEFAULT_POOLING_INTERVAL, +1207 DEFAULT_POOLING_UNIT); +1208 } +1209 +1210 /** +1211 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1212 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1213 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the +1214 * nodeFilters parameter. +1215 * +1216 * @param command the RunAdhocCommand, see {@link RunAdhocCommandBuilder} +1217 * @param poolingInterval for checking the status of the execution. Must be > 0. +1218 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1219 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1220 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1221 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1222 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1223 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace) +1224 * @see #triggerAdhocCommand(RunAdhocCommand) +1225 */ +1226 public RundeckExecution runAdhocCommand(RunAdhocCommand command, long poolingInterval, TimeUnit poolingUnit) +1227 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1228 if (poolingInterval <= 0) { +1229 poolingInterval = DEFAULT_POOLING_INTERVAL; +1230 poolingUnit = DEFAULT_POOLING_UNIT; +1231 } +1232 if (poolingUnit == null) { +1233 poolingUnit = DEFAULT_POOLING_UNIT; +1234 } +1235 +1236 RundeckExecution execution = triggerAdhocCommand(command); +1237 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { +1238 try { +1239 Thread.sleep(poolingUnit.toMillis(poolingInterval)); +1240 } catch (InterruptedException e) { +1241 break; +1242 } +1243 execution = getExecution(execution.getId()); +1244 } +1245 return execution; +1246 } +1247 +1248 /* +1249 * Ad-hoc scripts +1250 */ +1251 +1252 +1253 /** +1254 * Trigger the execution of an ad-hoc script read from a file, and return immediately (without waiting the end of +1255 * the execution). The script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1256 * +1257 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} +1258 * @param scriptFilename a file to read as the input script stream +1259 * +1260 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1261 * +1262 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1263 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1264 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1265 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1266 * @throws IOException if an error occurs reading the script file +1267 * @see #triggerAdhocScript(RunAdhocScript) +1268 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit) +1269 */ +1270 public RundeckExecution triggerAdhocScript(final RunAdhocScript script, final String scriptFilename) throws +1271 RundeckApiException, +1272 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1273 AssertUtil.notBlank(scriptFilename, "scriptFilename is mandatory to trigger an ad-hoc script !"); +1274 FileInputStream stream = null; +1275 try { +1276 stream = FileUtils.openInputStream(new File(scriptFilename)); +1277 return triggerAdhocScript(RunAdhocScriptBuilder.builder(script) +1278 .setScript(stream) +1279 .build()); +1280 } finally { +1281 IOUtils.closeQuietly(stream); +1282 } +1283 } +1284 /** +1285 * Trigger the execution of an ad-hoc script, and return immediately (without waiting the end of the execution). The +1286 * script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1287 * +1288 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} +1289 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null +1290 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1291 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1292 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1293 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1294 * @see #triggerAdhocScript(String, String, Properties, Properties, Integer, Boolean) +1295 * @see #runAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean, long, TimeUnit) +1296 */ +1297 public RundeckExecution triggerAdhocScript(RunAdhocScript script) throws RundeckApiException, +1298 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1299 AssertUtil.notBlank(script.getProject(), "project is mandatory to trigger an ad-hoc script !"); +1300 AssertUtil.notNull(script.getScript(), "script is mandatory to trigger an ad-hoc script !"); +1301 ApiPathBuilder apiPath = new ApiPathBuilder("/run/script").param("project", script.getProject()) +1302 .attach("scriptFile", +1303 script.getScript()) +1304 .param("argString",script.getArgString()) +1305 .param("nodeThreadcount", +1306 script.getNodeThreadcount()) +1307 .param("nodeKeepgoing", +1308 script.getNodeKeepgoing()) +1309 .param("scriptInterpreter", +1310 script.getScriptInterpreter()) +1311 .param("interpreterArgsQuoted", +1312 script.getInterpreterArgsQuoted()) +1313 .nodeFilters(script.getNodeFilters()); +1314 if(null!=script.getAsUser()) { +1315 apiPath.param("asUser", script.getAsUser()); +1316 } +1317 RundeckExecution execution = new ApiCall(this).post(apiPath, new ExecutionParser(rootXpath()+"/execution")); +1318 // the first call just returns the ID of the execution, so we need another call to get a "real" execution +1319 return getExecution(execution.getId()); +1320 } +1321 +1322 +1323 /** +1324 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1325 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still +1326 * running. The script will be dispatched to nodes, accordingly to the nodeFilters parameter. +1327 * +1328 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} +1329 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1330 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1331 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1332 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1333 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1334 * @throws IOException if we failed to read the file +1335 * @see #runAdhocScript(RunAdhocScript, long, java.util.concurrent.TimeUnit) +1336 * @see #triggerAdhocScript(RunAdhocScript) +1337 */ +1338 public RundeckExecution runAdhocScript(RunAdhocScript script) throws RundeckApiException, +1339 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException, IOException { +1340 return runAdhocScript(script, +1341 DEFAULT_POOLING_INTERVAL, +1342 DEFAULT_POOLING_UNIT); +1343 } +1344 +1345 /** +1346 * Run an ad-hoc script read from a file, and wait until its execution is finished (or aborted) to return. We will +1347 * poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the +1348 * execution is finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to +1349 * the nodeFilters parameter. +1350 * +1351 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} +1352 * @param scriptFilename filename of a script to read +1353 * @param poolingInterval for checking the status of the execution. Must be > 0. +1354 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1355 * +1356 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1357 * +1358 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1359 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1360 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1361 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1362 * @throws IOException if we failed to read the file +1363 * @see #runAdhocScript(RunAdhocScript) +1364 * @see #triggerAdhocScript(RunAdhocScript, String) +1365 */ +1366 public RundeckExecution runAdhocScript(final RunAdhocScript script, final String scriptFilename, +1367 final long poolingInterval, final TimeUnit poolingUnit) throws RundeckApiException, +1368 RundeckApiLoginException, RundeckApiTokenException, +1369 IllegalArgumentException, IOException { +1370 FileInputStream stream = null; +1371 try { +1372 stream = FileUtils.openInputStream(new File(scriptFilename)); +1373 return runAdhocScript(RunAdhocScriptBuilder.builder(script) +1374 .setScript(stream) +1375 .build(), poolingInterval, poolingUnit); +1376 } finally { +1377 IOUtils.closeQuietly(stream); +1378 } +1379 } +1380 /** +1381 * Run an ad-hoc script, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck +1382 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is +1383 * finished (or aborted) or is still running. The script will be dispatched to nodes, accordingly to the nodeFilters +1384 * parameter. +1385 * +1386 * @param script the RunAdhocScript, see {@link RunAdhocScriptBuilder} +1387 * @param poolingInterval for checking the status of the execution. Must be > 0. +1388 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds. +1389 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null +1390 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1391 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1392 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1393 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) or the script is null +1394 * @throws IOException if we failed to read the file +1395 * @see #runAdhocScript(String, String, Properties, Properties, Integer, Boolean, long, TimeUnit) +1396 * @see #triggerAdhocScript(String, InputStream, Properties, Properties, Integer, Boolean) +1397 */ +1398 public RundeckExecution runAdhocScript(final RunAdhocScript script, long poolingInterval, +1399 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, +1400 IllegalArgumentException { +1401 if (poolingInterval <= 0) { +1402 poolingInterval = DEFAULT_POOLING_INTERVAL; +1403 poolingUnit = DEFAULT_POOLING_UNIT; +1404 } +1405 if (poolingUnit == null) { +1406 poolingUnit = DEFAULT_POOLING_UNIT; +1407 } +1408 +1409 RundeckExecution execution = triggerAdhocScript(script); +1410 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) { +1411 try { +1412 Thread.sleep(poolingUnit.toMillis(poolingInterval)); +1413 } catch (InterruptedException e) { +1414 break; +1415 } +1416 execution = getExecution(execution.getId()); +1417 } +1418 return execution; +1419 } +1420 +1421 /* +1422 * Executions +1423 */ +1424 +1425 /** +1426 * Get all running executions (for all projects) +1427 * +1428 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1429 * @throws RundeckApiException in case of error when calling the API 1430 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 1431 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1432 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1433 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1434 */ -1435 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, Long max, Long offset) -1436 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1437 return getHistory(project, jobId, reportId, user, null, null, null, max, offset); -1438 } -1439 -1440 /** -1441 * Get the (events) history for the given project -1442 * -1443 * @param project name of the project - mandatory -1444 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y -1445 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 -1446 * weeks), "5d" (= last 5 days), etc. Optional. -1447 * @return a {@link RundeckHistory} instance - won't be null -1448 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1449 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1450 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1451 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1452 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1453 */ -1454 public RundeckHistory getHistory(String project, String recent) throws RundeckApiException, -1455 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1456 return getHistory(project, null, null, null, recent, null, null, null, null); -1457 } -1458 -1459 /** -1460 * Get the (events) history for the given project -1461 * -1462 * @param project name of the project - mandatory -1463 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y -1464 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 -1465 * weeks), "5d" (= last 5 days), etc. Optional. -1466 * @param max number of results to return - optional (default to 20) -1467 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -1468 * @return a {@link RundeckHistory} instance - won't be null -1469 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1470 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1471 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1472 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1473 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1474 */ -1475 public RundeckHistory getHistory(String project, String recent, Long max, Long offset) throws RundeckApiException, -1476 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1477 return getHistory(project, null, null, null, recent, null, null, max, offset); -1478 } -1479 -1480 /** -1481 * Get the (events) history for the given project -1482 * -1483 * @param project name of the project - mandatory -1484 * @param begin date for the earlier events to retrieve - optional -1485 * @param end date for the latest events to retrieve - optional -1486 * @return a {@link RundeckHistory} instance - won't be null -1487 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1488 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1489 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1490 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1491 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1492 */ -1493 public RundeckHistory getHistory(String project, Date begin, Date end) throws RundeckApiException, -1494 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1495 return getHistory(project, null, null, (String)null, (String)null, begin, end, null, null); -1496 } -1497 -1498 /** -1499 * Get the (events) history for the given project -1500 * -1501 * @param project name of the project - mandatory -1502 * @param begin date for the earlier events to retrieve - optional -1503 * @param end date for the latest events to retrieve - optional -1504 * @param max number of results to return - optional (default to 20) -1505 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -1506 * @return a {@link RundeckHistory} instance - won't be null -1507 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1508 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1509 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1510 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1511 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) -1512 */ -1513 public RundeckHistory getHistory(String project, Date begin, Date end, Long max, Long offset) -1514 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1515 return getHistory(project, null, null, (String)null, (String) null, begin, end, max, offset); -1516 } -1517 -1518 /** -1519 * Get the (events) history for the given project -1520 * -1521 * @param project name of the project - mandatory -1522 * @param jobId include only events matching the given job ID - optional -1523 * @param reportId include only events matching the given report ID - optional -1524 * @param user include only events created by the given user - optional -1525 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y -1526 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 -1527 * weeks), "5d" (= last 5 days), etc. Optional. -1528 * @param begin date for the earlier events to retrieve - optional -1529 * @param end date for the latest events to retrieve - optional -1530 * @param max number of results to return - optional (default to 20) -1531 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -1532 * @return a {@link RundeckHistory} instance - won't be null -1533 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1534 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1535 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1536 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1537 */ -1538 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, String recent, -1539 Date begin, Date end, Long max, Long offset) throws RundeckApiException, RundeckApiLoginException, -1540 RundeckApiTokenException, IllegalArgumentException { -1541 AssertUtil.notBlank(project, "project is mandatory to get the history !"); -1542 return new ApiCall(this).get(new ApiPathBuilder("/history").param("project", project) -1543 .param("jobIdFilter", jobId) -1544 .param("reportIdFilter", reportId) -1545 .param("userFilter", user) -1546 .param("recentFilter", recent) -1547 .param("begin", begin) -1548 .param("end", end) -1549 .param("max", max) -1550 .param("offset", offset), -1551 new HistoryParser("result/events")); -1552 } -1553 -1554 /** -1555 * Get the (events) history for the given project -1556 * -1557 * @param project name of the project - mandatory -1558 * @param includeJobNames list of job names ("group/name") to include results for -1559 * @param excludeJobNames list of job names ("group/name") to exclude results for -1560 * @param user include only events created by the given user - optional -1561 * @param recent include only events matching the given period of time. Format : "XY", where X is an -1562 * integer, and Y is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). -1563 * Example : "2w" (= last 2 weeks), "5d" (= last 5 days), etc. Optional. -1564 * @param begin date for the earlier events to retrieve - optional -1565 * @param end date for the latest events to retrieve - optional -1566 * @param max number of results to return - optional (default to 20) -1567 * @param offset the 0-indexed offset for the first result to return - optional (default to O) -1568 * -1569 * @return a {@link RundeckHistory} instance - won't be null -1570 * -1571 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1572 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1573 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1574 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1575 */ -1576 public RundeckHistory getHistory(String project, -1577 String user, -1578 String recent, -1579 List<String> includeJobNames, -1580 List<String> excludeJobNames, -1581 Date begin, -1582 Date end, -1583 Long max, -1584 Long offset) -1585 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1586 -1587 AssertUtil.notBlank(project, "project is mandatory to get the history !"); -1588 final ApiPathBuilder builder = new ApiPathBuilder("/history").param("project", project) -1589 .field("jobListFilter", includeJobNames) -1590 .field("excludeJobListFilter", excludeJobNames) -1591 .param("userFilter", user) -1592 .param("recentFilter", recent) -1593 .param("begin", begin) -1594 .param("end", end) -1595 .param("max", max) -1596 .param("offset", offset); -1597 -1598 return new ApiCall(this).postOrGet(builder, new HistoryParser("result/events")); -1599 } -1600 -1601 /* -1602 * Nodes -1603 */ -1604 -1605 /** -1606 * List all nodes (for all projects) -1607 * -1608 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null -1609 * @throws RundeckApiException in case of error when calling the API -1610 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1611 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1612 */ -1613 public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { -1614 List<RundeckNode> nodes = new ArrayList<RundeckNode>(); -1615 for (RundeckProject project : getProjects()) { -1616 nodes.addAll(getNodes(project.getName())); -1617 } -1618 return nodes; -1619 } -1620 -1621 /** -1622 * List all nodes that belongs to the given project -1623 * -1624 * @param project name of the project - mandatory -1625 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null -1626 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1627 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1628 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1629 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1630 * @see #getNodes(String, Properties) -1631 */ -1632 public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException, -1633 RundeckApiTokenException, IllegalArgumentException { -1634 return getNodes(project, null); -1635 } -1636 -1637 /** -1638 * List nodes that belongs to the given project -1639 * -1640 * @param project name of the project - mandatory -1641 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder} -1642 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null -1643 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) -1644 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1645 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1646 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) -1647 */ -1648 public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException, -1649 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1650 AssertUtil.notBlank(project, "project is mandatory to get all nodes !"); -1651 return new ApiCall(this).get(new ApiPathBuilder("/resources").param("project", project) -1652 .nodeFilters(nodeFilters), -1653 new ListParser<RundeckNode>(new NodeParser(), "project/node")); -1654 } -1655 -1656 /** -1657 * Get the definition of a single node -1658 * -1659 * @param name of the node - mandatory -1660 * @param project name of the project - mandatory -1661 * @return a {@link RundeckNode} instance - won't be null -1662 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) -1663 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1664 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1665 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) -1666 */ -1667 public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException, -1668 RundeckApiTokenException, IllegalArgumentException { -1669 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !"); -1670 AssertUtil.notBlank(project, "project is mandatory to get a node !"); -1671 return new ApiCall(this).get(new ApiPathBuilder("/resource/", name).param("project", project), -1672 new NodeParser("project/node")); -1673 } -1674 -1675 /** -1676 * Get the output of a job execution -1677 * -1678 * @param executionId id of the execution - mandatory -1679 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -1680 * @throws RundeckApiException in case of error when calling the API (non-existent name or 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 name or project is blank (null, empty or whitespace) -1684 */ -1685 public InputStream getOutput(String executionId) throws RundeckApiException, RundeckApiLoginException, -1686 RundeckApiTokenException, IllegalArgumentException { -1687 AssertUtil.notBlank(executionId, "the execution id is mandatory to get execution output !"); -1688 return new ApiCall(this).getNonApi(new ApiPathBuilder("/execution/downloadOutput/", executionId)); -1689 } -1690 -1691 /** -1692 * Get the html page of the user's profile -1693 * -1694 * @param username - mandatory -1695 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -1696 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) -1697 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1698 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1699 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) -1700 */ -1701 public InputStream getProfilePage(String username) throws RundeckApiException, RundeckApiLoginException, -1702 RundeckApiTokenException, IllegalArgumentException { -1703 AssertUtil.notBlank(username, "the username is mandatory to get profile page !"); -1704 return new ApiCall(this).getNonApi(new ApiPathBuilder("/user/profile?login=", username)); -1705 } -1706 -1707 -1708 /** -1709 * Generate a new token and get the result page (which is the html page of the user's profile) -1710 * -1711 * @param username - mandatory -1712 * @return an {@link InputStream} instance, not linked to any network resources - won't be null -1713 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +1432 * @see #getRunningExecutions(String) +1433 */ +1434 public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException, +1435 RundeckApiTokenException { +1436 if (this.getApiVersion() >= Version.V9.getVersionNumber()) { +1437 //simply query using '*' +1438 return getRunningExecutions("*"); +1439 } else { +1440 List<RundeckExecution> executions = new ArrayList<RundeckExecution>(); +1441 for (RundeckProject project : getProjects()) { +1442 executions.addAll(getRunningExecutions(project.getName())); +1443 } +1444 return executions; +1445 } +1446 } +1447 +1448 /** +1449 * Get the running executions for the given project +1450 * +1451 * @param project name of the project - mandatory +1452 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1453 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1454 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1455 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1456 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1457 * @see #getRunningExecutions() +1458 */ +1459 public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException, +1460 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1461 AssertUtil.notBlank(project, "project is mandatory get all running executions !"); +1462 return new ApiCall(this).get(new ApiPathBuilder("/executions/running").param("project", project), +1463 new ListParser<RundeckExecution>(new ExecutionParser(), +1464 rootXpath()+"/executions/execution")); +1465 } +1466 +1467 /** +1468 * Get the executions of the given job +1469 * +1470 * @param jobId identifier of the job - mandatory +1471 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1472 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1473 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1474 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1475 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1476 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) +1477 */ +1478 public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException, +1479 RundeckApiTokenException, IllegalArgumentException { +1480 return getJobExecutions(jobId, (ExecutionStatus) null); +1481 } +1482 +1483 /** +1484 * Get the executions of the given job +1485 * +1486 * @param jobId identifier of the job - mandatory +1487 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1488 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1489 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1490 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1491 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1492 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is +1493 * invalid +1494 * @see #getJobExecutions(String, String, Long, Long) +1495 */ +1496 public List<RundeckExecution> getJobExecutions(String jobId, String status) throws RundeckApiException, +1497 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1498 return getJobExecutions(jobId, +1499 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status))); +1500 } +1501 +1502 /** +1503 * Get the executions of the given job +1504 * +1505 * @param jobId identifier of the job - mandatory +1506 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1507 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1508 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1509 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1510 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1511 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1512 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) +1513 */ +1514 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException, +1515 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1516 return getJobExecutions(jobId, status, null, null); +1517 } +1518 +1519 /** +1520 * Get the executions of the given job +1521 * +1522 * @param jobId identifier of the job - mandatory +1523 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1524 * @param max number of results to return - optional (null for all) +1525 * @param offset the 0-indexed offset for the first result to return - optional +1526 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1527 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1528 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1529 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1530 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace), or the executionStatus is +1531 * invalid +1532 * @see #getJobExecutions(String, RundeckExecution.ExecutionStatus, Long, Long) +1533 */ +1534 public List<RundeckExecution> getJobExecutions(String jobId, String status, Long max, Long offset) +1535 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1536 return getJobExecutions(jobId, +1537 StringUtils.isBlank(status) ? null : ExecutionStatus.valueOf(StringUtils.upperCase(status)), +1538 max, +1539 offset); +1540 } +1541 +1542 /** +1543 * Get the executions of the given job +1544 * +1545 * @param jobId identifier of the job - mandatory +1546 * @param status of the executions, see {@link ExecutionStatus} - optional (null for all) +1547 * @param max number of results to return - optional (null for all) +1548 * @param offset the 0-indexed offset for the first result to return - optional +1549 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1550 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1551 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1552 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1553 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1554 */ +1555 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset) +1556 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1557 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !"); +1558 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/executions").param("status", status) +1559 .param("max", max) +1560 .param("offset", offset), +1561 new ListParser<RundeckExecution>(new ExecutionParser(), +1562 rootXpath()+"/executions/execution")); +1563 } +1564 +1565 /** +1566 * Get executions based on query parameters +1567 * +1568 * @param query query parameters for the request +1569 * @param max number of results to return - optional (null for all) +1570 * @param offset the 0-indexed offset for the first result to return - optional +1571 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null +1572 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1573 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1574 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1575 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1576 */ +1577 public PagedResults<RundeckExecution> getExecutions(ExecutionQuery query, Long max, Long offset) +1578 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1579 if (!query.notBlank()) { +1580 throw new IllegalArgumentException("Some execution query parameter must be set"); +1581 } +1582 AssertUtil.notBlank(query.getProject(), "project is required for execution query"); +1583 return new ApiCall(this).get(new ApiPathBuilder("/executions") +1584 .param(new ExecutionQueryParameters(query)) +1585 .param("max", max) +1586 .param("offset", offset), +1587 new PagedResultParser<RundeckExecution>( +1588 new ListParser<RundeckExecution>(new ExecutionParser(), "execution"), +1589 rootXpath()+"/executions" +1590 ) +1591 ); +1592 } +1593 +1594 /** +1595 * Get a single execution, identified by the given ID +1596 * +1597 * @param executionId identifier of the execution - mandatory +1598 * @return a {@link RundeckExecution} instance - won't be null +1599 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) +1600 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1601 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1602 * @throws IllegalArgumentException if the executionId is null +1603 */ +1604 public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, +1605 RundeckApiTokenException, IllegalArgumentException { +1606 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !"); +1607 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()), +1608 new ExecutionParser(rootXpath()+"/executions/execution")); +1609 } +1610 +1611 /** +1612 * Abort an execution (identified by the given ID). The execution should be running... +1613 * +1614 * @param executionId identifier of the execution - mandatory +1615 * @return a {@link RundeckAbort} instance - won't be null +1616 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) +1617 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1618 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1619 * @throws IllegalArgumentException if the executionId is null +1620 */ +1621 public RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException, +1622 RundeckApiTokenException, IllegalArgumentException { +1623 return abortExecution(executionId, null); +1624 } +1625 /** +1626 * Abort an execution (identified by the given ID). The execution should be running... +1627 * +1628 * @param executionId identifier of the execution - mandatory +1629 * @param asUser specify a user name to abort the job as, must have 'killAs' permission +1630 * @return a {@link RundeckAbort} instance - won't be null +1631 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID) +1632 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1633 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1634 * @throws IllegalArgumentException if the executionId is null +1635 */ +1636 public RundeckAbort abortExecution(Long executionId, final String asUser) throws RundeckApiException, RundeckApiLoginException, +1637 RundeckApiTokenException, IllegalArgumentException { +1638 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !"); +1639 ApiPathBuilder apiPath = new ApiPathBuilder("/execution/", executionId.toString(), "/abort"); +1640 if(null!=asUser) { +1641 apiPath.param("asUser", asUser); +1642 } +1643 return new ApiCall(this).get(apiPath, new AbortParser(rootXpath()+"/abort")); +1644 } +1645 +1646 /* +1647 * History +1648 */ +1649 +1650 /** +1651 * Get the (events) history for the given project +1652 * +1653 * @param project name of the project - mandatory +1654 * @return a {@link RundeckHistory} instance - won't be null +1655 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1656 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1657 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1658 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1659 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1660 */ +1661 public RundeckHistory getHistory(String project) throws RundeckApiException, RundeckApiLoginException, +1662 RundeckApiTokenException, IllegalArgumentException { +1663 return getHistory(project, null, null,(String) null, (String) null, null, null, null, null); +1664 } +1665 +1666 /** +1667 * Get the (events) history for the given project +1668 * +1669 * @param project name of the project - mandatory +1670 * @param max number of results to return - optional (default to 20) +1671 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +1672 * @return a {@link RundeckHistory} instance - won't be null +1673 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1674 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1675 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1676 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1677 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1678 */ +1679 public RundeckHistory getHistory(String project, Long max, Long offset) throws RundeckApiException, +1680 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1681 return getHistory(project, null, null, (String)null, (String)null, null, null, max, offset); +1682 } +1683 +1684 /** +1685 * Get the (events) history for the given project +1686 * +1687 * @param project name of the project - mandatory +1688 * @param jobId include only events matching the given job ID - optional +1689 * @param reportId include only events matching the given report ID - optional +1690 * @param user include only events created by the given user - optional +1691 * @return a {@link RundeckHistory} instance - won't be null +1692 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1693 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1694 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1695 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1696 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1697 */ +1698 public RundeckHistory getHistory(String project, String jobId, String reportId, String user) +1699 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1700 return getHistory(project, jobId, reportId, user, null, null, null, null, null); +1701 } +1702 +1703 /** +1704 * Get the (events) history for the given project +1705 * +1706 * @param project name of the project - mandatory +1707 * @param jobId include only events matching the given job ID - optional +1708 * @param reportId include only events matching the given report ID - optional +1709 * @param user include only events created by the given user - optional +1710 * @param max number of results to return - optional (default to 20) +1711 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +1712 * @return a {@link RundeckHistory} instance - won't be null +1713 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) 1714 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 1715 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1716 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) -1717 */ -1718 public InputStream generateToken(String username) throws RundeckApiException, RundeckApiLoginException, -1719 RundeckApiTokenException, IllegalArgumentException { -1720 AssertUtil.notBlank(username, "the username is mandatory to generate the token"); -1721 return new ApiCall(this).getNonApi(new ApiPathBuilder("/user/generateApiToken?login=", username)); +1716 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1717 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1718 */ +1719 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, Long max, Long offset) +1720 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1721 return getHistory(project, jobId, reportId, user, null, null, null, max, offset); 1722 } 1723 -1724 -1725 /** -1726 * Get the execution output of the given job -1727 * -1728 * @param executionId identifier of the execution - mandatory -1729 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1730 * @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. -1731 * @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 -1732 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1733 * @return {@link RundeckOutput} -1734 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1735 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1736 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1737 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1738 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, int, long, int)}, will be removed in -1739 * version 12 of this library -1740 */ -1741 public RundeckOutput getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines) -1742 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1743 return getExecutionOutput(executionId, offset, lastlines, lastmod, maxlines); -1744 } -1745 /** -1746 * Get the execution output of the given job -1747 * -1748 * @param executionId identifier of the execution - mandatory -1749 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1750 * @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. -1751 * @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 -1752 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1753 * @return {@link RundeckOutput} -1754 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1755 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1756 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1757 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1724 /** +1725 * Get the (events) history for the given project +1726 * +1727 * @param project name of the project - mandatory +1728 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y +1729 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 +1730 * weeks), "5d" (= last 5 days), etc. Optional. +1731 * @return a {@link RundeckHistory} instance - won't be null +1732 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1733 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1734 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1735 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1736 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1737 */ +1738 public RundeckHistory getHistory(String project, String recent) throws RundeckApiException, +1739 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1740 return getHistory(project, null, null, null, recent, null, null, null, null); +1741 } +1742 +1743 /** +1744 * Get the (events) history for the given project +1745 * +1746 * @param project name of the project - mandatory +1747 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y +1748 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 +1749 * weeks), "5d" (= last 5 days), etc. Optional. +1750 * @param max number of results to return - optional (default to 20) +1751 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +1752 * @return a {@link RundeckHistory} instance - won't be null +1753 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1754 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1755 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1756 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1757 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) 1758 */ -1759 public RundeckOutput getExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines) -1760 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1761 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); -1762 ApiPathBuilder param = new ApiPathBuilder( -1763 "/execution/", executionId.toString(), -1764 "/output") -1765 .param("offset", offset); -1766 if (lastlines > 0) { -1767 param.param("lastlines", lastlines); -1768 } -1769 if (lastmod >= 0) { -1770 param.param("lastmod", lastmod); -1771 } -1772 if (maxlines > 0) { -1773 param.param("maxlines", maxlines); -1774 } -1775 return new ApiCall(this).get(param, -1776 new OutputParser("result/output", createOutputEntryParser())); -1777 } -1778 /** -1779 * Get the execution state of the given execution -1780 * -1781 * @param executionId identifier of the execution - mandatory -1782 * @return {@link RundeckExecutionState} the execution state -1783 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1784 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1785 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1786 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1787 */ -1788 public RundeckExecutionState getExecutionState(Long executionId) -1789 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1790 AssertUtil.notNull(executionId, "executionId is mandatory to get the state of an execution!"); -1791 ApiPathBuilder param = new ApiPathBuilder( -1792 "/execution/", executionId.toString(), -1793 "/state"); -1794 -1795 return new ApiCall(this).get(param, new ExecutionStateParser("result/executionState")); -1796 } -1797 -1798 /** -1799 * Get the execution output of the given execution on the specified node -1800 * -1801 * @param executionId identifier of the execution - mandatory -1802 * @param nodeName name of the node -1803 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1804 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will -1805 * override the offset value and return only the specified number of lines at the end of the -1806 * log. -1807 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the -1808 * specified date OR if more data is available at the given offset -1809 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1810 * -1811 * @return {@link RundeckOutput} -1812 * -1813 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1814 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1815 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1816 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1817 */ -1818 public RundeckOutput getExecutionOutputForNode(Long executionId, String nodeName, int offset, int lastlines, -1819 long lastmod, int maxlines) -1820 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1821 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); -1822 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!"); -1823 ApiPathBuilder param = new ApiPathBuilder( -1824 "/execution/", executionId.toString(), -1825 "/output/node/", nodeName) -1826 .param("offset", offset); -1827 if(lastlines>0) { -1828 param.param("lastlines", lastlines); -1829 } -1830 if(lastmod>=0) { -1831 param.param("lastmod", lastmod); -1832 } -1833 if(maxlines>0) { -1834 param.param("maxlines", maxlines); -1835 } -1836 return new ApiCall(this).get(param, -1837 new OutputParser("result/output", createOutputEntryParser())); -1838 } -1839 /** -1840 * Get the execution output of the given execution for the specified step -1841 * -1842 * @param executionId identifier of the execution - mandatory -1843 * @param stepCtx identifier for the step -1844 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1845 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will -1846 * override the offset value and return only the specified number of lines at the end of the -1847 * log. -1848 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the -1849 * specified date OR if more data is available at the given offset -1850 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1851 * -1852 * @return {@link RundeckOutput} -1853 * -1854 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1855 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1856 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1857 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1858 */ -1859 public RundeckOutput getExecutionOutputForStep(Long executionId, String stepCtx, int offset, int lastlines, -1860 long lastmod, int maxlines) -1861 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1862 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); -1863 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!"); -1864 ApiPathBuilder param = new ApiPathBuilder( -1865 "/execution/", executionId.toString(), -1866 "/output/step/", stepCtx) -1867 .param("offset", offset); -1868 if (lastlines > 0) { -1869 param.param("lastlines", lastlines); -1870 } -1871 if (lastmod >= 0) { -1872 param.param("lastmod", lastmod); -1873 } -1874 if (maxlines > 0) { -1875 param.param("maxlines", maxlines); -1876 } -1877 return new ApiCall(this).get(param, -1878 new OutputParser("result/output", createOutputEntryParser())); -1879 } -1880 /** -1881 * Get the execution output of the given execution for the specified step -1882 * -1883 * @param executionId identifier of the execution - mandatory -1884 * @param stepCtx identifier for the step -1885 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1886 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will -1887 * override the offset value and return only the specified number of lines at the end of the -1888 * log. -1889 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the -1890 * specified date OR if more data is available at the given offset -1891 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1892 * -1893 * @return {@link RundeckOutput} -1894 * -1895 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1896 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1897 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1898 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1899 */ -1900 public RundeckOutput getExecutionOutputForNodeAndStep(Long executionId, String nodeName, String stepCtx, -1901 int offset, int lastlines, -1902 long lastmod, int maxlines) -1903 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1904 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); -1905 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!"); -1906 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!"); -1907 ApiPathBuilder param = new ApiPathBuilder( -1908 "/execution/", executionId.toString(), -1909 "/output/node/", nodeName, -1910 "/step/", stepCtx) -1911 .param("offset", offset); -1912 if (lastlines > 0) { -1913 param.param("lastlines", lastlines); -1914 } -1915 if (lastmod >= 0) { -1916 param.param("lastmod", lastmod); -1917 } -1918 if (maxlines > 0) { -1919 param.param("maxlines", maxlines); -1920 } -1921 return new ApiCall(this).get(param, -1922 new OutputParser("result/output", createOutputEntryParser())); -1923 } -1924 -1925 -1926 /** -1927 * Get the execution output of the given job -1928 * -1929 * @param executionId identifier of the execution - mandatory -1930 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1931 * @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 -1932 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1933 * @return {@link RundeckOutput} -1934 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1935 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1936 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1937 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1938 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, long, int)}, will be removed in -1939 * version 12 of this library -1940 */ -1941 public RundeckOutput getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines) -1942 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1943 return getExecutionOutput(executionId, offset, lastmod, maxlines); -1944 } -1945 /** -1946 * Get the execution output of the given job -1947 * -1948 * @param executionId identifier of the execution - mandatory -1949 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1950 * @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 -1951 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1952 * @return {@link RundeckOutput} -1953 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) -1954 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -1955 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1956 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) -1957 */ -1958 public RundeckOutput getExecutionOutput(Long executionId, int offset, long lastmod, int maxlines) -1959 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1960 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); -1961 ApiPathBuilder param = new ApiPathBuilder("/execution/", executionId.toString(), "/output") -1962 .param("offset", offset); -1963 if (lastmod >= 0) { -1964 param.param("lastmod", lastmod); -1965 } -1966 if (maxlines > 0) { -1967 param.param("maxlines", maxlines); -1968 } -1969 return new ApiCall(this).get(param, new OutputParser("result/output", createOutputEntryParser())); -1970 } -1971 /** -1972 * Get the execution state output sequence of the given job -1973 * -1974 * @param executionId identifier of the execution - mandatory -1975 * @param stateOnly if true, include only state change output entries, otherwise include state and log entries -1976 * @param offset byte offset to read from in the file. 0 indicates the beginning. -1977 * @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 -1978 * @param maxlines maximum number of lines to retrieve forward from the specified offset. -1979 * @return {@link RundeckOutput} -1980 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +1759 public RundeckHistory getHistory(String project, String recent, Long max, Long offset) throws RundeckApiException, +1760 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1761 return getHistory(project, null, null, null, recent, null, null, max, offset); +1762 } +1763 +1764 /** +1765 * Get the (events) history for the given project +1766 * +1767 * @param project name of the project - mandatory +1768 * @param begin date for the earlier events to retrieve - optional +1769 * @param end date for the latest events to retrieve - optional +1770 * @return a {@link RundeckHistory} instance - won't be null +1771 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1772 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1773 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1774 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1775 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1776 */ +1777 public RundeckHistory getHistory(String project, Date begin, Date end) throws RundeckApiException, +1778 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1779 return getHistory(project, null, null, (String)null, (String)null, begin, end, null, null); +1780 } +1781 +1782 /** +1783 * Get the (events) history for the given project +1784 * +1785 * @param project name of the project - mandatory +1786 * @param begin date for the earlier events to retrieve - optional +1787 * @param end date for the latest events to retrieve - optional +1788 * @param max number of results to return - optional (default to 20) +1789 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +1790 * @return a {@link RundeckHistory} instance - won't be null +1791 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1792 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1793 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1794 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1795 * @see #getHistory(String, String, String, String, String, Date, Date, Long, Long) +1796 */ +1797 public RundeckHistory getHistory(String project, Date begin, Date end, Long max, Long offset) +1798 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1799 return getHistory(project, null, null, (String)null, (String) null, begin, end, max, offset); +1800 } +1801 +1802 /** +1803 * Get the (events) history for the given project +1804 * +1805 * @param project name of the project - mandatory +1806 * @param jobId include only events matching the given job ID - optional +1807 * @param reportId include only events matching the given report ID - optional +1808 * @param user include only events created by the given user - optional +1809 * @param recent include only events matching the given period of time. Format : "XY", where X is an integer, and Y +1810 * is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). Example : "2w" (= last 2 +1811 * weeks), "5d" (= last 5 days), etc. Optional. +1812 * @param begin date for the earlier events to retrieve - optional +1813 * @param end date for the latest events to retrieve - optional +1814 * @param max number of results to return - optional (default to 20) +1815 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +1816 * @return a {@link RundeckHistory} instance - won't be null +1817 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1818 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1819 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1820 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1821 */ +1822 public RundeckHistory getHistory(String project, String jobId, String reportId, String user, String recent, +1823 Date begin, Date end, Long max, Long offset) throws RundeckApiException, RundeckApiLoginException, +1824 RundeckApiTokenException, IllegalArgumentException { +1825 AssertUtil.notBlank(project, "project is mandatory to get the history !"); +1826 return new ApiCall(this).get(new ApiPathBuilder("/history").param("project", project) +1827 .param("jobIdFilter", jobId) +1828 .param("reportIdFilter", reportId) +1829 .param("userFilter", user) +1830 .param("recentFilter", recent) +1831 .param("begin", begin) +1832 .param("end", end) +1833 .param("max", max) +1834 .param("offset", offset), +1835 new HistoryParser(rootXpath()+"/events")); +1836 } +1837 +1838 /** +1839 * Get the (events) history for the given project +1840 * +1841 * @param project name of the project - mandatory +1842 * @param includeJobNames list of job names ("group/name") to include results for +1843 * @param excludeJobNames list of job names ("group/name") to exclude results for +1844 * @param user include only events created by the given user - optional +1845 * @param recent include only events matching the given period of time. Format : "XY", where X is an +1846 * integer, and Y is one of : "h" (hour), "d" (day), "w" (week), "m" (month), "y" (year). +1847 * Example : "2w" (= last 2 weeks), "5d" (= last 5 days), etc. Optional. +1848 * @param begin date for the earlier events to retrieve - optional +1849 * @param end date for the latest events to retrieve - optional +1850 * @param max number of results to return - optional (default to 20) +1851 * @param offset the 0-indexed offset for the first result to return - optional (default to O) +1852 * +1853 * @return a {@link RundeckHistory} instance - won't be null +1854 * +1855 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1856 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1857 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1858 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1859 */ +1860 public RundeckHistory getHistory(String project, +1861 String user, +1862 String recent, +1863 List<String> includeJobNames, +1864 List<String> excludeJobNames, +1865 Date begin, +1866 Date end, +1867 Long max, +1868 Long offset) +1869 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1870 +1871 AssertUtil.notBlank(project, "project is mandatory to get the history !"); +1872 final ApiPathBuilder builder = new ApiPathBuilder("/history").param("project", project) +1873 .field("jobListFilter", includeJobNames) +1874 .field("excludeJobListFilter", excludeJobNames) +1875 .param("userFilter", user) +1876 .param("recentFilter", recent) +1877 .param("begin", begin) +1878 .param("end", end) +1879 .param("max", max) +1880 .param("offset", offset); +1881 +1882 return new ApiCall(this).postOrGet(builder, new HistoryParser(rootXpath()+"/events")); +1883 } +1884 +1885 /* +1886 * Nodes +1887 */ +1888 +1889 /** +1890 * List all nodes (for all projects) +1891 * +1892 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null +1893 * @throws RundeckApiException in case of error when calling the API +1894 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1895 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1896 */ +1897 public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException { +1898 List<RundeckNode> nodes = new ArrayList<RundeckNode>(); +1899 for (RundeckProject project : getProjects()) { +1900 nodes.addAll(getNodes(project.getName())); +1901 } +1902 return nodes; +1903 } +1904 +1905 /** +1906 * List all nodes that belongs to the given project +1907 * +1908 * @param project name of the project - mandatory +1909 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null +1910 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1911 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1912 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1913 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1914 * @see #getNodes(String, Properties) +1915 */ +1916 public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException, +1917 RundeckApiTokenException, IllegalArgumentException { +1918 return getNodes(project, null); +1919 } +1920 +1921 /** +1922 * List nodes that belongs to the given project +1923 * +1924 * @param project name of the project - mandatory +1925 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder} +1926 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null +1927 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name) +1928 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1929 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1930 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace) +1931 */ +1932 public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException, +1933 RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +1934 AssertUtil.notBlank(project, "project is mandatory to get all nodes !"); +1935 return new ApiCall(this).get(new ApiPathBuilder("/resources").param("project", project) +1936 .nodeFilters(nodeFilters), +1937 new ListParser<RundeckNode>(new NodeParser(), "project/node")); +1938 } +1939 +1940 /** +1941 * Get the definition of a single node +1942 * +1943 * @param name of the node - mandatory +1944 * @param project name of the project - mandatory +1945 * @return a {@link RundeckNode} instance - won't be null +1946 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +1947 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1948 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1949 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +1950 */ +1951 public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException, +1952 RundeckApiTokenException, IllegalArgumentException { +1953 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !"); +1954 AssertUtil.notBlank(project, "project is mandatory to get a node !"); +1955 return new ApiCall(this).get(new ApiPathBuilder("/resource/", name).param("project", project), +1956 new NodeParser("project/node")); +1957 } +1958 +1959 /** +1960 * Get the output of a job execution +1961 * +1962 * @param executionId id of the execution - mandatory +1963 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +1964 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +1965 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1966 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +1967 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +1968 */ +1969 public InputStream getOutput(String executionId) throws RundeckApiException, RundeckApiLoginException, +1970 RundeckApiTokenException, IllegalArgumentException { +1971 AssertUtil.notBlank(executionId, "the execution id is mandatory to get execution output !"); +1972 return new ApiCall(this).getNonApi(new ApiPathBuilder("/execution/downloadOutput/", executionId)); +1973 } +1974 +1975 /** +1976 * Get the html page of the user's profile +1977 * +1978 * @param username - mandatory +1979 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +1980 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) 1981 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) 1982 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -1983 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +1983 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) 1984 */ -1985 public RundeckOutput getExecutionOutputState(Long executionId, boolean stateOnly, int offset, long lastmod, -1986 int maxlines) -1987 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { -1988 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); -1989 ApiPathBuilder param = new ApiPathBuilder("/execution/", executionId.toString(), "/output/state") -1990 .param("offset", offset); -1991 if (lastmod >= 0) { -1992 param.param("lastmod", lastmod); -1993 } -1994 if (maxlines > 0) { -1995 param.param("maxlines", maxlines); -1996 } -1997 if(stateOnly) { -1998 param.param("stateOnly", true); -1999 } -2000 return new ApiCall(this).get(param, new OutputParser("result/output", createOutputEntryParser())); -2001 } -2002 -2003 private OutputEntryParser createOutputEntryParser() { -2004 if (getApiVersion() <= Version.V5.versionNumber) { -2005 return new OutputEntryParserV5(); -2006 }else{ -2007 return new OutputEntryParser(); -2008 } -2009 } -2010 -2011 -2012 /* -2013 * System Info -2014 */ -2015 -2016 /** -2017 * Get system informations about the RunDeck server -2018 * -2019 * @return a {@link RundeckSystemInfo} instance - won't be null -2020 * @throws RundeckApiException in case of error when calling the API -2021 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) -2022 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) -2023 */ -2024 public RundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException, -2025 RundeckApiTokenException { -2026 return new ApiCall(this).get(new ApiPathBuilder("/system/info"), new SystemInfoParser("result/system")); -2027 } -2028 +1985 public InputStream getProfilePage(String username) throws RundeckApiException, RundeckApiLoginException, +1986 RundeckApiTokenException, IllegalArgumentException { +1987 AssertUtil.notBlank(username, "the username is mandatory to get profile page !"); +1988 return new ApiCall(this).getNonApi(new ApiPathBuilder("/user/profile?login=", username)); +1989 } +1990 +1991 +1992 /** +1993 * Generate a new token and get the result page (which is the html page of the user's profile) +1994 * +1995 * @param username - mandatory +1996 * @return an {@link InputStream} instance, not linked to any network resources - won't be null +1997 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name) +1998 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +1999 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2000 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace) +2001 */ +2002 public InputStream generateToken(String username) throws RundeckApiException, RundeckApiLoginException, +2003 RundeckApiTokenException, IllegalArgumentException { +2004 AssertUtil.notBlank(username, "the username is mandatory to generate the token"); +2005 return new ApiCall(this).getNonApi(new ApiPathBuilder("/user/generateApiToken?login=", username)); +2006 } +2007 +2008 +2009 /** +2010 * Get the execution output of the given job +2011 * +2012 * @param executionId identifier of the execution - mandatory +2013 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2014 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log. +2015 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset +2016 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2017 * @return {@link RundeckOutput} +2018 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2019 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2020 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2021 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2022 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, int, long, int)}, will be removed in +2023 * version 12 of this library +2024 */ +2025 public RundeckOutput getJobExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines) +2026 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2027 return getExecutionOutput(executionId, offset, lastlines, lastmod, maxlines); +2028 } 2029 /** -2030 * @return the URL of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) -2031 */ -2032 public String getUrl() { -2033 return url; -2034 } -2035 -2036 /** -2037 * @return the auth-token used for authentication on the RunDeck instance (null if using login-based or session-based auth) -2038 */ -2039 public String getToken() { -2040 return token; -2041 } -2042 -2043 /** -2044 * @return the login used for authentication on the RunDeck instance (null if using token-based or session-based auth) -2045 */ -2046 public String getLogin() { -2047 return login; -2048 } -2049 -2050 /** -2051 * @return the password used for authentication on the RunDeck instance (null if using token-based or session-based auth) -2052 */ -2053 public String getPassword() { -2054 return password; -2055 } -2056 -2057 /** -2058 * @return the sessionID used for authentication on the RunDeck instance (null if using login-based or token-based auth) -2059 */ -2060 public String getSessionID() { -2061 return sessionID; -2062 } -2063 -2064 @Override -2065 public String toString() { -2066 StringBuilder str = new StringBuilder(); -2067 str.append("RundeckClient ").append(API_VERSION); -2068 str.append(" [").append(url).append("] "); -2069 if (token != null) { -2070 str.append("(token=").append(token).append(")"); -2071 } else { -2072 str.append("(credentials=").append(login).append("|").append(password).append(")"); -2073 } -2074 return str.toString(); -2075 } -2076 -2077 @Override -2078 public int hashCode() { -2079 final int prime = 31; -2080 int result = 1; -2081 result = prime * result + ((login == null) ? 0 : login.hashCode()); -2082 result = prime * result + ((password == null) ? 0 : password.hashCode()); -2083 result = prime * result + ((token == null) ? 0 : token.hashCode()); -2084 result = prime * result + ((url == null) ? 0 : url.hashCode()); -2085 return result; -2086 } -2087 -2088 @Override -2089 public boolean equals(Object obj) { -2090 if (this == obj) -2091 return true; -2092 if (obj == null) -2093 return false; -2094 if (getClass() != obj.getClass()) -2095 return false; -2096 RundeckClient other = (RundeckClient) obj; -2097 if (login == null) { -2098 if (other.login != null) -2099 return false; -2100 } else if (!login.equals(other.login)) -2101 return false; -2102 if (password == null) { -2103 if (other.password != null) -2104 return false; -2105 } else if (!password.equals(other.password)) -2106 return false; -2107 if (token == null) { -2108 if (other.token != null) -2109 return false; -2110 } else if (!token.equals(other.token)) -2111 return false; -2112 if (url == null) { -2113 if (other.url != null) -2114 return false; -2115 } else if (!url.equals(other.url)) -2116 return false; -2117 return true; -2118 } -2119 -2120 } +2030 * Get the execution output of the given job +2031 * +2032 * @param executionId identifier of the execution - mandatory +2033 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2034 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will override the offset value and return only the specified number of lines at the end of the log. +2035 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset +2036 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2037 * @return {@link RundeckOutput} +2038 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2039 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2040 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2041 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2042 */ +2043 public RundeckOutput getExecutionOutput(Long executionId, int offset, int lastlines, long lastmod, int maxlines) +2044 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2045 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2046 ApiPathBuilder param = new ApiPathBuilder( +2047 "/execution/", executionId.toString(), +2048 "/output") +2049 .param("offset", offset); +2050 if (lastlines > 0) { +2051 param.param("lastlines", lastlines); +2052 } +2053 if (lastmod >= 0) { +2054 param.param("lastmod", lastmod); +2055 } +2056 if (maxlines > 0) { +2057 param.param("maxlines", maxlines); +2058 } +2059 return new ApiCall(this).get(param, +2060 new OutputParser(rootXpath()+"/output", createOutputEntryParser())); +2061 } +2062 /** +2063 * Get the execution state of the given execution +2064 * +2065 * @param executionId identifier of the execution - mandatory +2066 * @return {@link RundeckExecutionState} the execution state +2067 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2068 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2069 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2070 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2071 */ +2072 public RundeckExecutionState getExecutionState(Long executionId) +2073 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2074 AssertUtil.notNull(executionId, "executionId is mandatory to get the state of an execution!"); +2075 ApiPathBuilder param = new ApiPathBuilder( +2076 "/execution/", executionId.toString(), +2077 "/state"); +2078 +2079 return new ApiCall(this).get(param, new ExecutionStateParser(rootXpath()+"/executionState")); +2080 } +2081 +2082 /** +2083 * Get the execution output of the given execution on the specified node +2084 * +2085 * @param executionId identifier of the execution - mandatory +2086 * @param nodeName name of the node +2087 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2088 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will +2089 * override the offset value and return only the specified number of lines at the end of the +2090 * log. +2091 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the +2092 * specified date OR if more data is available at the given offset +2093 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2094 * +2095 * @return {@link RundeckOutput} +2096 * +2097 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2098 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2099 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2100 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2101 */ +2102 public RundeckOutput getExecutionOutputForNode(Long executionId, String nodeName, int offset, int lastlines, +2103 long lastmod, int maxlines) +2104 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2105 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2106 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!"); +2107 ApiPathBuilder param = new ApiPathBuilder( +2108 "/execution/", executionId.toString(), +2109 "/output/node/", nodeName) +2110 .param("offset", offset); +2111 if(lastlines>0) { +2112 param.param("lastlines", lastlines); +2113 } +2114 if(lastmod>=0) { +2115 param.param("lastmod", lastmod); +2116 } +2117 if(maxlines>0) { +2118 param.param("maxlines", maxlines); +2119 } +2120 return new ApiCall(this).get(param, +2121 new OutputParser(rootXpath()+"/output", createOutputEntryParser())); +2122 } +2123 /** +2124 * Get the execution output of the given execution for the specified step +2125 * +2126 * @param executionId identifier of the execution - mandatory +2127 * @param stepCtx identifier for the step +2128 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2129 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will +2130 * override the offset value and return only the specified number of lines at the end of the +2131 * log. +2132 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the +2133 * specified date OR if more data is available at the given offset +2134 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2135 * +2136 * @return {@link RundeckOutput} +2137 * +2138 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2139 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2140 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2141 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2142 */ +2143 public RundeckOutput getExecutionOutputForStep(Long executionId, String stepCtx, int offset, int lastlines, +2144 long lastmod, int maxlines) +2145 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2146 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2147 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!"); +2148 ApiPathBuilder param = new ApiPathBuilder( +2149 "/execution/", executionId.toString(), +2150 "/output/step/", stepCtx) +2151 .param("offset", offset); +2152 if (lastlines > 0) { +2153 param.param("lastlines", lastlines); +2154 } +2155 if (lastmod >= 0) { +2156 param.param("lastmod", lastmod); +2157 } +2158 if (maxlines > 0) { +2159 param.param("maxlines", maxlines); +2160 } +2161 return new ApiCall(this).get(param, +2162 new OutputParser(rootXpath()+"/output", createOutputEntryParser())); +2163 } +2164 /** +2165 * Get the execution output of the given execution for the specified step +2166 * +2167 * @param executionId identifier of the execution - mandatory +2168 * @param stepCtx identifier for the step +2169 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2170 * @param lastlines nnumber of lines to retrieve from the end of the available output. If specified it will +2171 * override the offset value and return only the specified number of lines at the end of the +2172 * log. +2173 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the +2174 * specified date OR if more data is available at the given offset +2175 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2176 * +2177 * @return {@link RundeckOutput} +2178 * +2179 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2180 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2181 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2182 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2183 */ +2184 public RundeckOutput getExecutionOutputForNodeAndStep(Long executionId, String nodeName, String stepCtx, +2185 int offset, int lastlines, +2186 long lastmod, int maxlines) +2187 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2188 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2189 AssertUtil.notNull(nodeName, "nodeName is mandatory to get the output of a job execution!"); +2190 AssertUtil.notNull(stepCtx, "stepCtx is mandatory to get the output of a job execution!"); +2191 ApiPathBuilder param = new ApiPathBuilder( +2192 "/execution/", executionId.toString(), +2193 "/output/node/", nodeName, +2194 "/step/", stepCtx) +2195 .param("offset", offset); +2196 if (lastlines > 0) { +2197 param.param("lastlines", lastlines); +2198 } +2199 if (lastmod >= 0) { +2200 param.param("lastmod", lastmod); +2201 } +2202 if (maxlines > 0) { +2203 param.param("maxlines", maxlines); +2204 } +2205 return new ApiCall(this).get(param, +2206 new OutputParser(rootXpath()+"/output", createOutputEntryParser())); +2207 } +2208 +2209 +2210 /** +2211 * Get the execution output of the given job +2212 * +2213 * @param executionId identifier of the execution - mandatory +2214 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2215 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset +2216 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2217 * @return {@link RundeckOutput} +2218 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2219 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2220 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2221 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2222 * @deprecated renamed for clarity use {@link #getExecutionOutput(Long, int, long, int)}, will be removed in +2223 * version 12 of this library +2224 */ +2225 public RundeckOutput getJobExecutionOutput(Long executionId, int offset, long lastmod, int maxlines) +2226 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2227 return getExecutionOutput(executionId, offset, lastmod, maxlines); +2228 } +2229 /** +2230 * Get the execution output of the given job +2231 * +2232 * @param executionId identifier of the execution - mandatory +2233 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2234 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset +2235 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2236 * @return {@link RundeckOutput} +2237 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2238 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2239 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2240 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2241 */ +2242 public RundeckOutput getExecutionOutput(Long executionId, int offset, long lastmod, int maxlines) +2243 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2244 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2245 ApiPathBuilder param = new ApiPathBuilder("/execution/", executionId.toString(), "/output") +2246 .param("offset", offset); +2247 if (lastmod >= 0) { +2248 param.param("lastmod", lastmod); +2249 } +2250 if (maxlines > 0) { +2251 param.param("maxlines", maxlines); +2252 } +2253 return new ApiCall(this).get(param, new OutputParser(rootXpath()+"/output", createOutputEntryParser())); +2254 } +2255 /** +2256 * Get the execution state output sequence of the given job +2257 * +2258 * @param executionId identifier of the execution - mandatory +2259 * @param stateOnly if true, include only state change output entries, otherwise include state and log entries +2260 * @param offset byte offset to read from in the file. 0 indicates the beginning. +2261 * @param lastmod epoch datestamp in milliseconds, return results only if modification changed since the specified date OR if more data is available at the given offset +2262 * @param maxlines maximum number of lines to retrieve forward from the specified offset. +2263 * @return {@link RundeckOutput} +2264 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID) +2265 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2266 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2267 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace) +2268 */ +2269 public RundeckOutput getExecutionOutputState(Long executionId, boolean stateOnly, int offset, long lastmod, +2270 int maxlines) +2271 throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException { +2272 AssertUtil.notNull(executionId, "executionId is mandatory to get the output of a job execution!"); +2273 ApiPathBuilder param = new ApiPathBuilder("/execution/", executionId.toString(), "/output/state") +2274 .param("offset", offset); +2275 if (lastmod >= 0) { +2276 param.param("lastmod", lastmod); +2277 } +2278 if (maxlines > 0) { +2279 param.param("maxlines", maxlines); +2280 } +2281 if(stateOnly) { +2282 param.param("stateOnly", true); +2283 } +2284 return new ApiCall(this).get(param, new OutputParser(rootXpath()+"/output", createOutputEntryParser())); +2285 } +2286 +2287 private OutputEntryParser createOutputEntryParser() { +2288 if (getApiVersion() <= Version.V5.versionNumber) { +2289 return new OutputEntryParserV5(); +2290 }else{ +2291 return new OutputEntryParser(); +2292 } +2293 } +2294 +2295 +2296 /* +2297 * System Info +2298 */ +2299 +2300 /** +2301 * Get system informations about the RunDeck server +2302 * +2303 * @return a {@link RundeckSystemInfo} instance - won't be null +2304 * @throws RundeckApiException in case of error when calling the API +2305 * @throws RundeckApiLoginException if the login fails (in case of login-based authentication) +2306 * @throws RundeckApiTokenException if the token is invalid (in case of token-based authentication) +2307 */ +2308 public RundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException, +2309 RundeckApiTokenException { +2310 return new ApiCall(this).get(new ApiPathBuilder("/system/info"), new SystemInfoParser(rootXpath()+"/system")); +2311 } +2312 +2313 +2314 /* +2315 * API token +2316 */ +2317 +2318 /** +2319 * List API tokens for a user. +2320 * @param user username +2321 * @return list of tokens +2322 * @throws RundeckApiException +2323 */ +2324 public List<RundeckToken> listApiTokens(final String user) throws RundeckApiException { +2325 AssertUtil.notNull(user, "user is mandatory to list API tokens for a user."); +2326 return new ApiCall(this). +2327 get(new ApiPathBuilder("/tokens/", user), +2328 new ListParser<RundeckToken>(new RundeckTokenParser(), "/tokens/token")); +2329 } +2330 +2331 /** +2332 * List all API tokens +2333 * @return list of tokens +2334 * @throws RundeckApiException +2335 */ +2336 public List<RundeckToken> listApiTokens() throws RundeckApiException { +2337 return new ApiCall(this). +2338 get(new ApiPathBuilder("/tokens"), +2339 new ListParser<RundeckToken>(new RundeckTokenParser(), "/tokens/token")); +2340 } +2341 +2342 /** +2343 * Generate an API token for a user. +2344 * @param user +2345 * @return +2346 * @throws RundeckApiException +2347 */ +2348 public String generateApiToken(final String user) throws RundeckApiException{ +2349 AssertUtil.notNull(user, "user is mandatory to generate an API token for a user."); +2350 RundeckToken result = new ApiCall(this). +2351 post(new ApiPathBuilder("/tokens/", user).emptyContent(), +2352 new RundeckTokenParser("/token")); +2353 return result.getToken(); +2354 } +2355 /** +2356 * Delete an existing token +2357 * @param token +2358 * @return +2359 * @throws RundeckApiException +2360 */ +2361 public boolean deleteApiToken(final String token) throws RundeckApiException{ +2362 AssertUtil.notNull(token, "token is mandatory to delete an API token."); +2363 new ApiCall(this).delete(new ApiPathBuilder("/token/", token)); +2364 return true; +2365 } +2366 /** +2367 * Return user info for an existing token +2368 * @param token +2369 * @return token info +2370 * @throws RundeckApiException +2371 */ +2372 public RundeckToken getApiToken(final String token) throws RundeckApiException{ +2373 AssertUtil.notNull(token, "token is mandatory to get an API token."); +2374 return new ApiCall(this).get(new ApiPathBuilder("/token/", token), new RundeckTokenParser("/token")); +2375 } +2376 +2377 /** +2378 * Store an key file +2379 * @param path ssh key storage path, must start with "keys/" +2380 * @param keyfile key file +2381 * @param privateKey true to store private key, false to store public key +2382 * @return the key resource +2383 * @throws RundeckApiException +2384 */ +2385 public KeyResource storeKey(final String path, final File keyfile, boolean privateKey) throws RundeckApiException{ +2386 AssertUtil.notNull(path, "path is mandatory to store an key."); +2387 AssertUtil.notNull(keyfile, "keyfile is mandatory to store an key."); +2388 if (!path.startsWith(STORAGE_KEYS_PATH)) { +2389 throw new IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH); +2390 } +2391 return new ApiCall(this).post( +2392 new ApiPathBuilder(STORAGE_ROOT_PATH, path).content( +2393 privateKey ? "application/octet-stream" : "application/pgp-keys", +2394 keyfile +2395 ), +2396 new SSHKeyResourceParser("/resource") +2397 ); +2398 } +2399 +2400 /** +2401 * Get metadata for an key file +2402 * +2403 * @param path ssh key storage path, must start with "keys/" +2404 * +2405 * @return the ssh key resource +2406 * +2407 * @throws RundeckApiException if there is an error, or if the path is a directory not a file +2408 */ +2409 public KeyResource getKey(final String path) throws RundeckApiException { +2410 AssertUtil.notNull(path, "path is mandatory to get an key."); +2411 if (!path.startsWith(STORAGE_KEYS_PATH)) { +2412 throw new IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH); +2413 } +2414 KeyResource storageResource = new ApiCall(this).get( +2415 new ApiPathBuilder(STORAGE_ROOT_PATH, path), +2416 new SSHKeyResourceParser("/resource") +2417 ); +2418 if (storageResource.isDirectory()) { +2419 throw new RundeckApiException("Key Path is a directory: " + path); +2420 } +2421 return storageResource; +2422 } +2423 +2424 /** +2425 * Get content for a public key file +2426 * @param path ssh key storage path, must start with "keys/" +2427 * @param out outputstream to write data to +2428 * +2429 * @return length of written data +2430 * @throws RundeckApiException +2431 */ +2432 public int getPublicKeyContent(final String path, final OutputStream out) throws +2433 RundeckApiException, IOException { +2434 AssertUtil.notNull(path, "path is mandatory to get an key."); +2435 if (!path.startsWith(STORAGE_KEYS_PATH)) { +2436 throw new IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH); +2437 } +2438 try { +2439 return new ApiCall(this).get( +2440 new ApiPathBuilder(STORAGE_ROOT_PATH, path) +2441 .accept("application/pgp-keys") +2442 .requireContentType("application/pgp-keys"), +2443 out +2444 ); +2445 } catch (RundeckApiException.RundeckApiHttpContentTypeException e) { +2446 throw new RundeckApiException("Requested Key path was not a Public key: " + path, e); +2447 } +2448 } +2449 +2450 /** +2451 * Get content for a public key file +2452 * @param path ssh key storage path, must start with "keys/" +2453 * @param out file to write data to +2454 * @return length of written data +2455 * @throws RundeckApiException +2456 */ +2457 public int getPublicKeyContent(final String path, final File out) throws +2458 RundeckApiException, IOException { +2459 final FileOutputStream fileOutputStream = new FileOutputStream(out); +2460 try { +2461 return getPublicKeyContent(path, fileOutputStream); +2462 }finally { +2463 fileOutputStream.close(); +2464 } +2465 } +2466 +2467 /** +2468 * List contents of root key directory +2469 * +2470 * @return list of key resources +2471 * @throws RundeckApiException +2472 */ +2473 public List<KeyResource> listKeyDirectoryRoot() throws RundeckApiException { +2474 return listKeyDirectory(STORAGE_KEYS_PATH); +2475 } +2476 /** +2477 * List contents of key directory +2478 * +2479 * @param path ssh key storage path, must start with "keys/" +2480 * +2481 * @throws RundeckApiException if there is an error, or if the path is a file not a directory +2482 */ +2483 public List<KeyResource> listKeyDirectory(final String path) throws RundeckApiException { +2484 AssertUtil.notNull(path, "path is mandatory to get an key."); +2485 if (!path.startsWith(STORAGE_KEYS_PATH)) { +2486 throw new IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH); +2487 } +2488 KeyResource storageResource = new ApiCall(this).get( +2489 new ApiPathBuilder(STORAGE_ROOT_PATH, path), +2490 new SSHKeyResourceParser("/resource") +2491 ); +2492 if(!storageResource.isDirectory()) { +2493 throw new RundeckApiException("key path is not a directory path: " + path); +2494 } +2495 return storageResource.getDirectoryContents(); +2496 } +2497 +2498 /** +2499 * Delete an key file +2500 * @param path a path to a key file, must start with "keys/" +2501 */ +2502 public void deleteKey(final String path){ +2503 AssertUtil.notNull(path, "path is mandatory to delete an key."); +2504 if (!path.startsWith(STORAGE_KEYS_PATH)) { +2505 throw new IllegalArgumentException("key storage path must start with: " + STORAGE_KEYS_PATH); +2506 } +2507 new ApiCall(this).delete(new ApiPathBuilder(STORAGE_ROOT_PATH, path)); +2508 } +2509 +2510 /** +2511 * @return the URL of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc) +2512 */ +2513 public String getUrl() { +2514 return url; +2515 } +2516 +2517 /** +2518 * @return the auth-token used for authentication on the RunDeck instance (null if using login-based or session-based auth) +2519 */ +2520 public String getToken() { +2521 return token; +2522 } +2523 +2524 /** +2525 * @return the login used for authentication on the RunDeck instance (null if using token-based or session-based auth) +2526 */ +2527 public String getLogin() { +2528 return login; +2529 } +2530 +2531 /** +2532 * @return the password used for authentication on the RunDeck instance (null if using token-based or session-based auth) +2533 */ +2534 public String getPassword() { +2535 return password; +2536 } +2537 +2538 /** +2539 * @return the sessionID used for authentication on the RunDeck instance (null if using login-based or token-based auth) +2540 */ +2541 public String getSessionID() { +2542 return sessionID; +2543 } +2544 +2545 @Override +2546 public String toString() { +2547 StringBuilder str = new StringBuilder(); +2548 str.append("RundeckClient ").append(API_VERSION); +2549 str.append(" [").append(url).append("] "); +2550 if (token != null) { +2551 str.append("(token=").append(token).append(")"); +2552 } else { +2553 str.append("(credentials=").append(login).append("|").append(password).append(")"); +2554 } +2555 return str.toString(); +2556 } +2557 +2558 @Override +2559 public int hashCode() { +2560 final int prime = 31; +2561 int result = 1; +2562 result = prime * result + ((login == null) ? 0 : login.hashCode()); +2563 result = prime * result + ((password == null) ? 0 : password.hashCode()); +2564 result = prime * result + ((token == null) ? 0 : token.hashCode()); +2565 result = prime * result + ((url == null) ? 0 : url.hashCode()); +2566 return result; +2567 } +2568 +2569 @Override +2570 public boolean equals(Object obj) { +2571 if (this == obj) +2572 return true; +2573 if (obj == null) +2574 return false; +2575 if (getClass() != obj.getClass()) +2576 return false; +2577 RundeckClient other = (RundeckClient) obj; +2578 if (login == null) { +2579 if (other.login != null) +2580 return false; +2581 } else if (!login.equals(other.login)) +2582 return false; +2583 if (password == null) { +2584 if (other.password != null) +2585 return false; +2586 } else if (!password.equals(other.password)) +2587 return false; +2588 if (token == null) { +2589 if (other.token != null) +2590 return false; +2591 } else if (!token.equals(other.token)) +2592 return false; +2593 if (url == null) { +2594 if (other.url != null) +2595 return false; +2596 } else if (!url.equals(other.url)) +2597 return false; +2598 return true; +2599 } +2600 +2601 }
    diff --git a/xref/org/rundeck/api/domain/ArchiveImport.html b/xref/org/rundeck/api/domain/ArchiveImport.html new file mode 100644 index 0000000..52862c8 --- /dev/null +++ b/xref/org/rundeck/api/domain/ArchiveImport.html @@ -0,0 +1,52 @@ + + + + +ArchiveImport xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.util.List;
    +4   
    +5   /**
    +6    * ArchiveImport describes the result of an {@link org.rundeck.api.RundeckClient#importArchive(String, java.io.File,
    +7    * boolean, boolean)} request.
    +8    *
    +9    * @author greg
    +10   * @since 2014-03-09
    +11   */
    +12  public class ArchiveImport {
    +13      private boolean successful;
    +14      private List<String> errorMessages;
    +15  
    +16      public ArchiveImport(final boolean successful, final List<String> errorMessages) {
    +17          this.successful = successful;
    +18          this.errorMessages = errorMessages;
    +19      }
    +20  
    +21      /**
    +22       * Return true if successful
    +23       * @return
    +24       */
    +25      public boolean isSuccessful() {
    +26          return successful;
    +27      }
    +28  
    +29  
    +30      /**
    +31       * Return a list of error messages if unsuccessful
    +32       * @return
    +33       */
    +34      public List<String> getErrorMessages() {
    +35          return errorMessages;
    +36      }
    +37  
    +38  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/BaseKeyResource.html b/xref/org/rundeck/api/domain/BaseKeyResource.html new file mode 100644 index 0000000..8c071e9 --- /dev/null +++ b/xref/org/rundeck/api/domain/BaseKeyResource.html @@ -0,0 +1,72 @@ + + + + +BaseKeyResource xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.util.ArrayList;
    +4   import java.util.List;
    +5   
    +6   /**
    +7    * BaseKeyResource is ...
    +8    *
    +9    * @author Greg Schueler <greg@simplifyops.com>
    +10   * @since 2014-04-04
    +11   */
    +12  public class BaseKeyResource extends BaseStorageResource implements KeyResource {
    +13      private boolean privateKey;
    +14  
    +15      public BaseKeyResource() {
    +16      }
    +17  
    +18  
    +19      public boolean isPrivateKey() {
    +20          return privateKey;
    +21      }
    +22  
    +23      public void setPrivateKey(boolean privateKey) {
    +24          this.privateKey = privateKey;
    +25      }
    +26  
    +27      ArrayList<KeyResource> keyResources = new ArrayList<KeyResource>();
    +28  
    +29      @Override
    +30      public void setDirectoryContents(List<? extends StorageResource> directoryContents) {
    +31          for (StorageResource directoryContent : directoryContents) {
    +32              keyResources.add(from(directoryContent));
    +33          }
    +34      }
    +35  
    +36      @Override
    +37      public List<KeyResource> getDirectoryContents() {
    +38          return keyResources;
    +39      }
    +40  
    +41      public static BaseKeyResource from(final StorageResource source) {
    +42          final BaseKeyResource baseSshKeyResource = new BaseKeyResource();
    +43          baseSshKeyResource.setDirectory(source.isDirectory());
    +44          baseSshKeyResource.setPath(source.getPath());
    +45          baseSshKeyResource.setName(source.getName());
    +46          baseSshKeyResource.setMetadata(source.getMetadata());
    +47          baseSshKeyResource.setUrl(source.getUrl());
    +48          if (!baseSshKeyResource.isDirectory()) {
    +49              baseSshKeyResource.setPrivateKey(
    +50                      null != baseSshKeyResource.getMetadata() && "private".equals(baseSshKeyResource.getMetadata().get
    +51                              ("Rundeck-key-type"))
    +52              );
    +53          } else if (null != source.getDirectoryContents()) {
    +54              baseSshKeyResource.setDirectoryContents(source.getDirectoryContents());
    +55          }
    +56          return baseSshKeyResource;
    +57      }
    +58  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/BaseStorageResource.html b/xref/org/rundeck/api/domain/BaseStorageResource.html new file mode 100644 index 0000000..d41325c --- /dev/null +++ b/xref/org/rundeck/api/domain/BaseStorageResource.html @@ -0,0 +1,100 @@ + + + + +BaseStorageResource xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.util.List;
    +4   import java.util.Map;
    +5   
    +6   /**
    +7    * BaseStorageResource is ...
    +8    *
    +9    * @author Greg Schueler <greg@simplifyops.com>
    +10   * @since 2014-04-04
    +11   */
    +12  public class BaseStorageResource implements StorageResource {
    +13      private String path;
    +14      private String url;
    +15      private String name;
    +16      private Map<String,String> metadata;
    +17      private boolean directory;
    +18      private List<? extends StorageResource> directoryContents;
    +19  
    +20      public BaseStorageResource() {
    +21      }
    +22  
    +23      @Override
    +24      public String getPath() {
    +25          return path;
    +26      }
    +27  
    +28      public void setPath(String path) {
    +29          this.path = path;
    +30      }
    +31  
    +32      @Override
    +33      public String getUrl() {
    +34          return url;
    +35      }
    +36  
    +37      public void setUrl(String url) {
    +38          this.url = url;
    +39      }
    +40  
    +41      @Override
    +42      public String getName() {
    +43          return name;
    +44      }
    +45  
    +46      public void setName(String name) {
    +47          this.name = name;
    +48      }
    +49  
    +50      @Override
    +51      public Map<String, String> getMetadata() {
    +52          return metadata;
    +53      }
    +54  
    +55      public void setMetadata(Map<String, String> metadata) {
    +56          this.metadata = metadata;
    +57      }
    +58  
    +59      @Override
    +60      public boolean isDirectory() {
    +61          return directory;
    +62      }
    +63  
    +64      public void setDirectory(boolean directory) {
    +65          this.directory = directory;
    +66      }
    +67  
    +68      @Override
    +69      public List<? extends StorageResource> getDirectoryContents() {
    +70          return directoryContents;
    +71      }
    +72  
    +73      public void setDirectoryContents(List<? extends StorageResource> directoryContents) {
    +74          this.directoryContents = directoryContents;
    +75      }
    +76  
    +77      @Override
    +78      public String toString() {
    +79          return "BaseStorageResource{" +
    +80                  "path='" + path + '\'' +
    +81                  ", url='" + url + '\'' +
    +82                  ", name='" + name + '\'' +
    +83                  ", directory=" + directory +
    +84                  '}';
    +85      }
    +86  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/ConfigProperty.html b/xref/org/rundeck/api/domain/ConfigProperty.html new file mode 100644 index 0000000..57deba2 --- /dev/null +++ b/xref/org/rundeck/api/domain/ConfigProperty.html @@ -0,0 +1,82 @@ + + + + +ConfigProperty xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.io.Serializable;
    +4   
    +5   /**
    +6    * ConfigProperty is a single configuration property key and value.
    +7    *
    +8    * @author greg
    +9    * @since 2014-03-07
    +10   */
    +11  public class ConfigProperty implements Serializable {
    +12  
    +13      private static final long serialVersionUID = 1L;
    +14      private String key;
    +15      private String value;
    +16  
    +17      public ConfigProperty() {
    +18      }
    +19  
    +20      public ConfigProperty(String key, String value) {
    +21          this.key = key;
    +22          this.value = value;
    +23      }
    +24  
    +25      public String getKey() {
    +26          return key;
    +27      }
    +28  
    +29      public void setKey(String key) {
    +30          this.key = key;
    +31      }
    +32  
    +33      public String getValue() {
    +34          return value;
    +35      }
    +36  
    +37      public void setValue(String value) {
    +38          this.value = value;
    +39      }
    +40  
    +41      @Override
    +42      public boolean equals(Object o) {
    +43          if (this == o) return true;
    +44          if (!(o instanceof ConfigProperty)) return false;
    +45  
    +46          ConfigProperty that = (ConfigProperty) o;
    +47  
    +48          if (!key.equals(that.key)) return false;
    +49          if (!value.equals(that.value)) return false;
    +50  
    +51          return true;
    +52      }
    +53  
    +54      @Override
    +55      public int hashCode() {
    +56          int result = key.hashCode();
    +57          result = 31 * result + value.hashCode();
    +58          return result;
    +59      }
    +60  
    +61      @Override
    +62      public String toString() {
    +63          return "ConfigProperty{" +
    +64                  "key='" + key + '\'' +
    +65                  ", value='" + value + '\'' +
    +66                  '}';
    +67      }
    +68  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/KeyResource.html b/xref/org/rundeck/api/domain/KeyResource.html new file mode 100644 index 0000000..7f06bf0 --- /dev/null +++ b/xref/org/rundeck/api/domain/KeyResource.html @@ -0,0 +1,37 @@ + + + + +KeyResource xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.util.List;
    +4   
    +5   /**
    +6    * KeyResource represents a directory or an SSH key file
    +7    *
    +8    * @author Greg Schueler <greg@simplifyops.com>
    +9    * @since 2014-04-04
    +10   */
    +11  public interface KeyResource extends StorageResource {
    +12      /**
    +13       * Return true if this is a file and is a private SSH key file.
    +14       * @return
    +15       */
    +16      public boolean isPrivateKey();
    +17  
    +18      /**
    +19       * Return the list of SSH Key resources if this is a directory
    +20       * @return
    +21       */
    +22      public List<KeyResource> getDirectoryContents();
    +23  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/ProjectConfig.html b/xref/org/rundeck/api/domain/ProjectConfig.html new file mode 100644 index 0000000..2c999d3 --- /dev/null +++ b/xref/org/rundeck/api/domain/ProjectConfig.html @@ -0,0 +1,78 @@ + + + + +ProjectConfig xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.io.Serializable;
    +4   import java.util.LinkedHashMap;
    +5   import java.util.Map;
    +6   
    +7   /**
    +8    * ProjectConfig is ...
    +9    *
    +10   * @author greg
    +11   * @since 2014-02-27
    +12   */
    +13  public class ProjectConfig implements Serializable {
    +14  
    +15      private static final long serialVersionUID = 1L;
    +16      private LinkedHashMap<String, String> properties = new LinkedHashMap<String, String>();
    +17  
    +18      public ProjectConfig() {
    +19      }
    +20  
    +21      public ProjectConfig(Map<String, String> properties) {
    +22          setProperties(properties);
    +23      }
    +24  
    +25      public void setProperty(final String key, final String value) {
    +26          getProperties().put(key, value);
    +27      }
    +28  
    +29      public void addProperties(final Map<String, String> values) {
    +30          getProperties().putAll(values);
    +31      }
    +32  
    +33      public Map<String, String> getProperties() {
    +34          return properties;
    +35      }
    +36  
    +37      public void setProperties(final Map<String, String> properties) {
    +38          this.properties = new LinkedHashMap<String, String>(properties);
    +39      }
    +40  
    +41      @Override
    +42      public boolean equals(Object o) {
    +43          if (this == o) return true;
    +44          if (!(o instanceof ProjectConfig)) return false;
    +45  
    +46          ProjectConfig that = (ProjectConfig) o;
    +47  
    +48          if (properties != null ? !properties.equals(that.properties) : that.properties != null) return false;
    +49  
    +50          return true;
    +51      }
    +52  
    +53      @Override
    +54      public int hashCode() {
    +55          return properties != null ? properties.hashCode() : 0;
    +56      }
    +57  
    +58      @Override
    +59      public String toString() {
    +60          return "ProjectConfig{" +
    +61                  "properties=" + properties +
    +62                  '}';
    +63      }
    +64  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/RundeckProject.html b/xref/org/rundeck/api/domain/RundeckProject.html index 712179e..f35e813 100644 --- a/xref/org/rundeck/api/domain/RundeckProject.html +++ b/xref/org/rundeck/api/domain/RundeckProject.html @@ -42,74 +42,91 @@ 32 33 private String resourceModelProviderUrl; 34 -35 public String getName() { -36 return name; -37 } -38 -39 public void setName(String name) { -40 this.name = name; -41 } -42 -43 public String getDescription() { -44 return description; -45 } -46 -47 public void setDescription(String description) { -48 this.description = description; -49 } -50 -51 public String getResourceModelProviderUrl() { -52 return resourceModelProviderUrl; -53 } -54 -55 public void setResourceModelProviderUrl(String resourceModelProviderUrl) { -56 this.resourceModelProviderUrl = resourceModelProviderUrl; -57 } -58 -59 @Override -60 public String toString() { -61 return "RundeckProject [name=" + name + ", description=" + description + ", resourceModelProviderUrl=" -62 + resourceModelProviderUrl + "]"; +35 private ProjectConfig projectConfig; +36 +37 public String getName() { +38 return name; +39 } +40 +41 public void setName(String name) { +42 this.name = name; +43 } +44 +45 public String getDescription() { +46 return description; +47 } +48 +49 public void setDescription(String description) { +50 this.description = description; +51 } +52 +53 public String getResourceModelProviderUrl() { +54 return resourceModelProviderUrl; +55 } +56 +57 public void setResourceModelProviderUrl(String resourceModelProviderUrl) { +58 this.resourceModelProviderUrl = resourceModelProviderUrl; +59 } +60 +61 public ProjectConfig getProjectConfig() { +62 return projectConfig; 63 } 64 -65 @Override -66 public int hashCode() { -67 final int prime = 31; -68 int result = 1; -69 result = prime * result + ((description == null) ? 0 : description.hashCode()); -70 result = prime * result + ((name == null) ? 0 : name.hashCode()); -71 result = prime * result + ((resourceModelProviderUrl == null) ? 0 : resourceModelProviderUrl.hashCode()); -72 return result; -73 } -74 -75 @Override -76 public boolean equals(Object obj) { -77 if (this == obj) -78 return true; -79 if (obj == null) -80 return false; -81 if (getClass() != obj.getClass()) -82 return false; -83 RundeckProject other = (RundeckProject) obj; -84 if (description == null) { -85 if (other.description != null) -86 return false; -87 } else if (!description.equals(other.description)) -88 return false; -89 if (name == null) { -90 if (other.name != null) -91 return false; -92 } else if (!name.equals(other.name)) +65 public void setProjectConfig(ProjectConfig projectConfig) { +66 this.projectConfig = projectConfig; +67 } +68 +69 @Override +70 public String toString() { +71 return "RundeckProject [name=" + name + ", description=" + description +72 + (null!=resourceModelProviderUrl? ", resourceModelProviderUrl=" + resourceModelProviderUrl : "") +73 + ", config=" +74 + projectConfig + "]"; +75 } +76 +77 @Override +78 public int hashCode() { +79 final int prime = 31; +80 int result = 1; +81 result = prime * result + ((description == null) ? 0 : description.hashCode()); +82 result = prime * result + ((name == null) ? 0 : name.hashCode()); +83 result = prime * result + ((resourceModelProviderUrl == null) ? 0 : resourceModelProviderUrl.hashCode()); +84 result = prime * result + ((projectConfig == null) ? 0 : projectConfig.hashCode()); +85 return result; +86 } +87 +88 @Override +89 public boolean equals(Object obj) { +90 if (this == obj) +91 return true; +92 if (obj == null) 93 return false; -94 if (resourceModelProviderUrl == null) { -95 if (other.resourceModelProviderUrl != null) -96 return false; -97 } else if (!resourceModelProviderUrl.equals(other.resourceModelProviderUrl)) -98 return false; -99 return true; -100 } -101 -102 } +94 if (getClass() != obj.getClass()) +95 return false; +96 RundeckProject other = (RundeckProject) obj; +97 if (description == null) { +98 if (other.description != null) +99 return false; +100 } else if (!description.equals(other.description)) +101 return false; +102 if (name == null) { +103 if (other.name != null) +104 return false; +105 } else if (!name.equals(other.name)) +106 return false; +107 if (resourceModelProviderUrl == null) { +108 if (other.resourceModelProviderUrl != null) +109 return false; +110 } else if (!resourceModelProviderUrl.equals(other.resourceModelProviderUrl)) +111 return false; +112 if (projectConfig == null) { +113 if (other.projectConfig != null) +114 return false; +115 } else if (!projectConfig.equals(other.projectConfig)) +116 return false; +117 return true; +118 } +119 }
    diff --git a/xref/org/rundeck/api/domain/RundeckToken.html b/xref/org/rundeck/api/domain/RundeckToken.html new file mode 100644 index 0000000..3b9dee6 --- /dev/null +++ b/xref/org/rundeck/api/domain/RundeckToken.html @@ -0,0 +1,50 @@ + + + + +RundeckToken xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   /**
    +4    * RundeckToken is ...
    +5    *
    +6    * @author Greg Schueler <greg@simplifyops.com>
    +7    * @since 2014-04-04
    +8    */
    +9   public class RundeckToken {
    +10      private String user;
    +11      private String token;
    +12  
    +13      public RundeckToken() {
    +14      }
    +15  
    +16      public RundeckToken(String user, String token) {
    +17          this.setUser(user);
    +18          this.setToken(token);
    +19      }
    +20  
    +21      public String getUser() {
    +22          return user;
    +23      }
    +24  
    +25      public void setUser(String user) {
    +26          this.user = user;
    +27      }
    +28  
    +29      public String getToken() {
    +30          return token;
    +31      }
    +32  
    +33      public void setToken(String token) {
    +34          this.token = token;
    +35      }
    +36  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/StorageResource.html b/xref/org/rundeck/api/domain/StorageResource.html new file mode 100644 index 0000000..b3135b6 --- /dev/null +++ b/xref/org/rundeck/api/domain/StorageResource.html @@ -0,0 +1,68 @@ + + + + +StorageResource xref + + + +
    +
    +1   package org.rundeck.api.domain;
    +2   
    +3   import java.util.List;
    +4   import java.util.Map;
    +5   
    +6   /**
    +7    * StorageResource represents a directory or a file
    +8    *
    +9    * @author Greg Schueler <greg@simplifyops.com>
    +10   * @since 2014-04-04
    +11   */
    +12  public interface StorageResource {
    +13      /**
    +14       * Return the storage path for this resource
    +15       *
    +16       * @return
    +17       */
    +18      public String getPath();
    +19  
    +20      /**
    +21       * Return the URL for this resource
    +22       *
    +23       * @return
    +24       */
    +25      public String getUrl();
    +26  
    +27      /**
    +28       * Return the file name if this is a file
    +29       *
    +30       * @return
    +31       */
    +32      public String getName();
    +33  
    +34      /**
    +35       * Return the metadata for this file if this is a file
    +36       *
    +37       * @return
    +38       */
    +39      public Map<String, String> getMetadata();
    +40  
    +41      /**
    +42       * Return true if this is a directory, false if this is a file
    +43       *
    +44       * @return
    +45       */
    +46      public boolean isDirectory();
    +47  
    +48      /**
    +49       * Return the list of directory contents if this is a directory
    +50       *
    +51       * @return
    +52       */
    +53      public List<? extends StorageResource> getDirectoryContents();
    +54  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/domain/package-frame.html b/xref/org/rundeck/api/domain/package-frame.html index 66da8b1..035b6bc 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 10.0 Reference Package org.rundeck.api.domain + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.domain @@ -17,18 +17,36 @@
  • AbortStatus
    + ArchiveImport +
    + BaseKeyResource +
    BaseState
    + BaseStorageResource +
    + ConfigProperty +
    @@ -54,11 +74,21 @@ ExecutionStatus
    + KeyResource +
    NodeSummary
    + ProjectConfig +
    @@ -149,11 +179,21 @@ RundeckSystemInfo
    + RundeckToken +
    RundeckWFExecState
    + StorageResource +
    diff --git a/xref/org/rundeck/api/generator/BaseDocGenerator.html b/xref/org/rundeck/api/generator/BaseDocGenerator.html new file mode 100644 index 0000000..66a902b --- /dev/null +++ b/xref/org/rundeck/api/generator/BaseDocGenerator.html @@ -0,0 +1,32 @@ + + + + +BaseDocGenerator xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import org.dom4j.Document;
    +4   import org.dom4j.DocumentFactory;
    +5   
    +6   /**
    +7    * BaseDocGenerator generates a document using the element as the root.
    +8    *
    +9    * @author greg
    +10   * @since 2014-02-27
    +11   */
    +12  public abstract class BaseDocGenerator implements XmlDocumentGenerator {
    +13      @Override
    +14      public Document generateXmlDocument() {
    +15          return DocumentFactory.getInstance().createDocument(generateXmlElement());
    +16      }
    +17  
    +18  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/generator/ProjectConfigGenerator.html b/xref/org/rundeck/api/generator/ProjectConfigGenerator.html new file mode 100644 index 0000000..b2646cc --- /dev/null +++ b/xref/org/rundeck/api/generator/ProjectConfigGenerator.html @@ -0,0 +1,48 @@ + + + + +ProjectConfigGenerator xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import org.dom4j.Document;
    +4   import org.dom4j.DocumentFactory;
    +5   import org.dom4j.Element;
    +6   import org.rundeck.api.domain.ProjectConfig;
    +7   
    +8   /**
    +9    * ProjectConfigGenerator is ...
    +10   *
    +11   * @author greg
    +12   * @since 2014-02-27
    +13   */
    +14  public class ProjectConfigGenerator extends BaseDocGenerator {
    +15      private ProjectConfig config;
    +16  
    +17      public ProjectConfigGenerator(ProjectConfig config) {
    +18          this.config = config;
    +19      }
    +20  
    +21      @Override
    +22      public Element generateXmlElement() {
    +23          Element configEl = DocumentFactory.getInstance().createElement("config");
    +24          if (null != config.getProperties()) {
    +25              for (String s : config.getProperties().keySet()) {
    +26                  Element property = configEl.addElement("property");
    +27                  property.addAttribute("key", s);
    +28                  property.addAttribute("value", config.getProperties().get(s));
    +29              }
    +30          }
    +31          return configEl;
    +32      }
    +33  
    +34  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html b/xref/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html new file mode 100644 index 0000000..7cd5f69 --- /dev/null +++ b/xref/org/rundeck/api/generator/ProjectConfigPropertyGenerator.html @@ -0,0 +1,42 @@ + + + + +ProjectConfigPropertyGenerator xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import org.dom4j.DocumentFactory;
    +4   import org.dom4j.Element;
    +5   import org.rundeck.api.domain.ConfigProperty;
    +6   
    +7   /**
    +8    * ProjectConfigPropertyGenerator generates a {@literal <property/>} element representing a configuration property.
    +9    *
    +10   * @author greg
    +11   * @since 2014-03-07
    +12   */
    +13  public class ProjectConfigPropertyGenerator extends BaseDocGenerator {
    +14      private ConfigProperty property;
    +15  
    +16      public ProjectConfigPropertyGenerator(ConfigProperty property) {
    +17          this.property = property;
    +18      }
    +19  
    +20      @Override
    +21      public Element generateXmlElement() {
    +22          Element propElem = DocumentFactory.getInstance().createElement("property");
    +23          propElem.addAttribute("key", property.getKey());
    +24          propElem.addAttribute("value", property.getValue());
    +25  
    +26          return propElem;
    +27      }
    +28  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/generator/ProjectGenerator.html b/xref/org/rundeck/api/generator/ProjectGenerator.html new file mode 100644 index 0000000..2f560f8 --- /dev/null +++ b/xref/org/rundeck/api/generator/ProjectGenerator.html @@ -0,0 +1,46 @@ + + + + +ProjectGenerator xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import org.dom4j.Document;
    +4   import org.dom4j.DocumentFactory;
    +5   import org.dom4j.Element;
    +6   import org.rundeck.api.domain.ProjectConfig;
    +7   import org.rundeck.api.domain.RundeckProject;
    +8   
    +9   /**
    +10   * ProjectGenerator is ...
    +11   *
    +12   * @author greg
    +13   * @since 2014-02-27
    +14   */
    +15  public class ProjectGenerator extends BaseDocGenerator {
    +16      RundeckProject project;
    +17  
    +18      public ProjectGenerator(RundeckProject project) {
    +19          this.project = project;
    +20      }
    +21  
    +22      @Override
    +23      public Element generateXmlElement() {
    +24          Element rootElem = DocumentFactory.getInstance().createElement("project");
    +25          rootElem.addElement("name").setText(project.getName());
    +26          ProjectConfig configuration = project.getProjectConfig();
    +27          if (null != configuration) {
    +28              rootElem.add(new ProjectConfigGenerator(configuration).generateXmlElement());
    +29          }
    +30          return rootElem;
    +31      }
    +32  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/generator/XmlDocumentGenerator.html b/xref/org/rundeck/api/generator/XmlDocumentGenerator.html new file mode 100644 index 0000000..ae5eeb7 --- /dev/null +++ b/xref/org/rundeck/api/generator/XmlDocumentGenerator.html @@ -0,0 +1,43 @@ + + + + +XmlDocumentGenerator xref + + + +
    +
    +1   package org.rundeck.api.generator;
    +2   
    +3   import org.dom4j.Document;
    +4   import org.dom4j.Element;
    +5   import org.dom4j.Node;
    +6   
    +7   /**
    +8    * XmlDocumentGenerator is ...
    +9    *
    +10   * @author greg
    +11   * @since 2014-02-27
    +12   */
    +13  public interface XmlDocumentGenerator {
    +14  
    +15      /**
    +16       * Generate the XML {@link org.dom4j.Node}
    +17       *
    +18       * @return any object holding the converted value
    +19       */
    +20      Element generateXmlElement();
    +21      /**
    +22       * Generate the XML {@link org.dom4j.Node}
    +23       *
    +24       * @param node
    +25       *
    +26       * @return any object holding the converted value
    +27       */
    +28      Document generateXmlDocument();
    +29  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/generator/package-frame.html b/xref/org/rundeck/api/generator/package-frame.html new file mode 100644 index 0000000..7f8f773 --- /dev/null +++ b/xref/org/rundeck/api/generator/package-frame.html @@ -0,0 +1,36 @@ + + + + + + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.generator + + + + +

    + org.rundeck.api.generator +

    + +

    Classes

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

    Package org.rundeck.api.generator

    + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary
    + BaseDocGenerator +
    + ProjectConfigGenerator +
    + ProjectConfigPropertyGenerator +
    + ProjectGenerator +
    + XmlDocumentGenerator +
    + +
    + +
    +
    + +
    +
    + Copyright © 2011-2014. 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 34114a8..97f562f 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 10.0 Reference Package org.rundeck.api + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api @@ -23,6 +23,9 @@
  • BuildsParameters +
  • +
  • + ChainHandler
  • DefaultJobsImport @@ -44,15 +47,27 @@
  • FileType +
  • +
  • + Handler
  • NodeFiltersBuilder
  • OptionsBuilder +
  • +
  • + ParserHandler
  • QueryParameterBuilder +
  • +
  • + RequireContentTypeHandler +
  • +
  • + ResultHandler
  • RunAdhoc @@ -80,6 +95,12 @@
  • RundeckApiException +
  • +
  • + RundeckApiHttpContentTypeException +
  • +
  • + RundeckApiHttpStatusException
  • RundeckApiLoginException @@ -101,6 +122,9 @@
  • Version +
  • +
  • + WriteOutHandler
  • diff --git a/xref/org/rundeck/api/package-summary.html b/xref/org/rundeck/api/package-summary.html index ed071f9..f38ded7 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 10.0 Reference Package org.rundeck.api + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api @@ -49,6 +49,11 @@
    BuildsParameters
    + ChainHandler +
    @@ -84,6 +89,11 @@ FileType
    + Handler +
    @@ -94,11 +104,26 @@ OptionsBuilder
    + ParserHandler +
    QueryParameterBuilder
    + RequireContentTypeHandler +
    + ResultHandler +
    @@ -144,6 +169,16 @@ RundeckApiException
    + RundeckApiHttpContentTypeException +
    + RundeckApiHttpStatusException +
    @@ -179,6 +214,11 @@ Version
    + WriteOutHandler +
    diff --git a/xref/org/rundeck/api/parser/ArchiveImportParser.html b/xref/org/rundeck/api/parser/ArchiveImportParser.html new file mode 100644 index 0000000..65e5f54 --- /dev/null +++ b/xref/org/rundeck/api/parser/ArchiveImportParser.html @@ -0,0 +1,50 @@ + + + + +ArchiveImportParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   import org.rundeck.api.domain.ArchiveImport;
    +5   
    +6   import java.util.ArrayList;
    +7   
    +8   /**
    +9    * ArchiveImportParser is ...
    +10   *
    +11   * @author greg
    +12   * @since 2014-03-09
    +13   */
    +14  public class ArchiveImportParser implements XmlNodeParser<ArchiveImport> {
    +15      String xpath;
    +16  
    +17      public ArchiveImportParser() {
    +18      }
    +19  
    +20      public ArchiveImportParser(final String xpath) {
    +21          this.xpath = xpath;
    +22      }
    +23  
    +24      @Override
    +25      public ArchiveImport parseXmlNode(final Node node) {
    +26          final Node importNode = xpath != null ? node.selectSingleNode(xpath) : node;
    +27  
    +28          boolean issuccess = "successful".equals(importNode.valueOf("/import/@status"));
    +29          final ArrayList<String> messages = new ArrayList<String>();
    +30          for (final Object o : importNode.selectNodes("/import/errors/error")) {
    +31              messages.add(((Node) o).getText());
    +32          }
    +33  
    +34          return new ArchiveImport(issuccess, messages);
    +35      }
    +36  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/BaseXpathParser.html b/xref/org/rundeck/api/parser/BaseXpathParser.html new file mode 100644 index 0000000..b196c28 --- /dev/null +++ b/xref/org/rundeck/api/parser/BaseXpathParser.html @@ -0,0 +1,43 @@ + + + + +BaseXpathParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   
    +5   /**
    +6    * BaseXpathParser is ...
    +7    *
    +8    * @author Greg Schueler <greg@simplifyops.com>
    +9    * @since 2014-04-04
    +10   */
    +11  public abstract class BaseXpathParser<T> implements XmlNodeParser<T> {
    +12      private String xpath;
    +13  
    +14      public BaseXpathParser() {
    +15      }
    +16  
    +17      public BaseXpathParser(String xpath) {
    +18  
    +19          this.xpath = xpath;
    +20      }
    +21  
    +22      public abstract T parse(Node node);
    +23  
    +24      @Override
    +25      public T parseXmlNode(Node node) {
    +26          Node selectedNode = xpath != null ? node.selectSingleNode(xpath) : node;
    +27          return parse(selectedNode);
    +28      }
    +29  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/ProjectConfigParser.html b/xref/org/rundeck/api/parser/ProjectConfigParser.html new file mode 100644 index 0000000..afaceb9 --- /dev/null +++ b/xref/org/rundeck/api/parser/ProjectConfigParser.html @@ -0,0 +1,57 @@ + + + + +ProjectConfigParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   import org.rundeck.api.domain.ProjectConfig;
    +5   
    +6   import java.util.List;
    +7   
    +8   /**
    +9    * ProjectConfigParser parses project "config" element contents
    +10   *
    +11   * @author greg
    +12   * @since 2014-02-27
    +13   */
    +14  public class ProjectConfigParser implements XmlNodeParser<ProjectConfig> {
    +15      private String xpath;
    +16  
    +17      public ProjectConfigParser() {
    +18      }
    +19  
    +20      public ProjectConfigParser(String xpath) {
    +21          this.xpath = xpath;
    +22      }
    +23  
    +24      @Override
    +25      public ProjectConfig parseXmlNode(Node node) {
    +26          Node config1 = getXpath() != null ? node.selectSingleNode(getXpath()) : node;
    +27          ProjectConfig config = new ProjectConfig();
    +28          List property = config1.selectNodes("property");
    +29          for (Object o : property) {
    +30              Node propnode = (Node) o;
    +31              String key = propnode.valueOf("@key");
    +32              String value = propnode.valueOf("@value");
    +33              if (null != key && null != value) {
    +34                  config.setProperty(key, value);
    +35              }
    +36          }
    +37          return config;
    +38      }
    +39  
    +40      public String getXpath() {
    +41          return xpath;
    +42      }
    +43  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/ProjectConfigPropertyParser.html b/xref/org/rundeck/api/parser/ProjectConfigPropertyParser.html new file mode 100644 index 0000000..83a8460 --- /dev/null +++ b/xref/org/rundeck/api/parser/ProjectConfigPropertyParser.html @@ -0,0 +1,55 @@ + + + + +ProjectConfigPropertyParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   import org.rundeck.api.domain.ConfigProperty;
    +5   
    +6   /**
    +7    * ProjectConfigPropertyParser parses a {@literal <property/>} element representing
    +8    * a configuration property.
    +9    *
    +10   * @author greg
    +11   * @since 2014-03-07
    +12   */
    +13  public class ProjectConfigPropertyParser implements XmlNodeParser<ConfigProperty> {
    +14      private String xpath;
    +15  
    +16      public ProjectConfigPropertyParser() {
    +17      }
    +18  
    +19      public ProjectConfigPropertyParser(final String xpath) {
    +20          this.setXpath(xpath);
    +21      }
    +22  
    +23      @Override
    +24      public ConfigProperty parseXmlNode(final Node node) {
    +25          final Node propnode = getXpath() != null ? node.selectSingleNode(getXpath()) : node;
    +26          final String key = propnode.valueOf("@key");
    +27          final String value = propnode.valueOf("@value");
    +28          final ConfigProperty config = new ConfigProperty();
    +29          config.setKey(key);
    +30          config.setValue(value);
    +31          return config;
    +32      }
    +33  
    +34      public String getXpath() {
    +35          return xpath;
    +36      }
    +37  
    +38      public void setXpath(final String xpath) {
    +39          this.xpath = xpath;
    +40      }
    +41  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/ProjectParser.html b/xref/org/rundeck/api/parser/ProjectParser.html index 6c3e7f3..15eec29 100644 --- a/xref/org/rundeck/api/parser/ProjectParser.html +++ b/xref/org/rundeck/api/parser/ProjectParser.html @@ -52,7 +52,7 @@ 42 43 @Override 44 public RundeckProject parseXmlNode(Node node) { -45 Node projectNode = xpath != null ? node.selectSingleNode(xpath) : node; +45 Node projectNode = getXpath() != null ? node.selectSingleNode(getXpath()) : node; 46 47 RundeckProject project = new RundeckProject(); 48 @@ -63,7 +63,10 @@ 53 return project; 54 } 55 -56 } +56 protected String getXpath() { +57 return xpath; +58 } +59 }
    diff --git a/xref/org/rundeck/api/parser/ProjectParserV11.html b/xref/org/rundeck/api/parser/ProjectParserV11.html new file mode 100644 index 0000000..d630ad8 --- /dev/null +++ b/xref/org/rundeck/api/parser/ProjectParserV11.html @@ -0,0 +1,50 @@ + + + + +ProjectParserV11 xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   import org.rundeck.api.domain.ProjectConfig;
    +5   import org.rundeck.api.domain.RundeckProject;
    +6   
    +7   import java.util.List;
    +8   
    +9   /**
    +10   * ProjectParserV11 supports embedded "config" element.
    +11   *
    +12   * @author greg
    +13   * @since 2014-02-27
    +14   */
    +15  public class ProjectParserV11 extends ProjectParser {
    +16      public ProjectParserV11() {
    +17      }
    +18  
    +19      public ProjectParserV11(final String xpath) {
    +20          super(xpath);
    +21      }
    +22  
    +23      @Override
    +24      public RundeckProject parseXmlNode(final Node node) {
    +25          final RundeckProject rundeckProject = super.parseXmlNode(node);
    +26          final Node projectNode = getXpath() != null ? node.selectSingleNode(getXpath()) : node;
    +27          final Node config1 = projectNode.selectSingleNode("config");
    +28          if (config1 == null) {
    +29              return rundeckProject;
    +30          }
    +31  
    +32          rundeckProject.setProjectConfig(new ProjectConfigParser().parseXmlNode(config1));
    +33  
    +34          return rundeckProject;
    +35      }
    +36  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/RundeckTokenParser.html b/xref/org/rundeck/api/parser/RundeckTokenParser.html new file mode 100644 index 0000000..3c9872f --- /dev/null +++ b/xref/org/rundeck/api/parser/RundeckTokenParser.html @@ -0,0 +1,47 @@ + + + + +RundeckTokenParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   import org.rundeck.api.domain.RundeckToken;
    +5   
    +6   /**
    +7    * RundeckTokenParser is ...
    +8    *
    +9    * @author Greg Schueler <greg@simplifyops.com>
    +10   * @since 2014-04-04
    +11   */
    +12  public class RundeckTokenParser implements XmlNodeParser<RundeckToken> {
    +13      String xpath;
    +14  
    +15      public RundeckTokenParser() {
    +16      }
    +17  
    +18      public RundeckTokenParser(String xpath) {
    +19          this.xpath = xpath;
    +20      }
    +21  
    +22      @Override
    +23      public RundeckToken parseXmlNode(Node node) {
    +24          Node targetNode = xpath != null ? node.selectSingleNode(xpath) : node;
    +25          RundeckToken rundeckToken = new RundeckToken();
    +26          String token = targetNode.valueOf("@id");
    +27          String user = targetNode.valueOf("@user");
    +28          rundeckToken.setToken(token);
    +29          rundeckToken.setUser(user);
    +30  
    +31          return rundeckToken;
    +32      }
    +33  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/SSHKeyResourceParser.html b/xref/org/rundeck/api/parser/SSHKeyResourceParser.html new file mode 100644 index 0000000..9a584c4 --- /dev/null +++ b/xref/org/rundeck/api/parser/SSHKeyResourceParser.html @@ -0,0 +1,39 @@ + + + + +SSHKeyResourceParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Node;
    +4   import org.rundeck.api.domain.BaseKeyResource;
    +5   import org.rundeck.api.domain.KeyResource;
    +6   
    +7   /**
    +8    * SSHKeyResourceParser is ...
    +9    *
    +10   * @author Greg Schueler <greg@simplifyops.com>
    +11   * @since 2014-04-04
    +12   */
    +13  public class SSHKeyResourceParser extends BaseXpathParser<KeyResource> implements XmlNodeParser<KeyResource> {
    +14      public SSHKeyResourceParser() {
    +15      }
    +16  
    +17      public SSHKeyResourceParser(String xpath) {
    +18          super(xpath);
    +19      }
    +20  
    +21      @Override
    +22      public KeyResource parse(Node node) {
    +23          return BaseKeyResource.from(new StorageResourceParser().parse(node));
    +24      }
    +25  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/StorageResourceParser.html b/xref/org/rundeck/api/parser/StorageResourceParser.html new file mode 100644 index 0000000..e1a3cb1 --- /dev/null +++ b/xref/org/rundeck/api/parser/StorageResourceParser.html @@ -0,0 +1,75 @@ + + + + +StorageResourceParser xref + + + +
    View Javadoc
    +
    +1   package org.rundeck.api.parser;
    +2   
    +3   import org.dom4j.Element;
    +4   import org.dom4j.Node;
    +5   import org.rundeck.api.domain.BaseStorageResource;
    +6   import org.rundeck.api.domain.StorageResource;
    +7   
    +8   import java.util.HashMap;
    +9   
    +10  /**
    +11   * StorageResourceParser is ...
    +12   *
    +13   * @author Greg Schueler <greg@simplifyops.com>
    +14   * @since 2014-04-04
    +15   */
    +16  public class StorageResourceParser extends BaseXpathParser<StorageResource> {
    +17      private BaseStorageResource holder;
    +18      public StorageResourceParser() {
    +19  
    +20      }
    +21      public StorageResourceParser(BaseStorageResource holder){
    +22          this.holder=holder;
    +23      }
    +24  
    +25      public StorageResourceParser(String xpath) {
    +26          super(xpath);
    +27      }
    +28  
    +29      @Override
    +30      public StorageResource parse(Node node) {
    +31          String path = node.valueOf("@path");
    +32          String type = node.valueOf("@type");
    +33          String url = node.valueOf("@url");
    +34          BaseStorageResource storageResource = null == holder ? new BaseStorageResource() : holder;
    +35          storageResource.setDirectory("directory".equals(type));
    +36          storageResource.setPath(path);
    +37          storageResource.setUrl(url);
    +38  
    +39          if (storageResource.isDirectory()) {
    +40              if (node.selectSingleNode("contents") != null) {
    +41                  storageResource.setDirectoryContents(new ListParser<StorageResource>(new StorageResourceParser(),
    +42                          "contents/resource").parseXmlNode(node));
    +43              }
    +44          } else {
    +45              String name = node.valueOf("@name");
    +46              storageResource.setName(name);
    +47  
    +48              Node meta = node.selectSingleNode("resource-meta");
    +49              HashMap<String, String> metamap = new HashMap<String, String>();
    +50              if (null != meta) {
    +51                  Element metaEl = (Element) meta;
    +52                  for (Object o : metaEl.elements()) {
    +53                      Element sub = (Element) o;
    +54                      metamap.put(sub.getName(), sub.getText().trim());
    +55                  }
    +56              }
    +57              storageResource.setMetadata(metamap);
    +58          }
    +59          return storageResource;
    +60      }
    +61  }
    +
    +
    + + diff --git a/xref/org/rundeck/api/parser/package-frame.html b/xref/org/rundeck/api/parser/package-frame.html index 5ac2e14..41be768 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 10.0 Reference Package org.rundeck.api.parser + RunDeck API - Java Client 11.0-SNAPSHOT Reference Package org.rundeck.api.parser @@ -17,9 +17,15 @@