public interface JobService
Modifier and Type | Method and Description |
---|---|
Job |
createRepositoryJob(JobCreateInfo jobInfo,
RepositoryCheckinSpecification jobCheckinSpec)
Creates a job in workspace and checks the file into the repository.
|
Job |
createWorkspaceJob(JobCreateInfo jobInfo)
Creates a job in workspace based on information that is specified in JobCreateInfo.
|
Job |
createWorkspaceJob(String parentPath,
String jobName,
List<ItemSpecification> tasks,
Set<JobParameter> parameters,
boolean createParents)
Creates a job in the current user's workspace.
|
Job |
getRepositoryJob(String path,
String version)
Gets the job from the specified path in the repository.
|
boolean |
getRunAsOwner(String jobPath)
Indicates whether the repository job runs as the job owner.
|
Job |
getWorkspaceJob(String path)
Gets the job from the path in the workspace.
|
void |
setRunAsOwner(String jobPath,
boolean value)
Sets whether the repository job runs as the job owner.
|
Job |
updateRepositoryJob(Job job,
RepositoryCheckinSpecification checkinSpec)
Updates the job in the repository with the information in the job.
|
Job |
updateWorkspaceJob(Job job)
Updates the job in the workspace with the 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 in which to create the job.jobName
- The name of the job.tasks
- The list of files for the job to execute sequentially. The files are represented by an
ItemSpecification
.parameters
- The list of parameters of the job that are defined as SAS macros. For parameters of type FILE
and FOLDER, the value should be an ItemSpecification
. Values of
CHARACTER and NUMERIC parameters should be Strings. Date parameter values should be java.util.Date.createParents
- Indicates whether to create parent paths if they do not exist.JobExistsException
- Thrown when the job exists at the location.JobCreateException
- Thrown when the job is not createdJob createWorkspaceJob(JobCreateInfo jobInfo) throws JobExistsException, JobCreateException
jobInfo
- The information that is required to create the job and additional job attributes.JobExistsException
- Thrown when the job exists at the location.JobCreateException
- Thrown when the job is not created.Job createRepositoryJob(JobCreateInfo jobInfo, RepositoryCheckinSpecification jobCheckinSpec) throws JobExistsException, JobCreateException
jobInfo
- The information that is required to create the job and additional job attributes.jobCheckinSpec
- The information on the method to check in the new job file such as major version or minor
version. Specifying null creates an unversioned file.JobExistsException
- Thrown when the job exists at the location.JobCreateException
- Thrown when the job is not created.Job getWorkspaceJob(String path) throws JobNotFoundException, JobFormatException
path
- The full path of job.JobNotFoundException
- Thrown when the job does not exist at the path.JobFormatException
- Thrown when the job file content is not in the proper format.Job getRepositoryJob(String path, String version) throws JobNotFoundException, JobFormatException
path
- The full path of job.version
- The specific version of the job to get. Specifying null gets the latest version.JobNotFoundException
- Thrown when the job does not exist at the path.JobFormatException
- Thrown when the job file content is not in the proper format.Job updateRepositoryJob(Job job, RepositoryCheckinSpecification checkinSpec) throws JobNotFoundException, JobUpdateException
job
- The job that contains the information to update the job.checkinSpec
- The information on the method to check in the updated job file such as major version or minor
version. Specifying null defaults to a minor version specification.JobNotFoundException
- Thrown when the job is not found at the location that is specified in the job.JobUpdateException
- Thrown when there is an issue when updating the job.Job updateWorkspaceJob(Job job) throws JobNotFoundException, JobUpdateException
job
- The job that contains the information to update the job.JobNotFoundException
- Thrown when the job is not found at the location that is specified in the job.JobUpdateException
- Thrown when there is an issue when updating the job.void setRunAsOwner(String jobPath, boolean value) throws JobNotFoundException
jobPath
- The full path of the job.value
- Indicates whether the job runs as the job owner.JobNotFoundException
- Thrown when the specified job is not found.boolean getRunAsOwner(String jobPath) throws JobNotFoundException
jobPath
- The full path of the job.JobNotFoundException
- Thrown when the specified job is not found.Copyright (c) 2019, SAS Institute Inc., Cary, NC, USA