|
||||||||
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.
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(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 |
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)
Gets the user information for the specified user. |
static Enumeration |
getUsers()
Returns an Enumeration of all User objects. |
static Enumeration |
getUsers(Env env)
Returns an Enumeration of all User objects. |
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()
|
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(String id)
id
- Id for the user.Method Detail |
public void commit()
commit
method is not working yet.commit
in class SourceControlObject
public HashDecay getCache()
SourceControlObject
getCache
in class SourceControlObject
public String getEmail()
public String getFullName()
public String getId()
public static User getUser(Env env, 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 static Enumeration getUsers()
Enumeration
of all User
objects.public static Enumeration getUsers(Env env)
Enumeration
of all User
objects.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
public String toXML()
SourceControlObject
toXML
in class SourceControlObject
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |