|
||||||||||
| 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.Client
public final class Client
Representation of a source control client. This class can be used to retrieve and hold p4 client information. It's class methods can be used to list all loaded clients or list those beginning with a particular prefix. Before these class methods are called, the class method loadClients() must be called to ensure the client list is up to date.
| Constructor Summary | |
|---|---|
Client()
Default no-argument constructor. |
|
Client(Env env,
java.lang.String name)
Constructor that is passed the client name. |
|
Client(java.lang.String name)
Constructor that is passed the client 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 Client |
getClient(Env env,
java.lang.String name)
Returns a Client with the specified name, or null if not found. |
static Client |
getClient(java.lang.String name)
Returns a Client with the specified name, or null if not found. |
static java.util.Iterator |
getClientIterator(Env env)
|
static java.util.Enumeration |
getClients()
Deprecated. |
static java.util.Enumeration |
getClients(Env env)
|
java.lang.String |
getOptions()
Returns the Client options. |
java.lang.String |
getRoot()
Returns the Client root. |
static void |
loadClients()
Loads a list of all the clients into an internal class Hashtable. |
static void |
loadClients(Env env)
Loads a list of all the clients into an internal class Hashtable. |
static java.util.Enumeration |
lookupClient(Env env,
java.lang.String prefix)
Returns a list of clients that begin with the specified prefix. |
static java.util.Enumeration |
lookupClient(java.lang.String prefix)
Returns a list of clients that begin with the specified prefix. |
static void |
main(java.lang.String[] argv)
Deprecated. Actually in use, but this keeps it out of the docs. |
void |
setOptions(java.lang.String options)
Sets the options for the Client. |
void |
setRoot(java.lang.String root)
Sets the root for the Client. |
void |
store()
Deprecated. Use commit() instead. |
void |
sync()
Brings this object back into sync with Perforce. |
void |
sync(java.lang.String name)
Synchronizes the Client 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 Client()
public Client(java.lang.String name)
public Client(Env env,
java.lang.String name)
| Method Detail |
|---|
public HashDecay getCache()
SourceControlObject
getCache in interface CacheablegetCache in class SourceControlObjectpublic void setOptions(java.lang.String options)
options - Options of the client.public java.lang.String getOptions()
public void setRoot(java.lang.String root)
root - Root of the client.public java.lang.String getRoot()
public static Client getClient(Env env,
java.lang.String name)
name - Name of the client to find.public static Client getClient(java.lang.String name)
getClient(Env, String)
public static java.util.Enumeration lookupClient(Env env,
java.lang.String prefix)
env - P4 environment to use.prefix - Prefix for all clients to be returned.
public static java.util.Enumeration lookupClient(java.lang.String prefix)
prefix - Prefix for all clients to be returned
public static java.util.Enumeration getClients()
public static java.util.Enumeration getClients(Env env)
env - Environment to use when working with P4
public static java.util.Iterator getClientIterator(Env env)
env - Environment to use when working with P4
public static void loadClients()
Hashtablepublic static void loadClients(Env env)
env - Source conrol environment to use.loadClients()
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 Client to synchronize.public java.lang.String toXML()
SourceControlObject
toXML in class Mappingpublic static void main(java.lang.String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||