public interface JobService
Modifier and Type | Method and Description |
---|---|
Job |
createRepositoryJob(JobCreateInfo jobInfo,
RepositoryCheckinSpecification jobCheckinSpec)
Creates job in workspace and checks it into the repository
|
Job |
createWorkspaceJob(JobCreateInfo jobInfo)
Creates job in workspace based on information specified on JobCreateInfo
|
Job |
createWorkspaceJob(String parentPath,
String jobName,
List<ItemSpecification> tasks,
Set<JobParameter> parameters,
boolean createParents)
Creates a job in the current user's workspace while optionally being able to specify tasks and parameters.
|
Job |
getRepositoryJob(String path,
String version)
Gets the job from the specified path in the repository
|
boolean |
getRunAsOwner(String jobPath)
Get the flag that defines whether the repository job will run as the owner.
|
Job |
getWorkspaceJob(String path)
Gets the job from the specified path in the workspace
|
void |
setRunAsOwner(String jobPath,
boolean value)
Sets if the repository job will run as the owner.
|
Job |
updateRepositoryJob(Job job,
RepositoryCheckinSpecification checkinSpec)
Updates the job in the repository with information on the specified Job
|
Job |
updateWorkspaceJob(Job job)
Updates the job in the workspace with information on the specified Job
|
Job createWorkspaceJob(String parentPath, String jobName, List<ItemSpecification> tasks, Set<JobParameter> parameters, boolean createParents) throws JobExistsException, JobCreateException
parentPath
- the parent path of where to create the jobjobName
- name of the jobtasks
- list of files for the job to execute sequentially. Files are represented by an
ItemSpecification
.parameters
- list of parameters of the job that will be defined as SAS macros. For parameters of type FILE
and FOLDER, the value should be specified as an ItemSpecification
.
Values of CHARACTER and NUMERIC parameters should be specified as Strings. Date parameter values
should be specified as java.util.Date.createParents
- specify true to create parent paths if they do not already existJobExistsException
- Thrown if the job already exists at that locationJobCreateException
- Thrown if the job could not be createdJob createWorkspaceJob(JobCreateInfo jobInfo) throws JobExistsException, JobCreateException
jobInfo
- Contains information required to create a job as well other additional job attributesJobExistsException
- Thrown if the job already exists at that locationJobCreateException
- Thrown if the job could not be createdJob createRepositoryJob(JobCreateInfo jobInfo, RepositoryCheckinSpecification jobCheckinSpec) throws JobExistsException, JobCreateException
jobInfo
- Contains information required to create a job as well other additional job attributesjobCheckinSpec
- Contains the information on how to check in the new job file (major version, minor version,
etc.). Specifying null will create an unversioned file.JobExistsException
- Thrown if the job already exists at that locationJobCreateException
- Thrown if the job could not be createdJob getWorkspaceJob(String path) throws JobNotFoundException, JobFormatException
path
- Full path of jobJobNotFoundException
- Thrown if the job does not exist at the path specifiedJobFormatException
- Thrown if the job file content is not in the proper formatJob getRepositoryJob(String path, String version) throws JobNotFoundException, JobFormatException
path
- Full path of jobversion
- Specify a specific version of the job to get. Specifying null will get the latest version.JobNotFoundException
- Thrown if the job does not exist at the path specifiedJobFormatException
- Thrown if the job file content is not in the proper formatJob updateRepositoryJob(Job job, RepositoryCheckinSpecification checkinSpec) throws JobNotFoundException, JobUpdateException
job
- Job containing the information in which to update the jobcheckinSpec
- Contains the information on how to check in the updated job file (major version, minor
version, etc.). Specifying null will default to a minor version specification.JobNotFoundException
- Thrown if the job no longer exists at the location specified in the jobJobUpdateException
- Thrown if there was an issue updating the jobJob updateWorkspaceJob(Job job) throws JobNotFoundException, JobUpdateException
job
- Job containing the information in which to update the jobJobNotFoundException
- Thrown if the job no longer exists at the location specified in the jobJobUpdateException
- Thrown if there was an issue updating the jobvoid setRunAsOwner(String jobPath, boolean value) throws JobNotFoundException
jobPath
- Full path of the jobvalue
- Value indicating if job should run as the job owner.JobNotFoundException
- Thrown if the specified job can not be found.boolean getRunAsOwner(String jobPath) throws JobNotFoundException
jobPath
- Full path of the jobJobNotFoundException
- Thrown if the specified job can not be found.Copyright (c) 2019, SAS Institute Inc., Cary, NC, USA