jetbrains.buildServer.users
Interface SUser

All Superinterfaces:
AuthorityHolder, NotificationRulesHolder, RolesHolder, User

public interface SUser
extends AuthorityHolder, RolesHolder, User, NotificationRulesHolder

Presents TeamCity user data.


Method Summary
 void deleteUserProperty(PropertyKey propertyKey)
          Deletes a property with specified key from the user profile.
 java.util.List<SVcsModification> getAllModifications()
          Returns the list of all (personal and non-personal) user modifications sorted by VCS date.
 java.util.List<UserGroup> getAllUserGroups()
          Returns the list of all user groups that include this user, directly or through intermediate subgroups.
 java.lang.String getBlockState(java.lang.String blockType)
          Retrieves state of a block stored for this user
 java.util.List<SBuildType> getOrderedBuildTypes(SProject project)
          Returns the list of build configurations (in a project, or globally) sorted according to user settings.
 java.util.List<UserGroup> getUserGroups()
          Returns the list of groups which this user belongs to.
 java.util.List<SVcsModification> getVcsModifications(int numberOfActiveDays)
          Returns the list of changes made by this user filtered according to the caller's permissions.
 java.util.List<VcsUsernamePropertyKey> getVcsUsernameProperties()
          Returns list of VCS username properties associated with this user.
 void hideProject(java.lang.String projectId)
          Marks a project with specified id as invisible
 boolean isHighlightRelatedDataInUI()
          Returns true if highlighting of user changes, investigations, and other related data in web UI is enabled.
 void setBlockState(java.lang.String blockType, java.lang.String blockState)
          Stores collapsable block state for this user
 void setBuildTypesOrder(SProject project, java.util.List<SBuildType> visible, java.util.List<SBuildType> invisible)
          Sets visible and invisible build types for the given project in the specified order.
 void setLastLoginTimestamp(java.util.Date timestamp)
          Updates last login timestamp
 void setPassword(java.lang.String password)
          Changes password of this user
 void setProjectsOrder(java.util.List<java.lang.String> projectsOrder)
          Sets order of the projects.
 void setUserProperties(java.util.Map<? extends PropertyKey,java.lang.String> properties)
          Updates properties of the user specified by user id.
 void setUserProperty(PropertyKey propertyKey, java.lang.String value)
          Sets a property with specified key and value in user profile
 void setVisibleProjects(java.util.Collection<java.lang.String> visibleProjects)
          Sets projects visible for specified user
 void updateUserAccount(java.lang.String username, java.lang.String name, java.lang.String email)
          Updates user fields: username, name and email.
 
Methods inherited from interface jetbrains.buildServer.serverSide.auth.AuthorityHolder
getAssociatedUser, getGlobalPermissions, getPermissionsGrantedForProject, getProjectsPermissions, isPermissionGrantedForAnyProject, isPermissionGrantedForProject, isPermissionGrantedGlobally
 
Methods inherited from interface jetbrains.buildServer.serverSide.auth.RolesHolder
addRole, getAllParentHolders, getParentHolders, getRoles, getRolesWithScope, getScopes, isSystemAdministratorRoleGranted, isSystemAdministratorRoleGrantedDirectly, isSystemAdministratorRoleInherited, removeRole, removeRole, removeRoles
 
Methods inherited from interface jetbrains.buildServer.users.User
getAllProjects, getBooleanProperty, getDescriptiveName, getEmail, getExtendedName, getId, getLastLoginTimestamp, getName, getProperties, getPropertyValue, getRealm, getUsername, getVisibleProjects
 
Methods inherited from interface jetbrains.buildServer.notification.NotificationRulesHolder
addNewRule, applyOrder, findConflictingRules, findRuleById, getNotificationRules, getParentRulesHolders, removeRule, setNotificationRules
 

Method Detail

getVcsModifications

@NotNull
java.util.List<SVcsModification> getVcsModifications(int numberOfActiveDays)
Returns the list of changes made by this user filtered according to the caller's permissions.

Parameters:
numberOfActiveDays - number of last active days of changing
Returns:
unmodifiable list of user changes
Since:
5.0

getAllModifications

@NotNull
java.util.List<SVcsModification> getAllModifications()
Returns the list of all (personal and non-personal) user modifications sorted by VCS date. Returns only modifications which have at least one related configuration.

Returns:
see above
Since:
6.0

updateUserAccount

void updateUserAccount(@NotNull
                       java.lang.String username,
                       java.lang.String name,
                       java.lang.String email)
                       throws UserNotFoundException,
                              DuplicateUserAccountException,
                              EmptyUsernameException
Updates user fields: username, name and email.

Parameters:
username - username, cannot be null
name - full name of a user
email - email address
Throws:
UserNotFoundException - if specified user no longer exists in the model
DuplicateUserAccountException - if a new username name already assigned to another user
EmptyUsernameException - if username is an empty string

