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, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, setRawField, setRawFields, setServer, update, update
public 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 IServerResource
refresh
in class ServerResource
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 callerIServerResource.refresh()
@Deprecated public java.lang.String updateOnServer() throws ConnectionException, RequestException, AccessException
IJob
Basically a convenience method for IServer.updateJob(job).
updateOnServer
in interface IJob
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 callerpublic void update() throws ConnectionException, RequestException, AccessException
IServerResource
The 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 IServerResource
update
in class ServerResource
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 callerIServerResource.update()
public java.lang.String getDescription()
getDescription
in interface IJob
public java.lang.String getId()
public IJobSpec getJobSpec()
getJobSpec
in interface IJob
public void setId(java.lang.String id)
public void setDescription(java.lang.String description)
setDescription
in interface IJob
public void setJobSpec(IJobSpec jobSpec)
setJobSpec
in interface IJob
protected 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)