|
||||||||
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.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,
String name)
Constructor that is passed the client name. |
|
Client(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,
String name)
Returns a Client with the specified name, or null if not found. |
static Client |
getClient(String name)
Returns a Client with the specified name, or null if not found. |
static Iterator |
getClientIterator(Env env)
|
static Enumeration |
getClients(Env env)
|
String |
getOptions()
Returns the Client options. |
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 Enumeration |
lookupClient(Env env,
String prefix)
Returns a list of clients that begin with the specified prefix. |
static Enumeration |
lookupClient(String prefix)
Returns a list of clients that begin with the specified prefix. |
void |
setOptions(String options)
Sets the options for the Client. |
void |
setRoot(String root)
Sets the root for the Client. |
void |
sync()
Brings this object back into sync with Perforce. |
void |
sync(String name)
Synchronizes the Client 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 Client()
public Client(Env env, String name)
public Client(String name)
Method Detail |
public void commit() throws CommitException
SourceControlObject
commit
in class Mapping
public HashDecay getCache()
SourceControlObject
getCache
in class SourceControlObject
public static Client getClient(Env env, String name)
name
- Name of the client to find.public static Client getClient(String name)
getClient(Env, String)
public static Iterator getClientIterator(Env env)
env
- Environment to use when working with P4public static Enumeration getClients(Env env)
env
- Environment to use when working with P4public String getOptions()
public String getRoot()
public static void loadClients()
Hashtable
public static void loadClients(Env env)
env
- Source conrol environment to use.loadClients()
public static Enumeration lookupClient(Env env, String prefix)
env
- P4 environment to use.prefix
- Prefix for all clients to be returned.public static Enumeration lookupClient(String prefix)
prefix
- Prefix for all clients to be returnedpublic void setOptions(String options)
options
- Options of the client.public void setRoot(String root)
root
- Root of the client.public void sync()
SourceControlObject
sync
in class SourceControlObject
public void sync(String name)
sync
in class Mapping
name
- Name of the Client 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 |