Package org.ggf.drmaa

## Class SimpleJobTemplate

- java.lang.Object
- - org.ggf.drmaa.SimpleJobTemplate

- All Implemented Interfaces:
    `java.io.Serializable`, `JobTemplate`

      public class SimpleJobTemplate
      extends java.lang.Object
      implements JobTemplate, java.io.Serializable

  This class is a trivial implementation of the JobTemplate interface. This class can either be used as the base class for a implementation-specific job template class, or for implementations which do not need more than the required properties, it can be used as the job template implementation directly.

  All non-primitive properties default to `null`. All boolean properties default to `false`. All other primitive properties default to zero.

  The SimpleJobTemplate class is not thread safe. No attempt is made to prevent setters and getters from interfering with each other or the toString() method.

  Since:
    1.0
  See Also:
    `JobTemplate`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface org.ggf.drmaa.JobTemplate

      `ACTIVE_STATE, HOLD_STATE, HOME_DIRECTORY, PARAMETRIC_INDEX, WORKING_DIRECTORY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SimpleJobTemplate()` | Create a new instance of a JobTemplate.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List` | `getArgs()` | Get the arguments to the job.
    `java.util.Set` | `getAttributeNames()` | Returns the list of supported property names.
    `boolean` | `getBlockEmail()` | Get whether to block sending e-mail by default, regardless of the DRMS settings.
    `PartialTimestamp` | `getDeadlineTime()` | Sets a deadline after which the DRMS will terminate the job.
    `java.util.Set` | `getEmail()` | Get the list of email addresses used to report the job completion and status.
    `java.lang.String` | `getErrorPath()` | Gets how to direct the job's standard error.
    `long` | `getHardRunDurationLimit()` | Gets how long the job may be in a running state before its limit has been exceeded.
    `long` | `getHardWallclockTimeLimit()` | Gets the duration of the job's wall clock time limit.
    `java.lang.String` | `getInputPath()` | Get the job's standard input path.
    `java.lang.String` | `getJobCategory()` | Get the opaque string specifying how to resolve site-specific resources and/or policies.
    `java.util.Map` | `getJobEnvironment()` | Get the environment values that define the remote environment.
    `java.lang.String` | `getJobName()` | Get the name of the job.
    `int` | `getJobSubmissionState()` | Get the job state at submission.
    `boolean` | `getJoinFiles()` | Gets whether the error stream should be intermixed with the output stream.
    `java.lang.String` | `getNativeSpecification()` | Get the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.
    `java.lang.String` | `getOutputPath()` | Gets how to direct the job's standard output.
    `java.lang.String` | `getRemoteCommand()` | Get the command string to execute as the job.
    `long` | `getSoftRunDurationLimit()` | Gets an estimate as to how long the job will need to remain in a running state to complete.
    `long` | `getSoftWallclockTimeLimit()` | Gets an estimate as to how much wall clock time job will need to complete.
    `PartialTimestamp` | `getStartTime()` | Get the earliest time when the job may be eligible to be run.
    `FileTransferMode` | `getTransferFiles()` | Gets how to transfer files between hosts.
    `java.lang.String` | `getWorkingDirectory()` | Get the directory where the job is executed.
    `void` | `setArgs​(java.util.List args)` | Sets the arguments to the job.
    `void` | `setBlockEmail​(boolean blockEmail)` | Set whether to block sending e-mail by default, regardless of the DRMS settings.
    `void` | `setDeadlineTime​(PartialTimestamp deadline)` | Sets a deadline after which the DRMS will terminate the job.
    `void` | `setEmail​(java.util.Set email)` | Set the list of email addresses used to report the job completion and status.
    `void` | `setErrorPath​(java.lang.String errorPath)` | Sets how to direct the job's standard error.
    `void` | `setHardRunDurationLimit​(long hardRunLimit)` | Sets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.
    `void` | `setHardWallclockTimeLimit​(long hardWallclockLimit)` | Sets when the job's wall clock time limit has been exceeded.
    `void` | `setInputPath​(java.lang.String inputPath)` | Set the job's standard input path.
    `void` | `setJobCategory​(java.lang.String category)` | Set an opaque string specifying how to resolve site-specific resources and/or policies.
    `void` | `setJobEnvironment​(java.util.Map env)` | Set the environment values that define the remote environment.
    `void` | `setJobName​(java.lang.String name)` | Set the name of the job.
    `void` | `setJobSubmissionState​(int state)` | Set the job state at submission.
    `void` | `setJoinFiles​(boolean join)` | Sets whether the error stream should be intermixed with the output stream.
    `void` | `setNativeSpecification​(java.lang.String spec)` | Set an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.
    `void` | `setOutputPath​(java.lang.String outputPath)` | Sets how to direct the job's standard output.
    `void` | `setRemoteCommand​(java.lang.String remoteCommand)` | Set the command string to execute as the job.
    `void` | `setSoftRunDurationLimit​(long softRunLimit)` | Sets an estimate as to how long the job will need to remain in a running state to complete.
    `void` | `setSoftWallclockTimeLimit​(long softWallclockLimit)` | Sets an estimate as to how much wall clock time job will need to complete.
    `void` | `setStartTime​(PartialTimestamp startTime)` | Set the earliest time when the job may be eligible to be run.
    `void` | `setTransferFiles​(FileTransferMode mode)` | Specifies, which of the standard I/O files (stdin, stdout and stderr) are to be transferred to/from the execution host.
    `void` | `setWorkingDirectory​(java.lang.String wd)` | Set the directory where the job is executed.
    `java.lang.String` | `toString()` | Converts this JobTemplate into a String which contains all property settings.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleJobTemplate

          public SimpleJobTemplate()

      Create a new instance of a JobTemplate.

  - ### Method Detail

    - #### setRemoteCommand

          public void setRemoteCommand​(java.lang.String remoteCommand)
                                throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the command string to execute as the job. The command is relative to the execution host and is evaluated on the execution host.
      Specified by:
        `setRemoteCommand` in interface `JobTemplate`
      Parameters:
        `remoteCommand` - the command to execute as the job
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getRemoteCommand

          public java.lang.String getRemoteCommand()
                                            throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the command string to execute as the job.
      Specified by:
        `getRemoteCommand` in interface `JobTemplate`
      Returns:
        the command to execute as the job or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setRemoteCommand(String)`

    - #### setArgs

          public void setArgs​(java.util.List args)
                       throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets the arguments to the job.
      Specified by:
        `setArgs` in interface `JobTemplate`
      Parameters:
        `args` - the parameters passed as arguments to the job
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getArgs

          public java.util.List getArgs()
                                 throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the arguments to the job.
      Specified by:
        `getArgs` in interface `JobTemplate`
      Returns:
        the parameters passed as arguments to the job or null if they have not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setArgs(List)`

    - #### setJobSubmissionState

          public void setJobSubmissionState​(int state)
                                     throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the job state at submission. The states are HOLD_STATE and ACTIVE_STATE:
      - ACTIVE_STATE means job is eligible to run
      - HOLD_STATE means job may be queued but is ineligible to run

      A job submitted in the HOLD_STATE state can be made eligible to run through the Session.control() method using the Session.RELEASE constant.

      Specified by:
        `setJobSubmissionState` in interface `JobTemplate`
      Parameters:
        `state` - the job state at submission
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getJobSubmissionState

          public int getJobSubmissionState()
                                    throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the job state at submission.
      Specified by:
        `getJobSubmissionState` in interface `JobTemplate`
      Returns:
        the job state at submission
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setJobSubmissionState(int)`

    - #### setJobEnvironment

          public void setJobEnvironment​(java.util.Map env)
                                 throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the environment values that define the remote environment. The values override any remote environment values if there is a collision.
      Specified by:
        `setJobEnvironment` in interface `JobTemplate`
      Parameters:
        `env` - the environment values that define the remote environment
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getJobEnvironment

          public java.util.Map getJobEnvironment()
                                          throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the environment values that define the remote environment.
      Specified by:
        `getJobEnvironment` in interface `JobTemplate`
      Returns:
        the environment values that define the remote environment or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setJobEnvironment(Map)`

    - #### setWorkingDirectory

          public void setWorkingDirectory​(java.lang.String wd)
                                   throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the directory where the job is executed. If the working directory is not set, behavior is implementation dependent. The working directory is evaluated relative to the execution host.

      A `HOME_DIRECTORY` placeholder at the beginning denotes that the remaining portion of the directory name is resolved relative to the job submiter's home directory on the execution host.

      The `PARAMETRIC_INDEX` placeholder can be used at any position within the directory name of a parametric job and will be replaced by the underlying DRM system with the parametric job's index.

      The directory name must be specified in a syntax that is common at the host where the job will be executed.

      If no placeholder is used, an absolute directory specification is expected.

      If the directory does not exist when the job is run, the job enters the state Session.FAILED.

      Specified by:
        `setWorkingDirectory` in interface `JobTemplate`
      Parameters:
        `wd` - the directory where the job is executed
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getWorkingDirectory

          public java.lang.String getWorkingDirectory()
                                               throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the directory where the job is executed.
      Specified by:
        `getWorkingDirectory` in interface `JobTemplate`
      Returns:
        the directory where the job is executed or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setWorkingDirectory(String)`

    - #### setJobCategory

          public void setJobCategory​(java.lang.String category)
                              throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set an opaque string specifying how to resolve site-specific resources and/or policies. The job category can be used, for example, to submit jobs that are "low priority" jobs. It is then up to the local DRM administrator to map "low priority" to a set of appropriate job submission characteristics, such as reduced memory allowance or lower priority value.
      Specified by:
        `setJobCategory` in interface `JobTemplate`
      Parameters:
        `category` - an opaque string specifying how to resolve site-specific resources and/or policies.
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getJobCategory

          public java.lang.String getJobCategory()
                                          throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the opaque string specifying how to resolve site-specific resources and/or policies.
      Specified by:
        `getJobCategory` in interface `JobTemplate`
      Returns:
        the opaque string specifying how to resolve site-specific resources and/or policies or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setJobCategory(String)`

    - #### setNativeSpecification

          public void setNativeSpecification​(java.lang.String spec)
                                      throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.
      Specified by:
        `setNativeSpecification` in interface `JobTemplate`
      Parameters:
        `spec` - an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getNativeSpecification

          public java.lang.String getNativeSpecification()
                                                  throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.
      Specified by:
        `getNativeSpecification` in interface `JobTemplate`
      Returns:
        the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setNativeSpecification(String)`

    - #### setEmail

          public void setEmail​(java.util.Set email)
                        throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the list of email addresses used to report the job completion and status.
      Specified by:
        `setEmail` in interface `JobTemplate`
      Parameters:
        `email` - the list of email addresses used to report the job completion and status.
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getEmail

          public java.util.Set getEmail()
                                 throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the list of email addresses used to report the job completion and status.
      Specified by:
        `getEmail` in interface `JobTemplate`
      Returns:
        the list of email addresses used to report the job completion and status or null if they have not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setEmail(Set)`

    - #### setBlockEmail

          public void setBlockEmail​(boolean blockEmail)
                             throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set whether to block sending e-mail by default, regardless of the DRMS settings. This property can only be used to prevent email from being sent. It cannot force the DRM to send email.
      Specified by:
        `setBlockEmail` in interface `JobTemplate`
      Parameters:
        `blockEmail` - whether to block sending e-mail by default
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getBlockEmail

          public boolean getBlockEmail()
                                throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get whether to block sending e-mail by default, regardless of the DRMS settings.
      Specified by:
        `getBlockEmail` in interface `JobTemplate`
      Returns:
        whether to block sending e-mail by default
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setBlockEmail(boolean)`

    - #### setStartTime

          public void setStartTime​(PartialTimestamp startTime)
                            throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the earliest time when the job may be eligible to be run.
      Specified by:
        `setStartTime` in interface `JobTemplate`
      Parameters:
        `startTime` - the earliest time when the job may be eligible to be run
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getStartTime

          public PartialTimestamp getStartTime()
                                        throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the earliest time when the job may be eligible to be run.
      Specified by:
        `getStartTime` in interface `JobTemplate`
      Returns:
        the earliest time when the job may be eligible to be run or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setStartTime(PartialTimestamp)`

    - #### setJobName

          public void setJobName​(java.lang.String name)
                          throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the name of the job. A job name will be comprised of alpha-numeric and _ characters. The DRMAA implementation may truncate client provided job names to an implementation defined length that is at least 31 characters.
      Specified by:
        `setJobName` in interface `JobTemplate`
      Parameters:
        `name` - the name of the job
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getJobName

          public java.lang.String getJobName()
                                      throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the name of the job.
      Specified by:
        `getJobName` in interface `JobTemplate`
      Returns:
        the name of the job or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setJobName(String)`

    - #### setInputPath

          public void setInputPath​(java.lang.String inputPath)
                            throws DrmaaException

      Description copied from interface: `JobTemplate`
      Set the job's standard input path. Unless set elsewhere, if not explicitly set in the job template, the job is started with an empty input stream.

      If set, specifies the network path of the job's input stream in the form of [hostname]:file_path

      When the transferFiles property is supported and has it's inputStream property set, the input file will be fetched by the underlying DRM system from the specified host or from the submit host if no hostname is specified.

      When the transferFiles property is not supported or does not have its inputStream property set, the input file is always expected to be at the host where the job is executed irrespective of a whether a hostname is specified in the path.

      The `PARAMETRIC_INDEX` placeholder can be used at any position within the file path of parametric job templates and will be replaced by the underlying DRM system with the parametric job's index.

      A `HOME_DIRECTORY` placeholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job submiter's home directory on the host where the file is located.

      A `WORKING_DIRECTORY` placeholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job's working directory on the host where the file is located.

      The file path must be specified in a syntax that is common at the host where the file is located.

      When the job is run, if this property is set, and the file can't be read, the job will enter the state Session.FAILED.

      Specified by:
        `setInputPath` in interface `JobTemplate`
      Parameters:
        `inputPath` - the job's standard input path
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getInputPath

          public java.lang.String getInputPath()
                                        throws DrmaaException

      Description copied from interface: `JobTemplate`
      Get the job's standard input path.
      Specified by:
        `getInputPath` in interface `JobTemplate`
      Returns:
        the job's standard input path or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setInputPath(String)`

    - #### setOutputPath

          public void setOutputPath​(java.lang.String outputPath)
                             throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets how to direct the job's standard output. If not explicitly set in the job template, the whereabouts of the jobs output stream is not defined. If set, specifies the network path of the job's output stream file in the form of [hostname]:file_path

      When the transferFiles property is supported and has its outputStream property set, the output file will be transferred by the underlying DRM system to the specified host or to the submit host if no hostname is specified.

      When the transferFiles property is not supported or does not have it's outputStream property set, the output file is always kept at the host where the job is executed irrespective of a whether a hostname is specified in the path.

      The `PARAMETRIC_INDEX` placeholder can be used at any position within the file path of parametric job templates and will be replaced by the underlying DRM system with the parametric job's index.

      A `HOME_DIRECTORY` placeholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job submiter's home directory on the host where the file is located.

      A `WORKING_DIRECTORY` placeholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job's working directory on the host where the file is located.

      The file path must be specified in a syntax that is common at the host where the file is located.

      When the job is run, if this property is set, and the file can't be written before execution the job will enter the state Session.FAILED.

      Specified by:
        `setOutputPath` in interface `JobTemplate`
      Parameters:
        `outputPath` - how to direct the job's standard output
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getOutputPath

          public java.lang.String getOutputPath()
                                         throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets how to direct the job's standard output.
      Specified by:
        `getOutputPath` in interface `JobTemplate`
      Returns:
        how to direct the job's standard output or null if it has not been set
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setOutputPath(String)`

    - #### setErrorPath

          public void setErrorPath​(java.lang.String errorPath)
                            throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets how to direct the job's standard error. If not explicitly set in the job template, the whereabouts of the job's error stream is not defined. If set, specifies the network path of the job's error stream file in the form [hostname]:file_path

      When the transferFiles property is supported and has its errorStream property set, the error file will be transferred by the underlying DRM system to the specified host or to the submit host if no hostname is specified.

      When the transferFiles property is not supported or does not have it's errorStream property set, the error file is always kept at the host where the job is executed irrespective of a whether a hostname is specified in the path.

      The `PARAMETRIC_INDEX` placeholder can be used at any position within the file path of parametric job templates and will be replaced by the underlying DRM system with the parametric job's index.

      A `HOME_DIRECTORY` placeholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job submiter's home directory on the host where the file is located.

      A `WORKING_DIRECTORY` placeholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job's working directory on the host where the file is located.

      The file path must be specified in a syntax that is common at the host where the file is located.

      When the job is run, if this property is set, and the file can't be written before execution the job will enter the state Session.FAILED.

      Specified by:
        `setErrorPath` in interface `JobTemplate`
      Parameters:
        `errorPath` - how to direct the job's standard error
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getErrorPath

          public java.lang.String getErrorPath()
                                        throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets how to direct the job's standard error.
      Specified by:
        `getErrorPath` in interface `JobTemplate`
      Returns:
        how to direct the job's standard error
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setErrorPath(String)`

    - #### setJoinFiles

          public void setJoinFiles​(boolean join)
                            throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets whether the error stream should be intermixed with the output stream. If not explicitly set in the job template this property defaults to `false`.

      If `true` is specified the underlying DRM system will ignore the value of the errorPath property and intermix the standard error stream with the standard output stream as specified by the outputPath property.

      Specified by:
        `setJoinFiles` in interface `JobTemplate`
      Parameters:
        `join` - whether the error stream should be intermixed with the output stream
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getJoinFiles

          public boolean getJoinFiles()
                               throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets whether the error stream should be intermixed with the output stream.
      Specified by:
        `getJoinFiles` in interface `JobTemplate`
      Returns:
        Whether the error stream should be intermixed with the output stream
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setJoinFiles(boolean)`

    - #### setTransferFiles

          public void setTransferFiles​(FileTransferMode mode)
                                throws DrmaaException

      Description copied from interface: `JobTemplate`
      Specifies, which of the standard I/O files (stdin, stdout and stderr) are to be transferred to/from the execution host. If not set, defaults to the equivalent of a FileTransferMode instance with all properties set to false. See inputPath, outputPath and errorPath setters for information about how to specify the standard input file, standard output file, and standard error file.

      If the FileTransferMode instance's errorStream property is set to `true`, the errorPath property is taken to specify the location to which error files should be transfered after the job finishes.

      If the FileTransferMode instance's inputStream property is set to `true`, the inputPath property is taken to specify the location from which input files should be transfered before the job starts.

      If the FileTransferMode instance's outputStream property is set to `true`, the outputPath property is taken to specify the location to which output files should be transfered after the job finishes.

      Specified by:
        `setTransferFiles` in interface `JobTemplate`
      Parameters:
        `mode` - how to transfer files between hosts.
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setInputPath(String)`, `JobTemplate.setOutputPath(String)`, `JobTemplate.setErrorPath(String)`

    - #### getTransferFiles

          public FileTransferMode getTransferFiles()
                                            throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets how to transfer files between hosts.
      Specified by:
        `getTransferFiles` in interface `JobTemplate`
      Returns:
        how to transfer files between hosts.
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setTransferFiles(FileTransferMode)`

    - #### setDeadlineTime

          public void setDeadlineTime​(PartialTimestamp deadline)
                               throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets a deadline after which the DRMS will terminate the job.
      Specified by:
        `setDeadlineTime` in interface `JobTemplate`
      Parameters:
        `deadline` - the deadline after which the DRMS will terminate the job
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getDeadlineTime

          public PartialTimestamp getDeadlineTime()
                                           throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets a deadline after which the DRMS will terminate the job.
      Specified by:
        `getDeadlineTime` in interface `JobTemplate`
      Returns:
        the deadline after which the DRMS will terminate the job
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setDeadlineTime(PartialTimestamp)`

    - #### setHardWallclockTimeLimit

          public void setHardWallclockTimeLimit​(long hardWallclockLimit)
                                         throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets when the job's wall clock time limit has been exceeded. The DRMS will terminate a job that has exceeded its wall clock time limit. Note that time spent suspended is also accounted for here.
      Specified by:
        `setHardWallclockTimeLimit` in interface `JobTemplate`
      Parameters:
        `hardWallclockLimit` - when the job's wall clock time limit has been exceeded. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getHardWallclockTimeLimit

          public long getHardWallclockTimeLimit()
                                         throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets the duration of the job's wall clock time limit.
      Specified by:
        `getHardWallclockTimeLimit` in interface `JobTemplate`
      Returns:
        when the job's wall clock time limit has been exceeded. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setHardWallclockTimeLimit(long)`

    - #### setSoftWallclockTimeLimit

          public void setSoftWallclockTimeLimit​(long softWallclockLimit)
                                         throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets an estimate as to how much wall clock time job will need to complete. Note that time spent suspended is also accounted for here.

      This attribute is intended to assist the scheduler. If the time specified in insufficient, the drmaa-implementation may impose a scheduling penalty.

      Specified by:
        `setSoftWallclockTimeLimit` in interface `JobTemplate`
      Parameters:
        `softWallclockLimit` - an estimate as to how much wall clock time job will need to complete. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getSoftWallclockTimeLimit

          public long getSoftWallclockTimeLimit()
                                         throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets an estimate as to how much wall clock time job will need to complete.
      Specified by:
        `getSoftWallclockTimeLimit` in interface `JobTemplate`
      Returns:
        an estimate as to how much wall clock time job will need to complete. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setSoftWallclockTimeLimit(long)`

    - #### setHardRunDurationLimit

          public void setHardRunDurationLimit​(long hardRunLimit)
                                       throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.
      Specified by:
        `setHardRunDurationLimit` in interface `JobTemplate`
      Parameters:
        `hardRunLimit` - how long the job may be in a running state before its limit has been exceeded. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getHardRunDurationLimit

          public long getHardRunDurationLimit()
                                       throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets how long the job may be in a running state before its limit has been exceeded.
      Specified by:
        `getHardRunDurationLimit` in interface `JobTemplate`
      Returns:
        how long the job may be in a running state before its limit has been exceeded. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setHardRunDurationLimit(long)`

    - #### setSoftRunDurationLimit

          public void setSoftRunDurationLimit​(long softRunLimit)
                                       throws DrmaaException

      Description copied from interface: `JobTemplate`
      Sets an estimate as to how long the job will need to remain in a running state to complete. This attribute is intended to assist the scheduler. If the time specified in insufficient, the DRMAA implementation may impose a scheduling penalty.
      Specified by:
        `setSoftRunDurationLimit` in interface `JobTemplate`
      Parameters:
        `softRunLimit` - an estimate as to how long the job will need to remain in a running state to complete. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - InvalidAttributeFormatException -- the format of the argument is invalid
        - InvalidAttributeValueException -- the value of the argument is invalid
        - ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - IllegalArgumentException -- an argument is invalid
        - InternalException -- an error has occured in the DRMAA implementation

    - #### getSoftRunDurationLimit

          public long getSoftRunDurationLimit()
                                       throws DrmaaException

      Description copied from interface: `JobTemplate`
      Gets an estimate as to how long the job will need to remain in a running state to complete.
      Specified by:
        `getSoftRunDurationLimit` in interface `JobTemplate`
      Returns:
        an estimate as to how long the job will need to remain in a running state to complete. Specified in seconds
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation
      See Also:
        `JobTemplate.setSoftRunDurationLimit(long)`

    - #### getAttributeNames

          public java.util.Set getAttributeNames()
                                          throws DrmaaException

      Description copied from interface: `JobTemplate`
      Returns the list of supported property names. This list includes supported DRMAA reserved property names (both required and optional) and DRM-specific property names.
      Specified by:
        `getAttributeNames` in interface `JobTemplate`
      Returns:
        the list of supported property names
      Throws:
        `DrmaaException` - May be one of the following:
        - NoActiveSessionException -- the session has not yet been initialized or has already been exited
        - DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
        - AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
        - InternalException -- an error has occured in the DRMAA implementation

    - #### toString

          public java.lang.String toString()

      Converts this JobTemplate into a String which contains all property settings. The generated string is then cached and reused until one of the property settings is modified.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a string containing all property settings