Package com.avoka.tm.svc
Class JobUpdater
java.lang.Object
com.avoka.tm.svc.JobUpdater
Provides a job value object updater class.
Examples
Please find the job updater examples below.
Remove and Add a Job Property
This Groovy example shows how to update a job by removing and adding a jobProperty.
 import com.avoka.tm.svc.*
 import com.avoka.tm.vo.*
 new JobUpdater(job)
     .removeProperty("fav food")
     .setProperty("sport","cycling")
     .update() - Since:
- 17.10.0
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a job updater.JobUpdater(Job job) Create a job updater setting the job to update.
- 
Method SummaryModifier and TypeMethodDescriptionaddComment(Comment comment) Add comment to the job.removeProperty(String name) Specify the property to remove from the job.Set the id of the job to update.setProperty(String name, String value) Specify the property name and value to add or update on the job.voidupdate()Update the identified job with the specified parameters.
- 
Constructor Details- 
JobUpdaterCreate a job updater.
- 
JobUpdaterCreate a job updater setting the job to update.- Parameters:
- job- the Job to update.
 
 
- 
- 
Method Details- 
setIdSet the id of the job to update.- Parameters:
- id- the id (Long) of the job to update
- Returns:
- the job updater
 
- 
setPropertySpecify the property name and value to add or update on the job.- Parameters:
- name- the property name (required)
- value- the property value (required)
- Returns:
- the job updater
 
- 
removePropertySpecify the property to remove from the job.- Parameters:
- name- the property name to remove (required)
- Returns:
- the job updater
 
- 
addCommentAdd comment to the job.- Parameters:
- comment- job comment
- Returns:
- the job updater
- Since:
- 21.5.0
 
- 
updatepublic void update()Update the identified job with the specified parameters.
 
-