Interface JobItem


public interface JobItem
Contains data about a single item in a Job.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getValue(String name, JobValueType<T> valueType)
    Retrieves the value of a job item parameter.
    <T extends JobValue>
    T
    getValue(String name, Class<T> returnType)
    Retrieves the value of a job item parameter.
    void
    setValue(String name, Object value)
    Sets the value of a job item parameter.
  • Method Details

    • setValue

      void setValue(String name, Object value)
      Sets the value of a job item parameter. This can be used by JobInitContext.newJobInput(String) to set the job item parameter.
      Parameters:
      name - name of the parameter. Cannot be null.
      value - new value to set on the parameter. Value must implement JobValue or be one of the data types specified in JobValueType.
    • getValue

      <T> T getValue(String name, JobValueType<T> valueType)
      Retrieves the value of a job item parameter.
      Type Parameters:
      T - the job parameter value type
      Parameters:
      name - the name String used when setting a parameter. Cannot be null.
      valueType - the type of value returned from the parameters
      Returns:
      the object identified by the given name, or null if there was no value for the given name
    • getValue

      <T extends JobValue> T getValue(String name, Class<T> returnType)
      Retrieves the value of a job item parameter.
      Type Parameters:
      T - type of object requested. Cannot be null.
      Parameters:
      name - the key String used when setting a parameter. Cannot be null.
      returnType - type of object requested. Cannot be null.
      Returns:
      the object identified by the given name, or null if there was no value for the given name