Package com.veeva.vault.sdk.api.job
Interface JobInitContext
- All Superinterfaces:
JobContext
Context given to
Job.init(JobInitContext).-
Method Summary
Modifier and TypeMethodDescriptionnewJobInput(String query) Allows a VQL query to be used as a Job input.newJobInput(List<JobItem> items) Allows a List ofJobItems to be used as input to a job.Retrieves a newJobItemobject.voidsetJobInitParameter(String name, Object value) Sets the name and value of a job parameter.Methods inherited from interface com.veeva.vault.sdk.api.job.JobContext
getJobId, getJobInitParameter, getJobInitParameter, getJobLogger, getJobName, getJobOwner, getJobParameter, getJobParameter
-
Method Details
-
setJobInitParameter
Sets the name and value of a job parameter.- Parameters:
name- name of the parameter for which a value will be setvalue- new value to set on the parameter. Value must be one of the data types specified inJobValueTypeOrJobValue
-
newJobInput
Allows a VQL query to be used as a Job input. The query'sSELECTmust contain one or more fields of the following types:- String
- Date
- Boolean
- Number
idfields for Vault Objects in the query'sSELECT. All otheridfields are not supported. Validation only occurs at runtime, after theJob.init(JobInitContext)method completes. If there are any issues encountered in VQL execution, the job will be marked asERROR_ENCOUNTEREDand errors are logged to the job log file.- Parameters:
query- VQL query to use as an input- Returns:
- a JobInputSupplier which can be used in a Job init method. Throws RuntimeException if VQL SELECT contains unsupported type.
-
newJobInput
Allows a List ofJobItems to be used as input to a job.- Parameters:
items- specifies the List of items to use as input- Returns:
- a JobInputSupplier which can be used in a Job init method
-
newJobItem
JobItem newJobItem()Retrieves a newJobItemobject.- Returns:
- JobItem object
-