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,
Map<String,Object> map) |
Job(IServer server,
Map<String,Object> map,
boolean longDescriptions) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription() |
protected String |
getDescriptionString(Map<String,Object> map,
boolean longDescriptions) |
String |
getId()
get job name
|
protected String |
getJobIdString(Map<String,Object> map) |
IJobSpec |
getJobSpec() |
Map<String,Object> |
getRawFields() |
static Job |
newJob(IServer server,
Map<String,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(String description) |
void |
setId(String id)
Set job name
|
void |
setJobSpec(IJobSpec jobSpec) |
void |
setRawFields(Map<String,Object> rawFields) |
void |
update()
Update the Perforce server object associated with the underlying P4Java object,
if possible.
|
String |
updateOnServer()
NOTE: do not use this method if the server field has not been set.
|
canRefresh, canUpdate, complete, setRefreshable, setServer, update, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanRefresh, canUpdate, setServer, update, updatepublic static int SHORT_DESCR_LENGTH
public static Job newJob(IServer server, Map<String,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()public String updateOnServer() throws ConnectionException, RequestException, AccessException
NOTE: do not use this method if the server field has not been set.
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 String getDescription()
getDescription in interface IJobpublic IJobSpec getJobSpec()
getJobSpec in interface IJobpublic Map<String,Object> getRawFields()
getRawFields in interface IJobpublic void setId(String id)
public void setRawFields(Map<String,Object> rawFields)
setRawFields in interface IJobpublic void setDescription(String description)
setDescription in interface IJobpublic void setJobSpec(IJobSpec jobSpec)
setJobSpec in interface IJobCopyright © 2017 Perforce Software. All Rights Reserved.