|
||||||||||
| 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.User
public final class User
Representation of a source control user. Each instance can store one p4 user's information. The class methods can be used to get a particular user. If that user has been gotten before, their user information will not be reloaded from P4. It is instead loaded from an internal HashDecay.
If the user information must be up to date, then the sync() method must be called.
TBD: The current implementation does NOT handle the "reviews" information for each user. Should User extend Mapping?
HashDecay| Constructor Summary | |
|---|---|
User()
Default no-argument constructor. |
|
User(java.lang.String id)
Constructor that accepts the id of the user. |
|
| Method Summary | |
|---|---|
void |
commit()
TBD: The commit method is not working yet. |
HashDecay |
getCache()
Returns the HashDecay instance for this class |
java.lang.String |
getEmail()
Returns the e-mail address for this user. |
java.lang.String |
getFullName()
Returns the full name of this user. |
java.lang.String |
getId()
Returns the id for this user. |
static User |
getUser(Env env,
java.lang.String uid)
Gets the user information for the specified user. |
static User |
getUser(java.lang.String uid)
Deprecated. Use method with Env parameter. |
static java.util.Enumeration |
getUsers()
Returns an Enumeration of all User objects. |
static java.util.Enumeration |
getUsers(Env env)
Returns an Enumeration of all User objects. |
static void |
main(java.lang.String[] argv)
Deprecated. Actually in use, but this keeps it out of the docs. |
void |
setEmail(java.lang.String email)
Sets the e-mail address for this user. |
void |
setFullName(java.lang.String fullname)
Sets the full name of this user. |
void |
setId(java.lang.String id)
Sets the id for this user. |
void |
sync()
Synchronizes the user information with P4. |
void |
sync(java.lang.String id)
Synchronizes the user information with P4. |
java.lang.String |
toString()
|
java.lang.String |
toXML()
Returns a string containing the object in XML form. |
| 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 User()
public User(java.lang.String id)
id - Id for the user.| Method Detail |
|---|
public HashDecay getCache()
SourceControlObject
getCache in interface CacheablegetCache in class SourceControlObjectpublic void setId(java.lang.String id)
id - Id for the user.public static java.util.Enumeration getUsers()
Enumeration of all User objects.
public static java.util.Enumeration getUsers(Env env)
Enumeration of all User objects.
public static User getUser(java.lang.String uid)
If the user information must be up to date, then the sync() method must be called.
uid - User id that is requested.
public static User getUser(Env env,
java.lang.String uid)
If the user information must be up to date, then the sync() method must be called.
env - Source control environment to use.uid - The user id of the user information to get from p4.
public java.lang.String getId()
public void setEmail(java.lang.String email)
email - Email address for the user.public java.lang.String getEmail()
public void setFullName(java.lang.String fullname)
fullname - The full name for the user.public java.lang.String getFullName()
public void commit()
commit method is not working yet.
commit in interface Cacheablecommit in class SourceControlObjectpublic void sync(java.lang.String id)
id - The user id for this to synchronize from p4.public void sync()
sync in interface Cacheablesync in class SourceControlObjectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXML()
SourceControlObject
toXML in class SourceControlObjectpublic static void main(java.lang.String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||