|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.TypedResource
com.starteam.LiveObject
com.starteam.TrackedObject
com.starteam.Principal
com.starteam.User
public final class User
Represents a StarTeam User. Some of the information is accessible only to
users with appropriate permissions. Applications which require only a subset
of user data should use Server.getUsers().Applications
which require the complete account information for all users should use
ServerAdministration.getUsers(). The logged in user
however needs to have permission
Permission.SERVER_ADMIN_USER_ACCOUNTS granted for
accessing the complete user account information.
| Nested Class Summary | |
|---|---|
static class |
User.DayOfWeek
The day of week |
static class |
User.GeographicTerritory
The accessible territory for the logged in User Account. |
static class |
User.License
The current license . |
static class |
User.LoginHistory
A history of User logins introduced with the 12.0 server release |
static class |
User.LogOnPolicy
The current logon access policy of the User Account. |
static class |
User.Status
The current status of the User Account. |
static class |
User.Type
The Type of the User |
static class |
User.WebCacheUser
User accessor for cached SDK Users contained objects are obtained from the artifact cache |
| Nested classes/interfaces inherited from class com.starteam.Principal |
|---|
Principal.WebCachePrincipal |
| Nested classes/interfaces inherited from class com.starteam.TrackedObject |
|---|
TrackedObject.WebCacheTrackedObject |
| Nested classes/interfaces inherited from class com.starteam.LiveObject |
|---|
LiveObject.WebCacheLiveObject |
| Nested classes/interfaces inherited from class com.starteam.TypedResource |
|---|
TypedResource.BranchState |
| Field Summary | |
|---|---|
static User |
LOGGED_IN_USER
The Logged In User. |
| Constructor Summary | |
|---|---|
User(Server server)
Creates a new User account to be activated on the server. |
|
| Method Summary | |
|---|---|
void |
addTo(Group group)
Adds this User to the specified group. |
User |
copy()
Creates a copy of this User object. |
boolean |
equals(java.lang.Object another)
Returns true if the specified Object identifies the same
exact User. |
void |
forceLogoff()
Forces this User account to be logged off from the server. |
void |
forcePasswordChange()
Forces a password change for this User account. |
int |
getAccessEndTime1(User.DayOfWeek dayOfWeek)
Returns the end time for the specified day for the first custom access policy. |
int |
getAccessEndTime2(User.DayOfWeek dayOfWeek)
Returns the end time for the specified day for the second custom access policy. |
User.LogOnPolicy |
getAccessPolicy()
Return's this account's access policy. |
int |
getAccessStartTime1(User.DayOfWeek dayOfWeek)
Returns the start time for the specified day for the first custom access policy. |
int |
getAccessStartTime2(User.DayOfWeek dayOfWeek)
Returns the start time for the specified day for the second custom access policy. |
User.Status |
getAccountStatus()
Returns this account's status. |
int |
getBLSSlipGuid()
Gets the Slip ID assigned to this license. |
Date[] |
getCapacityOverriddenOn(Project p)
Returns the set of dates for which capacities have been overridden |
DateTime |
getCreatedTime()
Gets the time at which this User was created. |
double |
getDefaultCapacity(Project p)
Returns the default capacity assigned to a specific project |
java.lang.String |
getDisplayName()
Gets a short string that can be used to refer to this User in an application's user interface. |
java.lang.String |
getDistinguishedName()
Gets the Distinguished Name for Directory Service. |
java.lang.String |
getEmailAddress()
Returns the User's email address. |
Project[] |
getFavoriteProjects()
Returns the User's Favorite Projects. |
java.lang.String |
getFaxNumber()
Returns the User's fax number. |
Group[] |
getGroups()
Returns all of the groups to which this User belongs. |
boolean |
getHasFixedLicense()
Determines whether this User has a fixed ( named-User ) license or a floating ( concurrent ) license. |
int |
getID()
Returns an integer ID that represents this User account. |
DateTime |
getLastWebLogoutTime()
Gets the time the user last logged out from the webserver. |
User.License |
getLicenseType()
Gets the type of license assigned to this User. |
User.LoginHistory[] |
getLogins()
Returns a history of logins for this User Login History has been introduced with the 12.0 server release |
int |
getLogOnCount()
Returns the number of times this User is logged in to the server. |
java.lang.String |
getLogOnName()
Returns the logon name or identifier for this account. |
int |
getMinimumPasswordLength()
Returns the minimum required password length. |
java.lang.String |
getName()
Returns the User's name. |
double |
getOverriddenCapacity(Project p,
Date d)
Return the overridden capacity for the project for the specified week |
java.lang.String |
getPagerNumber()
Returns the User's pager number. |
boolean |
getPasswordChangeRequired()
Determines whether or not a password change is required during the current session. |
int |
getPasswordDaysRemaining()
Returns the number of days remaining that the user's current password will remain valid. |
java.lang.String |
getPhoneNumber()
Returns the User's phone number. |
Content |
getPicture()
Returns the Content object used to store a picture of this user |
int |
getPolicyTimeZoneShift()
Return's the timezone shift for this account's access policy. |
java.lang.String |
getPostalAddress()
Returns the User's postal address. |
int |
getPresentationID()
Returns the unique integer identifier for this user. |
User.Type.PropertyCollection |
getProperties()
Returns the properties of the User Type |
Server |
getServer()
Returns the Server object to which this User belongs. |
User.GeographicTerritory |
getTerritory()
Returns the Territory this User belongs to |
boolean |
getValidateThroughDirectoryService()
Indicates whether the User validates through Directory Service. |
java.lang.Object |
getValue(Property property)
Return the value for the specified property. |
java.lang.String |
getVoiceMailNumber()
Returns the User's voice mail number. |
int |
getWebLogOnCount()
Returns the number of times this User is logged in via the webserver. |
java.lang.String[] |
getWorkstations()
Currently unused. |
boolean |
hasDefaultCapacity(Project p)
Returns true if this user has a default capacity assigned to a specific project |
int |
hashCode()
Returns a hash code for this User. |
boolean |
hasOverriddenCapacity(Project p,
Date d)
return true if the default capacity is overwritten for a specified week the date will typically be specified as a Monday, implying the week coverage |
boolean |
isBuiltIn()
Returns true if this is a built in user When a tenant is created, the system creates a built in user with full administrative privileges. |
boolean |
isDeleted()
Returns true if this User has been deleted. |
boolean |
isDirty()
Returns true if any property has been modified from the
original value (including properties set on new items). |
boolean |
isEqualTo(User account)
Compares two User objects. |
boolean |
isMemberOf(Group group)
Determines whether or not this user is a member of the given group. |
boolean |
isNew()
Tells if this User account has been created on the server yet. |
void |
reactivate()
Reactivates this User account. |
void |
remove()
Removes this User account from the server, and from any group of which it is a member. |
void |
removeFrom(Group group)
Removes this User from the specified group. |
void |
setAccessPolicy(User.LogOnPolicy policy)
Changes this account's access policy. |
void |
setAccessTimes(User.DayOfWeek dayOfWeek,
int start1,
int end1,
int start2,
int end2)
Changes the custom access policy start and end times for the specified day of the week. |
void |
setBLSSlipGuid(int nSlipGuid)
Sets the Slip ID assigned to this license. |
void |
setDefaultCapacity(Project p,
double capacity)
Set the default capacity for a given project. |
void |
setDistinguishedName(java.lang.String distinguishedName)
Sets the Distinguished Name for Directory Service. |
void |
setEmailAddress(java.lang.String emailAddress)
Changes the User's email address. |
void |
setFavoriteProjects(Project[] favoriteProjects)
Changes the User's favorite projects. |
void |
setFaxNumber(java.lang.String faxNumber)
Changes the User's fax number. |
void |
setHasFixedLicense(boolean bFixed)
Sets the license type for this User. |
void |
setLicenseType(User.License nLicenseType)
Sets the type of license assigned to this User. |
void |
setLogOnName(java.lang.String logOnName)
Changes the logon name for this account. |
void |
setName(java.lang.String name)
Changes the User's full name. |
void |
setOverriddenCapacity(Project p,
Date d,
double capacity)
Sets the overridden capacity for the project for the specified week |
void |
setPagerNumber(java.lang.String pagerNumber)
Changes the User's pager number. |
void |
setPassword(java.lang.String password)
Sets the password for this account. |
void |
setPhoneNumber(java.lang.String phoneNumber)
Changes the User's phone number. |
void |
setPicture(Content c)
Saves a picture of this user to the server |
void |
setPolicyTimeZoneShift(int shift)
Changes timezone shift for this account's access policy. |
void |
setPostalAddress(java.lang.String postalAddress)
Changes the User's postal address. |
void |
setTerritory(User.GeographicTerritory t)
Set the territory this User belongs to |
void |
setValidateThroughDirectoryService(boolean bValidateThroughDirectoryService)
Sets whether User validates through Directory Service. |
java.lang.Object |
setValue(Property property,
java.lang.Object value)
Sets the value of the specified property and return the old value. |
void |
setVoiceMailNumber(java.lang.String voiceMailNumber)
Changes the User's voice mail number. |
void |
suspend()
Suspend this User account. |
java.lang.String |
toString()
Returns the name of this User account. |
void |
unlock()
Unlocks this User account. |
void |
update()
Create or modify this User in the StarTeam Server. |
| Methods inherited from class com.starteam.TrackedObject |
|---|
getModifiedBy, getModifiedTime |
| Methods inherited from class com.starteam.LiveObject |
|---|
getCreatedBy, toStarTeamURL |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final User LOGGED_IN_USER
Server.getLoggedInUser()| Constructor Detail |
|---|
public User(Server server)
update() is called.
server - the server where the new account is to be created| Method Detail |
|---|
public boolean isDirty()
true if any property has been modified from the
original value (including properties set on new items). Modified
properties are saved by a call to update().
isDirty in class Principalpublic User.Type.PropertyCollection getProperties()
public Server getServer()
getServer in class Principalpublic java.lang.String getDisplayName()
getDisplayName in class TypedResourcepublic java.lang.String getName()
getName in class PrincipalUser.WebCacheUser.getName(),
User.WebCacheUser.getLogOnName()public boolean isBuiltIn()
public boolean isDeleted()
isDeleted in class Principalpublic int getMinimumPasswordLength()
public boolean getPasswordChangeRequired()
ServerException - if the logged in user does not have appropriate permissionsServerAdministration.getUsers()public int getPasswordDaysRemaining()
public java.lang.Object getValue(Property property)
throws NoSuchPropertyException
getValue in class Principalproperty - the name of property to be retrieved
NoSuchPropertyException - if the named property does not exist
public java.lang.Object setValue(Property property,
java.lang.Object value)
throws NoSuchPropertyException,
java.lang.ClassCastException
setValue in class Principalproperty - the property to setvalue - the new value to set for the specified property
NoSuchPropertyException - if the named property does not exist
java.lang.ClassCastException - if the value is of the wrong type for the specified propertypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object another)
Object identifies the same
exact User.
equals in class java.lang.Objectanother - the object to be compared to for equality
public User copy()
User.isEqualTo(com.starteam.User)public int getID()
getID in class Principalpublic int getPresentationID()
public void setName(java.lang.String name)
setName in class Principalname - the new name for this UserPrincipal.update()public java.lang.String getEmailAddress()
ServerException - if the logged in user does not have appropriate permissionspublic void setEmailAddress(java.lang.String emailAddress)
emailAddress - the new email address for this Userpublic java.lang.String getPostalAddress()
ServerException - if the logged in user does not have appropriate permissionspublic void setPostalAddress(java.lang.String postalAddress)
postalAddress - the User's new postal addresspublic java.lang.String getFaxNumber()
ServerException - if the logged in user does not have appropriate permissionspublic void setFaxNumber(java.lang.String faxNumber)
faxNumber - the User's new fax number.public java.lang.String getPagerNumber()
ServerException - if the logged in user does not have appropriate permissionspublic void setPagerNumber(java.lang.String pagerNumber)
pagerNumber - the User's new pager number.public java.lang.String getPhoneNumber()
ServerException - if the logged in user does not have appropriate permissionspublic void setPhoneNumber(java.lang.String phoneNumber)
phoneNumber - the User's new phone number.public java.lang.String getVoiceMailNumber()
ServerException - if the logged in user does not have appropriate permissionspublic void setVoiceMailNumber(java.lang.String voiceMailNumber)
voiceMailNumber - the User's new voice mail number.public Project[] getFavoriteProjects()
public void setFavoriteProjects(Project[] favoriteProjects)
favoriteProjects - the User's favorite Projects.public java.lang.String getLogOnName()
ServerException - if the logged in user does not have appropriate permissionspublic void setLogOnName(java.lang.String logOnName)
logOnName - the new logon name for this account
ServerException - if the logged in user does not have appropriate permissionspublic boolean hasDefaultCapacity(Project p)
p - the project to test against
public double getDefaultCapacity(Project p)
p - the project
public void setDefaultCapacity(Project p,
double capacity)
p - the projectcapacity - the default capacity to be assigned to this project
public boolean hasOverriddenCapacity(Project p,
Date d)
p - the projectd - the Monday of the week
public double getOverriddenCapacity(Project p,
Date d)
p - the projectd - the Monday of the week
public Date[] getCapacityOverriddenOn(Project p)
p - the project to test for
public void setOverriddenCapacity(Project p,
Date d,
double capacity)
p - the projectd - the Monday of the weekcapacity - the capacity for the weekpublic void setPassword(java.lang.String password)
password - the new password for this accountpublic User.Status getAccountStatus()
User.suspend() or User.reactivate() or User.forceLogoff()
ServerException - if the logged in user does not have appropriate permissionspublic Content getPicture()
public void setPicture(Content c)
c - the Content object describing a picture of this userpublic User.LogOnPolicy getAccessPolicy()
ServerException - if the logged in user does not have appropriate permissionspublic void setAccessPolicy(User.LogOnPolicy policy)
policy - this account's new access policypublic int getPolicyTimeZoneShift()
POLICY_ALWAYS. The
value is in hours from GMT.
ServerException - if the logged in user does not have appropriate permissionsUser.setPolicyTimeZoneShift(int)public void setPolicyTimeZoneShift(int shift)
shift - the new timezone shift for this account's access policy.User.getPolicyTimeZoneShift()public int getLogOnCount()
ServerException - if the logged in user does not have appropriate permissionspublic int getWebLogOnCount()
ServerException - if the logged in user does not have appropriate permissionsServerAdministration.getUsers()public DateTime getLastWebLogoutTime()
public java.lang.String[] getWorkstations()
ServerException - if the logged in user does not have appropriate permissionspublic boolean getValidateThroughDirectoryService()
public void setValidateThroughDirectoryService(boolean bValidateThroughDirectoryService)
bValidateThroughDirectoryService - whether or not to validate through Directory Servicepublic java.lang.String getDistinguishedName()
ServerException - if the logged in user does not have appropriate permissionspublic void setDistinguishedName(java.lang.String distinguishedName)
distinguishedName - the Distinguished Name for Directory Service.public boolean getHasFixedLicense()
ServerAdministration.License.getAvailableFixedLicenses(),
ServerAdministration.License.getAvailableFloatingLicenses(),
ServerAdministration.License.getTotalFixedLicenses()public void setHasFixedLicense(boolean bFixed)
bFixed - True if this User has a fixed ( named-User ) license; false if
this User has a floating ( concurrent ) license. Note that it
is an error to set a floating license if the StarTeam Server
does not support them.ServerAdministration.License.getAvailableFixedLicenses(),
ServerAdministration.License.getAvailableFloatingLicenses()public int getAccessStartTime1(User.DayOfWeek dayOfWeek)
dayOfWeek - must be a valid day of the week
public int getAccessStartTime2(User.DayOfWeek dayOfWeek)
dayOfWeek - must be a valid day of the week
public int getAccessEndTime1(User.DayOfWeek dayOfWeek)
dayOfWeek - must be a valid day of the week
public int getAccessEndTime2(User.DayOfWeek dayOfWeek)
dayOfWeek - a valid day of the week, e.g. DAY_SUNDAY
public void setAccessTimes(User.DayOfWeek dayOfWeek,
int start1,
int end1,
int start2,
int end2)
dayOfWeek - a valid day of the week, e.g. SUNDAYstart1 - start time in minutes from midnightend1 - end time in minutes from midnightstart2 - start time in minutes from midnightend2 - end time in minutes from midnightpublic boolean isNew()
isNew in class Principalpublic java.lang.String toString()
toString in class TypedResourcepublic void addTo(Group group)
update() to save
the changes on the server.
group - the group to which this User will be added.
ServerException - if the logged in user does not have appropriate permissionspublic void removeFrom(Group group)
update()
to save the changes on the server.
group - the group from which this User will be removed.
ServerException - if the logged in user does not have appropriate permissionspublic Group[] getGroups()
User.isMemberOf(Group)public void update()
update in class Principalpublic boolean isMemberOf(Group group)
group - The group to be tested.
public void remove()
remove in class PrincipalServerException - if the logged in user does not have appropriate permissionspublic void unlock()
java.lang.IllegalStateException - if the User has not yet been created on the serverpublic void reactivate()
java.lang.IllegalStateException - if the User has not yet been created on the serverUser.getAccountStatus()public void suspend()
java.lang.IllegalStateException - if the User has not yet been created on the serverUser.getAccountStatus()public void forcePasswordChange()
java.lang.IllegalStateException - if the User has not yet been created on the serverpublic void forceLogoff()
java.lang.IllegalStateException - if the User has not yet been created on the serverUser.getAccountStatus()public boolean isEqualTo(User account)
account - The User to be compared with this one.
User.copy()public DateTime getCreatedTime()
getCreatedTime in class LiveObjectpublic User.GeographicTerritory getTerritory()
public void setTerritory(User.GeographicTerritory t)
t - the territory this User belongs topublic User.LoginHistory[] getLogins()
public User.License getLicenseType()
public void setLicenseType(User.License nLicenseType)
nLicenseType - The type of license assigned to this User.public int getBLSSlipGuid()
ServerAdministration.License.getBLSSlipGUIDs(),
ServerAdministration.License.getNumUsersForBLSLicense(int)public void setBLSSlipGuid(int nSlipGuid)
nSlipGuid - The Slip ID assigned to this license.ServerAdministration.License.getBLSSlipGUIDs(),
ServerAdministration.License.getNumUsersForBLSLicense(int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||