public final class User extends Principal
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.Modifier and Type | Class and Description |
---|---|
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
|
Principal.WebCachePrincipal
TrackedObject.WebCacheTrackedObject
LiveObject.WebCacheLiveObject
TypedResource.BranchState
Modifier and Type | Field and Description |
---|---|
static User |
LOGGED_IN_USER
The Logged In User.
|
Constructor and Description |
---|
User(Server server)
Creates a new User account to be activated on the server.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
getIsPrimaryDirectoryService()
True if this user is in the primary directory service, false if secondary.
|
DateTime |
getLastLogoutTime()
Gets the time the user last logged out.
|
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
|
java.lang.String |
getReturnEmailAddress()
Return the email address to be used for spoofing the mail server
|
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.
|
boolean |
isSSOAuthenticationEnforced()
Check if this user is required to use Single Sign-On/Multi-factor authentication to login to StarTeam server.
|
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 |
setEnforceSSOAuthentication(boolean enforceSSOAuthentication)
Enforce user to login only using Single Sign-On/Multi-Factor Authentication.
|
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 |
setIsPrimaryDirectoryService(boolean bSID) |
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 |
setReturnEmailAddress(java.lang.String emailAddress)
set the return email address for server spoofing
|
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.
|
getModifiedBy, getModifiedTime
getCreatedBy, toStarTeamURL
addToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerArrayValue, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getStringValue, getTimeSpanValue, getType, hasCachedProperties, hasValue, isDirty, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValue
public static final User LOGGED_IN_USER
Server.getLoggedInUser()
public User(Server server)
update()
is called.server
- the server where the new account is to be createdpublic 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().public User.Type.PropertyCollection getProperties()
public Server getServer()
public java.lang.String getDisplayName()
getDisplayName
in class TypedResource
public java.lang.String getName()
getName
in class Principal
User.getName()
,
User.getLogOnName()
public boolean isBuiltIn()
public boolean isDeleted()
public boolean getIsPrimaryDirectoryService()
public void setIsPrimaryDirectoryService(boolean bSID)
public boolean isSSOAuthenticationEnforced()
public void setEnforceSSOAuthentication(boolean enforceSSOAuthentication)
enforceSSOAuthentication
- if true, user is required to login only using single sign-on/multi-factor (token based) authentication.
if false, user can login using password based authentication.public 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 Principal
property
- the name of property to be retrievedNoSuchPropertyException
- if the named property does not existpublic java.lang.Object setValue(Property property, java.lang.Object value) throws NoSuchPropertyException, java.lang.ClassCastException
setValue
in class Principal
property
- the property to setvalue
- the new value to set for the specified propertyNoSuchPropertyException
- if the named property does not existjava.lang.ClassCastException
- if the value is of the wrong type for the specified propertypublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object another)
Object
identifies the same
exact User
.equals
in class java.lang.Object
another
- the object to be compared to for equalitypublic User copy()
User.isEqualTo(com.starteam.User)
public int getID()
public int getPresentationID()
public void setName(java.lang.String name)
setName
in class Principal
name
- the new name for this UserPrincipal.update()
public java.lang.String getEmailAddress()
ServerException
- if the logged in user does not have appropriate permissionspublic java.lang.String getReturnEmailAddress()
public void setReturnEmailAddress(java.lang.String emailAddress)
emailAddress
- the return email address for server spoofingpublic 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 accountServerException
- if the logged in user does not have appropriate permissionspublic boolean hasDefaultCapacity(Project p)
p
- the project to test againstpublic double getDefaultCapacity(Project p)
p
- the projectpublic void setDefaultCapacity(Project p, double capacity)
p
- the projectcapacity
- the default capacity to be assigned to this projectpublic boolean hasOverriddenCapacity(Project p, Date d)
p
- the projectd
- the Monday of the weekpublic double getOverriddenCapacity(Project p, Date d)
p
- the projectd
- the Monday of the weekpublic Date[] getCapacityOverriddenOn(Project p)
p
- the project to test forpublic 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 DateTime getLastLogoutTime()
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 weekpublic int getAccessStartTime2(User.DayOfWeek dayOfWeek)
dayOfWeek
- must be a valid day of the weekpublic int getAccessEndTime1(User.DayOfWeek dayOfWeek)
dayOfWeek
- must be a valid day of the weekpublic int getAccessEndTime2(User.DayOfWeek dayOfWeek)
dayOfWeek
- a valid day of the week, e.g. DAY_SUNDAYpublic 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()
public java.lang.String toString()
toString
in class TypedResource
public 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()
public boolean isMemberOf(Group group)
group
- The group to be tested.public void remove()
remove
in class Principal
ServerException
- 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 LiveObject
public 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)
StarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.