|
||||||||||
| 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.Mapping
com.perforce.api.Branch
public class Branch
Representation of a source control branch. There are static class methods that can be used to list all P4 branches or to get a particular branch.
| Constructor Summary | |
|---|---|
Branch()
Default no-argument constructor. |
|
Branch(java.lang.String name)
Constructor that is passed the branch name. |
|
| Method Summary | |
|---|---|
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
static Branch |
getBranch(Env env,
java.lang.String name,
boolean force)
Returns a Branch with the specified name, or null if not found. |
static Branch |
getBranch(java.lang.String name)
Returns a Branch with the specified name, or null if not found. |
static java.util.Enumeration |
getBranches()
Deprecated. |
static java.util.Enumeration |
getBranches(Env env)
|
static java.util.Iterator |
getBranchIterator(Env env)
|
static java.util.Enumeration |
getBranchNames(Env env)
Returns list of all branch names. |
HashDecay |
getCache()
Returns the HashDecay instance for this class |
static Change |
integrate(Env env,
java.lang.String source,
java.lang.String branch,
java.lang.StringBuffer sb,
Change c)
Integrate a set of files using the named branch. |
static Change |
integrate(Env env,
java.util.Vector fents,
java.lang.String branch,
java.lang.StringBuffer sb,
Change c)
Integrate a set of files using the named branch. |
static Change |
integrate(Env env,
java.util.Vector fents,
java.lang.String branch,
java.lang.StringBuffer sb,
java.lang.String description)
Integrate a set of files using the named branch. |
Change |
integrate(java.lang.String source,
java.lang.StringBuffer sb,
Change c)
Class method for integrating using the instantiated Branch. |
static void |
loadBranches()
Loads the list of branches using the default environment. |
static void |
loadBranches(Env env)
Loads a list of all the branches into an internal class HashDecay. |
static java.util.Enumeration |
lookupBranches(java.lang.String prefix)
Returns a list of branches that begin with the specified prefix. |
void |
store()
Deprecated. Use commit() instead. |
void |
sync()
Brings this object back into sync with Perforce. |
void |
sync(java.lang.String name)
Synchronizes the Branch with the latest information from P4. |
java.lang.String |
toXML()
Returns a string containing the object in XML form. |
| Methods inherited from class com.perforce.api.Mapping |
|---|
addView, addView, compareTo, getDescription, getName, getOwner, getView, getViews, lookupMappings, setDescription, setName, setOwner, toString |
| 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 |
| Constructor Detail |
|---|
public Branch()
public Branch(java.lang.String name)
| Method Detail |
|---|
public HashDecay getCache()
SourceControlObject
getCache in interface CacheablegetCache in class SourceControlObjectpublic static java.util.Enumeration lookupBranches(java.lang.String prefix)
prefix - Prefix for all branches to be returned
public static void loadBranches()
Envpublic static void loadBranches(Env env)
env - Environment to use when working with P4HashDecaypublic static java.util.Enumeration getBranchNames(Env env)
Enumeration of Strings containing
branch names.public static java.util.Enumeration getBranches()
Enumeration of Branches.public static java.util.Enumeration getBranches(Env env)
env - Source control environment.
Enumeration of Branches.public static java.util.Iterator getBranchIterator(Env env)
env - Source control environment.
Iterator of Branches.public static Branch getBranch(java.lang.String name)
name - Name of the branch to find.
public static Branch getBranch(Env env,
java.lang.String name,
boolean force)
env - Environment to use when working with P4.name - Name of the branch to find.force - Indicates that the Branch should be sync'd.
public static Change integrate(Env env,
java.util.Vector fents,
java.lang.String branch,
java.lang.StringBuffer sb,
java.lang.String description)
throws CommitException,
PerforceException
env - environment to use when working with P4.fents - list of FileEntries to be integrated.branch - name of the branch to integrate with.sb - buffer that will contain a log of the integration.description - description to be used for the Change created.
CommitException
PerforceExceptionChange
public static Change integrate(Env env,
java.util.Vector fents,
java.lang.String branch,
java.lang.StringBuffer sb,
Change c)
throws PerforceException
env - environment to use when working with P4.fents - list of FileEntries to be integrated.branch - name of the branch to integrate with.sb - buffer that will contain a log of the integration.c - Change to be used to contain the integrated files.
PerforceExceptionChange
public Change integrate(java.lang.String source,
java.lang.StringBuffer sb,
Change c)
throws PerforceException
source - source files to integrate from.sb - buffer that will contain a log of the integration.c - Change to be used to contain the integrated files.
PerforceExceptionintegrate(Env,String,String,StringBuffer,Change)
public static Change integrate(Env env,
java.lang.String source,
java.lang.String branch,
java.lang.StringBuffer sb,
Change c)
throws PerforceException
env - environment to use when working with P4.source - source files to integrate from.branch - name of the branch to integrate with.sb - buffer that will contain a log of the integration.c - Change to be used to contain the integrated files.
PerforceExceptionChange
public void store()
throws CommitException
commit() instead.
CommitException
public void commit()
throws CommitException
SourceControlObject
commit in interface Cacheablecommit in class MappingCommitExceptionpublic void sync()
SourceControlObject
sync in interface Cacheablesync in class SourceControlObjectpublic void sync(java.lang.String name)
sync in class Mappingname - Name of the Branch to synchronize.public java.lang.String toXML()
SourceControlObject
toXML in class Mapping
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||