|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.generic.core.Job
public class Job
Simple generic default implementation class for the IJob interface.
Field Summary | |
---|---|
int |
SHORT_DESCR_LENGTH
The max description length for "short" or summary descriptions |
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource |
---|
refreshable, server, updateable |
Constructor Summary | |
---|---|
Job(IServer server,
Map<String,Object> map)
|
|
Job(IServer server,
Map<String,Object> map,
boolean longDescriptions)
|
Method Summary | |
---|---|
String |
getDescription()
|
protected String |
getDescriptionString(Map<String,Object> map,
boolean longDescriptions)
|
String |
getId()
|
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)
|
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()
Update the underlying Perforce job associated with this object in the Perforce server. |
Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource |
---|
canRefresh, canUpdate, complete, setRefreshable, setServer, update, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.perforce.p4java.core.IServerResource |
---|
canRefresh, canUpdate, setServer, update, update |
Field Detail |
---|
public int SHORT_DESCR_LENGTH
Constructor Detail |
---|
public Job(IServer server, Map<String,Object> map)
public Job(IServer server, Map<String,Object> map, boolean longDescriptions)
Method Detail |
---|
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 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 request
AccessException
- if the Perforce server denies access to the callerServerResource.refresh()
public 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 request
AccessException
- if the Perforce server denies access to the callerNOTE: do not use this method if the server field has not been set.
public 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 request
AccessException
- if the Perforce server denies access to the callerIServerResource.update()
public String getDescription()
getDescription
in interface IJob
IJob.getDescription()
public String getId()
getId
in interface IJob
IJob.getId()
public IJobSpec getJobSpec()
getJobSpec
in interface IJob
IJob.getJobSpec()
public Map<String,Object> getRawFields()
getRawFields
in interface IJob
IJob.getRawFields()
public void setId(String id)
setId
in interface IJob
IJob.setId(java.lang.String)
public void setRawFields(Map<String,Object> rawFields)
setRawFields
in interface IJob
IJob.setRawFields(java.util.Map)
public void setDescription(String description)
setDescription
in interface IJob
IJob.setDescription(java.lang.String)
public void setJobSpec(IJobSpec jobSpec)
setJobSpec
in interface IJob
IJob.setJobSpec(com.perforce.p4java.core.IJobSpec)
protected String getJobIdString(Map<String,Object> map)
protected String getDescriptionString(Map<String,Object> map, boolean longDescriptions)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |