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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  IJobSpec.IJobSpecField
      Interface onto the main jobspec field specifier.
    • Method Detail

      • getFields

        java.util.List<IJobSpec.IJobSpecField> 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​(java.util.List<IJobSpec.IJobSpecField> fields)
        Set the list of all known Perforce job fields on this jobspec.
        Parameters:
        fields - list of job fields
      • getValues

        java.util.Map<java.lang.String,​java.util.List<java.lang.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​(java.util.Map<java.lang.String,​java.util.List<java.lang.String>> values)
        Set the map of the values 'select' fields can have for each relevant jobspec field.
        Parameters:
        values - value map
      • getPresets

        java.util.Map<java.lang.String,​java.lang.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​(java.util.Map<java.lang.String,​java.lang.String> presets)
        Set the map of the possible presets for each known jobspec field.
        Parameters:
        presets - map of presets
      • getComments

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

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

        java.util.List<java.lang.String> getFieldValues​(java.lang.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

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