Class Job
java.lang.Object
com.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.generic.core.Job
- All Implemented Interfaces:
IJob,IServerResource
Simple generic default implementation class for the IJob interface.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe max description length for "short" or summary descriptionsFields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDescriptionString(Map<String, Object> map, boolean longDescriptions) getId()get job nameprotected StringgetJobIdString(Map<String, Object> map) static JobSimple factory method for creating a new Job class.voidrefresh()This method will refresh by getting the complete job model.voidsetDescription(String description) voidSet job namevoidsetJobSpec(IJobSpec jobSpec) voidupdate()Update the Perforce server object associated with the underlying P4Java object, if possible.Deprecated.use update() instead.Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, parseDate, setRawField, setRawFields, setRefreshable, setServer, toDateString, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, setRawField, setRawFields, setServer, update, update
-
Field Details
-
SHORT_DESCR_LENGTH
public static int SHORT_DESCR_LENGTHThe max description length for "short" or summary descriptions
-
-
Constructor Details
-
Job
-
Job
-
-
Method Details
-
newJob
Simple factory method for creating a new Job class.- Parameters:
server- non-null IServer to be associated with this job.map- non-null fields map for the job to be created.- Returns:
- new Job object
-
refresh
This method will refresh by getting the complete job model. If this refresh is successful then this job will be marked as complete.- Specified by:
refreshin interfaceIServerResource- Overrides:
refreshin classServerResource- 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 requestAccessException- if the Perforce server denies access to the caller- See Also:
-
updateOnServer
@Deprecated public String updateOnServer() throws ConnectionException, RequestException, AccessExceptionDeprecated.use update() instead.Description copied from interface:IJobUpdate the underlying Perforce job associated with this object in the Perforce server.Basically a convenience method for IServer.updateJob(job).
- Specified by:
updateOnServerin interfaceIJob- 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 requestAccessException- if the Perforce server denies access to the caller
-
update
Description copied from interface:IServerResourceUpdate the Perforce server object associated with the underlying P4Java object, if possible. The semantics of server updates are generally object-specific and will be spelled out for each participating object.The results of calling this method on objects whose canUpdate method returns false are undefined (but will generally result in a UnimplementedError being thrown).
- Specified by:
updatein interfaceIServerResource- Overrides:
updatein classServerResource- 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 requestAccessException- if the Perforce server denies access to the caller- See Also:
-
getDescription
- Specified by:
getDescriptionin interfaceIJob
-
getId
get job name -
getJobSpec
- Specified by:
getJobSpecin interfaceIJob
-
setId
Set job name -
setDescription
- Specified by:
setDescriptionin interfaceIJob
-
setJobSpec
- Specified by:
setJobSpecin interfaceIJob
-
getJobIdString
-
getDescriptionString
-