Interface IJobSpec

All Superinterfaces:
IServerResource
All Known Implementing Classes:
JobSpec

public interface IJobSpec extends IServerResource
Metadata definitions for jobs associated with a specific server. See the main Perforce documentation for the (voluminous) commentary on the various semantics and usage models for this information. In summary, every job is associated with a server-wide jobspec which details the various fields, values, etc. associated with the job; this information can be used to dynamically produce forms, display widgets, etc.

Job specs are complete and not refreshable, updateable, or completable. Setter methods below have only local effect.

  • Method Details

    • getFields

      Return a list of all known Perforce job fields on this jobspec.
      Returns:
      non-null but possibly-empty list of IJobSpecField objects for all known job fields in this jobspec.
    • setFields

      void setFields(List<IJobSpec.IJobSpecField> fields)
      Set the list of all known Perforce job fields on this jobspec.
      Parameters:
      fields - list of job fields
    • getValues

      Map<String,List<String>> getValues()
      Return a map of the values 'select' fields can have for each relevant jobspec field.
      Returns:
      non-null but possibly-empty map of select field value lists.
    • setValues

      void setValues(Map<String,List<String>> values)
      Set the map of the values 'select' fields can have for each relevant jobspec field.
      Parameters:
      values - value map
    • getPresets

      Map<String,String> getPresets()
      Return a map of the possible presets for each known jobspec field.
      Returns:
      non-null but possibly-empty map of presets
    • setPresets

      void setPresets(Map<String,String> presets)
      Set the map of the possible presets for each known jobspec field.
      Parameters:
      presets - map of presets
    • getComments

      String getComments()
      Get the comments associated with this jobspec.
      Returns:
      possibly-null comments string. This may be rather large...
    • setComments

      void setComments(String comments)
      Set the comments associated with this jobspec.
      Parameters:
      comments - jobspec comment string
    • getFieldValues

      List<String> getFieldValues(String fieldName)
      Get a list of field values for a given field.
      Parameters:
      fieldName - non-null field name
      Returns:
      possibly-null list of field values for the field.
    • getFieldPreset

      String getFieldPreset(String fieldName)
      Get the preset for a given field.
      Parameters:
      fieldName - non-null field name
      Returns:
      possibly-null preset for the named field.