diff --git a/apidocs/allclasses-frame.html b/apidocs/allclasses-frame.html index 130d96d..7673642 100644 --- a/apidocs/allclasses-frame.html +++ b/apidocs/allclasses-frame.html @@ -2,13 +2,13 @@
- +Node
@@ -515,6 +596,12 @@ Method in class org.rundeck.api.runAdhocCommand(String, String, Properties, long, TimeUnit) -
Method in class org.rundeck.api.RundeckClient
RundeckExecution
String
RundeckSystemInfo
InputStream
exportJob(String jobId)
+
+ InputStream
exportJobs(String project)
void
exportJobToFile(String filename,
+ String jobId)
+
+ RundeckJob
findJob(String project,
String groupPath,
@@ -412,6 +429,14 @@ Main entry point to talk to a RunDeck instance.
RundeckSystemInfo
getSystemInfo()
+
+ String
getUrl()
@@ -461,6 +486,32 @@ Main entry point to talk to a RunDeck instance. RundeckExecution
runAdhocCommand(String project,
+ String command,
+ Properties nodeFilters,
+ Integer nodeThreadcount,
+ Boolean nodeKeepgoing)
+
+ RundeckExecution
runAdhocCommand(String project,
+ String command,
+ Properties nodeFilters,
+ Integer nodeThreadcount,
+ Boolean nodeKeepgoing,
+ long poolingInterval,
+ TimeUnit poolingUnit)
+
RundeckExecution
triggerAdhocCommand(String project,
+ String command,
+ Properties nodeFilters,
+ Integer nodeThreadcount,
+ Boolean nodeKeepgoing)
+
+public void exportJobToFile(String filename, + String jobId) + throws RundeckApiException, + RundeckApiException.RundeckApiLoginException, + IllegalArgumentException, + IOException+
+
filename
- path of the file where the content should be savedjobId
- identifier of the job - mandatory
+RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
+RundeckApiException.RundeckApiLoginException
- if the login failed
+IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)
+IOException
- if we failed to write to the fileexportJob(String)
,
+getJob(String)
+public InputStream exportJob(String jobId) + throws RundeckApiException, + RundeckApiException.RundeckApiLoginException, + IllegalArgumentException+
+
jobId
- identifier of the job - mandatory
+InputStream
instance, not linked to any network resources - won't be null
+RundeckApiException
- in case of error when calling the API (non-existent job with this ID)
+RundeckApiException.RundeckApiLoginException
- if the login failed
+IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)exportJobToFile(String, String)
,
+getJob(String)
@@ -960,7 +1075,7 @@ public RundeckApiException - in case of error when calling the API (non-existent project with this name)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the project or the name is blank (null, empty or whitespace)
+IllegalArgumentException
- if the project or the name is blank (null, empty or whitespace)getJob(String)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)
+IllegalArgumentException
- if the jobId is blank (null, empty or whitespace)findJob(String, String, String)
,
+exportJob(String)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties)
,
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties, Integer, Boolean)
,
runAdhocCommand(String, String)
RundeckApiException.RundeckApiLoginException
- if the login failed
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties, Integer, Boolean)
,
+runAdhocCommand(String, String, Properties)
++public RundeckExecution triggerAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing) + throws RundeckApiException, + RundeckApiException.RundeckApiLoginException, + IllegalArgumentException+
+
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
nodeThreadcount
- thread count to use (for parallelizing when running on multiple nodes) - optionalnodeKeepgoing
- if true, continue executing on other nodes even if some fail - optional
+RundeckExecution
instance for the newly created (and running) execution - won't be null
+RundeckApiException
- in case of error when calling the API (non-existent project with this name)
+RundeckApiException.RundeckApiLoginException
- if the login failed
IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String)
,
runAdhocCommand(String, String, Properties)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, long, TimeUnit)
,
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, long, TimeUnit)
,
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, long, TimeUnit)
,
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
triggerAdhocCommand(String, String, Properties)
RundeckApiException.RundeckApiLoginException
- if the login failed
-IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties)
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
+triggerAdhocCommand(String, String, Properties)
++public RundeckExecution runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing) + throws RundeckApiException, + RundeckApiException.RundeckApiLoginException, + IllegalArgumentException+
+
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
nodeThreadcount
- thread count to use (for parallelizing when running on multiple nodes) - optionalnodeKeepgoing
- if true, continue executing on other nodes even if some fail - optional
+RundeckExecution
instance for the (finished/aborted) execution - won't be null
+RundeckApiException
- in case of error when calling the API (non-existent project with this name)
+RundeckApiException.RundeckApiLoginException
- if the login failed
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
,
+triggerAdhocCommand(String, String, Properties, Integer, Boolean)
+public RundeckExecution runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing, + long poolingInterval, + TimeUnit poolingUnit) + throws RundeckApiException, + RundeckApiException.RundeckApiLoginException, + IllegalArgumentException+
+
project
- name of the project - mandatorycommand
- to be executed - mandatorynodeFilters
- for selecting nodes on which the command will be executed. See NodeFiltersBuilder
nodeThreadcount
- thread count to use (for parallelizing when running on multiple nodes) - optionalnodeKeepgoing
- if true, continue executing on other nodes even if some fail - optionalpoolingInterval
- for checking the status of the execution. Must be > 0.poolingUnit
- unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+RundeckExecution
instance for the (finished/aborted) execution - won't be null
+RundeckApiException
- in case of error when calling the API (non-existent project with this name)
+RundeckApiException.RundeckApiLoginException
- if the login failed
+IllegalArgumentException
- if the project or command is blank (null, empty or whitespace)triggerAdhocCommand(String, String, Properties, Integer, Boolean)
+public RundeckSystemInfo getSystemInfo() + throws RundeckApiException, + RundeckApiException.RundeckApiLoginException+
+
RundeckSystemInfo
instance - won't be null
+RundeckApiException
- in case of error when calling the API
+RundeckApiException
- if the login failed
+RundeckApiException.RundeckApiLoginException
diff --git a/apidocs/org/rundeck/api/class-use/NodeFiltersBuilder.html b/apidocs/org/rundeck/api/class-use/NodeFiltersBuilder.html index 05e0ba6..ab4d01d 100644 --- a/apidocs/org/rundeck/api/class-use/NodeFiltersBuilder.html +++ b/apidocs/org/rundeck/api/class-use/NodeFiltersBuilder.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.NodeFiltersBuilder (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/class-use/OptionsBuilder.html b/apidocs/org/rundeck/api/class-use/OptionsBuilder.html index 25d0c3b..efa06f6 100644 --- a/apidocs/org/rundeck/api/class-use/OptionsBuilder.html +++ b/apidocs/org/rundeck/api/class-use/OptionsBuilder.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.OptionsBuilder (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/class-use/RundeckApiException.RundeckApiLoginException.html b/apidocs/org/rundeck/api/class-use/RundeckApiException.RundeckApiLoginException.html index d1e15f4..a172428 100644 --- a/apidocs/org/rundeck/api/class-use/RundeckApiException.RundeckApiLoginException.html +++ b/apidocs/org/rundeck/api/class-use/RundeckApiException.RundeckApiLoginException.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.RundeckApiException.RundeckApiLoginException (RunDeck API - Java Client 1.0-SNAPSHOT API) - + @@ -130,6 +130,14 @@ Uses of+ InputStream
+ + RundeckClient.exportJob(String jobId)
+ +
+ Export the definition of a single job, identified by the given ID+ ++ InputStream
RundeckClient.exportJobs(String project)
@@ -171,6 +179,15 @@ Uses of+ +void
+ RundeckClient.exportJobToFile(String filename, + String jobId)
+ +
+ Export the definition of a single job (identified by the given ID), as an XML file+ +RundeckJob
RundeckClient.findJob(String project, String groupPath, @@ -318,6 +335,14 @@ Uses of
+ +RundeckSystemInfo
+ RundeckClient.getSystemInfo()
+ +
+ Get system informations about the RunDeck server+ +RundeckExecution
+ RundeckClient.runAdhocCommand(String project, String command)
@@ -343,6 +368,32 @@ Uses of String command, Properties nodeFilters) +
+ Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.+ ++ +RundeckExecution
+ RundeckClient.runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing)
+ +
+ Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.+ @@ -432,6 +483,18 @@ Uses of String command, Properties nodeFilters) ++ +RundeckExecution
RundeckClient.runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing, + long poolingInterval, + TimeUnit poolingUnit)
+
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.
+ Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). + ++ diff --git a/apidocs/org/rundeck/api/class-use/RundeckApiException.html b/apidocs/org/rundeck/api/class-use/RundeckApiException.html index efb0ce6..0ab7f83 100644 --- a/apidocs/org/rundeck/api/class-use/RundeckApiException.html +++ b/apidocs/org/rundeck/api/class-use/RundeckApiException.html @@ -2,13 +2,13 @@ - ++ +RundeckExecution
RundeckClient.triggerAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing)
+
Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).Uses of Class org.rundeck.api.RundeckApiException (RunDeck API - Java Client 1.0-SNAPSHOT API) - + @@ -150,6 +150,14 @@ Uses of+ InputStream
+ + RundeckClient.exportJob(String jobId)
+ +
+ Export the definition of a single job, identified by the given ID+ ++ InputStream
RundeckClient.exportJobs(String project)
@@ -191,6 +199,15 @@ Uses of+ +void
+ RundeckClient.exportJobToFile(String filename, + String jobId)
+ +
+ Export the definition of a single job (identified by the given ID), as an XML file+ +RundeckJob
RundeckClient.findJob(String project, String groupPath, @@ -338,6 +355,14 @@ Uses of
+ +RundeckSystemInfo
+ RundeckClient.getSystemInfo()
+ +
+ Get system informations about the RunDeck server+ +void
+ RundeckClient.ping()
@@ -371,6 +396,32 @@ Uses of String command, Properties nodeFilters) +
+ Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.+ ++ +RundeckExecution
+ RundeckClient.runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing)
+ +
+ Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.+ @@ -452,6 +503,18 @@ Uses of String command, Properties nodeFilters) ++ +RundeckExecution
RundeckClient.runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing, + long poolingInterval, + TimeUnit poolingUnit)
+
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.
+ Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). + ++ diff --git a/apidocs/org/rundeck/api/class-use/RundeckClient.html b/apidocs/org/rundeck/api/class-use/RundeckClient.html index da0da06..f17aa00 100644 --- a/apidocs/org/rundeck/api/class-use/RundeckClient.html +++ b/apidocs/org/rundeck/api/class-use/RundeckClient.html @@ -2,13 +2,13 @@ - ++ +RundeckExecution
RundeckClient.triggerAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing)
+
Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).Uses of Class org.rundeck.api.RundeckClient (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/RundeckAbort.AbortStatus.html b/apidocs/org/rundeck/api/domain/RundeckAbort.AbortStatus.html index 5219038..e11c961 100644 --- a/apidocs/org/rundeck/api/domain/RundeckAbort.AbortStatus.html +++ b/apidocs/org/rundeck/api/domain/RundeckAbort.AbortStatus.html @@ -2,13 +2,13 @@ - +RundeckAbort.AbortStatus (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/RundeckAbort.html b/apidocs/org/rundeck/api/domain/RundeckAbort.html index fe5ee88..95e258d 100644 --- a/apidocs/org/rundeck/api/domain/RundeckAbort.html +++ b/apidocs/org/rundeck/api/domain/RundeckAbort.html @@ -2,13 +2,13 @@ - +RundeckAbort (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html b/apidocs/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html index fbb50a5..868478d 100644 --- a/apidocs/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html +++ b/apidocs/org/rundeck/api/domain/RundeckExecution.ExecutionStatus.html @@ -2,13 +2,13 @@ - +RundeckExecution.ExecutionStatus (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/RundeckExecution.html b/apidocs/org/rundeck/api/domain/RundeckExecution.html index 68bed64..a515387 100644 --- a/apidocs/org/rundeck/api/domain/RundeckExecution.html +++ b/apidocs/org/rundeck/api/domain/RundeckExecution.html @@ -2,13 +2,13 @@ - +RundeckExecution (RunDeck API - Java Client 1.0-SNAPSHOT API) - + @@ -425,7 +425,7 @@ public+ execution is still running, or has been aborted)
- Returns:
- the duration of the execution, as a human-readable string : "3 minutes 34 seconds" (or null if the - duration is still running, or has been aborted)
String
getName()
+ String
getResourceModelProviderUrl()
+
void
setName(String name)
+ void
setResourceModelProviderUrl(String resourceModelProviderUrl)
+
+public String getResourceModelProviderUrl()+
+public void setResourceModelProviderUrl(String resourceModelProviderUrl)+
@@ -365,7 +409,7 @@ public boolean equals( PREV CLASS - NEXT CLASS + NEXT CLASSFRAMES NO FRAMES diff --git a/apidocs/org/rundeck/api/domain/RundeckSystemInfo.html b/apidocs/org/rundeck/api/domain/RundeckSystemInfo.html new file mode 100644 index 0000000..07912b4 --- /dev/null +++ b/apidocs/org/rundeck/api/domain/RundeckSystemInfo.html @@ -0,0 +1,1170 @@ + + + + + + + + ++RundeckSystemInfo (RunDeck API - Java Client 1.0-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + ++
+ + + ++ + ++ + ++
++ +Overview +Package +Class +Use +Tree +Deprecated +Index +Help ++ + ++ ++ PREV CLASS + NEXT CLASS ++ FRAMES + NO FRAMES + + + + + ++ ++ SUMMARY: NESTED | FIELD | CONSTR | METHOD ++DETAIL: FIELD | CONSTR | METHOD +
+ ++ +org.rundeck.api.domain +
+
+Class RundeckSystemInfo+java.lang.Object ++org.rundeck.api.domain.RundeckSystemInfo +
+
+- All Implemented Interfaces:
- Serializable
+
++
+ + + public class RundeckSystemInfo- extends Object
- implements Serializable
+Represents the RunDeck system info +
+ +
+
+
+- Author:
+- Vincent Behar
+- See Also:
- Serialized Form
+ ++
+ + + + ++ ++Constructor Summary ++ ++ RundeckSystemInfo()
+ +
++
+ ++ ++Method Summary ++ ++ +boolean
+ equals(Object obj)
+ +
++ ++ +Integer
+ getActiveThreads()
+ +
++ ++ +String
+ getBaseDir()
+ +
++ ++ +String
+ getBuild()
+ +
++ ++ +String
+ getCpuLoadAverage()
+ +
++ ++ +Date
+ getDate()
+ +
++ ++ +Long
+ getFreeMemoryInBytes()
+ +
++ ++ +String
+ getJvmName()
+ +
++ ++ +String
+ getJvmVendor()
+ +
++ ++ +String
+ getJvmVersion()
+ +
++ ++ +Long
+ getMaxMemoryInBytes()
+ +
++ ++ +String
+ getNode()
+ +
++ ++ +String
+ getOsArch()
+ +
++ ++ +String
+ getOsName()
+ +
++ ++ +String
+ getOsVersion()
+ +
++ ++ +Integer
+ getRunningJobs()
+ +
++ ++ +Date
+ getStartDate()
+ +
++ ++ +Long
+ getTotalMemoryInBytes()
+ +
++ ++ +String
+ getUptime()
+ +
++ ++ +Long
+ getUptimeInMillis()
+ +
++ ++ +String
+ getVersion()
+ +
++ ++ +int
+ hashCode()
+ +
++ ++ +void
+ setActiveThreads(Integer activeThreads)
+ +
++ ++ +void
+ setBaseDir(String baseDir)
+ +
++ ++ +void
+ setBuild(String build)
+ +
++ ++ +void
+ setCpuLoadAverage(String cpuLoadAverage)
+ +
++ ++ +void
+ setDate(Date date)
+ +
++ ++ +void
+ setFreeMemoryInBytes(Long freeMemoryInBytes)
+ +
++ ++ +void
+ setJvmName(String jvmName)
+ +
++ ++ +void
+ setJvmVendor(String jvmVendor)
+ +
++ ++ +void
+ setJvmVersion(String jvmVersion)
+ +
++ ++ +void
+ setMaxMemoryInBytes(Long maxMemoryInBytes)
+ +
++ ++ +void
+ setNode(String node)
+ +
++ ++ +void
+ setOsArch(String osArch)
+ +
++ ++ +void
+ setOsName(String osName)
+ +
++ ++ +void
+ setOsVersion(String osVersion)
+ +
++ ++ +void
+ setRunningJobs(Integer runningJobs)
+ +
++ ++ +void
+ setStartDate(Date startDate)
+ +
++ ++ +void
+ setTotalMemoryInBytes(Long totalMemoryInBytes)
+ +
++ ++ +void
+ setUptimeInMillis(Long uptimeInMillis)
+ +
++ ++ +void
+ setVersion(String version)
+ +
++ ++ +String
+ toString()
+ +
++
+ ++ +Methods inherited from class java.lang.Object ++ ++ clone, finalize, getClass, notify, notifyAll, wait, wait, wait
+
+ ++ ++Constructor Detail ++RundeckSystemInfo
++public RundeckSystemInfo()++
+ + + + ++
+ ++ ++Method Detail ++getUptime
++public String getUptime()++
+- +
+
+- +
+ +
+- Returns:
- the uptime of the server, as a human-readable string : "42 days 7 hours 3 minutes 34 seconds"
+ ++getDate
++public Date getDate()++
+- +
+
+- +
+
+
+ ++setDate
++public void setDate(Date date)++
+- +
+
+- +
+
+
+ ++getVersion
++public String getVersion()++
+- +
+
+- +
+
+
+ ++setVersion
++public void setVersion(String version)++
+- +
+
+- +
+
+
+ ++getBuild
++public String getBuild()++
+- +
+
+- +
+
+
+ ++setBuild
++public void setBuild(String build)++
+- +
+
+- +
+
+
+ ++getNode
++public String getNode()++
+- +
+
+- +
+
+
+ ++setNode
++public void setNode(String node)++
+- +
+
+- +
+
+
+ ++getBaseDir
++public String getBaseDir()++
+- +
+
+- +
+
+
+ ++setBaseDir
++public void setBaseDir(String baseDir)++
+- +
+
+- +
+
+
+ ++getOsArch
++public String getOsArch()++
+- +
+
+- +
+
+
+ ++setOsArch
++public void setOsArch(String osArch)++
+- +
+
+- +
+
+
+ ++getOsName
++public String getOsName()++
+- +
+
+- +
+
+
+ ++setOsName
++public void setOsName(String osName)++
+- +
+
+- +
+
+
+ ++getOsVersion
++public String getOsVersion()++
+- +
+
+- +
+
+
+ ++setOsVersion
++public void setOsVersion(String osVersion)++
+- +
+
+- +
+
+
+ ++getJvmName
++public String getJvmName()++
+- +
+
+- +
+
+
+ ++setJvmName
++public void setJvmName(String jvmName)++
+- +
+
+- +
+
+
+ ++getJvmVendor
++public String getJvmVendor()++
+- +
+
+- +
+
+
+ ++setJvmVendor
++public void setJvmVendor(String jvmVendor)++
+- +
+
+- +
+
+
+ ++getJvmVersion
++public String getJvmVersion()++
+- +
+
+- +
+
+
+ ++setJvmVersion
++public void setJvmVersion(String jvmVersion)++
+- +
+
+- +
+
+
+ ++getStartDate
++public Date getStartDate()++
+- +
+
+- +
+
+
+ ++setStartDate
++public void setStartDate(Date startDate)++
+- +
+
+- +
+
+
+ ++getUptimeInMillis
++public Long getUptimeInMillis()++
+- +
+
+- +
+
+
+ ++setUptimeInMillis
++public void setUptimeInMillis(Long uptimeInMillis)++
+- +
+
+- +
+
+
+ ++getCpuLoadAverage
++public String getCpuLoadAverage()++
+- +
+
+- +
+
+
+ ++setCpuLoadAverage
++public void setCpuLoadAverage(String cpuLoadAverage)++
+- +
+
+- +
+
+
+ ++getMaxMemoryInBytes
++public Long getMaxMemoryInBytes()++
+- +
+
+- +
+
+
+ ++setMaxMemoryInBytes
++public void setMaxMemoryInBytes(Long maxMemoryInBytes)++
+- +
+
+- +
+
+
+ ++getFreeMemoryInBytes
++public Long getFreeMemoryInBytes()++
+- +
+
+- +
+
+
+ ++setFreeMemoryInBytes
++public void setFreeMemoryInBytes(Long freeMemoryInBytes)++
+- +
+
+- +
+
+
+ ++getTotalMemoryInBytes
++public Long getTotalMemoryInBytes()++
+- +
+
+- +
+
+
+ ++setTotalMemoryInBytes
++public void setTotalMemoryInBytes(Long totalMemoryInBytes)++
+- +
+
+- +
+
+
+ ++getRunningJobs
++public Integer getRunningJobs()++
+- +
+
+- +
+
+
+ ++setRunningJobs
++public void setRunningJobs(Integer runningJobs)++
+- +
+
+- +
+
+
+ ++getActiveThreads
++public Integer getActiveThreads()++
+- +
+
+- +
+
+
+ ++setActiveThreads
++public void setActiveThreads(Integer activeThreads)++
+- +
+
+- +
+
+
+ ++toString
++public String toString()++
+- +
+
+- Overrides:
toString
in classObject
- +
+
+
+ ++hashCode
++public int hashCode()++
+- +
+
+- Overrides:
hashCode
in classObject
- +
+
+
+ ++equals
++public boolean equals(Object obj)++
+ +- +
+
+- Overrides:
equals
in classObject
- +
+
+
+ + + + + ++
+ + + ++ + ++ + ++
++ +Overview +Package +Class +Use +Tree +Deprecated +Index +Help ++ + ++ ++ PREV CLASS + NEXT CLASS ++ FRAMES + NO FRAMES + + + + + ++ ++ SUMMARY: NESTED | FIELD | CONSTR | METHOD ++DETAIL: FIELD | CONSTR | METHOD +
+Copyright © 2011. All Rights Reserved. + + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.AbortStatus.html b/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.AbortStatus.html index 698bd10..3cd967e 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.AbortStatus.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.AbortStatus.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.domain.RundeckAbort.AbortStatus (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.html b/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.html index 515923e..5d6ffc5 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckAbort.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.domain.RundeckAbort (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.ExecutionStatus.html b/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.ExecutionStatus.html index 95abe39..951f61d 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.ExecutionStatus.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.ExecutionStatus.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.domain.RundeckExecution.ExecutionStatus (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.html b/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.html index 3f0bfee..ae92815 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckExecution.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.domain.RundeckExecution (RunDeck API - Java Client 1.0-SNAPSHOT API) - + @@ -154,6 +154,32 @@ Uses of String command, Properties nodeFilters) +
+ Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.+ ++ +RundeckExecution
+ RundeckClient.runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing)
+ +
+ Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.+ @@ -235,6 +261,18 @@ Uses of String command, Properties nodeFilters) ++ +RundeckExecution
RundeckClient.runAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing, + long poolingInterval, + TimeUnit poolingUnit)
+
Run an ad-hoc command, and wait until its execution is finished (or aborted) to return.
+ Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution). + ++ diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckJob.html b/apidocs/org/rundeck/api/domain/class-use/RundeckJob.html index 3da8b4e..760843d 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckJob.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckJob.html @@ -2,13 +2,13 @@ - ++ +RundeckExecution
RundeckClient.triggerAdhocCommand(String project, + String command, + Properties nodeFilters, + Integer nodeThreadcount, + Boolean nodeKeepgoing)
+
Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).Uses of Class org.rundeck.api.domain.RundeckJob (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckNode.html b/apidocs/org/rundeck/api/domain/class-use/RundeckNode.html index ef404c0..dad67e1 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckNode.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckNode.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.domain.RundeckNode (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckProject.html b/apidocs/org/rundeck/api/domain/class-use/RundeckProject.html index 83531c7..cd61f29 100644 --- a/apidocs/org/rundeck/api/domain/class-use/RundeckProject.html +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckProject.html @@ -2,13 +2,13 @@ - +Uses of Class org.rundeck.api.domain.RundeckProject (RunDeck API - Java Client 1.0-SNAPSHOT API) - + diff --git a/apidocs/org/rundeck/api/domain/class-use/RundeckSystemInfo.html b/apidocs/org/rundeck/api/domain/class-use/RundeckSystemInfo.html new file mode 100644 index 0000000..7960071 --- /dev/null +++ b/apidocs/org/rundeck/api/domain/class-use/RundeckSystemInfo.html @@ -0,0 +1,210 @@ + + + + + + ++Uses of Class org.rundeck.api.domain.RundeckSystemInfo (RunDeck API - Java Client 1.0-SNAPSHOT API) + + + + + + + + + + + + +
+ + + + + +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use RundeckSystemInfo | +|
---|---|
org.rundeck.api | +Java client for the RunDeck API. | +
org.rundeck.api.parser | +Internal parsers for parsing the RunDeck responses. | +
+Uses of RundeckSystemInfo in org.rundeck.api | +
---|
+ +
Methods in org.rundeck.api that return RundeckSystemInfo | +|
---|---|
+ RundeckSystemInfo |
+RundeckClient.getSystemInfo()
+
++ Get system informations about the RunDeck server |
+
+Uses of RundeckSystemInfo in org.rundeck.api.parser | +
---|
+ +
Methods in org.rundeck.api.parser that return RundeckSystemInfo | +|
---|---|
+ RundeckSystemInfo |
+SystemInfoParser.parseXmlNode(org.dom4j.Node node)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
@@ -219,6 +225,12 @@ Classes in org
diff --git a/apidocs/org/rundeck/api/package-frame.html b/apidocs/org/rundeck/api/package-frame.html
index 28876c9..59d680d 100644
--- a/apidocs/org/rundeck/api/package-frame.html
+++ b/apidocs/org/rundeck/api/package-frame.html
@@ -2,13 +2,13 @@
+Parser for a single
+
+
+
+
+
diff --git a/apidocs/org/rundeck/api/parser/package-frame.html b/apidocs/org/rundeck/api/parser/package-frame.html
index deeb9fb..1fd5a54 100644
--- a/apidocs/org/rundeck/api/parser/package-frame.html
+++ b/apidocs/org/rundeck/api/parser/package-frame.html
@@ -2,13 +2,13 @@
+serialVersionUID: 1L
+
+
LGPL: xom Unknown: Unnamed - com.ibm.icu:icu4j:jar:2.6.1, 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 Common Public License Version 1.0: JUnit The Apache Software License, Version 2.0: Commons Codec, Commons IO, Commons Lang, Commons Logging, RunDeck API - Java Client, XML Commons External Components XML APIs Repository locations for each of the Dependencies. We plan on hosting the library on the Maven Central Repository, with the groupId org.rundeck and the artifactId rundeck-api-java-client. You can see all versions and download the files with this query : g:"org.rundeck" AND a:"rundeck-api-java-client". If you want to use this library from a scripting language, it is often easier to download a single jar file with all dependencies included. You can download such files on GitHub : https://github.com/vbehar/rundeck-api-java-client/downloads The library is hosted on the Maven Central Repository, with the groupId org.rundeck and the artifactId rundeck-api-java-client. You can see all versions and download the files with this query : g:"org.rundeck" AND a:"rundeck-api-java-client". Alternatively, you can download releases or snapshots from Sonatype Nexus OSS instance (which is then synchronized to Macen Central). If you want to use this library from a scripting language, it is often easier to download a single jar file with all dependencies included. You can download such files on GitHub : https://github.com/vbehar/rundeck-api-java-client/downloads The following document contains the results of FindBugs Report FindBugs Version is 1.3.9 Threshold is medium Effort is min The following document contains the results of FindBugs Report FindBugs Version is 1.3.9 Threshold is medium Effort is min Here are some examples of what you can do with this lib and a few lines of Groovy. We can use Grape to download the lib (and its dependencies) from the Maven Central Repository, so you don't have to install anything manually (except Groovy, of course). Save the following script in a file named "rundeck.groovy", and execute it with "groovy rundeck.groovy". Feeling Groovy ? ;-) Here are some examples of what you can do with this lib and a few lines of Groovy. We can use Grape to download the lib (and its dependencies) from the Maven Central Repository, so you don't have to install anything manually (except Groovy, of course). Save the following script in a file named "rundeck.groovy", and execute it with "groovy rundeck.groovy". Feeling Groovy ? ;-) See the API documentation of the RundeckClient class for more interactions with your RunDeck instance... A Java library that maps the RunDeck HTTP REST API. RunDeck is an open-source tool for automating tasks on multiple nodes, with a CLI, a web-based interface and an HTTP REST API. You can read more about its API on the RunDeck User Manual. This library has been extracted from the Jenkins RunDeck plugin, so for the moment it is still incomplete (not all the RunDeck API is mapped). My goal is to have a complete mapping of the RunDeck API, and to publish the library on the Maven Central Repository, so that it can easily be used by Java (Maven) and Groovy (Grape) developers. A Java client (library) for the RunDeck HTTP REST API. RunDeck is an open-source tool for automating tasks on multiple nodes, with a CLI, a web-based interface and an HTTP REST API. You can read more about its API on the RunDeck User Manual. See the API documentation of the RundeckClient class for more interactions with your RunDeck instance... See the API documentation of the RundeckClient class for more interactions with your RunDeck instance... This document provides an overview of the various documents and links that are part of this project's general information. All of this content is automatically generated by Maven on behalf of the project. This document provides an overview of the various documents and links that are part of this project's general information. All of this content is automatically generated by Maven on behalf of the project.
Represents a RunDeck project
+
+
RundeckSystemInfo
+
+
+
+ Represents the RunDeck system info
+
PREV CLASS
- NEXT CLASS
+ NEXT CLASS
FRAMES
NO FRAMES
@@ -253,7 +253,7 @@ public
PREV CLASS
- NEXT CLASS
+ NEXT CLASS
FRAMES
NO FRAMES
diff --git a/apidocs/org/rundeck/api/parser/SystemInfoParser.html b/apidocs/org/rundeck/api/parser/SystemInfoParser.html
new file mode 100644
index 0000000..157458a
--- /dev/null
+++ b/apidocs/org/rundeck/api/parser/SystemInfoParser.html
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
+org.rundeck.api.parser
+
+
+Class SystemInfoParser
+java.lang.Object
+
+org.rundeck.api.parser.SystemInfoParser
+
+
+
+
+
+
+
+public class SystemInfoParser
RundeckSystemInfo
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+SystemInfoParser()
+
+
+
+
+
+SystemInfoParser(String xpath)
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+ RundeckSystemInfo
+parseXmlNode(org.dom4j.Node node)
+
+
+ Parse the given XML Node
+
+
+
+
+Methods inherited from class java.lang.Object
+
+
+
+clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+Constructor Detail
+
+SystemInfoParser
+
+public SystemInfoParser()
+
+
+
+
+
+SystemInfoParser
+
+public SystemInfoParser(String xpath)
+
+
+
+
+
+
+
+
+xpath
- of the systemInfo element if it is not the root node
+
+
+
+
+
+Method Detail
+
+parseXmlNode
+
+public RundeckSystemInfo parseXmlNode(org.dom4j.Node node)
+
+
+
+XmlNodeParser
Node
+
+
+parseXmlNode
in interface XmlNodeParser<RundeckSystemInfo>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+Copyright © 2011. All Rights Reserved.
+
+
diff --git a/apidocs/org/rundeck/api/parser/XmlNodeParser.html b/apidocs/org/rundeck/api/parser/XmlNodeParser.html
index 4ce9220..9b3bc6c 100644
--- a/apidocs/org/rundeck/api/parser/XmlNodeParser.html
+++ b/apidocs/org/rundeck/api/parser/XmlNodeParser.html
@@ -2,13 +2,13 @@
-
+
diff --git a/apidocs/org/rundeck/api/parser/package-summary.html b/apidocs/org/rundeck/api/parser/package-summary.html
index 6c5a23a..0b5da9b 100644
--- a/apidocs/org/rundeck/api/parser/package-summary.html
+++ b/apidocs/org/rundeck/api/parser/package-summary.html
@@ -2,13 +2,13 @@
-
+
- PREV CLASS
+ PREV CLASS
NEXT CLASS
FRAMES
@@ -93,7 +93,7 @@ org.rundeck.api.parser
+StringParser
+
Interface XmlNodeParser<T>
-
@@ -186,7 +186,7 @@ parseXmlNode
+
- PREV CLASS
+ PREV CLASS
NEXT CLASS
FRAMES
diff --git a/apidocs/org/rundeck/api/parser/class-use/AbortParser.html b/apidocs/org/rundeck/api/parser/class-use/AbortParser.html
index c0716b8..6b35147 100644
--- a/apidocs/org/rundeck/api/parser/class-use/AbortParser.html
+++ b/apidocs/org/rundeck/api/parser/class-use/AbortParser.html
@@ -2,13 +2,13 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+Uses of Class
+
org.rundeck.api.parser.SystemInfoParser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Copyright © 2011. All Rights Reserved.
+
+
diff --git a/apidocs/org/rundeck/api/parser/class-use/XmlNodeParser.html b/apidocs/org/rundeck/api/parser/class-use/XmlNodeParser.html
index edc8e93..0371be1 100644
--- a/apidocs/org/rundeck/api/parser/class-use/XmlNodeParser.html
+++ b/apidocs/org/rundeck/api/parser/class-use/XmlNodeParser.html
@@ -2,13 +2,13 @@
-
+
String
+
+
+ class
+SystemInfoParser
+
+
+ Parser for a single RundeckSystemInfo
ProjectParser
-StringParser
+SystemInfoParser
StringParser
Parser for a single
String
+
diff --git a/apidocs/org/rundeck/api/parser/package-tree.html b/apidocs/org/rundeck/api/parser/package-tree.html
index ee65ce0..c083171 100644
--- a/apidocs/org/rundeck/api/parser/package-tree.html
+++ b/apidocs/org/rundeck/api/parser/package-tree.html
@@ -2,13 +2,13 @@
-
+
SystemInfoParser
+Parser for a single
+RundeckSystemInfo
diff --git a/apidocs/org/rundeck/api/parser/package-use.html b/apidocs/org/rundeck/api/parser/package-use.html
index 6204df7..284e05b 100644
--- a/apidocs/org/rundeck/api/parser/package-use.html
+++ b/apidocs/org/rundeck/api/parser/package-use.html
@@ -2,13 +2,13 @@
-
+
diff --git a/apidocs/serialized-form.html b/apidocs/serialized-form.html
index 9a1af70..fe77b8a 100644
--- a/apidocs/serialized-form.html
+++ b/apidocs/serialized-form.html
@@ -2,13 +2,13 @@
-
+
+
+
+resourceModelProviderUrl
+
+String resourceModelProviderUrl
+
+
+
+
+
+
+
+
+
+
+
+Class org.rundeck.api.domain.RundeckSystemInfo extends Object implements Serializable
+
+
+
+
+
+
+Serialized Fields
+
+date
+
+Date date
+
+
+
+
+
+
+version
+
+String version
+
+
+
+
+
+
+build
+
+String build
+
+
+
+
+
+
+node
+
+String node
+
+
+
+
+
+
+baseDir
+
+String baseDir
+
+
+
+
+
+
+osArch
+
+String osArch
+
+
+
+
+
+
+osName
+
+String osName
+
+
+
+
+
+
+osVersion
+
+String osVersion
+
+
+
+
+
+
+jvmName
+
+String jvmName
+
+
+
+
+
+
+jvmVendor
+
+String jvmVendor
+
+
+
+
+
+
+jvmVersion
+
+String jvmVersion
+
+
+
+
+
+
+startDate
+
+Date startDate
+
+
+
+
+
+
+uptimeInMillis
+
+Long uptimeInMillis
+
+
+
+
+
+
+cpuLoadAverage
+
+String cpuLoadAverage
+
+
+
+
+
+
+maxMemoryInBytes
+
+Long maxMemoryInBytes
+
+
+
+
+
+
+freeMemoryInBytes
+
+Long freeMemoryInBytes
+
+
+
+
+
+
+totalMemoryInBytes
+
+Long totalMemoryInBytes
+
+
+
+
+
+
+runningJobs
+
+Integer runningJobs
+
+
+
+
+
+
+activeThreads
+
+Integer activeThreads
+
+
+
+
diff --git a/changes-report.html b/changes-report.html
index 7fd879c..2c22707 100644
--- a/changes-report.html
+++ b/changes-report.html
@@ -1,5 +1,5 @@
-
+
@@ -11,7 +11,7 @@
-
+
@@ -50,7 +50,7 @@
Project Documentation
Project Documentation
Project Documentation
-
Licenses
Dependency File Details
Filename Size Entries Classes Packages JDK Rev Debug Sealed icu4j-2.6.1.jar 2.34 MB 755 648 6 1.2 debug - commons-codec-1.4.jar 56.80 kB 47 30 5 1.4 debug - commons-io-2.0.1.jar 155.77 kB 122 104 6 1.5 debug - commons-lang-2.6.jar 277.56 kB 155 133 10 1.3 debug - commons-logging-1.1.1.jar 59.26 kB 42 28 2 1.1 debug - dom4j-1.6.1.jar 306.54 kB 208 190 14 1.3 debug - jaxen-1.1.1.jar 221.60 kB 236 214 17 1.2 debug - jdom-1.0.jar 149.66 kB 87 75 8 1.1 debug - junit-4.8.2.jar 231.78 kB 267 230 30 1.5 debug - httpclient-4.1.1.jar 342.90 kB 308 272 22 1.5 debug - httpcore-4.1.jar 176.80 kB 185 163 10 1.3 debug - xalan-2.6.0.jar 3.00 MB 1,625 1,548 50 1.1 debug - xercesImpl-2.6.2.jar 986.99 kB 845 784 37 1.1 release - xmlParserAPIs-2.6.2.jar 121.80 kB 238 207 17 1.1 release - xml-apis-1.0.b2.jar 106.76 kB 217 184 17 1.2 release - xom-1.0.jar 106.32 kB 108 96 6 1.2 release sealed Total Size Entries Classes Packages JDK Rev Debug Sealed 16 8.56 MB 5,445 4,906 257 1.5 12 1 compile: 15 compile: 8.34 MB compile: 5,178 compile: 4,676 compile: 227 - compile: 11 compile: 1 test: 1 test: 231.78 kB test: 267 test: 230 test: 30 - test: 1 - Dependency Repository Locations
Repo ID URL Release Snapshot apache.snapshots http://people.apache.org/repo/m2-snapshot-repository - Yes - sonatype-nexus-snapshots https://oss.sonatype.org/content/repositories/snapshots - Yes - central http://repo1.maven.org/maven2 Yes - - Project Documentation
Project Documentation
-
Project Documentation
-
Project Documentation
-
Project Documentation
FindBugs Bug Detector Report
FindBugs Bug Detector Report
Project Documentation
-
// we use Grape (Ivy) to download the lib (and its dependencies) from Maven Central Repository
-@Grab(group='org.rundeck', module='rundeck-api-java-client', version='1.0-SNAPSHOT')
+
// we use Grape (Ivy) to download the lib (and its dependencies) from Maven Central Repository
+@Grab(group='org.rundeck', module='rundeck-api-java-client', version='1.0')
import org.rundeck.api.RundeckClient
rundeck = new RundeckClient("http://localhost:4440", "admin", "admin")
+println "RunDeck uptime : ${rundeck.systemInfo.uptime}"
println "All RunDeck projects : ${rundeck.projects}"
println "All RunDeck nodes : ${rundeck.nodes}"
println "All RunDeck jobs : ${rundeck.jobs}"
@@ -122,6 +126,7 @@ println "All RunDeck running executions : ${rundeck.runningExecutions}"
rundeck = new RundeckClient("http://localhost:4440", "admin", "admin")
+println "RunDeck uptime : ${rundeck.systemInfo.uptime}"
println "All RunDeck projects : ${rundeck.projects}"
println "All RunDeck nodes : ${rundeck.nodes}"
println "All RunDeck jobs : ${rundeck.jobs}"
@@ -158,6 +163,7 @@ execution = rundeck.runAdhocCommand("my-project", "uptime",
rundeck = new RundeckClient("http://localhost:4440", "admin", "admin")
rundeck.exportJobsToFile("/tmp/jobs.xml", "my-project")
+rundeck.exportJobToFile("/tmp/job.xml", "job-id")
Project Documentation
-
+
+
+
+
+
Project Documentation
-
Project Documentation
-
Project Documentation
-
Project Documentation
-
Project Documentation
-
Project Documentation
Project Documentation
Project Documentation
-
Project Information
Overview
Document Description About Java client for the RunDeck REST API Distribution Management This document provides informations on the distribution management of this project. Mailing Lists This document provides subscription and archive information for this project's mailing lists. Issue Tracking This is a link to the issue management system for this project. Issues (bugs, features, change requests) can be created and queried using this link. Source Repository This is a link to the online source repository that can be viewed via a web browser. Project Summary This document lists other related information of this project Dependencies This document lists the project's dependencies and provides information on each dependency. Project Team This document provides information on the members of this project. These are the individuals who have contributed to the project in one form or another. Project License This is a link to the definitions of project licenses. Project Information
Overview
Document Description About Java client for the RunDeck REST API Distribution Management This document provides informations on the distribution management of this project. Mailing Lists This document provides subscription and archive information for this project's mailing lists. Issue Tracking This is a link to the issue management system for this project. Issues (bugs, features, change requests) can be created and queried using this link. Source Repository This is a link to the online source repository that can be viewed via a web browser. Project Summary This document lists other related information of this project Dependencies This document lists the project's dependencies and provides information on each dependency. Continuous Integration This is a link to the definitions of all continuous integration processes that builds and tests code on a frequent, regular basis. Project Team This document provides information on the members of this project. These are the individuals who have contributed to the project in one form or another. Project License This is a link to the definitions of project licenses. Project Documentation
Project Documentation
-
Project Documentation
Project Documentation
-
Project Documentation
-
Project Documentation
Project Documentation
-
diff --git a/xref-test/allclasses-frame.html b/xref-test/allclasses-frame.html
index c0111b9..543aa5f 100644
--- a/xref-test/allclasses-frame.html
+++ b/xref-test/allclasses-frame.html
@@ -37,6 +37,9 @@
diff --git a/xref-test/org/rundeck/api/parser/SystemInfoParserTest.html b/xref-test/org/rundeck/api/parser/SystemInfoParserTest.html
new file mode 100644
index 0000000..f7e268e
--- /dev/null
+++ b/xref-test/org/rundeck/api/parser/SystemInfoParserTest.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+1 /*
+2 * Copyright 2011 Vincent Behar
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16 package org.rundeck.api.parser;
+17
+18 import java.io.InputStream;
+19 import java.util.Date;
+20 import org.dom4j.Document;
+21 import org.junit.Assert;
+22 import org.junit.Test;
+23 import org.rundeck.api.domain.RundeckSystemInfo;
+24
+25 /**
+26 * Test the {@link SystemInfoParser}
+27 *
+28 * @author Vincent Behar
+29 */
+30 public class SystemInfoParserTest {
+31
+32 @Test
+33 public void parseProject() throws Exception {
+34 InputStream input = getClass().getResourceAsStream("system-info.xml");
+35 Document document = ParserHelper.loadDocument(input);
+36
+37 RundeckSystemInfo info = new SystemInfoParser("result/system").parseXmlNode(document);
+38
+39 Assert.assertEquals(new Date(1310051857605L), info.getDate());
+40 Assert.assertEquals("1.2.1", info.getVersion());
+41 Assert.assertEquals("1.2.1-1", info.getBuild());
+42 Assert.assertEquals("strongbad", info.getNode());
+43 Assert.assertEquals("/opt/rundeck/rundeck-1.2.1", info.getBaseDir());
+44 Assert.assertEquals("i386", info.getOsArch());
+45 Assert.assertEquals("Linux", info.getOsName());
+46 Assert.assertEquals("2.6.35-30-generic-pae", info.getOsVersion());
+47 Assert.assertEquals("Java HotSpot(TM) Server VM", info.getJvmName());
+48 Assert.assertEquals("Sun Microsystems Inc.", info.getJvmVendor());
+49 Assert.assertEquals("19.1-b02", info.getJvmVersion());
+50 Assert.assertEquals(new Date(1310032513574L), info.getStartDate());
+51 Assert.assertEquals(new Long(19344031), info.getUptimeInMillis());
+52 Assert.assertEquals("5 hours 22 minutes 24 seconds", info.getUptime());
+53 Assert.assertEquals("0.1 %", info.getCpuLoadAverage());
+54 Assert.assertEquals(new Long(954466304), info.getMaxMemoryInBytes());
+55 Assert.assertEquals(new Long(159576592), info.getFreeMemoryInBytes());
+56 Assert.assertEquals(new Long(271384576), info.getTotalMemoryInBytes());
+57 Assert.assertEquals(new Integer(0), info.getRunningJobs());
+58 Assert.assertEquals(new Integer(25), info.getActiveThreads());
+59 }
+60
+61 }
+
+
+
+
diff --git a/xref-test/org/rundeck/api/parser/package-frame.html b/xref-test/org/rundeck/api/parser/package-frame.html
index d0d1a0d..5d2f793 100644
--- a/xref-test/org/rundeck/api/parser/package-frame.html
+++ b/xref-test/org/rundeck/api/parser/package-frame.html
@@ -38,6 +38,9 @@
StringParserTest
+
+
+
diff --git a/xref/allclasses-frame.html b/xref/allclasses-frame.html
index 623460c..8ad4c74 100644
--- a/xref/allclasses-frame.html
+++ b/xref/allclasses-frame.html
@@ -79,9 +79,15 @@
+ SystemInfoParserTest
+
diff --git a/xref/org/rundeck/api/RundeckClient.html b/xref/org/rundeck/api/RundeckClient.html
index 2656cc2..a0cddb4 100644
--- a/xref/org/rundeck/api/RundeckClient.html
+++ b/xref/org/rundeck/api/RundeckClient.html
@@ -42,875 +42,1005 @@
32 import org.rundeck.api.domain.RundeckJob;
33 import org.rundeck.api.domain.RundeckNode;
34 import org.rundeck.api.domain.RundeckProject;
-35 import org.rundeck.api.domain.RundeckExecution.ExecutionStatus;
-36 import org.rundeck.api.parser.AbortParser;
-37 import org.rundeck.api.parser.ExecutionParser;
-38 import org.rundeck.api.parser.JobParser;
-39 import org.rundeck.api.parser.ListParser;
-40 import org.rundeck.api.parser.NodeParser;
-41 import org.rundeck.api.parser.ProjectParser;
-42 import org.rundeck.api.parser.StringParser;
-43 import org.rundeck.api.util.AssertUtil;
-44 import org.rundeck.api.util.ParametersUtil;
-45
-46 /**
-47 * Main entry point to talk to a RunDeck instance.<br>
-48 * Usage : <br>
-49 * <code>
-50 * <pre>
-51 * RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin");
-52 * List<RundeckJob> jobs = rundeck.getJobs();
-53 *
-54 * RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name");
-55 * RundeckExecution execution = rundeck.triggerJob(job.getId(),
-56 * new OptionsBuilder().addOption("version", "1.2.0").toProperties());
-57 *
-58 * List<RundeckExecution> runningExecutions = rundeck.getRunningExecutions("my-project");
-59 * </pre>
-60 * </code>
-61 *
-62 * @author Vincent Behar
-63 */
-64 public class RundeckClient implements Serializable {
-65
-66 private static final long serialVersionUID = 1L;
+35 import org.rundeck.api.domain.RundeckSystemInfo;
+36 import org.rundeck.api.domain.RundeckExecution.ExecutionStatus;
+37 import org.rundeck.api.parser.AbortParser;
+38 import org.rundeck.api.parser.ExecutionParser;
+39 import org.rundeck.api.parser.JobParser;
+40 import org.rundeck.api.parser.ListParser;
+41 import org.rundeck.api.parser.NodeParser;
+42 import org.rundeck.api.parser.ProjectParser;
+43 import org.rundeck.api.parser.StringParser;
+44 import org.rundeck.api.parser.SystemInfoParser;
+45 import org.rundeck.api.util.AssertUtil;
+46 import org.rundeck.api.util.ParametersUtil;
+47
+48 /**
+49 * Main entry point to talk to a RunDeck instance.<br>
+50 * Usage : <br>
+51 * <code>
+52 * <pre>
+53 * RundeckClient rundeck = new RundeckClient("http://localhost:4440", "admin", "admin");
+54 * List<RundeckJob> jobs = rundeck.getJobs();
+55 *
+56 * RundeckJob job = rundeck.findJob("my-project", "main-group/sub-group", "job-name");
+57 * RundeckExecution execution = rundeck.triggerJob(job.getId(),
+58 * new OptionsBuilder().addOption("version", "1.2.0").toProperties());
+59 *
+60 * List<RundeckExecution> runningExecutions = rundeck.getRunningExecutions("my-project");
+61 * </pre>
+62 * </code>
+63 *
+64 * @author Vincent Behar
+65 */
+66 public class RundeckClient implements Serializable {
67
-68 public static final transient int API_VERSION = 1;
+68 private static final long serialVersionUID = 1L;
69
-70 public static final transient String API_ENDPOINT = "/api/" + API_VERSION;
+70 public static final transient int API_VERSION = 1;
71
-72 private final String url;
+72 public static final transient String API_ENDPOINT = "/api/" + API_VERSION;
73
-74 private final String login;
+74 private final String url;
75
-76 private final String password;
+76 private final String login;
77
-78 /**
-79 * Instantiate a new {@link RundeckClient} for the RunDeck instance at the given url
-80 *
-81 * @param url of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)
-82 * @param login
-83 * @param password
-84 * @throws IllegalArgumentException if the url, login or password is blank (null, empty or whitespace)
-85 */
-86 public RundeckClient(String url, String login, String password) throws IllegalArgumentException {
-87 super();
-88 this.url = url;
-89 this.login = login;
-90 this.password = password;
-91 AssertUtil.notBlank(url, "The RunDeck URL is mandatory !");
-92 AssertUtil.notBlank(login, "The RunDeck login is mandatory !");
-93 AssertUtil.notBlank(password, "The RunDeck password is mandatory !");
-94 }
-95
-96 /**
-97 * Try to "ping" the RunDeck instance to see if it is alive
-98 *
-99 * @throws RundeckApiException if the ping fails
-100 */
-101 public void ping() throws RundeckApiException {
-102 new ApiCall(this).ping();
-103 }
-104
-105 /**
-106 * Test your credentials (login/password) on the RunDeck instance
-107 *
-108 * @throws RundeckApiLoginException if the login fails
-109 */
-110 public void testCredentials() throws RundeckApiLoginException {
-111 new ApiCall(this).testCredentials();
-112 }
-113
-114 /*
-115 * Projects
-116 */
-117
-118 /**
-119 * List all projects
-120 *
-121 * @return a {@link List} of {@link RundeckProject} : might be empty, but won't be null
-122 * @throws RundeckApiException in case of error when calling the API
-123 * @throws RundeckApiLoginException if the login failed
-124 */
-125 public List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiLoginException {
-126 return new ApiCall(this).get(new ApiPathBuilder("/projects"),
-127 new ListParser<RundeckProject>(new ProjectParser(), "result/projects/project"));
-128 }
-129
-130 /**
-131 * Get the definition of a single project, identified by the given name
-132 *
-133 * @param projectName name of the project - mandatory
-134 * @return a {@link RundeckProject} instance - won't be null
-135 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-136 * @throws RundeckApiLoginException if the login failed
-137 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace)
-138 */
-139 public RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiLoginException,
-140 IllegalArgumentException {
-141 AssertUtil.notBlank(projectName, "projectName is mandatory to get the details of a project !");
-142 return new ApiCall(this).get(new ApiPathBuilder("/project/", projectName),
-143 new ProjectParser("result/projects/project"));
-144 }
-145
-146 /*
-147 * Jobs
-148 */
-149
-150 /**
-151 * List all jobs (for all projects)
-152 *
-153 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null
-154 * @throws RundeckApiException in case of error when calling the API
-155 * @throws RundeckApiLoginException if the login failed
-156 */
-157 public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiLoginException {
-158 List<RundeckJob> jobs = new ArrayList<RundeckJob>();
-159 for (RundeckProject project : getProjects()) {
-160 jobs.addAll(getJobs(project.getName()));
-161 }
-162 return jobs;
-163 }
-164
-165 /**
-166 * List all jobs that belongs to the given project
-167 *
-168 * @param project name of the project - mandatory
-169 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null
-170 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-171 * @throws RundeckApiLoginException if the login failed
-172 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-173 * @see #getJobs(String, String, String, String...)
-174 */
-175 public List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiLoginException,
-176 IllegalArgumentException {
-177 return getJobs(project, null, null, new String[0]);
-178 }
-179
-180 /**
-181 * List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds)
-182 *
-183 * @param project name of the project - mandatory
-184 * @param jobFilter a filter for the job Name - optional
-185 * @param groupPath a group or partial group path to include all jobs within that group path - optional
-186 * @param jobIds a list of Job IDs to include - optional
-187 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null
-188 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-189 * @throws RundeckApiLoginException if the login failed
-190 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-191 * @see #getJobs(String)
-192 */
-193 public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds)
-194 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-195 AssertUtil.notBlank(project, "project is mandatory to get all jobs !");
-196 return new ApiCall(this).get(new ApiPathBuilder("/jobs").param("project", project)
-197 .param("jobFilter", jobFilter)
-198 .param("groupPath", groupPath)
-199 .param("idlist", StringUtils.join(jobIds, ",")),
-200 new ListParser<RundeckJob>(new JobParser(), "result/jobs/job"));
-201 }
-202
-203 /**
-204 * Export the definitions of all jobs that belongs to the given project, as an XML file
-205 *
-206 * @param filename path of the file where the content should be saved
-207 * @param project name of the project - mandatory
-208 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-209 * @throws RundeckApiLoginException if the login failed
-210 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-211 * @throws IOException if we failed to write to the file
-212 * @see #exportJobsToFile(String, String, String, String, String...)
-213 * @see #exportJobs(String)
-214 */
-215 public void exportJobsToFile(String filename, String project) throws RundeckApiException, RundeckApiLoginException,
-216 IllegalArgumentException, IOException {
-217 exportJobsToFile(filename, project, null, null, new String[0]);
-218 }
-219
-220 /**
-221 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter,
-222 * groupPath and jobIds), as an XML file
-223 *
-224 * @param filename path of the file where the content should be saved
-225 * @param project name of the project - mandatory
-226 * @param jobFilter a filter for the job Name - optional
-227 * @param groupPath a group or partial group path to include all jobs within that group path - optional
-228 * @param jobIds a list of Job IDs to include - optional
-229 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-230 * @throws RundeckApiLoginException if the login failed
-231 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-232 * @throws IOException if we failed to write to the file
-233 * @see #exportJobsToFile(String, String)
-234 * @see #exportJobs(String, String, String, String...)
-235 */
-236 public void exportJobsToFile(String filename, String project, String jobFilter, String groupPath, String... jobIds)
-237 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException, IOException {
-238 InputStream inputStream = exportJobs(project, jobFilter, groupPath, jobIds);
-239 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream));
-240 }
-241
-242 /**
-243 * Export the definitions of all jobs that belongs to the given project
-244 *
-245 * @param project name of the project - mandatory
-246 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
-247 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-248 * @throws RundeckApiLoginException if the login failed
-249 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-250 * @see #exportJobs(String, String, String, String...)
-251 * @see #exportJobsToFile(String, String)
-252 */
-253 public InputStream exportJobs(String project) throws RundeckApiException, RundeckApiLoginException,
-254 IllegalArgumentException {
-255 return exportJobs(project, null, null, new String[0]);
-256 }
-257
-258 /**
-259 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter,
-260 * groupPath and jobIds)
-261 *
-262 * @param project name of the project - mandatory
-263 * @param jobFilter a filter for the job Name - optional
-264 * @param groupPath a group or partial group path to include all jobs within that group path - optional
-265 * @param jobIds a list of Job IDs to include - optional
-266 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
-267 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-268 * @throws RundeckApiLoginException if the login failed
-269 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-270 * @see #exportJobs(String)
-271 * @see #exportJobsToFile(String, String, String, String, String...)
-272 */
-273 public InputStream exportJobs(String project, String jobFilter, String groupPath, String... jobIds)
-274 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-275 AssertUtil.notBlank(project, "project is mandatory to export all jobs !");
-276 return new ApiCall(this).get(new ApiPathBuilder("/jobs/export").param("project", project)
-277 .param("jobFilter", jobFilter)
-278 .param("groupPath", groupPath)
-279 .param("idlist", StringUtils.join(jobIds, ",")));
-280 }
-281
-282 /**
-283 * Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not
-284 * need to belong to a group (either pass null, or an empty string).
-285 *
-286 * @param project name of the project - mandatory
-287 * @param groupPath group to which the job belongs (if it belongs to a group) - optional
-288 * @param name of the job to find - mandatory
-289 * @return a {@link RundeckJob} instance - null if not found
-290 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-291 * @throws RundeckApiLoginException if the login failed
-292 * @throws IllegalArgumentException if the project or the name is blank (null, empty or whitespace)
-293 */
-294 public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException,
-295 RundeckApiLoginException, IllegalArgumentException {
-296 AssertUtil.notBlank(project, "project is mandatory to find a job !");
-297 AssertUtil.notBlank(name, "job name is mandatory to find a job !");
-298 List<RundeckJob> jobs = getJobs(project, name, groupPath, new String[0]);
-299 return jobs.isEmpty() ? null : jobs.get(0);
+78 private final String password;
+79
+80 /**
+81 * Instantiate a new {@link RundeckClient} for the RunDeck instance at the given url
+82 *
+83 * @param url of the RunDeck instance ("http://localhost:4440", "http://rundeck.your-compagny.com/", etc)
+84 * @param login
+85 * @param password
+86 * @throws IllegalArgumentException if the url, login or password is blank (null, empty or whitespace)
+87 */
+88 public RundeckClient(String url, String login, String password) throws IllegalArgumentException {
+89 super();
+90 this.url = url;
+91 this.login = login;
+92 this.password = password;
+93 AssertUtil.notBlank(url, "The RunDeck URL is mandatory !");
+94 AssertUtil.notBlank(login, "The RunDeck login is mandatory !");
+95 AssertUtil.notBlank(password, "The RunDeck password is mandatory !");
+96 }
+97
+98 /**
+99 * Try to "ping" the RunDeck instance to see if it is alive
+100 *
+101 * @throws RundeckApiException if the ping fails
+102 */
+103 public void ping() throws RundeckApiException {
+104 new ApiCall(this).ping();
+105 }
+106
+107 /**
+108 * Test your credentials (login/password) on the RunDeck instance
+109 *
+110 * @throws RundeckApiLoginException if the login fails
+111 */
+112 public void testCredentials() throws RundeckApiLoginException {
+113 new ApiCall(this).testCredentials();
+114 }
+115
+116 /*
+117 * Projects
+118 */
+119
+120 /**
+121 * List all projects
+122 *
+123 * @return a {@link List} of {@link RundeckProject} : might be empty, but won't be null
+124 * @throws RundeckApiException in case of error when calling the API
+125 * @throws RundeckApiLoginException if the login failed
+126 */
+127 public List<RundeckProject> getProjects() throws RundeckApiException, RundeckApiLoginException {
+128 return new ApiCall(this).get(new ApiPathBuilder("/projects"),
+129 new ListParser<RundeckProject>(new ProjectParser(), "result/projects/project"));
+130 }
+131
+132 /**
+133 * Get the definition of a single project, identified by the given name
+134 *
+135 * @param projectName name of the project - mandatory
+136 * @return a {@link RundeckProject} instance - won't be null
+137 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+138 * @throws RundeckApiLoginException if the login failed
+139 * @throws IllegalArgumentException if the projectName is blank (null, empty or whitespace)
+140 */
+141 public RundeckProject getProject(String projectName) throws RundeckApiException, RundeckApiLoginException,
+142 IllegalArgumentException {
+143 AssertUtil.notBlank(projectName, "projectName is mandatory to get the details of a project !");
+144 return new ApiCall(this).get(new ApiPathBuilder("/project/", projectName),
+145 new ProjectParser("result/projects/project"));
+146 }
+147
+148 /*
+149 * Jobs
+150 */
+151
+152 /**
+153 * List all jobs (for all projects)
+154 *
+155 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null
+156 * @throws RundeckApiException in case of error when calling the API
+157 * @throws RundeckApiLoginException if the login failed
+158 */
+159 public List<RundeckJob> getJobs() throws RundeckApiException, RundeckApiLoginException {
+160 List<RundeckJob> jobs = new ArrayList<RundeckJob>();
+161 for (RundeckProject project : getProjects()) {
+162 jobs.addAll(getJobs(project.getName()));
+163 }
+164 return jobs;
+165 }
+166
+167 /**
+168 * List all jobs that belongs to the given project
+169 *
+170 * @param project name of the project - mandatory
+171 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null
+172 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+173 * @throws RundeckApiLoginException if the login failed
+174 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+175 * @see #getJobs(String, String, String, String...)
+176 */
+177 public List<RundeckJob> getJobs(String project) throws RundeckApiException, RundeckApiLoginException,
+178 IllegalArgumentException {
+179 return getJobs(project, null, null, new String[0]);
+180 }
+181
+182 /**
+183 * List the jobs that belongs to the given project, and matches the given criteria (jobFilter, groupPath and jobIds)
+184 *
+185 * @param project name of the project - mandatory
+186 * @param jobFilter a filter for the job Name - optional
+187 * @param groupPath a group or partial group path to include all jobs within that group path - optional
+188 * @param jobIds a list of Job IDs to include - optional
+189 * @return a {@link List} of {@link RundeckJob} : might be empty, but won't be null
+190 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+191 * @throws RundeckApiLoginException if the login failed
+192 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+193 * @see #getJobs(String)
+194 */
+195 public List<RundeckJob> getJobs(String project, String jobFilter, String groupPath, String... jobIds)
+196 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+197 AssertUtil.notBlank(project, "project is mandatory to get all jobs !");
+198 return new ApiCall(this).get(new ApiPathBuilder("/jobs").param("project", project)
+199 .param("jobFilter", jobFilter)
+200 .param("groupPath", groupPath)
+201 .param("idlist", StringUtils.join(jobIds, ",")),
+202 new ListParser<RundeckJob>(new JobParser(), "result/jobs/job"));
+203 }
+204
+205 /**
+206 * Export the definitions of all jobs that belongs to the given project, as an XML file
+207 *
+208 * @param filename path of the file where the content should be saved
+209 * @param project name of the project - mandatory
+210 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+211 * @throws RundeckApiLoginException if the login failed
+212 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+213 * @throws IOException if we failed to write to the file
+214 * @see #exportJobsToFile(String, String, String, String, String...)
+215 * @see #exportJobs(String)
+216 */
+217 public void exportJobsToFile(String filename, String project) throws RundeckApiException, RundeckApiLoginException,
+218 IllegalArgumentException, IOException {
+219 exportJobsToFile(filename, project, null, null, new String[0]);
+220 }
+221
+222 /**
+223 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter,
+224 * groupPath and jobIds), as an XML file
+225 *
+226 * @param filename path of the file where the content should be saved
+227 * @param project name of the project - mandatory
+228 * @param jobFilter a filter for the job Name - optional
+229 * @param groupPath a group or partial group path to include all jobs within that group path - optional
+230 * @param jobIds a list of Job IDs to include - optional
+231 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+232 * @throws RundeckApiLoginException if the login failed
+233 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+234 * @throws IOException if we failed to write to the file
+235 * @see #exportJobsToFile(String, String)
+236 * @see #exportJobs(String, String, String, String...)
+237 */
+238 public void exportJobsToFile(String filename, String project, String jobFilter, String groupPath, String... jobIds)
+239 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException, IOException {
+240 InputStream inputStream = exportJobs(project, jobFilter, groupPath, jobIds);
+241 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream));
+242 }
+243
+244 /**
+245 * Export the definitions of all jobs that belongs to the given project
+246 *
+247 * @param project name of the project - mandatory
+248 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
+249 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+250 * @throws RundeckApiLoginException if the login failed
+251 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+252 * @see #exportJobs(String, String, String, String...)
+253 * @see #exportJobsToFile(String, String)
+254 */
+255 public InputStream exportJobs(String project) throws RundeckApiException, RundeckApiLoginException,
+256 IllegalArgumentException {
+257 return exportJobs(project, null, null, new String[0]);
+258 }
+259
+260 /**
+261 * Export the definitions of the jobs that belongs to the given project, and matches the given criteria (jobFilter,
+262 * groupPath and jobIds)
+263 *
+264 * @param project name of the project - mandatory
+265 * @param jobFilter a filter for the job Name - optional
+266 * @param groupPath a group or partial group path to include all jobs within that group path - optional
+267 * @param jobIds a list of Job IDs to include - optional
+268 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
+269 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+270 * @throws RundeckApiLoginException if the login failed
+271 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+272 * @see #exportJobs(String)
+273 * @see #exportJobsToFile(String, String, String, String, String...)
+274 */
+275 public InputStream exportJobs(String project, String jobFilter, String groupPath, String... jobIds)
+276 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+277 AssertUtil.notBlank(project, "project is mandatory to export all jobs !");
+278 return new ApiCall(this).get(new ApiPathBuilder("/jobs/export").param("project", project)
+279 .param("jobFilter", jobFilter)
+280 .param("groupPath", groupPath)
+281 .param("idlist", StringUtils.join(jobIds, ",")));
+282 }
+283
+284 /**
+285 * Export the definition of a single job (identified by the given ID), as an XML file
+286 *
+287 * @param filename path of the file where the content should be saved
+288 * @param jobId identifier of the job - mandatory
+289 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+290 * @throws RundeckApiLoginException if the login failed
+291 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+292 * @throws IOException if we failed to write to the file
+293 * @see #exportJob(String)
+294 * @see #getJob(String)
+295 */
+296 public void exportJobToFile(String filename, String jobId) throws RundeckApiException, RundeckApiLoginException,
+297 IllegalArgumentException, IOException {
+298 InputStream inputStream = exportJob(jobId);
+299 FileUtils.writeByteArrayToFile(new File(filename), IOUtils.toByteArray(inputStream));
300 }
301
302 /**
-303 * Get the definition of a single job, identified by the given ID
+303 * Export the definition of a single job, identified by the given ID
304 *
305 * @param jobId identifier of the job - mandatory
-306 * @return a {@link RundeckJob} instance - won't be null
+306 * @return an {@link InputStream} instance, not linked to any network resources - won't be null
307 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
308 * @throws RundeckApiLoginException if the login failed
309 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-310 */
-311 public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
-312 IllegalArgumentException {
-313 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !");
-314 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId), new JobParser("joblist/job"));
-315 }
-316
-317 /**
-318 * Delete a single job, identified by the given ID
-319 *
-320 * @param jobId identifier of the job - mandatory
-321 * @return the success message (note that in case of error, you'll get an exception)
-322 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-323 * @throws RundeckApiLoginException if the login failed
-324 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-325 */
-326 public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
-327 IllegalArgumentException {
-328 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !");
-329 return new ApiCall(this).delete(new ApiPathBuilder("/job/", jobId), new StringParser("result/success/message"));
-330 }
-331
-332 /**
-333 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
-334 * end of the job execution)
-335 *
-336 * @param jobId identifier of the job - mandatory
-337 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-338 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-339 * @throws RundeckApiLoginException if the login failed
-340 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-341 * @see #triggerJob(String, Properties, Properties)
-342 * @see #runJob(String)
-343 */
-344 public RundeckExecution triggerJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
-345 IllegalArgumentException {
-346 return triggerJob(jobId, null);
-347 }
-348
-349 /**
-350 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
-351 * end of the job execution)
-352 *
-353 * @param jobId identifier of the job - mandatory
-354 * @param options of the job - optional. See {@link OptionsBuilder}.
-355 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-356 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-357 * @throws RundeckApiLoginException if the login failed
-358 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-359 * @see #triggerJob(String, Properties, Properties)
-360 * @see #runJob(String, Properties)
-361 */
-362 public RundeckExecution triggerJob(String jobId, Properties options) throws RundeckApiException,
-363 RundeckApiLoginException, IllegalArgumentException {
-364 return triggerJob(jobId, options, null);
-365 }
-366
-367 /**
-368 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
-369 * end of the job execution)
-370 *
-371 * @param jobId identifier of the job - mandatory
-372 * @param options of the job - optional. See {@link OptionsBuilder}.
-373 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See
-374 * {@link NodeFiltersBuilder}
-375 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-376 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-377 * @throws RundeckApiLoginException if the login failed
-378 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-379 * @see #triggerJob(String)
-380 * @see #runJob(String, Properties, Properties)
-381 */
-382 public RundeckExecution triggerJob(String jobId, Properties options, Properties nodeFilters)
-383 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-384 AssertUtil.notBlank(jobId, "jobId is mandatory to trigger a job !");
-385 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/run").param("argString",
-386 ParametersUtil.generateArgString(options))
-387 .nodeFilters(nodeFilters),
-388 new ExecutionParser("result/executions/execution"));
-389 }
-390
-391 /**
-392 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-393 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
-394 * aborted) or is still running.
-395 *
-396 * @param jobId identifier of the job - mandatory
-397 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-398 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-399 * @throws RundeckApiLoginException if the login failed
-400 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-401 * @see #triggerJob(String)
-402 * @see #runJob(String, Properties, Properties, long, TimeUnit)
-403 */
-404 public RundeckExecution runJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
-405 IllegalArgumentException {
-406 return runJob(jobId, null);
-407 }
-408
-409 /**
-410 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-411 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
-412 * aborted) or is still running.
-413 *
-414 * @param jobId identifier of the job - mandatory
-415 * @param options of the job - optional. See {@link OptionsBuilder}.
-416 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-417 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-418 * @throws RundeckApiLoginException if the login failed
-419 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-420 * @see #triggerJob(String, Properties)
-421 * @see #runJob(String, Properties, Properties, long, TimeUnit)
-422 */
-423 public RundeckExecution runJob(String jobId, Properties options) throws RundeckApiException,
-424 RundeckApiLoginException, IllegalArgumentException {
-425 return runJob(jobId, options, null);
-426 }
-427
-428 /**
-429 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-430 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
-431 * aborted) or is still running.
-432 *
-433 * @param jobId identifier of the job - mandatory
-434 * @param options of the job - optional. See {@link OptionsBuilder}.
-435 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See
-436 * {@link NodeFiltersBuilder}
+310 * @see #exportJobToFile(String, String)
+311 * @see #getJob(String)
+312 */
+313 public InputStream exportJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
+314 IllegalArgumentException {
+315 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !");
+316 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId));
+317 }
+318
+319 /**
+320 * Find a job, identified by its project, group and name. Note that the groupPath is optional, as a job does not
+321 * need to belong to a group (either pass null, or an empty string).
+322 *
+323 * @param project name of the project - mandatory
+324 * @param groupPath group to which the job belongs (if it belongs to a group) - optional
+325 * @param name of the job to find - mandatory
+326 * @return a {@link RundeckJob} instance - null if not found
+327 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+328 * @throws RundeckApiLoginException if the login failed
+329 * @throws IllegalArgumentException if the project or the name is blank (null, empty or whitespace)
+330 * @see #getJob(String)
+331 */
+332 public RundeckJob findJob(String project, String groupPath, String name) throws RundeckApiException,
+333 RundeckApiLoginException, IllegalArgumentException {
+334 AssertUtil.notBlank(project, "project is mandatory to find a job !");
+335 AssertUtil.notBlank(name, "job name is mandatory to find a job !");
+336 List<RundeckJob> jobs = getJobs(project, name, groupPath, new String[0]);
+337 return jobs.isEmpty() ? null : jobs.get(0);
+338 }
+339
+340 /**
+341 * Get the definition of a single job, identified by the given ID
+342 *
+343 * @param jobId identifier of the job - mandatory
+344 * @return a {@link RundeckJob} instance - won't be null
+345 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+346 * @throws RundeckApiLoginException if the login failed
+347 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+348 * @see #findJob(String, String, String)
+349 * @see #exportJob(String)
+350 */
+351 public RundeckJob getJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
+352 IllegalArgumentException {
+353 AssertUtil.notBlank(jobId, "jobId is mandatory to get the details of a job !");
+354 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId), new JobParser("joblist/job"));
+355 }
+356
+357 /**
+358 * Delete a single job, identified by the given ID
+359 *
+360 * @param jobId identifier of the job - mandatory
+361 * @return the success message (note that in case of error, you'll get an exception)
+362 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+363 * @throws RundeckApiLoginException if the login failed
+364 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+365 */
+366 public String deleteJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
+367 IllegalArgumentException {
+368 AssertUtil.notBlank(jobId, "jobId is mandatory to delete a job !");
+369 return new ApiCall(this).delete(new ApiPathBuilder("/job/", jobId), new StringParser("result/success/message"));
+370 }
+371
+372 /**
+373 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
+374 * end of the job execution)
+375 *
+376 * @param jobId identifier of the job - mandatory
+377 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+378 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+379 * @throws RundeckApiLoginException if the login failed
+380 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+381 * @see #triggerJob(String, Properties, Properties)
+382 * @see #runJob(String)
+383 */
+384 public RundeckExecution triggerJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
+385 IllegalArgumentException {
+386 return triggerJob(jobId, null);
+387 }
+388
+389 /**
+390 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
+391 * end of the job execution)
+392 *
+393 * @param jobId identifier of the job - mandatory
+394 * @param options of the job - optional. See {@link OptionsBuilder}.
+395 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+396 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+397 * @throws RundeckApiLoginException if the login failed
+398 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+399 * @see #triggerJob(String, Properties, Properties)
+400 * @see #runJob(String, Properties)
+401 */
+402 public RundeckExecution triggerJob(String jobId, Properties options) throws RundeckApiException,
+403 RundeckApiLoginException, IllegalArgumentException {
+404 return triggerJob(jobId, options, null);
+405 }
+406
+407 /**
+408 * Trigger the execution of a RunDeck job (identified by the given ID), and return immediately (without waiting the
+409 * end of the job execution)
+410 *
+411 * @param jobId identifier of the job - mandatory
+412 * @param options of the job - optional. See {@link OptionsBuilder}.
+413 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See
+414 * {@link NodeFiltersBuilder}
+415 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+416 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+417 * @throws RundeckApiLoginException if the login failed
+418 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+419 * @see #triggerJob(String)
+420 * @see #runJob(String, Properties, Properties)
+421 */
+422 public RundeckExecution triggerJob(String jobId, Properties options, Properties nodeFilters)
+423 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+424 AssertUtil.notBlank(jobId, "jobId is mandatory to trigger a job !");
+425 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/run").param("argString",
+426 ParametersUtil.generateArgString(options))
+427 .nodeFilters(nodeFilters),
+428 new ExecutionParser("result/executions/execution"));
+429 }
+430
+431 /**
+432 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
+433 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
+434 * aborted) or is still running.
+435 *
+436 * @param jobId identifier of the job - mandatory
437 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
438 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
439 * @throws RundeckApiLoginException if the login failed
440 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-441 * @see #triggerJob(String, Properties, Properties)
+441 * @see #triggerJob(String)
442 * @see #runJob(String, Properties, Properties, long, TimeUnit)
443 */
-444 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters)
-445 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-446 return runJob(jobId, options, nodeFilters, 5, TimeUnit.SECONDS);
+444 public RundeckExecution runJob(String jobId) throws RundeckApiException, RundeckApiLoginException,
+445 IllegalArgumentException {
+446 return runJob(jobId, null);
447 }
448
449 /**
450 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-451 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to
-452 * know if the execution is finished (or aborted) or is still running.
+451 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
+452 * aborted) or is still running.
453 *
454 * @param jobId identifier of the job - mandatory
455 * @param options of the job - optional. See {@link OptionsBuilder}.
-456 * @param poolingInterval for checking the status of the execution. Must be > 0.
-457 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-458 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-459 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-460 * @throws RundeckApiLoginException if the login failed
-461 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-462 * @see #triggerJob(String, Properties)
-463 * @see #runJob(String, Properties, Properties, long, TimeUnit)
-464 */
-465 public RundeckExecution runJob(String jobId, Properties options, long poolingInterval, TimeUnit poolingUnit)
-466 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-467 return runJob(jobId, options, null, poolingInterval, poolingUnit);
-468 }
-469
-470 /**
-471 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
-472 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to
-473 * know if the execution is finished (or aborted) or is still running.
-474 *
-475 * @param jobId identifier of the job - mandatory
-476 * @param options of the job - optional. See {@link OptionsBuilder}.
-477 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See
-478 * {@link NodeFiltersBuilder}
-479 * @param poolingInterval for checking the status of the execution. Must be > 0.
-480 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-481 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-482 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-483 * @throws RundeckApiLoginException if the login failed
-484 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-485 * @see #triggerJob(String, Properties)
-486 * @see #runJob(String, Properties, Properties, long, TimeUnit)
-487 */
-488 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters, long poolingInterval,
-489 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-490 if (poolingInterval <= 0) {
-491 poolingInterval = 5;
-492 poolingUnit = TimeUnit.SECONDS;
-493 }
-494 if (poolingUnit == null) {
-495 poolingUnit = TimeUnit.SECONDS;
-496 }
-497
-498 RundeckExecution execution = triggerJob(jobId, options, nodeFilters);
-499 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
-500 try {
-501 Thread.sleep(poolingUnit.toMillis(poolingInterval));
-502 } catch (InterruptedException e) {
-503 break;
-504 }
-505 execution = getExecution(execution.getId());
-506 }
-507 return execution;
+456 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+457 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+458 * @throws RundeckApiLoginException if the login failed
+459 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+460 * @see #triggerJob(String, Properties)
+461 * @see #runJob(String, Properties, Properties, long, TimeUnit)
+462 */
+463 public RundeckExecution runJob(String jobId, Properties options) throws RundeckApiException,
+464 RundeckApiLoginException, IllegalArgumentException {
+465 return runJob(jobId, options, null);
+466 }
+467
+468 /**
+469 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
+470 * We will poll the RunDeck server at regular interval (every 5 seconds) to know if the execution is finished (or
+471 * aborted) or is still running.
+472 *
+473 * @param jobId identifier of the job - mandatory
+474 * @param options of the job - optional. See {@link OptionsBuilder}.
+475 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See
+476 * {@link NodeFiltersBuilder}
+477 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+478 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+479 * @throws RundeckApiLoginException if the login failed
+480 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+481 * @see #triggerJob(String, Properties, Properties)
+482 * @see #runJob(String, Properties, Properties, long, TimeUnit)
+483 */
+484 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters)
+485 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+486 return runJob(jobId, options, nodeFilters, 5, TimeUnit.SECONDS);
+487 }
+488
+489 /**
+490 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
+491 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to
+492 * know if the execution is finished (or aborted) or is still running.
+493 *
+494 * @param jobId identifier of the job - mandatory
+495 * @param options of the job - optional. See {@link OptionsBuilder}.
+496 * @param poolingInterval for checking the status of the execution. Must be > 0.
+497 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+498 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+499 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+500 * @throws RundeckApiLoginException if the login failed
+501 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+502 * @see #triggerJob(String, Properties)
+503 * @see #runJob(String, Properties, Properties, long, TimeUnit)
+504 */
+505 public RundeckExecution runJob(String jobId, Properties options, long poolingInterval, TimeUnit poolingUnit)
+506 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+507 return runJob(jobId, options, null, poolingInterval, poolingUnit);
508 }
509
-510 /*
-511 * Ad-hoc commands
-512 */
-513
-514 /**
-515 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
-516 * The command will not be dispatched to nodes, but be executed on the RunDeck server.
-517 *
-518 * @param project name of the project - mandatory
-519 * @param command to be executed - mandatory
-520 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-521 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-522 * @throws RundeckApiLoginException if the login failed
-523 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-524 * @see #triggerAdhocCommand(String, String, Properties)
-525 * @see #runAdhocCommand(String, String)
-526 */
-527 public RundeckExecution triggerAdhocCommand(String project, String command) throws RundeckApiException,
-528 RundeckApiLoginException, IllegalArgumentException {
-529 return triggerAdhocCommand(project, command, null);
-530 }
-531
-532 /**
-533 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
-534 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
-535 *
-536 * @param project name of the project - mandatory
-537 * @param command to be executed - mandatory
-538 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
-539 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
-540 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-541 * @throws RundeckApiLoginException if the login failed
-542 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-543 * @see #triggerAdhocCommand(String, String)
-544 * @see #runAdhocCommand(String, String, Properties)
-545 */
-546 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters)
-547 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-548 AssertUtil.notBlank(project, "project is mandatory to trigger an ad-hoc command !");
-549 AssertUtil.notBlank(command, "command is mandatory to trigger an ad-hoc command !");
-550 RundeckExecution execution = new ApiCall(this).get(new ApiPathBuilder("/run/command").param("project", project)
-551 .param("exec", command)
-552 .nodeFilters(nodeFilters),
-553 new ExecutionParser("result/execution"));
-554 // the first call just returns the ID of the execution, so we need another call to get a "real" execution
-555 return getExecution(execution.getId());
-556 }
-557
-558 /**
-559 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-560 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
-561 * running. The command will not be dispatched to nodes, but be executed on the RunDeck server.
-562 *
-563 * @param project name of the project - mandatory
-564 * @param command to be executed - mandatory
-565 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-566 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-567 * @throws RundeckApiLoginException if the login failed
-568 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-569 * @see #runAdhocCommand(String, String, Properties, long, TimeUnit)
-570 * @see #triggerAdhocCommand(String, String)
-571 */
-572 public RundeckExecution runAdhocCommand(String project, String command) throws RundeckApiException,
-573 RundeckApiLoginException, IllegalArgumentException {
-574 return runAdhocCommand(project, command, null);
-575 }
-576
-577 /**
-578 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-579 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
-580 * finished (or aborted) or is still running. The command will not be dispatched to nodes, but be executed on the
-581 * RunDeck server.
-582 *
-583 * @param project name of the project - mandatory
-584 * @param command to be executed - mandatory
-585 * @param poolingInterval for checking the status of the execution. Must be > 0.
-586 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-587 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-588 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-589 * @throws RundeckApiLoginException if the login failed
-590 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-591 * @see #runAdhocCommand(String, String, Properties, long, TimeUnit)
-592 * @see #triggerAdhocCommand(String, String)
-593 */
-594 public RundeckExecution runAdhocCommand(String project, String command, long poolingInterval, TimeUnit poolingUnit)
-595 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-596 return runAdhocCommand(project, command, null, poolingInterval, poolingUnit);
-597 }
-598
-599 /**
-600 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-601 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
-602 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
-603 *
-604 * @param project name of the project - mandatory
-605 * @param command to be executed - mandatory
-606 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
-607 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-608 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-609 * @throws RundeckApiLoginException if the login failed
-610 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-611 * @see #runAdhocCommand(String, String, Properties, long, TimeUnit)
-612 * @see #triggerAdhocCommand(String, String, Properties)
-613 */
-614 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters)
-615 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-616 return runAdhocCommand(project, command, nodeFilters, 5, TimeUnit.SECONDS);
-617 }
-618
-619 /**
-620 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
-621 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
-622 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the
-623 * nodeFilters parameter.
-624 *
-625 * @param project name of the project - mandatory
-626 * @param command to be executed - mandatory
-627 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
-628 * @param poolingInterval for checking the status of the execution. Must be > 0.
-629 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
-630 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
-631 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-632 * @throws RundeckApiLoginException if the login failed
-633 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
-634 * @see #triggerAdhocCommand(String, String, Properties)
-635 */
-636 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters,
-637 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException,
-638 IllegalArgumentException {
-639 if (poolingInterval <= 0) {
-640 poolingInterval = 5;
-641 poolingUnit = TimeUnit.SECONDS;
-642 }
-643 if (poolingUnit == null) {
-644 poolingUnit = TimeUnit.SECONDS;
-645 }
-646
-647 RundeckExecution execution = triggerAdhocCommand(project, command, nodeFilters);
-648 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
-649 try {
-650 Thread.sleep(poolingUnit.toMillis(poolingInterval));
-651 } catch (InterruptedException e) {
-652 break;
-653 }
-654 execution = getExecution(execution.getId());
-655 }
-656 return execution;
-657 }
-658
-659 /*
-660 * Executions
-661 */
-662
-663 /**
-664 * Get all running executions (for all projects)
-665 *
-666 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-667 * @throws RundeckApiException in case of error when calling the API
-668 * @throws RundeckApiLoginException if the login failed
-669 */
-670 public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException {
-671 List<RundeckExecution> executions = new ArrayList<RundeckExecution>();
-672 for (RundeckProject project : getProjects()) {
-673 executions.addAll(getRunningExecutions(project.getName()));
-674 }
-675 return executions;
-676 }
-677
-678 /**
-679 * Get the running executions for the given project
-680 *
-681 * @param project name of the project - mandatory
-682 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-683 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-684 * @throws RundeckApiLoginException if the login failed
-685 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-686 */
-687 public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException,
-688 RundeckApiLoginException, IllegalArgumentException {
-689 AssertUtil.notBlank(project, "project is mandatory get all running executions !");
-690 return new ApiCall(this).get(new ApiPathBuilder("/executions/running").param("project", project),
-691 new ListParser<RundeckExecution>(new ExecutionParser(),
-692 "result/executions/execution"));
-693 }
-694
-695 /**
-696 * Get the executions of the given job
-697 *
-698 * @param jobId identifier of the job - mandatory
-699 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-700 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-701 * @throws RundeckApiLoginException if the login failed
-702 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-703 */
-704 public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException,
+510 /**
+511 * Run a RunDeck job (identified by the given ID), and wait until its execution is finished (or aborted) to return.
+512 * We will poll the RunDeck server at regular interval (configured by the poolingInterval/poolingUnit couple) to
+513 * know if the execution is finished (or aborted) or is still running.
+514 *
+515 * @param jobId identifier of the job - mandatory
+516 * @param options of the job - optional. See {@link OptionsBuilder}.
+517 * @param nodeFilters for overriding the nodes on which the job will be executed - optional. See
+518 * {@link NodeFiltersBuilder}
+519 * @param poolingInterval for checking the status of the execution. Must be > 0.
+520 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+521 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+522 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+523 * @throws RundeckApiLoginException if the login failed
+524 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+525 * @see #triggerJob(String, Properties)
+526 * @see #runJob(String, Properties, Properties, long, TimeUnit)
+527 */
+528 public RundeckExecution runJob(String jobId, Properties options, Properties nodeFilters, long poolingInterval,
+529 TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+530 if (poolingInterval <= 0) {
+531 poolingInterval = 5;
+532 poolingUnit = TimeUnit.SECONDS;
+533 }
+534 if (poolingUnit == null) {
+535 poolingUnit = TimeUnit.SECONDS;
+536 }
+537
+538 RundeckExecution execution = triggerJob(jobId, options, nodeFilters);
+539 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
+540 try {
+541 Thread.sleep(poolingUnit.toMillis(poolingInterval));
+542 } catch (InterruptedException e) {
+543 break;
+544 }
+545 execution = getExecution(execution.getId());
+546 }
+547 return execution;
+548 }
+549
+550 /*
+551 * Ad-hoc commands
+552 */
+553
+554 /**
+555 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
+556 * The command will not be dispatched to nodes, but be executed on the RunDeck server.
+557 *
+558 * @param project name of the project - mandatory
+559 * @param command to be executed - mandatory
+560 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+561 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+562 * @throws RundeckApiLoginException if the login failed
+563 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+564 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean)
+565 * @see #runAdhocCommand(String, String)
+566 */
+567 public RundeckExecution triggerAdhocCommand(String project, String command) throws RundeckApiException,
+568 RundeckApiLoginException, IllegalArgumentException {
+569 return triggerAdhocCommand(project, command, null);
+570 }
+571
+572 /**
+573 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
+574 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
+575 *
+576 * @param project name of the project - mandatory
+577 * @param command to be executed - mandatory
+578 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
+579 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+580 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+581 * @throws RundeckApiLoginException if the login failed
+582 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+583 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean)
+584 * @see #runAdhocCommand(String, String, Properties)
+585 */
+586 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters)
+587 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+588 return triggerAdhocCommand(project, command, nodeFilters, null, null);
+589 }
+590
+591 /**
+592 * Trigger the execution of an ad-hoc command, and return immediately (without waiting the end of the execution).
+593 * The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
+594 *
+595 * @param project name of the project - mandatory
+596 * @param command to be executed - mandatory
+597 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
+598 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional
+599 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional
+600 * @return a {@link RundeckExecution} instance for the newly created (and running) execution - won't be null
+601 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+602 * @throws RundeckApiLoginException if the login failed
+603 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+604 * @see #triggerAdhocCommand(String, String)
+605 * @see #runAdhocCommand(String, String, Properties)
+606 */
+607 public RundeckExecution triggerAdhocCommand(String project, String command, Properties nodeFilters,
+608 Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiLoginException,
+609 IllegalArgumentException {
+610 AssertUtil.notBlank(project, "project is mandatory to trigger an ad-hoc command !");
+611 AssertUtil.notBlank(command, "command is mandatory to trigger an ad-hoc command !");
+612 RundeckExecution execution = new ApiCall(this).get(new ApiPathBuilder("/run/command").param("project", project)
+613 .param("exec", command)
+614 .param("nodeThreadcount",
+615 nodeThreadcount)
+616 .param("nodeKeepgoing",
+617 nodeKeepgoing)
+618 .nodeFilters(nodeFilters),
+619 new ExecutionParser("result/execution"));
+620 // the first call just returns the ID of the execution, so we need another call to get a "real" execution
+621 return getExecution(execution.getId());
+622 }
+623
+624 /**
+625 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+626 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
+627 * running. The command will not be dispatched to nodes, but be executed on the RunDeck server.
+628 *
+629 * @param project name of the project - mandatory
+630 * @param command to be executed - mandatory
+631 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+632 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+633 * @throws RundeckApiLoginException if the login failed
+634 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+635 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
+636 * @see #triggerAdhocCommand(String, String)
+637 */
+638 public RundeckExecution runAdhocCommand(String project, String command) throws RundeckApiException,
+639 RundeckApiLoginException, IllegalArgumentException {
+640 return runAdhocCommand(project, command, null);
+641 }
+642
+643 /**
+644 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+645 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
+646 * finished (or aborted) or is still running. The command will not be dispatched to nodes, but be executed on the
+647 * RunDeck server.
+648 *
+649 * @param project name of the project - mandatory
+650 * @param command to be executed - mandatory
+651 * @param poolingInterval for checking the status of the execution. Must be > 0.
+652 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+653 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+654 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+655 * @throws RundeckApiLoginException if the login failed
+656 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+657 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
+658 * @see #triggerAdhocCommand(String, String)
+659 */
+660 public RundeckExecution runAdhocCommand(String project, String command, long poolingInterval, TimeUnit poolingUnit)
+661 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+662 return runAdhocCommand(project, command, null, poolingInterval, poolingUnit);
+663 }
+664
+665 /**
+666 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+667 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
+668 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
+669 *
+670 * @param project name of the project - mandatory
+671 * @param command to be executed - mandatory
+672 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
+673 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+674 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+675 * @throws RundeckApiLoginException if the login failed
+676 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+677 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
+678 * @see #triggerAdhocCommand(String, String, Properties)
+679 */
+680 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters)
+681 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+682 return runAdhocCommand(project, command, nodeFilters, null, null);
+683 }
+684
+685 /**
+686 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+687 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
+688 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the
+689 * nodeFilters parameter.
+690 *
+691 * @param project name of the project - mandatory
+692 * @param command to be executed - mandatory
+693 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
+694 * @param poolingInterval for checking the status of the execution. Must be > 0.
+695 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+696 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+697 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+698 * @throws RundeckApiLoginException if the login failed
+699 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+700 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
+701 * @see #triggerAdhocCommand(String, String, Properties)
+702 */
+703 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters,
+704 long poolingInterval, TimeUnit poolingUnit) throws RundeckApiException, RundeckApiLoginException,
705 IllegalArgumentException {
-706 return getJobExecutions(jobId, null);
+706 return runAdhocCommand(project, command, nodeFilters, null, null, poolingInterval, poolingUnit);
707 }
708
709 /**
-710 * Get the executions of the given job
-711 *
-712 * @param jobId identifier of the job - mandatory
-713 * @param status of the executions - optional (null for all)
-714 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
-715 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
-716 * @throws RundeckApiLoginException if the login failed
-717 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-718 */
-719 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException,
-720 RundeckApiLoginException, IllegalArgumentException {
-721 return getJobExecutions(jobId, status, null, null);
-722 }
-723
-724 /**
-725 * Get the executions of the given job
-726 *
-727 * @param jobId identifier of the job - mandatory
-728 * @param status of the executions - optional (null for all)
-729 * @param max number of results to return - optional (null for all)
-730 * @param offset the 0-indexed offset for the first result to return - optional
-731 * @return a {@link List} of {@link RundeckExecution} : might be empty, but 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 failed
-734 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
-735 */
-736 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset)
-737 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
-738 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !");
-739 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/executions").param("status",
-740 status != null ? StringUtils.lowerCase(status.toString()) : null)
-741 .param("max", max)
-742 .param("offset", offset),
-743 new ListParser<RundeckExecution>(new ExecutionParser(),
-744 "result/executions/execution"));
-745 }
-746
-747 /**
-748 * Get a single execution, identified by the given ID
-749 *
-750 * @param executionId identifier of the execution - mandatory
-751 * @return a {@link RundeckExecution} instance - won't be null
-752 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
-753 * @throws RundeckApiLoginException if the login failed
-754 * @throws IllegalArgumentException if the executionId is null
-755 */
-756 public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
-757 IllegalArgumentException {
-758 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !");
-759 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()),
-760 new ExecutionParser("result/executions/execution"));
-761 }
-762
-763 /**
-764 * Abort an execution (identified by the given ID). The execution should be running...
-765 *
-766 * @param executionId identifier of the execution - mandatory
-767 * @return a {@link RundeckAbort} instance - won't be null
-768 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
-769 * @throws RundeckApiLoginException if the login failed
-770 * @throws IllegalArgumentException if the executionId is null
-771 */
-772 public RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
-773 IllegalArgumentException {
-774 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !");
-775 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString(), "/abort"),
-776 new AbortParser("result/abort"));
-777 }
-778
-779 /*
-780 * Nodes
-781 */
-782
-783 /**
-784 * List all nodes (for all projects)
-785 *
-786 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
-787 * @throws RundeckApiException in case of error when calling the API
-788 * @throws RundeckApiLoginException if the login failed
-789 */
-790 public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException {
-791 List<RundeckNode> nodes = new ArrayList<RundeckNode>();
-792 for (RundeckProject project : getProjects()) {
-793 nodes.addAll(getNodes(project.getName()));
-794 }
-795 return nodes;
-796 }
-797
-798 /**
-799 * List all nodes that belongs to the given project
-800 *
-801 * @param project name of the project - mandatory
-802 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
-803 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-804 * @throws RundeckApiLoginException if the login failed
-805 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-806 * @see #getNodes(String, Properties)
-807 */
-808 public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException,
-809 IllegalArgumentException {
-810 return getNodes(project, null);
-811 }
-812
-813 /**
-814 * List nodes that belongs to the given project
-815 *
-816 * @param project name of the project - mandatory
-817 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder}
-818 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
-819 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
-820 * @throws RundeckApiLoginException if the login failed
-821 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
-822 */
-823 public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException,
-824 RundeckApiLoginException, IllegalArgumentException {
-825 AssertUtil.notBlank(project, "project is mandatory to get all nodes !");
-826 return new ApiCall(this).get(new ApiPathBuilder("/resources").param("project", project)
-827 .nodeFilters(nodeFilters),
-828 new ListParser<RundeckNode>(new NodeParser(), "project/node"));
-829 }
-830
-831 /**
-832 * Get the definition of a single node
-833 *
-834 * @param name of the node - mandatory
-835 * @param project name of the project - mandatory
-836 * @return a {@link RundeckNode} instance - won't be null
-837 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
-838 * @throws RundeckApiLoginException if the login failed
-839 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
-840 */
-841 public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException,
-842 IllegalArgumentException {
-843 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !");
-844 AssertUtil.notBlank(project, "project is mandatory to get a node !");
-845 return new ApiCall(this).get(new ApiPathBuilder("/resource/", name).param("project", project),
-846 new NodeParser("project/node"));
-847 }
-848
-849 public String getUrl() {
-850 return url;
-851 }
-852
-853 public String getLogin() {
-854 return login;
-855 }
-856
-857 public String getPassword() {
-858 return password;
-859 }
-860
-861 @Override
-862 public String toString() {
-863 return "RundeckClient [url=" + url + ", login=" + login + ", password=" + password + "]";
-864 }
-865
-866 @Override
-867 public int hashCode() {
-868 final int prime = 31;
-869 int result = 1;
-870 result = prime * result + ((login == null) ? 0 : login.hashCode());
-871 result = prime * result + ((password == null) ? 0 : password.hashCode());
-872 result = prime * result + ((url == null) ? 0 : url.hashCode());
-873 return result;
-874 }
-875
-876 @Override
-877 public boolean equals(Object obj) {
-878 if (this == obj)
-879 return true;
-880 if (obj == null)
-881 return false;
-882 if (getClass() != obj.getClass())
-883 return false;
-884 RundeckClient other = (RundeckClient) obj;
-885 if (login == null) {
-886 if (other.login != null)
-887 return false;
-888 } else if (!login.equals(other.login))
-889 return false;
-890 if (password == null) {
-891 if (other.password != null)
-892 return false;
-893 } else if (!password.equals(other.password))
-894 return false;
-895 if (url == null) {
-896 if (other.url != null)
-897 return false;
-898 } else if (!url.equals(other.url))
-899 return false;
-900 return true;
-901 }
-902
-903 }
+710 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+711 * server at regular interval (every 5 seconds) to know if the execution is finished (or aborted) or is still
+712 * running. The command will be dispatched to nodes, accordingly to the nodeFilters parameter.
+713 *
+714 * @param project name of the project - mandatory
+715 * @param command to be executed - mandatory
+716 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
+717 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional
+718 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional
+719 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+720 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+721 * @throws RundeckApiLoginException if the login failed
+722 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+723 * @see #runAdhocCommand(String, String, Properties, Integer, Boolean, long, TimeUnit)
+724 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean)
+725 */
+726 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters,
+727 Integer nodeThreadcount, Boolean nodeKeepgoing) throws RundeckApiException, RundeckApiLoginException,
+728 IllegalArgumentException {
+729 return runAdhocCommand(project, command, nodeFilters, nodeThreadcount, nodeKeepgoing, 5, TimeUnit.SECONDS);
+730 }
+731
+732 /**
+733 * Run an ad-hoc command, and wait until its execution is finished (or aborted) to return. We will poll the RunDeck
+734 * server at regular interval (configured by the poolingInterval/poolingUnit couple) to know if the execution is
+735 * finished (or aborted) or is still running. The command will be dispatched to nodes, accordingly to the
+736 * nodeFilters parameter.
+737 *
+738 * @param project name of the project - mandatory
+739 * @param command to be executed - mandatory
+740 * @param nodeFilters for selecting nodes on which the command will be executed. See {@link NodeFiltersBuilder}
+741 * @param nodeThreadcount thread count to use (for parallelizing when running on multiple nodes) - optional
+742 * @param nodeKeepgoing if true, continue executing on other nodes even if some fail - optional
+743 * @param poolingInterval for checking the status of the execution. Must be > 0.
+744 * @param poolingUnit unit (seconds, milli-seconds, ...) of the interval. Default to seconds.
+745 * @return a {@link RundeckExecution} instance for the (finished/aborted) execution - won't be null
+746 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+747 * @throws RundeckApiLoginException if the login failed
+748 * @throws IllegalArgumentException if the project or command is blank (null, empty or whitespace)
+749 * @see #triggerAdhocCommand(String, String, Properties, Integer, Boolean)
+750 */
+751 public RundeckExecution runAdhocCommand(String project, String command, Properties nodeFilters,
+752 Integer nodeThreadcount, Boolean nodeKeepgoing, long poolingInterval, TimeUnit poolingUnit)
+753 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+754 if (poolingInterval <= 0) {
+755 poolingInterval = 5;
+756 poolingUnit = TimeUnit.SECONDS;
+757 }
+758 if (poolingUnit == null) {
+759 poolingUnit = TimeUnit.SECONDS;
+760 }
+761
+762 RundeckExecution execution = triggerAdhocCommand(project, command, nodeFilters, nodeThreadcount, nodeKeepgoing);
+763 while (ExecutionStatus.RUNNING.equals(execution.getStatus())) {
+764 try {
+765 Thread.sleep(poolingUnit.toMillis(poolingInterval));
+766 } catch (InterruptedException e) {
+767 break;
+768 }
+769 execution = getExecution(execution.getId());
+770 }
+771 return execution;
+772 }
+773
+774 /*
+775 * Executions
+776 */
+777
+778 /**
+779 * Get all running executions (for all projects)
+780 *
+781 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+782 * @throws RundeckApiException in case of error when calling the API
+783 * @throws RundeckApiLoginException if the login failed
+784 */
+785 public List<RundeckExecution> getRunningExecutions() throws RundeckApiException, RundeckApiLoginException {
+786 List<RundeckExecution> executions = new ArrayList<RundeckExecution>();
+787 for (RundeckProject project : getProjects()) {
+788 executions.addAll(getRunningExecutions(project.getName()));
+789 }
+790 return executions;
+791 }
+792
+793 /**
+794 * Get the running executions for the given project
+795 *
+796 * @param project name of the project - mandatory
+797 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+798 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+799 * @throws RundeckApiLoginException if the login failed
+800 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+801 */
+802 public List<RundeckExecution> getRunningExecutions(String project) throws RundeckApiException,
+803 RundeckApiLoginException, IllegalArgumentException {
+804 AssertUtil.notBlank(project, "project is mandatory get all running executions !");
+805 return new ApiCall(this).get(new ApiPathBuilder("/executions/running").param("project", project),
+806 new ListParser<RundeckExecution>(new ExecutionParser(),
+807 "result/executions/execution"));
+808 }
+809
+810 /**
+811 * Get the executions of the given job
+812 *
+813 * @param jobId identifier of the job - mandatory
+814 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+815 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+816 * @throws RundeckApiLoginException if the login failed
+817 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+818 */
+819 public List<RundeckExecution> getJobExecutions(String jobId) throws RundeckApiException, RundeckApiLoginException,
+820 IllegalArgumentException {
+821 return getJobExecutions(jobId, null);
+822 }
+823
+824 /**
+825 * Get the executions of the given job
+826 *
+827 * @param jobId identifier of the job - mandatory
+828 * @param status of the executions - optional (null for all)
+829 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+830 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+831 * @throws RundeckApiLoginException if the login failed
+832 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+833 */
+834 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status) throws RundeckApiException,
+835 RundeckApiLoginException, IllegalArgumentException {
+836 return getJobExecutions(jobId, status, null, null);
+837 }
+838
+839 /**
+840 * Get the executions of the given job
+841 *
+842 * @param jobId identifier of the job - mandatory
+843 * @param status of the executions - optional (null for all)
+844 * @param max number of results to return - optional (null for all)
+845 * @param offset the 0-indexed offset for the first result to return - optional
+846 * @return a {@link List} of {@link RundeckExecution} : might be empty, but won't be null
+847 * @throws RundeckApiException in case of error when calling the API (non-existent job with this ID)
+848 * @throws RundeckApiLoginException if the login failed
+849 * @throws IllegalArgumentException if the jobId is blank (null, empty or whitespace)
+850 */
+851 public List<RundeckExecution> getJobExecutions(String jobId, ExecutionStatus status, Long max, Long offset)
+852 throws RundeckApiException, RundeckApiLoginException, IllegalArgumentException {
+853 AssertUtil.notBlank(jobId, "jobId is mandatory to get the executions of a job !");
+854 return new ApiCall(this).get(new ApiPathBuilder("/job/", jobId, "/executions").param("status",
+855 status != null ? StringUtils.lowerCase(status.toString()) : null)
+856 .param("max", max)
+857 .param("offset", offset),
+858 new ListParser<RundeckExecution>(new ExecutionParser(),
+859 "result/executions/execution"));
+860 }
+861
+862 /**
+863 * Get a single execution, identified by the given ID
+864 *
+865 * @param executionId identifier of the execution - mandatory
+866 * @return a {@link RundeckExecution} instance - won't be null
+867 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
+868 * @throws RundeckApiLoginException if the login failed
+869 * @throws IllegalArgumentException if the executionId is null
+870 */
+871 public RundeckExecution getExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
+872 IllegalArgumentException {
+873 AssertUtil.notNull(executionId, "executionId is mandatory to get the details of an execution !");
+874 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString()),
+875 new ExecutionParser("result/executions/execution"));
+876 }
+877
+878 /**
+879 * Abort an execution (identified by the given ID). The execution should be running...
+880 *
+881 * @param executionId identifier of the execution - mandatory
+882 * @return a {@link RundeckAbort} instance - won't be null
+883 * @throws RundeckApiException in case of error when calling the API (non-existent execution with this ID)
+884 * @throws RundeckApiLoginException if the login failed
+885 * @throws IllegalArgumentException if the executionId is null
+886 */
+887 public RundeckAbort abortExecution(Long executionId) throws RundeckApiException, RundeckApiLoginException,
+888 IllegalArgumentException {
+889 AssertUtil.notNull(executionId, "executionId is mandatory to abort an execution !");
+890 return new ApiCall(this).get(new ApiPathBuilder("/execution/", executionId.toString(), "/abort"),
+891 new AbortParser("result/abort"));
+892 }
+893
+894 /*
+895 * Nodes
+896 */
+897
+898 /**
+899 * List all nodes (for all projects)
+900 *
+901 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
+902 * @throws RundeckApiException in case of error when calling the API
+903 * @throws RundeckApiLoginException if the login failed
+904 */
+905 public List<RundeckNode> getNodes() throws RundeckApiException, RundeckApiLoginException {
+906 List<RundeckNode> nodes = new ArrayList<RundeckNode>();
+907 for (RundeckProject project : getProjects()) {
+908 nodes.addAll(getNodes(project.getName()));
+909 }
+910 return nodes;
+911 }
+912
+913 /**
+914 * List all nodes that belongs to the given project
+915 *
+916 * @param project name of the project - mandatory
+917 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
+918 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+919 * @throws RundeckApiLoginException if the login failed
+920 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+921 * @see #getNodes(String, Properties)
+922 */
+923 public List<RundeckNode> getNodes(String project) throws RundeckApiException, RundeckApiLoginException,
+924 IllegalArgumentException {
+925 return getNodes(project, null);
+926 }
+927
+928 /**
+929 * List nodes that belongs to the given project
+930 *
+931 * @param project name of the project - mandatory
+932 * @param nodeFilters for filtering the nodes - optional. See {@link NodeFiltersBuilder}
+933 * @return a {@link List} of {@link RundeckNode} : might be empty, but won't be null
+934 * @throws RundeckApiException in case of error when calling the API (non-existent project with this name)
+935 * @throws RundeckApiLoginException if the login failed
+936 * @throws IllegalArgumentException if the project is blank (null, empty or whitespace)
+937 */
+938 public List<RundeckNode> getNodes(String project, Properties nodeFilters) throws RundeckApiException,
+939 RundeckApiLoginException, IllegalArgumentException {
+940 AssertUtil.notBlank(project, "project is mandatory to get all nodes !");
+941 return new ApiCall(this).get(new ApiPathBuilder("/resources").param("project", project)
+942 .nodeFilters(nodeFilters),
+943 new ListParser<RundeckNode>(new NodeParser(), "project/node"));
+944 }
+945
+946 /**
+947 * Get the definition of a single node
+948 *
+949 * @param name of the node - mandatory
+950 * @param project name of the project - mandatory
+951 * @return a {@link RundeckNode} instance - won't be null
+952 * @throws RundeckApiException in case of error when calling the API (non-existent name or project with this name)
+953 * @throws RundeckApiLoginException if the login failed
+954 * @throws IllegalArgumentException if the name or project is blank (null, empty or whitespace)
+955 */
+956 public RundeckNode getNode(String name, String project) throws RundeckApiException, RundeckApiLoginException,
+957 IllegalArgumentException {
+958 AssertUtil.notBlank(name, "the name of the node is mandatory to get a node !");
+959 AssertUtil.notBlank(project, "project is mandatory to get a node !");
+960 return new ApiCall(this).get(new ApiPathBuilder("/resource/", name).param("project", project),
+961 new NodeParser("project/node"));
+962 }
+963
+964 /*
+965 * System Info
+966 */
+967
+968 /**
+969 * Get system informations about the RunDeck server
+970 *
+971 * @return a {@link RundeckSystemInfo} instance - won't be null
+972 * @throws RundeckApiException in case of error when calling the API
+973 * @throws RundeckApiException if the login failed
+974 */
+975 public RundeckSystemInfo getSystemInfo() throws RundeckApiException, RundeckApiLoginException {
+976 return new ApiCall(this).get(new ApiPathBuilder("/system/info"), new SystemInfoParser("result/system"));
+977 }
+978
+979 public String getUrl() {
+980 return url;
+981 }
+982
+983 public String getLogin() {
+984 return login;
+985 }
+986
+987 public String getPassword() {
+988 return password;
+989 }
+990
+991 @Override
+992 public String toString() {
+993 return "RundeckClient [url=" + url + ", login=" + login + ", password=" + password + "]";
+994 }
+995
+996 @Override
+997 public int hashCode() {
+998 final int prime = 31;
+999 int result = 1;
+1000 result = prime * result + ((login == null) ? 0 : login.hashCode());
+1001 result = prime * result + ((password == null) ? 0 : password.hashCode());
+1002 result = prime * result + ((url == null) ? 0 : url.hashCode());
+1003 return result;
+1004 }
+1005
+1006 @Override
+1007 public boolean equals(Object obj) {
+1008 if (this == obj)
+1009 return true;
+1010 if (obj == null)
+1011 return false;
+1012 if (getClass() != obj.getClass())
+1013 return false;
+1014 RundeckClient other = (RundeckClient) obj;
+1015 if (login == null) {
+1016 if (other.login != null)
+1017 return false;
+1018 } else if (!login.equals(other.login))
+1019 return false;
+1020 if (password == null) {
+1021 if (other.password != null)
+1022 return false;
+1023 } else if (!password.equals(other.password))
+1024 return false;
+1025 if (url == null) {
+1026 if (other.url != null)
+1027 return false;
+1028 } else if (!url.equals(other.url))
+1029 return false;
+1030 return true;
+1031 }
+1032
+1033 }
diff --git a/xref/org/rundeck/api/domain/RundeckExecution.html b/xref/org/rundeck/api/domain/RundeckExecution.html
index 1f56d7b..45f8681 100644
--- a/xref/org/rundeck/api/domain/RundeckExecution.html
+++ b/xref/org/rundeck/api/domain/RundeckExecution.html
@@ -73,207 +73,198 @@
63 }
64
65 /**
-66 * @return the duration of the execution in seconds (or null if the duration is still running, or has been aborted)
+66 * @return the duration of the execution in seconds (or null if the execution is still running, or has been aborted)
67 */
68 public Long getDurationInSeconds() {
69 Long durationInMillis = getDurationInMillis();
-70 if (durationInMillis == null) {
-71 return null;
-72 }
-73 return TimeUnit.MILLISECONDS.toSeconds(durationInMillis);
-74 }
-75
-76 /**
-77 * @return the duration of the execution, as a human-readable string : "3 minutes 34 seconds" (or null if the
-78 * duration is still running, or has been aborted)
-79 */
-80 public String getDuration() {
-81 Long durationInMillis = getDurationInMillis();
-82 if (durationInMillis == null) {
-83 return null;
-84 }
-85 return DurationFormatUtils.formatDurationWords(durationInMillis, true, true);
-86 }
-87
-88 /**
-89 * @return the duration of the execution, as a "short" human-readable string : "0:03:34.187" (or null if the
-90 * duration is still running, or has been aborted)
-91 */
-92 public String getShortDuration() {
-93 Long durationInMillis = getDurationInMillis();
-94 if (durationInMillis == null) {
-95 return null;
-96 }
-97 return DurationFormatUtils.formatDurationHMS(durationInMillis);
-98 }
-99
-100 public Long getId() {
-101 return id;
-102 }
-103
-104 public void setId(Long id) {
-105 this.id = id;
-106 }
-107
-108 public String getUrl() {
-109 return url;
-110 }
-111
-112 public void setUrl(String url) {
-113 this.url = url;
-114 }
-115
-116 /**
-117 * @return the status of the execution - see {@link ExecutionStatus}
-118 */
-119 public ExecutionStatus getStatus() {
-120 return status;
-121 }
-122
-123 public void setStatus(ExecutionStatus status) {
-124 this.status = status;
-125 }
-126
-127 /**
-128 * @return the {@link RundeckJob} associated with this execution, or null in the case of an ad-hoc execution
-129 * (command or script)
-130 */
-131 public RundeckJob getJob() {
-132 return job;
-133 }
-134
-135 public void setJob(RundeckJob job) {
-136 this.job = job;
-137 }
-138
-139 public String getStartedBy() {
-140 return startedBy;
-141 }
-142
-143 public void setStartedBy(String startedBy) {
-144 this.startedBy = startedBy;
-145 }
-146
-147 public Date getStartedAt() {
-148 return (startedAt != null) ? new Date(startedAt.getTime()) : null;
-149 }
-150
-151 public void setStartedAt(Date startedAt) {
-152 this.startedAt = ((startedAt != null) ? new Date(startedAt.getTime()) : null);
-153 }
-154
-155 public Date getEndedAt() {
-156 return (endedAt != null) ? new Date(endedAt.getTime()) : null;
-157 }
-158
-159 public void setEndedAt(Date endedAt) {
-160 this.endedAt = ((endedAt != null) ? new Date(endedAt.getTime()) : null);
-161 }
-162
-163 public String getAbortedBy() {
-164 return abortedBy;
-165 }
-166
-167 public void setAbortedBy(String abortedBy) {
-168 this.abortedBy = abortedBy;
-169 }
-170
-171 public String getDescription() {
-172 return description;
-173 }
-174
-175 public void setDescription(String description) {
-176 this.description = description;
-177 }
-178
-179 @Override
-180 public String toString() {
-181 return "RundeckExecution [id=" + id + ", description=" + description + ", url=" + url + ", status=" + status
-182 + ", startedBy=" + startedBy + ", startedAt=" + startedAt + ", endedAt=" + endedAt
-183 + ", durationInSeconds=" + getDurationInSeconds() + ", abortedBy=" + abortedBy + ", job=" + job + "]";
-184 }
-185
-186 @Override
-187 public int hashCode() {
-188 final int prime = 31;
-189 int result = 1;
-190 result = prime * result + ((abortedBy == null) ? 0 : abortedBy.hashCode());
-191 result = prime * result + ((description == null) ? 0 : description.hashCode());
-192 result = prime * result + ((endedAt == null) ? 0 : endedAt.hashCode());
-193 result = prime * result + ((id == null) ? 0 : id.hashCode());
-194 result = prime * result + ((job == null) ? 0 : job.hashCode());
-195 result = prime * result + ((startedAt == null) ? 0 : startedAt.hashCode());
-196 result = prime * result + ((startedBy == null) ? 0 : startedBy.hashCode());
-197 result = prime * result + ((status == null) ? 0 : status.hashCode());
-198 result = prime * result + ((url == null) ? 0 : url.hashCode());
-199 return result;
-200 }
-201
-202 @Override
-203 public boolean equals(Object obj) {
-204 if (this == obj)
-205 return true;
-206 if (obj == null)
-207 return false;
-208 if (getClass() != obj.getClass())
-209 return false;
-210 RundeckExecution other = (RundeckExecution) obj;
-211 if (abortedBy == null) {
-212 if (other.abortedBy != null)
-213 return false;
-214 } else if (!abortedBy.equals(other.abortedBy))
-215 return false;
-216 if (description == null) {
-217 if (other.description != null)
-218 return false;
-219 } else if (!description.equals(other.description))
-220 return false;
-221 if (endedAt == null) {
-222 if (other.endedAt != null)
-223 return false;
-224 } else if (!endedAt.equals(other.endedAt))
-225 return false;
-226 if (id == null) {
-227 if (other.id != null)
-228 return false;
-229 } else if (!id.equals(other.id))
-230 return false;
-231 if (job == null) {
-232 if (other.job != null)
-233 return false;
-234 } else if (!job.equals(other.job))
-235 return false;
-236 if (startedAt == null) {
-237 if (other.startedAt != null)
-238 return false;
-239 } else if (!startedAt.equals(other.startedAt))
-240 return false;
-241 if (startedBy == null) {
-242 if (other.startedBy != null)
-243 return false;
-244 } else if (!startedBy.equals(other.startedBy))
-245 return false;
-246 if (status == null) {
-247 if (other.status != null)
-248 return false;
-249 } else if (!status.equals(other.status))
-250 return false;
-251 if (url == null) {
-252 if (other.url != null)
-253 return false;
-254 } else if (!url.equals(other.url))
-255 return false;
-256 return true;
-257 }
-258
-259 /**
-260 * The status of an execution
-261 */
-262 public static enum ExecutionStatus {
-263 RUNNING, SUCCEEDED, FAILED, ABORTED;
-264 }
-265
-266 }
+70 return durationInMillis != null ? TimeUnit.MILLISECONDS.toSeconds(durationInMillis) : null;
+71 }
+72
+73 /**
+74 * @return the duration of the execution, as a human-readable string : "3 minutes 34 seconds" (or null if the
+75 * execution is still running, or has been aborted)
+76 */
+77 public String getDuration() {
+78 Long durationInMillis = getDurationInMillis();
+79 return durationInMillis != null ? DurationFormatUtils.formatDurationWords(durationInMillis, true, true) : null;
+80 }
+81
+82 /**
+83 * @return the duration of the execution, as a "short" human-readable string : "0:03:34.187" (or null if the
+84 * execution is still running, or has been aborted)
+85 */
+86 public String getShortDuration() {
+87 Long durationInMillis = getDurationInMillis();
+88 return durationInMillis != null ? DurationFormatUtils.formatDurationHMS(durationInMillis) : null;
+89 }
+90
+91 public Long getId() {
+92 return id;
+93 }
+94
+95 public void setId(Long id) {
+96 this.id = id;
+97 }
+98
+99 public String getUrl() {
+100 return url;
+101 }
+102
+103 public void setUrl(String url) {
+104 this.url = url;
+105 }
+106
+107 /**
+108 * @return the status of the execution - see {@link ExecutionStatus}
+109 */
+110 public ExecutionStatus getStatus() {
+111 return status;
+112 }
+113
+114 public void setStatus(ExecutionStatus status) {
+115 this.status = status;
+116 }
+117
+118 /**
+119 * @return the {@link RundeckJob} associated with this execution, or null in the case of an ad-hoc execution
+120 * (command or script)
+121 */
+122 public RundeckJob getJob() {
+123 return job;
+124 }
+125
+126 public void setJob(RundeckJob job) {
+127 this.job = job;
+128 }
+129
+130 public String getStartedBy() {
+131 return startedBy;
+132 }
+133
+134 public void setStartedBy(String startedBy) {
+135 this.startedBy = startedBy;
+136 }
+137
+138 public Date getStartedAt() {
+139 return (startedAt != null) ? new Date(startedAt.getTime()) : null;
+140 }
+141
+142 public void setStartedAt(Date startedAt) {
+143 this.startedAt = ((startedAt != null) ? new Date(startedAt.getTime()) : null);
+144 }
+145
+146 public Date getEndedAt() {
+147 return (endedAt != null) ? new Date(endedAt.getTime()) : null;
+148 }
+149
+150 public void setEndedAt(Date endedAt) {
+151 this.endedAt = ((endedAt != null) ? new Date(endedAt.getTime()) : null);
+152 }
+153
+154 public String getAbortedBy() {
+155 return abortedBy;
+156 }
+157
+158 public void setAbortedBy(String abortedBy) {
+159 this.abortedBy = abortedBy;
+160 }
+161
+162 public String getDescription() {
+163 return description;
+164 }
+165
+166 public void setDescription(String description) {
+167 this.description = description;
+168 }
+169
+170 @Override
+171 public String toString() {
+172 return "RundeckExecution [id=" + id + ", description=" + description + ", url=" + url + ", status=" + status
+173 + ", startedBy=" + startedBy + ", startedAt=" + startedAt + ", endedAt=" + endedAt
+174 + ", durationInSeconds=" + getDurationInSeconds() + ", abortedBy=" + abortedBy + ", job=" + job + "]";
+175 }
+176
+177 @Override
+178 public int hashCode() {
+179 final int prime = 31;
+180 int result = 1;
+181 result = prime * result + ((abortedBy == null) ? 0 : abortedBy.hashCode());
+182 result = prime * result + ((description == null) ? 0 : description.hashCode());
+183 result = prime * result + ((endedAt == null) ? 0 : endedAt.hashCode());
+184 result = prime * result + ((id == null) ? 0 : id.hashCode());
+185 result = prime * result + ((job == null) ? 0 : job.hashCode());
+186 result = prime * result + ((startedAt == null) ? 0 : startedAt.hashCode());
+187 result = prime * result + ((startedBy == null) ? 0 : startedBy.hashCode());
+188 result = prime * result + ((status == null) ? 0 : status.hashCode());
+189 result = prime * result + ((url == null) ? 0 : url.hashCode());
+190 return result;
+191 }
+192
+193 @Override
+194 public boolean equals(Object obj) {
+195 if (this == obj)
+196 return true;
+197 if (obj == null)
+198 return false;
+199 if (getClass() != obj.getClass())
+200 return false;
+201 RundeckExecution other = (RundeckExecution) obj;
+202 if (abortedBy == null) {
+203 if (other.abortedBy != null)
+204 return false;
+205 } else if (!abortedBy.equals(other.abortedBy))
+206 return false;
+207 if (description == null) {
+208 if (other.description != null)
+209 return false;
+210 } else if (!description.equals(other.description))
+211 return false;
+212 if (endedAt == null) {
+213 if (other.endedAt != null)
+214 return false;
+215 } else if (!endedAt.equals(other.endedAt))
+216 return false;
+217 if (id == null) {
+218 if (other.id != null)
+219 return false;
+220 } else if (!id.equals(other.id))
+221 return false;
+222 if (job == null) {
+223 if (other.job != null)
+224 return false;
+225 } else if (!job.equals(other.job))
+226 return false;
+227 if (startedAt == null) {
+228 if (other.startedAt != null)
+229 return false;
+230 } else if (!startedAt.equals(other.startedAt))
+231 return false;
+232 if (startedBy == null) {
+233 if (other.startedBy != null)
+234 return false;
+235 } else if (!startedBy.equals(other.startedBy))
+236 return false;
+237 if (status == null) {
+238 if (other.status != null)
+239 return false;
+240 } else if (!status.equals(other.status))
+241 return false;
+242 if (url == null) {
+243 if (other.url != null)
+244 return false;
+245 } else if (!url.equals(other.url))
+246 return false;
+247 return true;
+248 }
+249
+250 /**
+251 * The status of an execution
+252 */
+253 public static enum ExecutionStatus {
+254 RUNNING, SUCCEEDED, FAILED, ABORTED;
+255 }
+256
+257 }
diff --git a/xref/org/rundeck/api/domain/RundeckProject.html b/xref/org/rundeck/api/domain/RundeckProject.html
index 54dd345..712179e 100644
--- a/xref/org/rundeck/api/domain/RundeckProject.html
+++ b/xref/org/rundeck/api/domain/RundeckProject.html
@@ -40,59 +40,76 @@
30
31 private String description;
32
-33 public String getName() {
-34 return name;
-35 }
-36
-37 public void setName(String name) {
-38 this.name = name;
-39 }
-40
-41 public String getDescription() {
-42 return description;
-43 }
-44
-45 public void setDescription(String description) {
-46 this.description = description;
-47 }
-48
-49 @Override
-50 public String toString() {
-51 return "RundeckProject [name=" + name + ", description=" + description + "]";
-52 }
-53
-54 @Override
-55 public int hashCode() {
-56 final int prime = 31;
-57 int result = 1;
-58 result = prime * result + ((description == null) ? 0 : description.hashCode());
-59 result = prime * result + ((name == null) ? 0 : name.hashCode());
-60 return result;
-61 }
-62
-63 @Override
-64 public boolean equals(Object obj) {
-65 if (this == obj)
-66 return true;
-67 if (obj == null)
-68 return false;
-69 if (getClass() != obj.getClass())
-70 return false;
-71 RundeckProject other = (RundeckProject) obj;
-72 if (description == null) {
-73 if (other.description != null)
-74 return false;
-75 } else if (!description.equals(other.description))
-76 return false;
-77 if (name == null) {
-78 if (other.name != null)
-79 return false;
-80 } else if (!name.equals(other.name))
-81 return false;
-82 return true;
-83 }
-84
-85 }
+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 + "]";
+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))
+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 }
diff --git a/xref/org/rundeck/api/domain/RundeckSystemInfo.html b/xref/org/rundeck/api/domain/RundeckSystemInfo.html
new file mode 100644
index 0000000..6de7565
--- /dev/null
+++ b/xref/org/rundeck/api/domain/RundeckSystemInfo.html
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+1 /*
+2 * Copyright 2011 Vincent Behar
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16 package org.rundeck.api.domain;
+17
+18 import java.io.Serializable;
+19 import java.util.Date;
+20 import org.apache.commons.lang.time.DurationFormatUtils;
+21
+22 /**
+23 * Represents the RunDeck system info
+24 *
+25 * @author Vincent Behar
+26 */
+27 public class RundeckSystemInfo implements Serializable {
+28
+29 private static final long serialVersionUID = 1L;
+30
+31 private Date date;
+32
+33 private String version;
+34
+35 private String build;
+36
+37 private String node;
+38
+39 private String baseDir;
+40
+41 private String osArch;
+42
+43 private String osName;
+44
+45 private String osVersion;
+46
+47 private String jvmName;
+48
+49 private String jvmVendor;
+50
+51 private String jvmVersion;
+52
+53 private Date startDate;
+54
+55 private Long uptimeInMillis;
+56
+57 private String cpuLoadAverage;
+58
+59 private Long maxMemoryInBytes;
+60
+61 private Long freeMemoryInBytes;
+62
+63 private Long totalMemoryInBytes;
+64
+65 private Integer runningJobs;
+66
+67 private Integer activeThreads;
+68
+69 /**
+70 * @return the uptime of the server, as a human-readable string : "42 days 7 hours 3 minutes 34 seconds"
+71 */
+72 public String getUptime() {
+73 return uptimeInMillis != null ? DurationFormatUtils.formatDurationWords(uptimeInMillis, true, true) : null;
+74 }
+75
+76 public Date getDate() {
+77 return (date != null) ? new Date(date.getTime()) : null;
+78 }
+79
+80 public void setDate(Date date) {
+81 this.date = ((date != null) ? new Date(date.getTime()) : null);
+82 }
+83
+84 public String getVersion() {
+85 return version;
+86 }
+87
+88 public void setVersion(String version) {
+89 this.version = version;
+90 }
+91
+92 public String getBuild() {
+93 return build;
+94 }
+95
+96 public void setBuild(String build) {
+97 this.build = build;
+98 }
+99
+100 public String getNode() {
+101 return node;
+102 }
+103
+104 public void setNode(String node) {
+105 this.node = node;
+106 }
+107
+108 public String getBaseDir() {
+109 return baseDir;
+110 }
+111
+112 public void setBaseDir(String baseDir) {
+113 this.baseDir = baseDir;
+114 }
+115
+116 public String getOsArch() {
+117 return osArch;
+118 }
+119
+120 public void setOsArch(String osArch) {
+121 this.osArch = osArch;
+122 }
+123
+124 public String getOsName() {
+125 return osName;
+126 }
+127
+128 public void setOsName(String osName) {
+129 this.osName = osName;
+130 }
+131
+132 public String getOsVersion() {
+133 return osVersion;
+134 }
+135
+136 public void setOsVersion(String osVersion) {
+137 this.osVersion = osVersion;
+138 }
+139
+140 public String getJvmName() {
+141 return jvmName;
+142 }
+143
+144 public void setJvmName(String jvmName) {
+145 this.jvmName = jvmName;
+146 }
+147
+148 public String getJvmVendor() {
+149 return jvmVendor;
+150 }
+151
+152 public void setJvmVendor(String jvmVendor) {
+153 this.jvmVendor = jvmVendor;
+154 }
+155
+156 public String getJvmVersion() {
+157 return jvmVersion;
+158 }
+159
+160 public void setJvmVersion(String jvmVersion) {
+161 this.jvmVersion = jvmVersion;
+162 }
+163
+164 public Date getStartDate() {
+165 return (startDate != null) ? new Date(startDate.getTime()) : null;
+166 }
+167
+168 public void setStartDate(Date startDate) {
+169 this.startDate = ((startDate != null) ? new Date(startDate.getTime()) : null);
+170 }
+171
+172 public Long getUptimeInMillis() {
+173 return uptimeInMillis;
+174 }
+175
+176 public void setUptimeInMillis(Long uptimeInMillis) {
+177 this.uptimeInMillis = uptimeInMillis;
+178 }
+179
+180 public String getCpuLoadAverage() {
+181 return cpuLoadAverage;
+182 }
+183
+184 public void setCpuLoadAverage(String cpuLoadAverage) {
+185 this.cpuLoadAverage = cpuLoadAverage;
+186 }
+187
+188 public Long getMaxMemoryInBytes() {
+189 return maxMemoryInBytes;
+190 }
+191
+192 public void setMaxMemoryInBytes(Long maxMemoryInBytes) {
+193 this.maxMemoryInBytes = maxMemoryInBytes;
+194 }
+195
+196 public Long getFreeMemoryInBytes() {
+197 return freeMemoryInBytes;
+198 }
+199
+200 public void setFreeMemoryInBytes(Long freeMemoryInBytes) {
+201 this.freeMemoryInBytes = freeMemoryInBytes;
+202 }
+203
+204 public Long getTotalMemoryInBytes() {
+205 return totalMemoryInBytes;
+206 }
+207
+208 public void setTotalMemoryInBytes(Long totalMemoryInBytes) {
+209 this.totalMemoryInBytes = totalMemoryInBytes;
+210 }
+211
+212 public Integer getRunningJobs() {
+213 return runningJobs;
+214 }
+215
+216 public void setRunningJobs(Integer runningJobs) {
+217 this.runningJobs = runningJobs;
+218 }
+219
+220 public Integer getActiveThreads() {
+221 return activeThreads;
+222 }
+223
+224 public void setActiveThreads(Integer activeThreads) {
+225 this.activeThreads = activeThreads;
+226 }
+227
+228 @Override
+229 public String toString() {
+230 return "RundeckSystemInfo [activeThreads=" + activeThreads + ", baseDir=" + baseDir + ", build=" + build
+231 + ", cpuLoadAverage=" + cpuLoadAverage + ", date=" + date + ", freeMemoryInBytes=" + freeMemoryInBytes
+232 + ", jvmName=" + jvmName + ", jvmVendor=" + jvmVendor + ", jvmVersion=" + jvmVersion
+233 + ", maxMemoryInBytes=" + maxMemoryInBytes + ", node=" + node + ", osArch=" + osArch + ", osName="
+234 + osName + ", osVersion=" + osVersion + ", runningJobs=" + runningJobs + ", startDate=" + startDate
+235 + ", totalMemoryInBytes=" + totalMemoryInBytes + ", uptimeInMillis=" + uptimeInMillis + ", version="
+236 + version + "]";
+237 }
+238
+239 @Override
+240 public int hashCode() {
+241 final int prime = 31;
+242 int result = 1;
+243 result = prime * result + ((activeThreads == null) ? 0 : activeThreads.hashCode());
+244 result = prime * result + ((baseDir == null) ? 0 : baseDir.hashCode());
+245 result = prime * result + ((build == null) ? 0 : build.hashCode());
+246 result = prime * result + ((cpuLoadAverage == null) ? 0 : cpuLoadAverage.hashCode());
+247 result = prime * result + ((date == null) ? 0 : date.hashCode());
+248 result = prime * result + ((freeMemoryInBytes == null) ? 0 : freeMemoryInBytes.hashCode());
+249 result = prime * result + ((jvmName == null) ? 0 : jvmName.hashCode());
+250 result = prime * result + ((jvmVendor == null) ? 0 : jvmVendor.hashCode());
+251 result = prime * result + ((jvmVersion == null) ? 0 : jvmVersion.hashCode());
+252 result = prime * result + ((maxMemoryInBytes == null) ? 0 : maxMemoryInBytes.hashCode());
+253 result = prime * result + ((node == null) ? 0 : node.hashCode());
+254 result = prime * result + ((osArch == null) ? 0 : osArch.hashCode());
+255 result = prime * result + ((osName == null) ? 0 : osName.hashCode());
+256 result = prime * result + ((osVersion == null) ? 0 : osVersion.hashCode());
+257 result = prime * result + ((runningJobs == null) ? 0 : runningJobs.hashCode());
+258 result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
+259 result = prime * result + ((totalMemoryInBytes == null) ? 0 : totalMemoryInBytes.hashCode());
+260 result = prime * result + ((uptimeInMillis == null) ? 0 : uptimeInMillis.hashCode());
+261 result = prime * result + ((version == null) ? 0 : version.hashCode());
+262 return result;
+263 }
+264
+265 @Override
+266 public boolean equals(Object obj) {
+267 if (this == obj)
+268 return true;
+269 if (obj == null)
+270 return false;
+271 if (getClass() != obj.getClass())
+272 return false;
+273 RundeckSystemInfo other = (RundeckSystemInfo) obj;
+274 if (activeThreads == null) {
+275 if (other.activeThreads != null)
+276 return false;
+277 } else if (!activeThreads.equals(other.activeThreads))
+278 return false;
+279 if (baseDir == null) {
+280 if (other.baseDir != null)
+281 return false;
+282 } else if (!baseDir.equals(other.baseDir))
+283 return false;
+284 if (build == null) {
+285 if (other.build != null)
+286 return false;
+287 } else if (!build.equals(other.build))
+288 return false;
+289 if (cpuLoadAverage == null) {
+290 if (other.cpuLoadAverage != null)
+291 return false;
+292 } else if (!cpuLoadAverage.equals(other.cpuLoadAverage))
+293 return false;
+294 if (date == null) {
+295 if (other.date != null)
+296 return false;
+297 } else if (!date.equals(other.date))
+298 return false;
+299 if (freeMemoryInBytes == null) {
+300 if (other.freeMemoryInBytes != null)
+301 return false;
+302 } else if (!freeMemoryInBytes.equals(other.freeMemoryInBytes))
+303 return false;
+304 if (jvmName == null) {
+305 if (other.jvmName != null)
+306 return false;
+307 } else if (!jvmName.equals(other.jvmName))
+308 return false;
+309 if (jvmVendor == null) {
+310 if (other.jvmVendor != null)
+311 return false;
+312 } else if (!jvmVendor.equals(other.jvmVendor))
+313 return false;
+314 if (jvmVersion == null) {
+315 if (other.jvmVersion != null)
+316 return false;
+317 } else if (!jvmVersion.equals(other.jvmVersion))
+318 return false;
+319 if (maxMemoryInBytes == null) {
+320 if (other.maxMemoryInBytes != null)
+321 return false;
+322 } else if (!maxMemoryInBytes.equals(other.maxMemoryInBytes))
+323 return false;
+324 if (node == null) {
+325 if (other.node != null)
+326 return false;
+327 } else if (!node.equals(other.node))
+328 return false;
+329 if (osArch == null) {
+330 if (other.osArch != null)
+331 return false;
+332 } else if (!osArch.equals(other.osArch))
+333 return false;
+334 if (osName == null) {
+335 if (other.osName != null)
+336 return false;
+337 } else if (!osName.equals(other.osName))
+338 return false;
+339 if (osVersion == null) {
+340 if (other.osVersion != null)
+341 return false;
+342 } else if (!osVersion.equals(other.osVersion))
+343 return false;
+344 if (runningJobs == null) {
+345 if (other.runningJobs != null)
+346 return false;
+347 } else if (!runningJobs.equals(other.runningJobs))
+348 return false;
+349 if (startDate == null) {
+350 if (other.startDate != null)
+351 return false;
+352 } else if (!startDate.equals(other.startDate))
+353 return false;
+354 if (totalMemoryInBytes == null) {
+355 if (other.totalMemoryInBytes != null)
+356 return false;
+357 } else if (!totalMemoryInBytes.equals(other.totalMemoryInBytes))
+358 return false;
+359 if (uptimeInMillis == null) {
+360 if (other.uptimeInMillis != null)
+361 return false;
+362 } else if (!uptimeInMillis.equals(other.uptimeInMillis))
+363 return false;
+364 if (version == null) {
+365 if (other.version != null)
+366 return false;
+367 } else if (!version.equals(other.version))
+368 return false;
+369 return true;
+370 }
+371
+372 }
+
+
+
+
diff --git a/xref/org/rundeck/api/domain/package-frame.html b/xref/org/rundeck/api/domain/package-frame.html
index 3ba9aff..d55de15 100644
--- a/xref/org/rundeck/api/domain/package-frame.html
+++ b/xref/org/rundeck/api/domain/package-frame.html
@@ -35,6 +35,9 @@
RundeckProject
+
+
+
diff --git a/xref/org/rundeck/api/parser/AbortParser.html b/xref/org/rundeck/api/parser/AbortParser.html
index 024956d..365c95e 100644
--- a/xref/org/rundeck/api/parser/AbortParser.html
+++ b/xref/org/rundeck/api/parser/AbortParser.html
@@ -61,18 +61,19 @@
51 try {
52 abort.setStatus(AbortStatus.valueOf(StringUtils.upperCase(abortNode.valueOf("@status"))));
53 } catch (IllegalArgumentException e) {
-54 }
-55
-56 Node execNode = abortNode.selectSingleNode("execution");
-57 if (execNode != null) {
-58 RundeckExecution execution = new ExecutionParser().parseXmlNode(execNode);
-59 abort.setExecution(execution);
-60 }
-61
-62 return abort;
-63 }
-64
-65 }
+54 abort.setStatus(null);
+55 }
+56
+57 Node execNode = abortNode.selectSingleNode("execution");
+58 if (execNode != null) {
+59 RundeckExecution execution = new ExecutionParser().parseXmlNode(execNode);
+60 abort.setExecution(execution);
+61 }
+62
+63 return abort;
+64 }
+65
+66 }
+ RundeckSystemInfo
+
diff --git a/xref/org/rundeck/api/parser/ExecutionParser.html b/xref/org/rundeck/api/parser/ExecutionParser.html
index 7077e3b..ca68a8a 100644
--- a/xref/org/rundeck/api/parser/ExecutionParser.html
+++ b/xref/org/rundeck/api/parser/ExecutionParser.html
@@ -64,29 +64,30 @@
54 try {
55 execution.setStatus(ExecutionStatus.valueOf(StringUtils.upperCase(execNode.valueOf("@status"))));
56 } catch (IllegalArgumentException e) {
-57 }
-58 execution.setDescription(StringUtils.trimToNull(execNode.valueOf("description")));
-59 execution.setStartedBy(StringUtils.trimToNull(execNode.valueOf("user")));
-60 execution.setAbortedBy(StringUtils.trimToNull(execNode.valueOf("abortedby")));
-61 String startedAt = StringUtils.trimToNull(execNode.valueOf("date-started/@unixtime"));
-62 if (startedAt != null) {
-63 execution.setStartedAt(new Date(Long.valueOf(startedAt)));
-64 }
-65 String endedAt = StringUtils.trimToNull(execNode.valueOf("date-ended/@unixtime"));
-66 if (endedAt != null) {
-67 execution.setEndedAt(new Date(Long.valueOf(endedAt)));
-68 }
-69
-70 Node jobNode = execNode.selectSingleNode("job");
-71 if (jobNode != null) {
-72 RundeckJob job = new JobParser().parseXmlNode(jobNode);
-73 execution.setJob(job);
-74 }
-75
-76 return execution;
-77 }
-78
-79 }
+57 execution.setStatus(null);
+58 }
+59 execution.setDescription(StringUtils.trimToNull(execNode.valueOf("description")));
+60 execution.setStartedBy(StringUtils.trimToNull(execNode.valueOf("user")));
+61 execution.setAbortedBy(StringUtils.trimToNull(execNode.valueOf("abortedby")));
+62 String startedAt = StringUtils.trimToNull(execNode.valueOf("date-started/@unixtime"));
+63 if (startedAt != null) {
+64 execution.setStartedAt(new Date(Long.valueOf(startedAt)));
+65 }
+66 String endedAt = StringUtils.trimToNull(execNode.valueOf("date-ended/@unixtime"));
+67 if (endedAt != null) {
+68 execution.setEndedAt(new Date(Long.valueOf(endedAt)));
+69 }
+70
+71 Node jobNode = execNode.selectSingleNode("job");
+72 if (jobNode != null) {
+73 RundeckJob job = new JobParser().parseXmlNode(jobNode);
+74 execution.setJob(job);
+75 }
+76
+77 return execution;
+78 }
+79
+80 }
diff --git a/xref/org/rundeck/api/parser/ProjectParser.html b/xref/org/rundeck/api/parser/ProjectParser.html
index 3bc1bac..6c3e7f3 100644
--- a/xref/org/rundeck/api/parser/ProjectParser.html
+++ b/xref/org/rundeck/api/parser/ProjectParser.html
@@ -58,11 +58,12 @@
48
49 project.setName(StringUtils.trimToNull(projectNode.valueOf("name")));
50 project.setDescription(StringUtils.trimToNull(projectNode.valueOf("description")));
-51
-52 return project;
-53 }
-54
-55 }
+51 project.setResourceModelProviderUrl(StringUtils.trimToNull(projectNode.valueOf("resources/providerURL")));
+52
+53 return project;
+54 }
+55
+56 }
diff --git a/xref/org/rundeck/api/parser/SystemInfoParser.html b/xref/org/rundeck/api/parser/SystemInfoParser.html
new file mode 100644
index 0000000..f847d66
--- /dev/null
+++ b/xref/org/rundeck/api/parser/SystemInfoParser.html
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+1 /*
+2 * Copyright 2011 Vincent Behar
+3 *
+4 * Licensed under the Apache License, Version 2.0 (the "License");
+5 * you may not use this file except in compliance with the License.
+6 * You may obtain a copy of the License at
+7 *
+8 * http://www.apache.org/licenses/LICENSE-2.0
+9 *
+10 * Unless required by applicable law or agreed to in writing, software
+11 * distributed under the License is distributed on an "AS IS" BASIS,
+12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+13 * See the License for the specific language governing permissions and
+14 * limitations under the License.
+15 */
+16 package org.rundeck.api.parser;
+17
+18 import java.util.Date;
+19 import org.apache.commons.lang.StringUtils;
+20 import org.dom4j.Node;
+21 import org.rundeck.api.domain.RundeckSystemInfo;
+22
+23 /**
+24 * Parser for a single {@link RundeckSystemInfo}
+25 *
+26 * @author Vincent Behar
+27 */
+28 public class SystemInfoParser implements XmlNodeParser<RundeckSystemInfo> {
+29
+30 private String xpath;
+31
+32 public SystemInfoParser() {
+33 super();
+34 }
+35
+36 /**
+37 * @param xpath of the systemInfo element if it is not the root node
+38 */
+39 public SystemInfoParser(String xpath) {
+40 super();
+41 this.xpath = xpath;
+42 }
+43
+44 @Override
+45 public RundeckSystemInfo parseXmlNode(Node node) {
+46 Node infoNode = xpath != null ? node.selectSingleNode(xpath) : node;
+47
+48 RundeckSystemInfo info = new RundeckSystemInfo();
+49
+50 String timestamp = StringUtils.trimToNull(infoNode.valueOf("timestamp/@epoch"));
+51 if (timestamp != null) {
+52 info.setDate(new Date(Long.valueOf(timestamp)));
+53 }
+54 info.setVersion(StringUtils.trimToNull(infoNode.valueOf("rundeck/version")));
+55 info.setBuild(StringUtils.trimToNull(infoNode.valueOf("rundeck/build")));
+56 info.setNode(StringUtils.trimToNull(infoNode.valueOf("rundeck/node")));
+57 info.setBaseDir(StringUtils.trimToNull(infoNode.valueOf("rundeck/base")));
+58 info.setOsArch(StringUtils.trimToNull(infoNode.valueOf("os/arch")));
+59 info.setOsName(StringUtils.trimToNull(infoNode.valueOf("os/name")));
+60 info.setOsVersion(StringUtils.trimToNull(infoNode.valueOf("os/version")));
+61 info.setJvmName(StringUtils.trimToNull(infoNode.valueOf("jvm/name")));
+62 info.setJvmVendor(StringUtils.trimToNull(infoNode.valueOf("jvm/vendor")));
+63 info.setJvmVersion(StringUtils.trimToNull(infoNode.valueOf("jvm/version")));
+64 String startDate = StringUtils.trimToNull(infoNode.valueOf("stats/uptime/since/@epoch"));
+65 if (startDate != null) {
+66 info.setStartDate(new Date(Long.valueOf(startDate)));
+67 }
+68 info.setUptimeInMillis(Long.valueOf(infoNode.valueOf("stats/uptime/@duration")));
+69 info.setCpuLoadAverage(StringUtils.trimToNull(infoNode.valueOf("stats/cpu/loadAverage")));
+70 if (info.getCpuLoadAverage() != null) {
+71 info.setCpuLoadAverage(info.getCpuLoadAverage() + " %");
+72 }
+73 info.setMaxMemoryInBytes(Long.valueOf(infoNode.valueOf("stats/memory/max")));
+74 info.setFreeMemoryInBytes(Long.valueOf(infoNode.valueOf("stats/memory/free")));
+75 info.setTotalMemoryInBytes(Long.valueOf(infoNode.valueOf("stats/memory/total")));
+76 info.setRunningJobs(Integer.valueOf(infoNode.valueOf("stats/scheduler/running")));
+77 info.setActiveThreads(Integer.valueOf(infoNode.valueOf("stats/threads/active")));
+78
+79 return info;
+80 }
+81 }
+
+
+
+
diff --git a/xref/org/rundeck/api/parser/package-frame.html b/xref/org/rundeck/api/parser/package-frame.html
index aa9e310..4f41eea 100644
--- a/xref/org/rundeck/api/parser/package-frame.html
+++ b/xref/org/rundeck/api/parser/package-frame.html
@@ -38,6 +38,9 @@
StringParser
+
+
+
+ SystemInfoParser
+