|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.perforce.api.SourceControlObject
com.perforce.api.Job
public final class Job
Representation of a source control job. This class can be used to determine information for a particular p4 job. It can be constructed using the job name, but will not contain any additional change information until the sync() method is called.
| Field Summary | |
|---|---|
static int |
CLOSED
Indicates that the Job is closed. |
static int |
OPEN
Indicates that the Job is open. |
static int |
SUSPENDED
Indicates that the Job is suspended. |
| Constructor Summary | |
|---|---|
Job()
|
|
Job(Env env)
Default no-argument constructor. |
|
Job(Env env,
java.lang.String name)
|
|
Job(java.lang.String name)
Constructor that accepts the job number. |
|
| Method Summary | |
|---|---|
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
static void |
fix(Env env,
java.lang.String changelist,
boolean del,
java.lang.String job)
|
static void |
fix(Env env,
java.lang.String changelist,
boolean del,
java.util.Vector jobs)
|
HashDecay |
getCache()
Returns the HashDecay instance for this class |
static Change[] |
getChangeFixes(Env env,
java.lang.String jobname,
java.lang.String[] files)
Returns an array of changes that are fixed by the named job, limited to the list of files if specified. |
Change[] |
getChanges()
|
java.lang.String |
getDescription()
Returns the description for the Job. |
java.lang.String |
getField(java.lang.String name)
|
java.util.Enumeration |
getFieldNames()
|
java.util.Vector |
getFileEntries()
|
static Job |
getJob(Env env,
java.lang.String name)
Returns the job with the specified name. |
static Job |
getJob(java.lang.String name)
Returns the job with the specified name. |
static Job[] |
getJobFixes(Env env,
java.lang.String change,
java.lang.String[] files)
Returns an array of jobs that fix the specified change, limited to the list of files if specified. |
static Job[] |
getJobs(Env env)
|
static Job[] |
getJobs(Env env,
java.lang.String jobview,
int max,
boolean use_integs,
java.lang.String[] files)
|
java.lang.String |
getModtimeString()
Returns the job's modification time |
java.lang.String |
getName()
Returns the name of this Job. |
int |
getStatus()
Returns the status for the Job. |
java.lang.String |
getStatusName()
|
java.lang.String |
getUser()
Returns the User that owns this Job. |
static void |
main(java.lang.String[] args)
Deprecated. Actually in use, but this keeps it out of the docs. |
void |
removeFix(int changelist)
|
void |
setDescription(java.lang.String description)
Sets the description for the job. |
void |
setField(java.lang.String name,
java.lang.String value)
|
void |
setModtimeString(java.lang.String modtime)
Sets the job's modification time |
void |
setName(java.lang.String name)
Sets the job name for the Job. |
void |
setStatus(int status)
Sets status for the Job. |
void |
setStatus(java.lang.String status)
Sets status for the Job. |
void |
setUser(java.lang.String user)
Sets the User that owns this Job. |
void |
store()
Deprecated. Use commit() instead. |
void |
sync()
Synchronizes the Job with the correct information from P4, using whatever job number has already been set in the Job. |
void |
sync(java.lang.String name)
Sycnhronizes the Job with the correct information from P4. |
java.lang.String |
toString()
Overrides the default toString() method. |
java.lang.String |
toXML()
Returns a string containing the object in XML form. |
| Methods inherited from class com.perforce.api.SourceControlObject |
|---|
clearCache, getEnv, getSyncTime, getUpdateTime, inSync, invalidate, outOfSync, refreshUpdateTime, setEnv |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int OPEN
public static final int CLOSED
public static final int SUSPENDED
| Constructor Detail |
|---|
public Job(Env env)
public Job(java.lang.String name)
name - Job namepublic Job()
public Job(Env env,
java.lang.String name)
| Method Detail |
|---|
public HashDecay getCache()
SourceControlObject
getCache in interface CacheablegetCache in class SourceControlObjectpublic static Job getJob(java.lang.String name)
public static Job getJob(Env env,
java.lang.String name)
public java.lang.String getModtimeString()
public void setModtimeString(java.lang.String modtime)
public void setName(java.lang.String name)
name - Job namepublic java.lang.String getName()
public void setUser(java.lang.String user)
user - Owning user.public java.lang.String getUser()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public java.util.Enumeration getFieldNames()
public void setField(java.lang.String name,
java.lang.String value)
public java.lang.String getField(java.lang.String name)
public java.util.Vector getFileEntries()
public void setStatus(java.lang.String status)
public void setStatus(int status)
public int getStatus()
public java.lang.String getStatusName()
public void store()
throws CommitException
commit() instead.
CommitException
public void commit()
throws CommitException
SourceControlObject
commit in interface Cacheablecommit in class SourceControlObjectCommitExceptionpublic void sync()
sync in interface Cacheablesync in class SourceControlObjectpublic void sync(java.lang.String name)
number - Job number
public static void fix(Env env,
java.lang.String changelist,
boolean del,
java.lang.String job)
public static void fix(Env env,
java.lang.String changelist,
boolean del,
java.util.Vector jobs)
public void removeFix(int changelist)
public java.lang.String toString()
toString in class java.lang.Objectpublic static Job[] getJobs(Env env)
public static Job[] getJobs(Env env,
java.lang.String jobview,
int max,
boolean use_integs,
java.lang.String[] files)
public Change[] getChanges()
public static Change[] getChangeFixes(Env env,
java.lang.String jobname,
java.lang.String[] files)
env - Perforce environment to use.jobname - Named job to get fixes for.files - array of files (including wildcards) used to limit to lookup.
public static Job[] getJobFixes(Env env,
java.lang.String change,
java.lang.String[] files)
env - Perforce environment to use.change - Change number (as a String) to lookup jobs
for.files - array of files (including wildcards) used to limit to lookup.
public java.lang.String toXML()
SourceControlObject
toXML in class SourceControlObjectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||