com.perforce.p4java.core
Interface IJob

All Superinterfaces:
IServerResource
All Known Implementing Classes:
Job

public interface IJob
extends IServerResource

The minimal Perforce job interface. The format and semantics of Perforce jobs can vary greatly between servers and installations, and are described fully by an associated IJobSpec interface, which should be used to fully interpret and work with jobs for a specific server. This particular interface (IJob) is really intended to let a consumer get a summary list only; further details may need to be retrieved from the jobspec and associated elements and interfaces.

Note that what constitutes the job ID and description may not always even be accurate, as it's intuited under the covers using a few shopworn rules of thumb. In any case, the list is returned in the order returned from the Perforce server, and the raw fields map is assumed to contain authoritative field values.

IJob objects are currently always complete, are updateable, but not refreshable. Setter methods below will not affect the corresponding job on the Perforce server unless an update is performed.


Method Summary
 String getDescription()
           
 String getId()
           
 IJobSpec getJobSpec()
           
 Map<String,Object> getRawFields()
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setJobSpec(IJobSpec jobSpec)
           
 void setRawFields(Map<String,Object> rawFields)
           
 String updateOnServer()
          Deprecated. use the IServerResource update method instead if possible.
 
Methods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, refresh, setServer, update, update, update
 

Method Detail

getId

String getId()

setId

void setId(String id)

getDescription

String getDescription()

setDescription

void setDescription(String description)

getJobSpec

IJobSpec getJobSpec()

setJobSpec

void setJobSpec(IJobSpec jobSpec)

getRawFields

Map<String,Object> getRawFields()

setRawFields

void setRawFields(Map<String,Object> rawFields)

updateOnServer

String updateOnServer()
                      throws ConnectionException,
                             RequestException,
                             AccessException
Deprecated. use the IServerResource update method instead if possible.

Update the underlying Perforce job associated with this object in the Perforce server.

Basically a convenience method for IServer.updateJob(job).

Returns:
possibly-null Perforce server-generated status resulting from operation.
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


Copyright © 2015 Perforce Software. All Rights Reserved.