Class JobsDelegator

java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.JobsDelegator
All Implemented Interfaces:
IJobsDelegator

public class JobsDelegator extends BaseDelegator implements IJobsDelegator
Implementation for 'p4 jobs'..
  • Constructor Details

    • JobsDelegator

      public JobsDelegator(IOptionsServer server)
      Instantiates a new jobs delegator.
      Parameters:
      server - the server
  • Method Details

    • getJobs

      public List<IJob> getJobs(List<IFileSpec> fileSpecs, int maxJobs, boolean longDescriptions, boolean reverseOrder, boolean includeIntegrated, String jobView) throws ConnectionException, RequestException, AccessException
      Description copied from interface: IJobsDelegator
      Return a list of Perforce jobs. Note that (as discussed in the IJob comments) Perforce jobs can have a wide variety of fields, formats, semantics, etc., and this method can return a list that may have to be unpacked at the map level by the consumer to make any sense of it.

      Note that this method (unlike the main file list methods) throws an exception and stops at the first encountered error.

      Specified by:
      getJobs in interface IJobsDelegator
      Parameters:
      fileSpecs - if given, return only jobspecs affecting the given file(s)
      maxJobs - if positive, return only up to maxJobs results
      longDescriptions - if true, return full descriptions, otherwise show only a subset (typically the first 128 characters, but this is not guaranteed).
      reverseOrder - if true, reverse the normal sort order
      includeIntegrated - if true, include any fixes made by changelists integrated into the specified files
      jobView - if non-null, a string in format detailed by "p4 help jobview" used to restrict jobs to those satisfying the job view expression.
      Returns:
      a non-null (but possibly-empty) list of qualifying Perforce jobs
      Throws:
      ConnectionException - if the Perforce server is unreachable or is not connected.
      RequestException - if the Perforce server encounters an error during its processing of the request
      AccessException - if the Perforce server denies access to the caller
    • getJobs

      public List<IJob> getJobs(List<IFileSpec> fileSpecs, GetJobsOptions opts) throws P4JavaException
      Description copied from interface: IJobsDelegator
      Return a list of Perforce jobs. Note that (as discussed in the IJob comments) Perforce jobs can have a wide variety of fields, formats, semantics, etc., and this method can return a list that may have to be unpacked at the map level by the consumer to make any sense of it.

      Note that this method (unlike the main file list methods) throws an exception and stops at the first encountered error.

      Specified by:
      getJobs in interface IJobsDelegator
      Parameters:
      fileSpecs - if given, return only jobspecs affecting the given file(s).
      opts - GetJobsOptions object describing optional parameters; if null, no options are set.
      Returns:
      a non-null (but possibly-empty) list of qualifying Perforce jobs.
      Throws:
      P4JavaException - if an error occurs processing this method and its parameters.