|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perforce.api.SourceControlObject com.perforce.api.Mapping com.perforce.api.Label
public class 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 |
Vector |
getFiles()
Returns the list of files associated with the current label |
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 Iterator |
getLabelIterator(Env env)
|
static Enumeration |
getLabelNames(Env env)
|
static Enumeration |
getLabels(Env env)
|
static void |
loadLabels(Env env)
Loads a list of all the labels into an internal class HashDecay. |
static Enumeration |
lookupLabels(Env env,
String prefix)
Returns a list of labels that begin with the specified prefix. |
static void |
main(String[] args)
|
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, 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 Label()
public Label(String name)
Method Detail |
---|
public void commit() throws CommitException
SourceControlObject
commit
in interface Cacheable
commit
in class Mapping
CommitException
public HashDecay getCache()
SourceControlObject
getCache
in interface Cacheable
getCache
in class SourceControlObject
public Vector getFiles() throws PerforceException
PerforceException
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 Iterator getLabelIterator(Env env)
env
- Environment to use when working with P4
public static Enumeration getLabelNames(Env env)
env
- Environment to use when working with P4
public static Enumeration getLabels(Env env)
env
- Environment to use when working with P4
public static void loadLabels(Env env)
env
- Environment to use when working with P4HashDecay
public static Enumeration lookupLabels(Env env, String prefix)
prefix
- Prefix for all labels to be returned
public static void main(String[] args)
public void sync()
SourceControlObject
sync
in interface Cacheable
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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |