|
||||||||
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.Mapping | +--com.perforce.api.Label
Representation of a source control lablel. There are static class methods that can be used to list all P4 labels or to get a particular label.
Constructor Summary | |
Label()
Default no-argument constructor. |
|
Label(String name)
Constructor that is passed the label name. |
Method Summary | |
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
HashDecay |
getCache()
Returns the HashDecay instance for this class |
static Label |
getLabel(Env env,
String name,
boolean force)
Returns a Label with the specified name, or null if not found. |
static Label |
getLabel(String name)
Returns a Label with the specified name, or null if not found. |
static Enumeration |
getLabelNames(Env env)
|
static Enumeration |
getLabels()
|
static Enumeration |
getLabels(Env env)
|
static void |
loadLabels()
Loads the list of labels using the default environment. |
static void |
loadLabels(Env env)
Loads a list of all the labels into an internal class HashDecay. |
static Enumeration |
lookupLabels(String prefix)
Returns a list of labels that begin with the specified prefix. |
void |
sync()
Brings this object back into sync with Perforce. |
void |
sync(String name)
Synchronizes the Label with the latest information from P4. |
String |
toXML()
Returns a string containing the object in XML form. |
Methods inherited from class com.perforce.api.Mapping |
addView, addView, 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 Label()
public Label(String name)
Method Detail |
public void commit() throws CommitException
SourceControlObject
commit
in class Mapping
public HashDecay getCache()
SourceControlObject
getCache
in class SourceControlObject
public static Label getLabel(Env env, String name, boolean force)
env
- Environment to use when working with P4.name
- Name of the label to find.force
- Indicates that the Label should be sync'd.public static Label getLabel(String name)
name
- Name of the label to find.public static Enumeration getLabelNames(Env env)
public static Enumeration getLabels()
public static Enumeration getLabels(Env env)
env
- Environment to use when working with P4public static void loadLabels()
Env
public static void loadLabels(Env env)
env
- Environment to use when working with P4HashDecay
public static Enumeration lookupLabels(String prefix)
prefix
- Prefix for all labels to be returnedpublic void sync()
SourceControlObject
sync
in class SourceControlObject
public void sync(String name)
sync
in class Mapping
name
- Name of the Label to synchronize.public String toXML()
SourceControlObject
toXML
in class Mapping
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |