public class Job extends ServerResource implements IJob
| Modifier and Type | Field and Description |
|---|---|
static int |
SHORT_DESCR_LENGTH
The max description length for "short" or summary descriptions
|
refreshable, server, updateable| Constructor and Description |
|---|
Job(IServer server,
java.util.Map<java.lang.String,java.lang.Object> map) |
Job(IServer server,
java.util.Map<java.lang.String,java.lang.Object> map,
boolean longDescriptions) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription() |
protected java.lang.String |
getDescriptionString(java.util.Map<java.lang.String,java.lang.Object> map,
boolean longDescriptions) |
java.lang.String |
getId()
get job name
|
protected java.lang.String |
getJobIdString(java.util.Map<java.lang.String,java.lang.Object> map) |
IJobSpec |
getJobSpec() |
static Job |
newJob(IServer server,
java.util.Map<java.lang.String,java.lang.Object> map)
Simple factory method for creating a new Job class.
|
void |
refresh()
This method will refresh by getting the complete job model.
|
void |
setDescription(java.lang.String description) |
void |
setId(java.lang.String id)
Set job name
|
void |
setJobSpec(IJobSpec jobSpec) |
void |
update()
Update the Perforce server object associated with the underlying P4Java object,
if possible.
|
java.lang.String |
updateOnServer()
Deprecated.
use update() instead.
|
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, parseDate, setRawField, setRawFields, setRefreshable, setServer, toDateString, update, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, setRawField, setRawFields, setServer, update, updatepublic static int SHORT_DESCR_LENGTH
public Job(IServer server, java.util.Map<java.lang.String,java.lang.Object> map)
public Job(IServer server, java.util.Map<java.lang.String,java.lang.Object> map, boolean longDescriptions)
public static Job newJob(IServer server, java.util.Map<java.lang.String,java.lang.Object> map)
server - non-null IServer to be associated with this job.map - non-null fields map for the job to be created.public void refresh()
throws ConnectionException,
RequestException,
AccessException
refresh in interface IServerResourcerefresh in class ServerResourceConnectionException - 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 callerIServerResource.refresh()@Deprecated
public java.lang.String updateOnServer()
throws ConnectionException,
RequestException,
AccessException
IJobBasically a convenience method for IServer.updateJob(job).
updateOnServer in interface IJobConnectionException - 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 callerpublic void update()
throws ConnectionException,
RequestException,
AccessException
IServerResourceThe results of calling this method on objects whose canUpdate method returns false are undefined (but will generally result in a UnimplementedError being thrown).
update in interface IServerResourceupdate in class ServerResourceConnectionException - 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 callerIServerResource.update()public java.lang.String getDescription()
getDescription in interface IJobpublic java.lang.String getId()
public IJobSpec getJobSpec()
getJobSpec in interface IJobpublic void setId(java.lang.String id)
public void setDescription(java.lang.String description)
setDescription in interface IJobpublic void setJobSpec(IJobSpec jobSpec)
setJobSpec in interface IJobprotected java.lang.String getJobIdString(java.util.Map<java.lang.String,java.lang.Object> map)
protected java.lang.String getDescriptionString(java.util.Map<java.lang.String,java.lang.Object> map,
boolean longDescriptions)