Package jetbrains.buildServer.users.impl
Class UserImpl
- java.lang.Object
-
- jetbrains.buildServer.users.impl.BaseUser
-
- jetbrains.buildServer.users.impl.UserImpl
-
- All Implemented Interfaces:
Loggable
,NotificationRulesHolder
,AuthorityHolder
,RolesHolder
,UserEx
,UserRolesInit
,PropertyHolder
,SPropertyHolder
,SUser
,User
- Direct Known Subclasses:
AssociatedUser
,SecuredUser
,TestUser
public abstract class UserImpl extends BaseUser implements UserEx
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserImpl.BuildTypesOrder
-
Field Summary
Fields Modifier and Type Field Description protected ProjectManagerEx
myProjectManager
static String
PROTECTED_USER_PROPERTY_PREFIX
static String
PUBLIC_USER_PROPERTY_PREFIX
static String
SECURED_USER_PROPERTY_PREFIX
static String
VERIFIED_EMAIL_PROPERTY_NAME
-
Fields inherited from interface jetbrains.buildServer.users.SUser
GUEST_USER_ID, SUPER_USER_ID, UKNOWN_USER_ID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserImpl(long id, String realm, String account, String name, String email, Date lastLoginTimestamp, boolean hasPassword, UserChangesFacade changesFacade, SecurityContextEx securityContext, ServerResponsibility serverResponsibility, UserUpdate userUpdate, UserDataLoader userDataLoader, BlockStateManager blockStateManager, ProjectManagerEx projectManager, UserGroupManager userGroupManager, NotificationRulesManager notificationRulesManager, RolesManager rolesManager, RolesConverter rolesConverter, VcsUsernameStorage vcsUsernameStorage, PasswordComplexityChecker passwordComplexityChecker, UserAttributeStorage userAttributeStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRole(RoleScope scope, Role role)
Adds role with specified scopevoid
addVcsUsername(VcsUsernamePropertyKey key, String userName)
void
clearPermissions()
void
deleteAttribute(String attributeKey)
Delete user attributeboolean
deleteProperty(PropertyKey propertyKey)
Deletes a property with specified key.void
deleteUserProperty(PropertyKey propertyKey)
Deletes a property with specified key from the user profile.boolean
equals(Object o)
protected Collection<Permission>
getAdditionalGlobalPermissions()
List<SVcsModification>
getAllModifications()
Returns the list of all (personal and non-personal) user modifications sorted by VCS date.List<String>
getAllProjects()
Returns all projects sorted according to the order specified by user.String
getAttribute(String attributeKey)
Get user attributeMap<String,String>
getAttributes()
Get all user attributesboolean
getBooleanProperty(PropertyKey propertyKey)
Returns value of the boolean propertyCollection<SBuildType>
getBuildTypesOrder(SProject project)
String
getDescriptiveName()
Returns full name of the user if it is not empty, otherwise returns username.String
getEmail()
Returns e-mail of this userString
getExtendedName()
SortedMap<SProject,List<SBuildType>>
getFilteredVisibleBuildTypes(BuildTypeFilter filter)
Returns sorted map of build configurations per project.long
getId()
Returns user idDate
getLastLoginTimestamp()
Returns this user last login timestampString
getName()
Returns full name of this userList<SBuildType>
getOrderedBuildTypes(SProject project)
Returns the list of build configurations (in a project, or globally) sorted according to user settings.List<String>
getProjectsOrder()
ProjectVisibilityHolder
getProjectVisibilityHolder()
Map<PropertyKey,String>
getProperties()
Returns map of the propertiesString
getPropertyValue(PropertyKey propertyKey)
Returns value of the property with specified keyString
getRealm()
Returns realm of the user.String
getUsername()
Returns username of this userList<SVcsModification>
getVcsModifications(int numberOfActiveDays)
Returns the list of changes made by this user filtered according to the caller's permissions.Map<VcsUsernamePropertyKey,List<String>>
getVcsUsernames()
String
getVerifiedEmail()
Returns null if user doesn't have email specified or his email is not verified.List<String>
getVisibleProjects()
Computes list of visible projects sorted according to the order specified by user.int
hashCode()
boolean
hasPassword()
Returns true if user has password, false otherwise (e.g.void
hideProject(String projectId)
Marks a project with specified id as invisiblevoid
hideProjects(Collection<String> projectIds)
Marks the specified projects as invisiblevoid
init(String username, String name, String email, Long lastLogin, boolean hasPassword)
boolean
isConfiguredVisibleProjects()
Returns whether the user has configured visible projects.boolean
isGuest()
Returns true if the user is guestboolean
isHasHiddenProjects()
Returns whether the user has any hidden (i.e.boolean
isHighlightRelatedDataInUI()
Returns true if highlighting of user changes, investigations, and other related data in web UI is enabled.void
removeRole(Role role)
Removes specified role.void
removeRole(RoleScope scope, Role role)
Removes role with specified scopevoid
removeRoles(RoleScope scope)
Removes all of the roles having the specified scope.void
resetBuildTypesOrder(SProject project)
Resets the build types order settings to defaults.void
resetCachedAttributes()
Reset cached user attributesvoid
resetCachedProperties()
Reset cached blocksvoid
resetCachedVcsUsernames()
Reset cached blocksvoid
setAttribute(String attributeKey, String attributeValue)
Set user attributevoid
setBlockState(String blockType, String blockState)
Stores collapsable block state for this uservoid
setBuildTypesOrder(SProject project, List<SBuildType> visible, List<SBuildType> invisible)
Sets visible and invisible build types for the given project in the specified order.void
setCreationInProgress(boolean inProgress)
void
setDefaultVcsUsernames(List<String> userNames)
boolean
setEmailIsVerified(String email)
Mark user`s email as verified if it's equal to email passed in parameter.void
setLastLoginTimestamp(Date timestamp)
Updates last login timestampvoid
setPassword(String password)
Changes password of this uservoid
setProjectsOrder(List<String> projectsOrder)
Sets order of the projects.boolean
setProperties(Map<? extends PropertyKey,String> properties)
Updates the specified properties.boolean
setProperty(PropertyKey propertyKey, String value)
Sets a property with specified key and value.void
setUserProperties(Map<? extends PropertyKey,String> properties)
Updates properties of the user specified by user id.void
setUserProperty(PropertyKey propertyKey, String value)
Sets a property with specified key and value in user profilevoid
setVcsRootUsernames(VcsRoot root, List<String> userNames)
void
setVcsUsernames(String vcsName, List<String> userNames)
void
setVcsUsernames(VcsUsernamePropertyKey key, List<String> userNames)
void
setVisibleProjects(Collection<String> visibleProjects)
Sets projects visible for specified userString
toString()
void
updateUserAccount(String username, String name, String email)
Updates user fields: username, name and email.-
Methods inherited from class jetbrains.buildServer.users.impl.BaseUser
addNewRule, applyOrder, describe, findConflictingRules, findRuleById, getAllParentHolders, getAllParentRulesHolders, getAllUserGroups, getAllUserGroupsUnfiltered, getAssociatedUser, getBlockState, getGlobalPermissions, getNotificationRules, getOriginalAuthorityHolder, getParentHolders, getParentRulesHolders, getPermissionsGrantedForAllProjects, getPermissionsGrantedForAnyOfProjects, getPermissionsGrantedForProject, getProjectsPermissions, getRoles, getRolesWithScope, getScopes, getSecurityContext, getServerResponsibility, getUserGroups, getVcsUsernameProperties, hasAllPermissionsOf, isPermissionGrantedForAllProjects, isPermissionGrantedForAnyOfProjects, isPermissionGrantedForAnyProject, isPermissionGrantedForProject, isPermissionGrantedGlobally, isPseudoUser, isPseudoUserId, isSystemAdministratorRoleGranted, isSystemAdministratorRoleGrantedDirectly, isSystemAdministratorRoleInherited, removeRule, removeRule, resetBlocks, resetRoles, runWithRestrictor, setNotificationRules, updatePermissions
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.auth.AuthorityHolder
getAllPermissions, getAssociatedUser, getGlobalPermissions, getPermissionsGrantedForAllProjects, getPermissionsGrantedForAnyOfProjects, getPermissionsGrantedForProject, getProjectsPermissions, hasAllPermissionsOf, isPermissionGrantedForAllProjects, isPermissionGrantedForAnyOfProjects, isPermissionGrantedForAnyProject, isPermissionGrantedForProject, isPermissionGrantedGlobally
-
Methods inherited from interface jetbrains.buildServer.notification.NotificationRulesHolder
addNewRule, applyOrder, findConflictingRules, findRuleById, getAllParentRulesHolders, getNotificationRules, getParentRulesHolders, removeRule, removeRule, setNotificationRules
-
Methods inherited from interface jetbrains.buildServer.serverSide.auth.RolesHolder
getAllParentHolders, getParentHolders, getRoles, getRolesWithScope, getScopes, isSystemAdministratorRoleGranted, isSystemAdministratorRoleGrantedDirectly, isSystemAdministratorRoleInherited
-
Methods inherited from interface jetbrains.buildServer.users.SUser
getAllUserGroups, getBlockState, getUserGroups, getVcsUsernameProperties
-
Methods inherited from interface jetbrains.buildServer.users.impl.UserEx
getOriginalAuthorityHolder, isPseudoUser, resetBlocks, runWithRestrictor, runWithRestrictor, updatePermissions
-
Methods inherited from interface jetbrains.buildServer.users.impl.UserRolesInit
resetRoles
-
-
-
-
Field Detail
-
PROTECTED_USER_PROPERTY_PREFIX
public static final String PROTECTED_USER_PROPERTY_PREFIX
- See Also:
- Constant Field Values
-
SECURED_USER_PROPERTY_PREFIX
public static final String SECURED_USER_PROPERTY_PREFIX
- See Also:
- Constant Field Values
-
PUBLIC_USER_PROPERTY_PREFIX
public static final String PUBLIC_USER_PROPERTY_PREFIX
- See Also:
- Constant Field Values
-
VERIFIED_EMAIL_PROPERTY_NAME
public static final String VERIFIED_EMAIL_PROPERTY_NAME
- See Also:
- Constant Field Values
-
myProjectManager
@NotNull protected final ProjectManagerEx myProjectManager
-
-
Constructor Detail
-
UserImpl
protected UserImpl(long id, String realm, String account, String name, String email, Date lastLoginTimestamp, boolean hasPassword, @NotNull UserChangesFacade changesFacade, SecurityContextEx securityContext, ServerResponsibility serverResponsibility, @NotNull UserUpdate userUpdate, @NotNull UserDataLoader userDataLoader, BlockStateManager blockStateManager, @NotNull ProjectManagerEx projectManager, UserGroupManager userGroupManager, NotificationRulesManager notificationRulesManager, RolesManager rolesManager, RolesConverter rolesConverter, VcsUsernameStorage vcsUsernameStorage, PasswordComplexityChecker passwordComplexityChecker, UserAttributeStorage userAttributeStorage)
-
-
Method Detail
-
getId
public long getId()
Description copied from interface:User
Returns user id
-
getRealm
public String getRealm()
Description copied from interface:User
Returns realm of the user.
-
getUsername
public String getUsername()
Description copied from interface:User
Returns username of this user- Specified by:
getUsername
in interfaceUser
- Returns:
- username
-
getName
public String getName()
Description copied from interface:User
Returns full name of this user
-
getEmail
public String getEmail()
Description copied from interface:User
Returns e-mail of this user
-
setEmailIsVerified
public boolean setEmailIsVerified(@NotNull String email)
Description copied from interface:UserEx
Mark user`s email as verified if it's equal to email passed in parameter.- Specified by:
setEmailIsVerified
in interfaceUserEx
- Returns:
- true if verified email was set, false otherwise
-
getVerifiedEmail
@Nullable public String getVerifiedEmail()
Description copied from interface:UserEx
Returns null if user doesn't have email specified or his email is not verified.- Specified by:
getVerifiedEmail
in interfaceUserEx
-
getDescriptiveName
public String getDescriptiveName()
Description copied from interface:User
Returns full name of the user if it is not empty, otherwise returns username.- Specified by:
getDescriptiveName
in interfaceUser
- Returns:
- full name or username if full name is empty
-
getExtendedName
public String getExtendedName()
- Specified by:
getExtendedName
in interfaceUser
- Returns:
- user full name and username in the form: <full name> (<username>)
-
getLastLoginTimestamp
public Date getLastLoginTimestamp()
Description copied from interface:User
Returns this user last login timestamp- Specified by:
getLastLoginTimestamp
in interfaceUser
- Returns:
- last login timestamp
-
getVcsModifications
@NotNull public List<SVcsModification> getVcsModifications(int numberOfActiveDays)
Description copied from interface:SUser
Returns the list of changes made by this user filtered according to the caller's permissions.- Specified by:
getVcsModifications
in interfaceSUser
- Parameters:
numberOfActiveDays
- number of last active days of changing- Returns:
- unmodifiable list of user changes
-
getAllModifications
@NotNull public List<SVcsModification> getAllModifications()
Description copied from interface:SUser
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.- Specified by:
getAllModifications
in interfaceSUser
- Returns:
- see above
-
getProperties
@NotNull public Map<PropertyKey,String> getProperties()
Description copied from interface:PropertyHolder
Returns map of the properties- Specified by:
getProperties
in interfacePropertyHolder
- Returns:
- map of the properties
-
getPropertyValue
public String getPropertyValue(PropertyKey propertyKey)
Description copied from interface:PropertyHolder
Returns value of the property with specified key- Specified by:
getPropertyValue
in interfacePropertyHolder
- Parameters:
propertyKey
- value of the property with specified key- Returns:
- value of the property with specified key
-
getBooleanProperty
public boolean getBooleanProperty(PropertyKey propertyKey)
Description copied from interface:PropertyHolder
Returns value of the boolean property- Specified by:
getBooleanProperty
in interfacePropertyHolder
- Parameters:
propertyKey
- property key- Returns:
- value
-
updateUserAccount
public void updateUserAccount(@NotNull String username, String name, String email) throws UserNotFoundException, DuplicateUserAccountException
Description copied from interface:SUser
Updates user fields: username, name and email.- Specified by:
updateUserAccount
in interfaceSUser
- Parameters:
username
- username, cannot be nullname
- full name of a useremail
- email address- Throws:
UserNotFoundException
- if specified user no longer exists in the modelDuplicateUserAccountException
- if a new username name already assigned to another user
-
init
public void init(@NotNull String username, String name, String email, @Nullable Long lastLogin, boolean hasPassword)
-
resetCachedProperties
public void resetCachedProperties()
Description copied from interface:UserEx
Reset cached blocks- Specified by:
resetCachedProperties
in interfaceUserEx
-
resetCachedVcsUsernames
public void resetCachedVcsUsernames()
Description copied from interface:UserEx
Reset cached blocks- Specified by:
resetCachedVcsUsernames
in interfaceUserEx
-
setProperties
public boolean setProperties(@NotNull Map<? extends PropertyKey,String> properties)
Description copied from interface:SPropertyHolder
Updates the specified properties. Only those properties will be updated which keys are specified in the properties map. All other properties will be left intact.- Specified by:
setProperties
in interfaceSPropertyHolder
- Parameters:
properties
- properties- Returns:
- true if at least one property was changed, false otherwise
-
setProperty
public boolean setProperty(@NotNull PropertyKey propertyKey, String value)
Description copied from interface:SPropertyHolder
Sets a property with specified key and value.- Specified by:
setProperty
in interfaceSPropertyHolder
- Parameters:
propertyKey
- property keyvalue
- value of the property- Returns:
- true if the property value was actually changed, false otherwise
-
deleteProperty
public boolean deleteProperty(@NotNull PropertyKey propertyKey)
Description copied from interface:SPropertyHolder
Deletes a property with specified key.- Specified by:
deleteProperty
in interfaceSPropertyHolder
- Parameters:
propertyKey
- property key- Returns:
- true if the property was actually deleted, false otherwise
-
setUserProperties
public void setUserProperties(@NotNull Map<? extends PropertyKey,String> properties) throws UserNotFoundException
Description copied from interface:SUser
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.- Specified by:
setUserProperties
in interfaceSUser
- Parameters:
properties
- properties- Throws:
UserNotFoundException
- if specified user no longer exists
-
setUserProperty
public void setUserProperty(@NotNull PropertyKey propertyKey, String value) throws UserNotFoundException
Description copied from interface:SUser
Sets a property with specified key and value in user profile- Specified by:
setUserProperty
in interfaceSUser
- Parameters:
propertyKey
- property keyvalue
- value of the property- Throws:
UserNotFoundException
- if specified user no longer exists
-
deleteUserProperty
public void deleteUserProperty(@NotNull PropertyKey propertyKey) throws UserNotFoundException
Description copied from interface:SUser
Deletes a property with specified key from the user profile.- Specified by:
deleteUserProperty
in interfaceSUser
- Parameters:
propertyKey
- property key- Throws:
UserNotFoundException
- if specified user no longer exists
-
setAttribute
public void setAttribute(@NotNull String attributeKey, @NotNull String attributeValue)
Description copied from interface:UserEx
Set user attribute- Specified by:
setAttribute
in interfaceUserEx
-
getAttribute
@Nullable public String getAttribute(@NotNull String attributeKey)
Description copied from interface:UserEx
Get user attribute- Specified by:
getAttribute
in interfaceUserEx
- Returns:
- user attribute or null if there is no attribute with such key
-
getAttributes
@NotNull public Map<String,String> getAttributes()
Description copied from interface:UserEx
Get all user attributes- Specified by:
getAttributes
in interfaceUserEx
- Returns:
- user attributes or an empty map
-
deleteAttribute
public void deleteAttribute(@NotNull String attributeKey)
Description copied from interface:UserEx
Delete user attribute- Specified by:
deleteAttribute
in interfaceUserEx
-
resetCachedAttributes
public void resetCachedAttributes()
Description copied from interface:UserEx
Reset cached user attributes- Specified by:
resetCachedAttributes
in interfaceUserEx
-
setPassword
public void setPassword(String password) throws UserNotFoundException
Description copied from interface:SUser
Changes password of this user- Specified by:
setPassword
in interfaceSUser
- Parameters:
password
- new password- Throws:
UserNotFoundException
- if specified user no longer exists
-
hasPassword
public boolean hasPassword()
Description copied from interface:UserEx
Returns true if user has password, false otherwise (e.g. if it was created by NT domain or LDAP login module)- Specified by:
hasPassword
in interfaceUserEx
- Returns:
-
setLastLoginTimestamp
public void setLastLoginTimestamp(@NotNull Date timestamp) throws UserNotFoundException
Description copied from interface:SUser
Updates last login timestamp- Specified by:
setLastLoginTimestamp
in interfaceSUser
- Parameters:
timestamp
- last login timestamp- Throws:
UserNotFoundException
- if this user does not exist anymore
-
getAdditionalGlobalPermissions
protected Collection<Permission> getAdditionalGlobalPermissions()
- Overrides:
getAdditionalGlobalPermissions
in classBaseUser
-
addRole
public void addRole(@NotNull RoleScope scope, @NotNull Role role) throws UserNotFoundException
Description copied from interface:RolesHolder
Adds role with specified scope- Specified by:
addRole
in interfaceRolesHolder
- Overrides:
addRole
in classBaseUser
- Parameters:
scope
- scope of the rolerole
- role- Throws:
UserNotFoundException
-
removeRole
public void removeRole(@NotNull RoleScope scope, @NotNull Role role) throws UserNotFoundException
Description copied from interface:RolesHolder
Removes role with specified scope- Specified by:
removeRole
in interfaceRolesHolder
- Overrides:
removeRole
in classBaseUser
- Parameters:
scope
- scope of the rolerole
- role- Throws:
UserNotFoundException
-
removeRoles
public void removeRoles(@NotNull RoleScope scope) throws UserNotFoundException
Description copied from interface:RolesHolder
Removes all of the roles having the specified scope.- Specified by:
removeRoles
in interfaceRolesHolder
- Overrides:
removeRoles
in classBaseUser
- Parameters:
scope
- scope of the role- Throws:
UserNotFoundException
-
removeRole
public void removeRole(@NotNull Role role)
Description copied from interface:RolesHolder
Removes specified role. If the role is associated with several scopes all of these roles will be removed.- Specified by:
removeRole
in interfaceRolesHolder
- Overrides:
removeRole
in classBaseUser
- Parameters:
role
- role to remove
-
clearPermissions
public void clearPermissions()
- Overrides:
clearPermissions
in classBaseUser
-
isHighlightRelatedDataInUI
public boolean isHighlightRelatedDataInUI()
Description copied from interface:SUser
Returns true if highlighting of user changes, investigations, and other related data in web UI is enabled. The value is controlled by theStandardProperties.HIGHLIGHT_MY_CHANGES
property.- Specified by:
isHighlightRelatedDataInUI
in interfaceSUser
- Returns:
- true if highlighting of user changes, investigations, and other related data in web UI is enabled.
-
isGuest
public boolean isGuest()
Description copied from interface:SUser
Returns true if the user is guest
-
getVcsUsernames
@NotNull public Map<VcsUsernamePropertyKey,List<String>> getVcsUsernames()
- Specified by:
getVcsUsernames
in interfaceUserEx
-
setDefaultVcsUsernames
public void setDefaultVcsUsernames(@NotNull List<String> userNames)
- Specified by:
setDefaultVcsUsernames
in interfaceUserEx
-
setVcsUsernames
public void setVcsUsernames(@NotNull String vcsName, @NotNull List<String> userNames)
- Specified by:
setVcsUsernames
in interfaceUserEx
-
setVcsRootUsernames
public void setVcsRootUsernames(@NotNull VcsRoot root, @NotNull List<String> userNames)
- Specified by:
setVcsRootUsernames
in interfaceUserEx
-
setVcsUsernames
public void setVcsUsernames(@NotNull VcsUsernamePropertyKey key, @NotNull List<String> userNames)
- Specified by:
setVcsUsernames
in interfaceUserEx
-
addVcsUsername
public void addVcsUsername(@NotNull VcsUsernamePropertyKey key, @NotNull String userName)
- Specified by:
addVcsUsername
in interfaceUserEx
-
setBlockState
public void setBlockState(String blockType, String blockState)
Description copied from interface:SUser
Stores collapsable block state for this user- Specified by:
setBlockState
in interfaceSUser
- Overrides:
setBlockState
in classBaseUser
- Parameters:
blockType
- type of blockblockState
- state
-
getProjectVisibilityHolder
public ProjectVisibilityHolder getProjectVisibilityHolder()
- Specified by:
getProjectVisibilityHolder
in interfaceUserEx
-
setCreationInProgress
public void setCreationInProgress(boolean inProgress)
- Specified by:
setCreationInProgress
in interfaceUserEx
-
getVisibleProjects
@NotNull public List<String> getVisibleProjects()
Description copied from interface:User
Computes list of visible projects sorted according to the order specified by user.- Specified by:
getVisibleProjects
in interfaceUser
- Returns:
- list of visible projects ids
-
getAllProjects
@NotNull public List<String> getAllProjects()
Description copied from interface:User
Returns all projects sorted according to the order specified by user.- Specified by:
getAllProjects
in interfaceUser
- Returns:
- list of all of the projects ids
-
getProjectsOrder
@NotNull public List<String> getProjectsOrder()
- Specified by:
getProjectsOrder
in interfaceSUser
- Returns:
- List of project internal IDs in configured order. Empty list will be returned in case user didn't configure any order.
-
setProjectsOrder
public void setProjectsOrder(@NotNull List<String> projectsOrder)
Description copied from interface:SUser
Sets order of the projects.- Specified by:
setProjectsOrder
in interfaceSUser
- Parameters:
projectsOrder
- identificators of all projects in the order specified by user
-
setVisibleProjects
public void setVisibleProjects(@NotNull Collection<String> visibleProjects)
Description copied from interface:SUser
Sets projects visible for specified user- Specified by:
setVisibleProjects
in interfaceSUser
- Parameters:
visibleProjects
- collection of identifiers of visible projects
-
hideProject
public void hideProject(@NotNull String projectId)
Description copied from interface:SUser
Marks a project with specified id as invisible- Specified by:
hideProject
in interfaceSUser
- Parameters:
projectId
- id of the project
-
hideProjects
public void hideProjects(@NotNull Collection<String> projectIds) throws UserNotFoundException
Description copied from interface:SUser
Marks the specified projects as invisible- Specified by:
hideProjects
in interfaceSUser
- Parameters:
projectIds
- ids of the project to hide- Throws:
UserNotFoundException
- if this user does not exist anymore
-
isHasHiddenProjects
public boolean isHasHiddenProjects()
Description copied from interface:UserEx
Returns whether the user has any hidden (i.e. configured to be not-visible) projects.- Specified by:
isHasHiddenProjects
in interfaceUserEx
- Returns:
- true if the user has any hidden projects
-
isConfiguredVisibleProjects
public boolean isConfiguredVisibleProjects()
Description copied from interface:UserEx
Returns whether the user has configured visible projects.- Specified by:
isConfiguredVisibleProjects
in interfaceUserEx
- Returns:
- true if the user has configured visible projects
-
getFilteredVisibleBuildTypes
@NotNull public SortedMap<SProject,List<SBuildType>> getFilteredVisibleBuildTypes(@Nullable BuildTypeFilter filter)
Description copied from interface:UserEx
Returns sorted map of build configurations per project. The build configurations are sorted according to user settings.- Specified by:
getFilteredVisibleBuildTypes
in interfaceUserEx
- Parameters:
filter
- filter of build configurations, can be null- Returns:
- sorted map of build types per project
-
getOrderedBuildTypes
@NotNull public List<SBuildType> getOrderedBuildTypes(@Nullable SProject project)
Description copied from interface:SUser
Returns the list of build configurations (in a project, or globally) sorted according to user settings. The configurations invisible for the user are omitted.- Specified by:
getOrderedBuildTypes
in interfaceSUser
- Parameters:
project
- the project (can be null)- Returns:
- the list of build configurations
-
setBuildTypesOrder
public void setBuildTypesOrder(@NotNull SProject project, @NotNull List<SBuildType> visible, @NotNull List<SBuildType> invisible)
Description copied from interface:SUser
Sets visible and invisible build types for the given project in the specified order.- Specified by:
setBuildTypesOrder
in interfaceSUser
- Parameters:
project
- the projectvisible
- the list of visible build typesinvisible
- the list of invisible build types
-
getBuildTypesOrder
@NotNull public Collection<SBuildType> getBuildTypesOrder(@NotNull SProject project)
- Specified by:
getBuildTypesOrder
in interfaceSUser
- Parameters:
project
- the project- Returns:
- List of build configurations in configured order. Empty list will be returned in case user didn't configure any order.
-
resetBuildTypesOrder
public void resetBuildTypesOrder(@NotNull SProject project)
Description copied from interface:UserEx
Resets the build types order settings to defaults.- Specified by:
resetBuildTypesOrder
in interfaceUserEx
- Parameters:
project
- the project
-
-