Package com.dtolabs.rundeck.core.jobs
Interface JobService
-
- All Superinterfaces:
AppService
public interface JobService extends AppService
Service for interacting with Jobs
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.util.MapdeleteBulkExecutionIds(java.util.Collection ids, java.lang.String asUser)ExecutionReferenceexecutionForId(java.lang.String id, java.lang.String project)JobStategetJobState(JobReference jobReference)JobReferencejobForID(java.lang.String uuid, java.lang.String project)JobReferencejobForName(java.lang.String name, java.lang.String project)JobReferencejobForName(java.lang.String group, java.lang.String name, java.lang.String project)java.util.MapqueryExecutions(java.util.Map filter)ExecutionReferencerunJob(JobReference jobReference, java.lang.String jobArgString, java.lang.String jobFilter, java.lang.String asUser)Run a jobExecutionReferencerunJob(JobReference jobReference, java.lang.String jobArgString, java.lang.String nodeFilter, java.lang.String asUser, java.util.Map<java.lang.String,?> meta)Run a jobExecutionReferencerunJob(JobReference jobReference, java.util.Map options, java.lang.String jobFilter, java.lang.String asUser)Run a jobExecutionReferencerunJob(JobReference jobReference, java.util.Map optionData, java.lang.String jobFilter, java.lang.String asUser, java.util.Map<java.lang.String,?> meta)Run a jobjava.util.List<ExecutionReference>searchExecutions(java.lang.String state, java.lang.String project, java.lang.String jobUuid, java.lang.String excludeJobUuid, java.lang.String since)java.util.List<ExecutionReference>searchExecutions(java.lang.String state, java.lang.String project, java.lang.String jobUuid, java.lang.String excludeJobUuid, java.lang.String since, boolean reverseSince)java.lang.StringstartJob(JobReference jobReference, java.lang.String jobArgString, java.lang.String jobFilter, java.lang.String asUser)Deprecated.
-
-
-
Method Detail
-
jobForID
JobReference jobForID(java.lang.String uuid, java.lang.String project) throws JobNotFound
- Parameters:
uuid- job IDproject- the project- Returns:
- a reference to the job by the ID
- Throws:
JobNotFound- if the job was not found
-
jobForName
JobReference jobForName(java.lang.String name, java.lang.String project) throws JobNotFound
- Parameters:
name- the job group path/name stringproject- the project- Returns:
- a job reference for the group/name
- Throws:
JobNotFound- if the job was not found
-
jobForName
JobReference jobForName(java.lang.String group, java.lang.String name, java.lang.String project) throws JobNotFound
- Parameters:
group- group path or nullname- job nameproject- the project- Returns:
- a job reference for the group and name
- Throws:
JobNotFound- if the job was not found
-
getJobState
JobState getJobState(JobReference jobReference) throws JobNotFound
- Parameters:
jobReference- reference to a job- Returns:
- state of the job
- Throws:
JobNotFound
-
searchExecutions
java.util.List<ExecutionReference> searchExecutions(java.lang.String state, java.lang.String project, java.lang.String jobUuid, java.lang.String excludeJobUuid, java.lang.String since)
- Parameters:
state- to searchproject- the projectjobUuid- to search or nullexcludeJobUuid- to search or nullsince- to search or null- Returns:
- a list of references to executions using the input parameters
-
searchExecutions
java.util.List<ExecutionReference> searchExecutions(java.lang.String state, java.lang.String project, java.lang.String jobUuid, java.lang.String excludeJobUuid, java.lang.String since, boolean reverseSince)
- Parameters:
state- to searchproject- the projectjobUuid- to search or nullexcludeJobUuid- to search or nullsince- to search or nullreverseSince- if true search executions older than since parameter- Returns:
- a list of references to executions using the input parameters
-
executionForId
ExecutionReference executionForId(java.lang.String id, java.lang.String project) throws ExecutionNotFound
- Parameters:
id- execution idproject- the project- Returns:
- a execution reference for the id
- Throws:
ExecutionNotFound- if the execution was not found
-
startJob
@Deprecated java.lang.String startJob(JobReference jobReference, java.lang.String jobArgString, java.lang.String jobFilter, java.lang.String asUser) throws JobNotFound
Deprecated.- Parameters:
jobReference- reference to a jobjobArgString- argString for the executionjobFilter- filter for the executionasUser- user to execute the job(null for the same user)- Returns:
- Id of the result execution, or null if there was an error
- Throws:
JobNotFound- if the specified job was not found
-
runJob
ExecutionReference runJob(JobReference jobReference, java.lang.String jobArgString, java.lang.String jobFilter, java.lang.String asUser) throws JobNotFound, JobExecutionError
Run a job- Parameters:
jobReference- reference to a jobjobArgString- argString for the executionjobFilter- filter for the executionasUser- user to execute the job(null for the same user)- Returns:
- Id of the result execution
- Throws:
JobNotFound- if the specified job was not foundJobExecutionError- if an error occurred executing the job
-
runJob
ExecutionReference runJob(JobReference jobReference, java.lang.String jobArgString, java.lang.String nodeFilter, java.lang.String asUser, java.util.Map<java.lang.String,?> meta) throws JobNotFound, JobExecutionError
Run a job- Parameters:
jobReference- reference to a jobjobArgString- argString for the executionnodeFilter- filter for the executionasUser- user to execute the job(null for the same user)meta- metadata to attach to the execution- Returns:
- Id of the result execution
- Throws:
JobNotFound- if the specified job was not foundJobExecutionError- if an error occurred executing the job
-
runJob
ExecutionReference runJob(JobReference jobReference, java.util.Map options, java.lang.String jobFilter, java.lang.String asUser) throws JobNotFound, JobExecutionError
Run a job- Parameters:
jobReference- reference to a joboptions- option valuesjobFilter- filter for the executionasUser- user to execute the job(null for the same user)- Returns:
- Id of the result execution
- Throws:
JobNotFound- if the specified job was not foundJobExecutionError- if an error occurred executing the job
-
runJob
ExecutionReference runJob(JobReference jobReference, java.util.Map optionData, java.lang.String jobFilter, java.lang.String asUser, java.util.Map<java.lang.String,?> meta) throws JobNotFound, JobExecutionError
Run a job- Parameters:
jobReference- reference to a joboptions- option valuesjobFilter- filter for the executionasUser- user to execute the job(null for the same user)meta- metadata to attach to the execution- Returns:
- Id of the result execution
- Throws:
JobNotFound- if the specified job was not foundJobExecutionError- if an error occurred executing the job
-
deleteBulkExecutionIds
java.util.Map deleteBulkExecutionIds(java.util.Collection ids, java.lang.String asUser)- Parameters:
ids- collection of id to iterateasUser- user to execute delete (null for the same user)- Returns:
- [success:true/false, failures:[ [success:false, message: String, id: id],... ], successTotal:Integer]
-
queryExecutions
java.util.Map queryExecutions(java.util.Map filter)
- Parameters:
filter- for query executions- Returns:
- map with results and total
-
-