public interface JobService
Modifier and Type | Method and Description |
---|---|
Job |
createJobInWorkspace(CreateJobInfo jobInfo)
Creates job in workspace based on information specified on CreateJobInfo
|
Job |
createJobInWorkspace(String parentPath,
String jobName,
List<ResourceSpecification> 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 |
createJobInWorkspaceAndRepository(CreateJobInfo jobInfo,
NewFileCheckinSpecification jobCheckinSpec)
Creates job in workspace and checks it into the repository
|
Job |
getJobInRepository(String path,
String version)
Gets the job from the specified path in the repository
|
Job |
getJobInWorkspace(String path)
Gets the job from the specified path in the workspace
|
boolean |
getRunAsOwner(Job job)
Get the flag that defines whether the repository job will run as the owner.
|
boolean |
jobExistsInRepository(String path)
Confirms whether the job exists at the specified path in the repository
|
boolean |
jobExistsInWorkspace(String path)
Confirms whether the job exists at the specified path in the workspace
|
void |
setRunAsOwner(Job job,
boolean value)
Sets if the repository job will run as the owner.
|
Job |
updateJobInRepository(Job job,
ResourceCheckinSpecification checkinSpec)
Updates the job in the repository with information on the specified Job
|
Job |
updateJobInWorkspace(Job job)
Updates the job in the workspace with information on the specified Job
|
Job createJobInWorkspace(String parentPath, String jobName, List<ResourceSpecification> tasks, Set<JobParameter> parameters, boolean createParents) throws JobExistsException, ResourceNotFoundException
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 a ResourceSepcification.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 a ResourceSpecification. 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 locationResourceNotFoundException
- Thrown if createParents was specified as false and the parentPath does not
exist.Job createJobInWorkspace(CreateJobInfo jobInfo) throws JobExistsException, ResourceNotFoundException
jobInfo
- Contains information required to create a job as well other additional job attributesJobExistsException
- Thrown if the job already exists at that locationResourceNotFoundException
- Thrown if createParents was specified as false on CreateJobInfo and the
parentPath on CreateJobInfo does not exist.Job createJobInWorkspaceAndRepository(CreateJobInfo jobInfo, NewFileCheckinSpecification jobCheckinSpec) throws JobExistsException, ResourceNotFoundException, RepositoryJobCreateException
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 default to a major version specification.JobExistsException
- Thrown if the job already exists at that locationResourceNotFoundException
- Thrown if createParents was specified as false on CreateJobInfo and the
parentPath on CreateJobInfo does not exist.RepositoryJobCreateException
- Thrown if there was an error creating the job in the repositoryboolean jobExistsInWorkspace(String path)
path
- Full path of jobboolean jobExistsInRepository(String path)
path
- Full path of jobJob getJobInWorkspace(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 getJobInRepository(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 updateJobInRepository(Job job, ResourceCheckinSpecification checkinSpec) throws JobNotFoundException, AlreadyCheckedoutException
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 jobAlreadyCheckedoutException
- Thrown if the job attempting to be updated is already checked outJob updateJobInWorkspace(Job job) throws JobNotFoundException
job
- Job containing the information in which to update the jobJobNotFoundException
- Thrown if the job no longer exists at the location specified in the jobvoid setRunAsOwner(Job job, boolean value) throws JobNotFoundException
job
- The job to updatevalue
- Value indicating if job should run as the job owner.JobNotFoundException
- Thrown if the specified job can not be found.boolean getRunAsOwner(Job job) throws JobNotFoundException
job
- JobNotFoundException
- Thrown if the specified job can not be found.Copyright (c) 2017, SAS Institute Inc., Cary, NC, USA