Class Job

  • All Implemented Interfaces:
    java.io.Serializable

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

      Constructors 
      Constructor Description
      Job()
      Constructor.
      Job​(java.lang.String path)
      Constructor.
      Job​(java.lang.String path, java.lang.String version)
      Constructor.
      Job​(java.lang.String path, java.lang.String version, SourceLocation sourceLocation)
      Constructor.
      Job​(java.lang.String path, java.lang.String version, java.lang.String owner, boolean runAsOwner)
      Constructor.
    • Constructor Detail

      • Job

        public Job()
        Constructor.
      • Job

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

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

        public Job​(java.lang.String path,
                   java.lang.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​(java.lang.String path,
                   java.lang.String version,
                   java.lang.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 Detail

      • getPath

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

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

        public java.lang.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 java.lang.String getDescription()
        Gets the description of the job.
        Returns:
        The description of the job.
      • setDescription

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

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

        public void setPrograms​(java.util.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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​(java.lang.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 java.util.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​(java.util.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 java.lang.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​(java.lang.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​(java.lang.String path,
                               java.lang.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​(java.lang.String name,
                                     java.lang.String label,
                                     java.lang.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​(java.lang.String name,
                                     java.lang.String label,
                                     java.lang.String path,
                                     java.lang.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​(java.lang.String name,
                                       java.lang.String label,
                                       java.lang.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​(java.lang.String name,
                                       java.lang.String label,
                                       java.lang.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​(java.lang.String name,
                                          java.lang.String label,
                                          java.lang.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​(java.lang.String name,
                                                java.lang.String label,
                                                java.lang.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​(java.lang.String name,
                                        java.lang.String label,
                                        java.lang.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​(java.lang.String name,
                                     java.lang.String label,
                                     java.util.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object