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'..
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description JobsDelegator(IOptionsServer server)
Instantiates a new jobs delegator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IJob>
getJobs(java.util.List<IFileSpec> fileSpecs, int maxJobs, boolean longDescriptions, boolean reverseOrder, boolean includeIntegrated, java.lang.String jobView)
Return a list of Perforce jobs.java.util.List<IJob>
getJobs(java.util.List<IFileSpec> fileSpecs, GetJobsOptions opts)
Return a list of Perforce jobs.
-
-
-
Constructor Detail
-
JobsDelegator
public JobsDelegator(IOptionsServer server)
Instantiates a new jobs delegator.- Parameters:
server
- the server
-
-
Method Detail
-
getJobs
public java.util.List<IJob> getJobs(java.util.List<IFileSpec> fileSpecs, int maxJobs, boolean longDescriptions, boolean reverseOrder, boolean includeIntegrated, java.lang.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 interfaceIJobsDelegator
- Parameters:
fileSpecs
- if given, return only jobspecs affecting the given file(s)maxJobs
- if positive, return only up to maxJobs resultslongDescriptions
- 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 orderincludeIntegrated
- if true, include any fixes made by changelists integrated into the specified filesjobView
- 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 requestAccessException
- if the Perforce server denies access to the caller
-
getJobs
public java.util.List<IJob> getJobs(java.util.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 interfaceIJobsDelegator
- 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.
-
-