setUserProperties

void setUserProperties(@NotNull
                       java.util.Map<? extends PropertyKey,java.lang.String> properties)
                       throws UserNotFoundException
Updates properties of the user specified by user id. Only those properties will be updated which keys are specified in the properties map. All other properties will be left intact.

Parameters:
properties - properties
Throws:
UserNotFoundException - if specified user no longer exists

setUserProperty

void setUserProperty(@NotNull
                     PropertyKey propertyKey,
                     java.lang.String value)
                     throws UserNotFoundException
Sets a property with specified key and value in user profile

Parameters:
propertyKey - property key
value - value of the property
Throws:
UserNotFoundException - if specified user no longer exists

deleteUserProperty

void deleteUserProperty(@NotNull
                        PropertyKey propertyKey)
                        throws UserNotFoundException
Deletes a property with specified key from the user profile.

Parameters:
propertyKey - property key
Throws:
UserNotFoundException - if specified user no longer exists

setPassword

void setPassword(java.lang.String password)
                 throws UserNotFoundException
Changes password of this user

Parameters:
password - new password
Throws:
UserNotFoundException - if specified user no longer exists

setProjectsOrder

void setProjectsOrder(@NotNull
                      java.util.List<java.lang.String> projectsOrder)
                      throws UserNotFoundException
Sets order of the projects.

Parameters:
projectsOrder - identificators of all projects in the order specified by user
Throws:
UserNotFoundException - if specified user no longer exists

setVisibleProjects

void setVisibleProjects(@NotNull
                        java.util.Collection<java.lang.String> visibleProjects)
                        throws UserNotFoundException
Sets projects visible for specified user

Parameters:
visibleProjects - collection of identifiers of visible projects
Throws:
UserNotFoundException - if specified user no longer exists

hideProject

void hideProject(@NotNull
                 java.lang.String projectId)
                 throws UserNotFoundException
Marks a project with specified id as invisible

Parameters:
projectId - id of the project
Throws:
UserNotFoundException - if this user does not exist anymore

setLastLoginTimestamp

void setLastLoginTimestamp(@NotNull
                           java.util.Date timestamp)
                           throws UserNotFoundException
Updates last login timestamp

Parameters:
timestamp - last login timestamp
Throws:
UserNotFoundException - if this user does not exist anymore

setBlockState

void setBlockState(java.lang.String blockType,
                   java.lang.String blockState)
Stores collapsable block state for this user

Parameters:
blockType - type of block
blockState - state

getBlockState

@Nullable
java.lang.String getBlockState(java.lang.String blockType)
Retrieves state of a block stored for this user

Parameters:
blockType - type of block
Returns:
block state or null

getUserGroups

@NotNull
java.util.List<UserGroup> getUserGroups()
Returns the list of groups which this user belongs to. Only groups which contain this user directly are considered. If you need all user groups use getAllUserGroups().

No specific order of the groups is guaranteed.

Returns:
list of groups containing this user
Since:
4.5
See Also:
getAllUserGroups()

getAllUserGroups

@NotNull
java.util.List<UserGroup> getAllUserGroups()
Returns the list of all user groups that include this user, directly or through intermediate subgroups.

No specific order of the groups is guaranteed.

Returns:
list of all groups containing this user
Since:
4.5
See Also:
getUserGroups()

getVcsUsernameProperties

@NotNull
java.util.List<VcsUsernamePropertyKey> getVcsUsernameProperties()
Returns list of VCS username properties associated with this user. VCS username property defines username of this user in a concrete VCS root or VCS repository type (Subversion, Perforce, etc).

Returns:
list of VCS usernames

getOrderedBuildTypes

@NotNull
java.util.List<SBuildType> getOrderedBuildTypes(@Nullable
                                                        SProject project)
Returns the list of build configurations (in a project, or globally) sorted according to user settings. The configurations invisible for the user are omitted.

Parameters:
project - the project (can be null)
Returns:
the list of build configurations
Since:
5.1

setBuildTypesOrder

void setBuildTypesOrder(@NotNull
                        SProject project,
                        @NotNull
                        java.util.List<SBuildType> visible,
                        @NotNull
                        java.util.List<SBuildType> invisible)
Sets visible and invisible build types for the given project in the specified order.

Parameters:
project - the project
visible - the list of visible build types
invisible - the list of invisible build types
Since:
5.1

isHighlightRelatedDataInUI

boolean isHighlightRelatedDataInUI()
Returns true if highlighting of user changes, investigations, and other related data in web UI is enabled. The value is controlled by the StandardProperties.HIGHLIGHT_MY_CHANGES property.

Returns:
true if highlighting of user changes, investigations, and other related data in web UI is enabled.
Since:
7.1