Class Job

java.lang.Object
com.sas.lsaf.execution.job.Job
All Implemented Interfaces:
Serializable

public class Job extends Object implements Serializable
The client representation of a job. Note: Relative paths are supported for jobs when paths can be specified.
See Also:
  • Constructor Details

    • Job

      public Job()
      Constructor.
    • Job

      public Job(String path)
      Constructor.
      Parameters:
      path - The path to the job.
    • Job

      public Job(String path, String version)
      Constructor.
      Parameters:
      path - The path to the job.
      version - The version label for the job.
    • Job

      public Job(String path, String version, SourceLocation sourceLocation)
      Constructor.
      Parameters:
      path - The path to the job.
      version - The version label for the job.
      sourceLocation - The source location of the job.
    • Job

      public Job(String path, String version, String owner, boolean runAsOwner)
      Constructor.
      Parameters:
      path - The path to the job.
      version - The version label for the job.
      owner - The userId of the user who owns the job.
      runAsOwner - Indicates whether the job runs as the owner.
  • Method Details

    • getPath

      public String getPath()
      Gets the path of the job.
      Returns:
      The path of the job.
    • setPath

      public void setPath(String path)
      Sets the path of the job.
      Parameters:
      path - The path of the job.
    • getVersion

      public String getVersion()
      Gets the version of the job.
      Returns:
      The version of the job.
    • getSourceLocation

      public SourceLocation getSourceLocation()
      Gets the source location of the job.
      Returns:
      The source location of the job.
    • setSourceLocation

      public void setSourceLocation(SourceLocation sourceLocation)
      Sets the source location of the job.
      Parameters:
      sourceLocation - The source location of the job.
    • getDescription

      public String getDescription()
      Gets the description of the job.
      Returns:
      The description of the job.
    • setDescription

      public void setDescription(String description)
      Sets the description of the job.
      Parameters:
      description - The description of the job.
    • getPrograms

      public List<JobProgram> getPrograms()
      Gets the programs that are associated with the job.
      Returns:
      The associated programs of the job.
    • setPrograms

      public void setPrograms(List<JobProgram> programs)
      Sets the programs to associate with the job.
      Parameters:
      programs - The programs to associate.
    • getPublishSetup

      public JobPublishSetup getPublishSetup()
      Gets the content to transfer when submitting the job.
      Returns:
      The content to transfer when submitting the job.
    • setPublishSetup

      public void setPublishSetup(JobPublishSetup publishSetup)
      Sets the content to transfer when submitting the job.
      Parameters:
      publishSetup - The content to transfer when submitting the job.
    • getPublishCheckin

      public JobPublishCheckin getPublishCheckin()
      Gets the check-in specification to use for the output files that are created by the job.
      Returns:
      The check-in specification for the output files.
    • setPublishCheckin

      public void setPublishCheckin(JobPublishCheckin publishCheckin)
      Sets the check-in specification to use for the output files that are created by the job.
      Parameters:
      publishCheckin - The check-in specification for the output files.
    • getLogsLocation

      public String getLogsLocation()
      Gets the location for job submission log files to be saved. The log files are saved with the same name as the job.
      Returns:
      The location for the job submission log files to be saved.
    • setLogsLocation

      public void setLogsLocation(String logsLocation)
      Sets the location for the job submission log files to be saved. The log files are saved with the same name as the job.
      Parameters:
      logsLocation - The location for the job submission log files to be saved.
    • getResultsLocation

      public String getResultsLocation()
      Gets the location for the job execution results files to be saved. The results files are saved with the same name as the job.
      Returns:
      The location for the job execution results files to be saved.
    • setResultsLocation

      public void setResultsLocation(String resultsLocation)
      Sets the location for the job submission results files to be saved. The results files are saved with the same name as the job.
      Parameters:
      resultsLocation - The location for the job submission results files to be saved.
    • getManifestLocation

      public String getManifestLocation()
      Gets the location for the job submission manifest file to be saved. The manifest file is saved with the same name as the job.
      Returns:
      The location for the job submission manifest file to be saved.
    • setManifestLocation

      public void setManifestLocation(String manifestLocation)
      Sets the location for the job submission manifest file to be saved. The manifest file is saved with the same name as the job.
      Parameters:
      manifestLocation - The location for the job submission manifest file to be saved.
    • getParameters

      public List<JobParameter> getParameters()
      Gets the job parameters. For the JobParameter type FILE or FOLDER, the default value is a JobInput. The values of CHARACTER and NUMERIC parameters are a String, and a DATE parameter value is a java.util.Date.
      Returns:
      The job parameters.
    • setParameters

      public void setParameters(List<JobParameter> parameters)
      Sets the job parameters. For the JobParameter type FILE and FOLDER, the default value must be specified as a JobInput. The values of CHARACTER and NUMERIC parameters must be specified as a String, and a DATE parameter value must be specified as a java.util.Date.
      Note: FILE parameters support wildcards but FOLDER parameters do not.
      Parameters:
      parameters - The job parameters.
    • getOwner

      public String getOwner()
      Gets the userId of the current owner of the job.
      Returns:
      The userId of the current owner of the job.
    • isRunAsOwner

      public boolean isRunAsOwner()
      Indicates whether the job runs as the owner of the file or as the user who submitted the file for execution.
      Returns:
      Indicates whether the job runs as the owner of the file or asthe user who submitted the file for execution.
    • addProgram

      public void addProgram(String path)
      Adds a JobProgram with the specified path. The default version is null which specifies that the latest version is used when submitted as a published job.
      Parameters:
      path - The path to the program.
    • addProgram

      public void addProgram(String path, String version)
      Adds a JobProgram with the specified information. Specifying null for the version specifies that the latest version is used when the program is submitted with a published job.
      Parameters:
      path - The path to the program.
      version - The version of the program. If null, the latest version is is used when the program is submitted with a published job.
    • addFileParameter

      public void addFileParameter(String name, String label, String path)
      Adds a JobParameter with the specified JobInputFile information. By default, the version specified is null, which specifies that the latest version will be used when the program is submitted with a published job.
      Note: Wildcards can be used in the paths of a file parameter.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      path - The default path for the parameter. The default version is the latest (null).
    • addFileParameter

      public void addFileParameter(String name, String label, String path, String version)
      Adds a JobParameter with the specified JobInputFile information. Specifying null for the version specifies that the latest version will be used when the program is submitted with a published job.
      Note: Wildcards can be used in the paths of a file parameter.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      path - The default path for the parameter.
      version - The version to be set on the JobInputFile as the default value for the parameter. Specifying null means the latest version will be used when submitted as a published job.
    • addFolderParameter

      public void addFolderParameter(String name, String label, String path)
      Adds a JobParameter with the specified JobInputFolder information. By default, the folder does not include subfolders when transferred for a published job run. Only the files that are directly underneath it are transferred.
      Note: Wildcards are not supported in the paths of a folder parameter.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      path - The default path for the parameter.
    • addFolderParameter

      public void addFolderParameter(String name, String label, String path, boolean includeSubfolders)
      Adds a JobParameter with the specified JobInputFolder information. By default, the folder does not include subfolders when transferred for a published job run. Only the files that are directly underneath it will be transferred. Sets includeSubfolders to true to transfer the folder and all of the files and folders underneath it.

      Note: Wildcards are not supported in the paths of a folder parameter.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      path - The default path for the parameter.
      includeSubfolders - Indicates whether to transfer all files and folders that are underneath the specified folder.
    • addCharacterParameter

      public void addCharacterParameter(String name, String label, String value)
      Adds a JobParameter with the specified information.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      value - The default value of the job parameter.
    • addCharacterMaskedParameter

      public void addCharacterMaskedParameter(String name, String label, String value)
      Adds a JobParameter with the specified information that is masked.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      value - The masked default value of the job parameter.
    • addNumericParameter

      public void addNumericParameter(String name, String label, String value)
      Adds a JobParameter with the specified information that represents a numeric value.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      value - The default value of the job parameter that represents a numeric value.
    • addDateParameter

      public void addDateParameter(String name, String label, Date value)
      Adds a JobParameter with the specified information.
      Parameters:
      name - The name of the job parameter.
      label - The label of the job parameter.
      value - The default value of the job parameter.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object