|
||||||||
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.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.
HashDecay
Constructor Summary | |
User()
Default no-argument constructor. |
|
User(String id)
Constructor that accepts the id of the user. |
Method Summary | |
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
HashDecay |
getCache()
|
String |
getEmail()
Returns the e-mail address for this user. |
String |
getFullName()
Returns the full name of this user. |
String |
getId()
Returns the id for this user. |
static User |
getUser(Env env,
String uid)
|
static User |
getUser(String uid)
Gets the user information for the specified user. |
static Enumeration |
getUsers()
|
static Enumeration |
getUsers(Env env)
|
static void |
main(String[] argv)
|
void |
setEmail(String email)
Sets the e-mail address for this user. |
void |
setFullName(String fullname)
Sets the full name of this user. |
void |
setId(String id)
Sets the id for this user. |
void |
sync()
Synchronizes the user information with P4. |
void |
sync(String id)
Synchronizes the user information with P4. |
String |
toString()
|
Methods inherited from class com.perforce.api.SourceControlObject |
clearCache, getEnv, getSyncTime, getUpdateTime, inSync, invalidate, outOfSync, refreshUpdateTime, setEnv, toXML |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public User()
public User(String id)
id
- Id for the user.Method Detail |
public void commit()
SourceControlObject
commit
in class SourceControlObject
public HashDecay getCache()
getCache
in class SourceControlObject
public String getEmail()
public String getFullName()
public String getId()
public static User getUser(Env env, String uid)
public static User getUser(String uid)
If the user information must be up to date, then the
sync() method must be called.
uid
- The user id of the user information to get from p4.
public static Enumeration getUsers()
public static Enumeration getUsers(Env env)
public static void main(String[] argv)
public void setEmail(String email)
email
- Email address for the user.public void setFullName(String fullname)
fullname
- The full name for the user.public void setId(String id)
id
- Id for the user.public void sync()
sync
in class SourceControlObject
public void sync(String id)
id
- The user id for this to synchronize from p4.public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |