public interface JobService
Modifier and Type | Method and Description |
---|---|
Job |
createRepositoryJob(Job job,
RepositoryCheckinSpecification jobCheckinSpec,
boolean createParents,
boolean useRelativePaths)
Creates a job in the repository.
|
Job |
createWorkspaceJob(Job job,
boolean createParents,
boolean useRelativePaths)
Creates the job in the current user's workspace.
|
Job |
createWorkspaceJob(String parentPath,
String jobName,
List<JobProgram> programs,
List<JobParameter> parameters,
boolean createParents,
boolean useRelativePaths)
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 the repository job to run 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 to the specified job.
|
Job createWorkspaceJob(String parentPath, String jobName, List<JobProgram> programs, List<JobParameter> parameters, boolean createParents, boolean useRelativePaths) throws JobExistsException, JobCreateException
parentPath
- The parent path in which to create the job.jobName
- The name of the job.programs
- The list of files for the job to execute sequentially.parameters
- The list of the parameters of the job that are defined as variables to be available to
executing programs. For parameters of type FILE and FOLDER, the value must be a
JobInput
. The values of CHARACTER and NUMERIC parameters must be
Strings. The date parameter values must be java.util.Date.createParents
- Indicates whether to create parent paths, if they do not exist.useRelativePaths
- Indicates whether to use relative paths when adding path-based attributes of job.JobExistsException
- Thrown when a job exists at the location.JobCreateException
- Thrown when the job is not created.Job createWorkspaceJob(Job job, boolean createParents, boolean useRelativePaths) throws JobExistsException, JobCreateException
job
- The information to create the job.createParents
- Indicates whether to create parent paths, if they do not exist.useRelativePaths
- Indicates whether to use relative paths when adding path-based attributes of job.JobExistsException
- Thrown when a job exists at the location.JobCreateException
- Thrown when the job is not created.Job createRepositoryJob(Job job, RepositoryCheckinSpecification jobCheckinSpec, boolean createParents, boolean useRelativePaths) throws JobExistsException, JobCreateException
job
- The information to create the job.createParents
- Indicates whether to create parent paths, if they do not exist.useRelativePaths
- Indicates whether to use relative paths when adding path-based attributes of job.jobCheckinSpec
- The information on the method to check in the new job file, such as the major version or
minor version. Specifying null creates an unversioned file.JobExistsException
- Thrown when a job exists at the location.JobCreateException
- Thrown when the job is not created.Job getWorkspaceJob(String path) throws JobNotFoundException, JobFormatException
path
- The full path to the 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 to the job.version
- The specific version of the job. 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 the 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 to 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.<i>Copyright (c) 2021, SAS Institute Inc., Cary, NC, USA</i>