public interface IJobDelegator
Modifier and Type | Method and Description |
---|---|
IJob |
createJob(java.util.Map<java.lang.String,java.lang.Object> fieldMap)
Create a new Perforce job in the Perforce server corresponding to the
passed-in Perforce job fields (which in turn should correspond to at
least the mandatory fields defined in the reigning Perforce job spec).
|
java.lang.String |
deleteJob(java.lang.String jobId)
Delete a job from the Perforce server.
|
IJob |
getJob(java.lang.String jobId)
Get a specific job.
|
java.lang.String |
updateJob(IJob job)
Update a Perforce job on the Perforce server.
|
IJob createJob(@Nonnull java.util.Map<java.lang.String,java.lang.Object> fieldMap) throws ConnectionException, RequestException, AccessException
Perforce job semantics, field count and layout, etc., are to some extent free-form and specified for each server by the associated job spec (retrievable using the getJobSpec() method below), so map fields are passed to the Perforce server exactly as passed to the create method in the job's field map, so you need to know the field names and semantics given by the associated job spec. This includes setting the relevant job ID field to "new", but otherwise, no checking is done on fields in this method against the job spec (this may be added later).
fieldMap
- non-null field map defining the new job in the Perforce
server.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 callerjava.lang.String deleteJob(java.lang.String jobId) throws ConnectionException, RequestException, AccessException
jobId
- ID of the job to be deleted.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 callerIJob getJob(java.lang.String jobId) throws ConnectionException, RequestException, AccessException
jobId
- non-null job Id.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 callerjava.lang.String updateJob(@Nonnull IJob job) throws ConnectionException, RequestException, AccessException
The returned string will contain whatever the Perforce server returned in response to this command; in general, if the update fails, an exception will be thrown, meaning that the returned string represents success only. There are two success states -- either the job was saved or it didn't need saving (it was the same after updating). Consumers should parse this accordingly.
job
- non-null candidate for updating.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