|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.perforce.api.SourceControlObject | +--com.perforce.api.Change
Representation of a source control change. This class can be used to determine information for a particular p4 change. It can be constructed using the change number, but will not contain any additional change information until the sync() method is called.
Field Summary | |
static int |
PENDING
Indicates that the Change is pending submission. |
static int |
SUBMITTED
Indicates that the Change has been submitted. |
Constructor Summary | |
Change()
Default no-argument constructor. |
|
Change(Env environ)
|
|
Change(int number)
Constructor that accepts the change number. |
|
Change(String number)
|
Method Summary | |
void |
addFile(FileEntry fent)
Adds the given FileEntry to the changelist. |
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
String |
delete()
Delete the pending changelist. |
HashDecay |
getCache()
Returns the HashDecay instance for this class |
static Change |
getChange(Env env,
int number,
boolean force)
|
static Change |
getChange(Env env,
String number,
boolean force)
|
static Change |
getChange(int number)
|
static Change |
getChange(int number,
boolean force)
|
static Change |
getChange(String number)
|
static Change |
getChange(String number,
boolean force)
|
static Change[] |
getChanges(Env env,
String path)
|
static Change[] |
getChanges(Env env,
String path,
int max,
String start,
String end,
boolean use_integs,
String ufilter)
|
static Change[] |
getChanges(String path)
|
String |
getClientName()
|
String |
getDescription()
Returns the description for the Change. |
Vector |
getFileEntries()
Returns a Vector filled with the files (including revision numbers) that were affected by this change. |
Vector |
getFiles()
Returns a Vector filled with the files (including revision numbers) that were affected by this change. |
String |
getModtimeString()
|
int |
getNumber()
Returns the number of this Change. |
String |
getShortDescription()
|
String |
getShortDescription(boolean blurb)
|
int |
getStatus()
Returns the status for the Change. |
User |
getUser()
Returns the User that owns this Change. |
String |
resolve(boolean force)
Resolves this file. |
void |
revert()
Reverts all the files associated with a pending changelist. |
User[] |
reviews()
Determine the users that review this changelist. |
void |
setClientName(String name)
|
void |
setDescription(String description)
Sets the description for the change. |
void |
setModtimeString(String modtime)
|
void |
setNumber(int number)
Sets the change number for the Change. |
void |
setStatus(int status)
Sets status for the Change. |
void |
setUser(User user)
Sets the User that owns this Change. |
String |
submit()
Submits the change, if it is pending. |
void |
sync()
Synchronizes the Change with the correct information from P4, using whatever change number has already been set in the Change. |
void |
sync(int number)
Sycnhronizes the Change with the correct information from P4. |
String |
toString()
Overrides the default toString() method. |
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 PENDING
public static final int SUBMITTED
Constructor Detail |
public Change()
public Change(Env environ)
public Change(int number)
number
- Change numberpublic Change(String number)
Method Detail |
public void addFile(FileEntry fent) throws PerforceException
FileEntry
to the changelist. If the
changelist has not been committed to the server, that is done first.fent
- file entry to be added.public void commit() throws CommitException
SourceControlObject
commit
in class SourceControlObject
public String delete() throws PerforceException
public HashDecay getCache()
SourceControlObject
getCache
in class SourceControlObject
public static Change getChange(Env env, int number, boolean force)
public static Change getChange(Env env, String number, boolean force)
public static Change getChange(int number)
public static Change getChange(int number, boolean force)
public static Change getChange(String number)
public static Change getChange(String number, boolean force)
public static Change[] getChanges(Env env, String path) throws PerforceException
public static Change[] getChanges(Env env, String path, int max, String start, String end, boolean use_integs, String ufilter) throws PerforceException
public static Change[] getChanges(String path) throws PerforceException
public String getClientName()
public String getDescription()
public Vector getFileEntries()
Vector
of FileEntry
objects of files affected.public Vector getFiles()
Vector
of String
s of files affected.public String getModtimeString()
public int getNumber()
public String getShortDescription()
public String getShortDescription(boolean blurb)
public int getStatus()
public User getUser()
public String resolve(boolean force) throws PerforceException
force
- Indicates whether the resolve should be forced.FileEntry.resolve(boolean)
public void revert() throws PerforceException
public User[] reviews() throws PerforceException
public void setClientName(String name)
public void setDescription(String description)
public void setModtimeString(String modtime)
public void setNumber(int number)
number
- Change numberpublic void setStatus(int status)
public void setUser(User user)
user
- Owning user.public String submit() throws SubmitException
SubmitException
- If the submit fails.public void sync()
sync
in class SourceControlObject
public void sync(int number)
number
- Change numberpublic String toString()
toString
in class Object
public String toXML()
SourceControlObject
toXML
in class SourceControlObject
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |