Class AllUsersGroup
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.Proxyfied<UserGroupEx>
-
- jetbrains.buildServer.groups.impl.UserGroupImpl
-
- jetbrains.buildServer.groups.impl.AllUsersGroup
-
- All Implemented Interfaces:
Comparable<UserGroup>,SUserGroup,UserGroup,UserGroupEx,Loggable,NotificationRulesHolder,AuthorityHolder,RolesHolder,RolesHolderEx,PropertyHolder,SPropertyHolder
public class AllUsersGroup extends UserGroupImpl
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUser(User user)Users.voidcleanupGroup()Removes from the group users, which were removed on the serverbooleancontainsUserDirectly(User user)List<User>getAllUsers()Returns the set of all users included into this group, directly or through subgroups.List<User>getDirectUsers()Returns the collection of users included into this group.intgetUsersNumber()Returns the number of (direct) users in this group.booleanisAllUsersGroup()Returns true, if the specified group is the all-users group.voidremoveUser(User user)Removes a user from this group.voidsetDescription(String description)Sets the group description.voidsetName(String name)Sets the group name.voidupdateInfo()Reload main group info (name and description) from the databasevoidupdateUsers()Reload group users from the database-
Methods inherited from class jetbrains.buildServer.groups.impl.UserGroupImpl
addNewRule, addParent, addRole, addSubgroup, addSubgroups, applyOrder, calculatePermissions, compareTo, deleteGroupProperty, deleteProperty, describe, dispose, equals, findConflictingRules, findRuleById, getAllParentHolders, getAllParentRulesHolders, getAllPermissions, getAllSubgroups, getAssociatedUser, getBooleanProperty, getDescription, getDirectSubgroups, getGlobalPermissions, getKey, getName, getNotificationRules, getParentGroups, getParentHolders, getParentRulesHolders, getPermissionsGrantedForAllProjects, getPermissionsGrantedForAnyOfProjects, getPermissionsGrantedForProject, getProjectsPermissions, getProperties, getPropertyValue, getRoles, getRolesWithScope, getScopes, getUnfilteredRoles, getUnfilteredScopes, hasAllPermissionsOf, hashCode, hasParents, isPermissionGrantedForAllProjects, isPermissionGrantedForAnyOfProjects, isPermissionGrantedForAnyProject, isPermissionGrantedForProject, isPermissionGrantedGlobally, isSystemAdministratorRoleGranted, isSystemAdministratorRoleGrantedDirectly, isSystemAdministratorRoleInherited, removeParent, removeRole, removeRole, removeRoles, removeRule, removeRule, removeSubgroup, resetRoles, setGroupProperties, setGroupProperty, setNotificationRules, setProperties, setProperty, toString, updateProperties, updateRoles, updateSubgroups
-
-
-
-
Method Detail
-
setName
public void setName(@NotNull String name) throws UserGroupExceptionDescription copied from interface:SUserGroupSets the group name.Note: group name must be unique among all user groups. If
namealready exists, an exception is thrown.The name cannot be empty and cannot exceed 255 characters.
- Specified by:
setNamein interfaceSUserGroup- Overrides:
setNamein classUserGroupImpl- Parameters:
name- the new group name- Throws:
UserGroupException- if name already exists, or is empty, or is too long- See Also:
UserGroup.getName()
-
setDescription
public void setDescription(@NotNull String description) throws UserGroupExceptionDescription copied from interface:SUserGroupSets the group description.The description cannot exceed 2000 characters.
- Specified by:
setDescriptionin interfaceSUserGroup- Overrides:
setDescriptionin classUserGroupImpl- Parameters:
description- the new description- Throws:
UserGroupException- if description is too long- See Also:
UserGroup.getDescription()
-
getDirectUsers
@NotNull public List<User> getDirectUsers()
Description copied from interface:UserGroupReturns the collection of users included into this group. This method ignores the subgroups.- Specified by:
getDirectUsersin interfaceUserGroup- Overrides:
getDirectUsersin classUserGroupImpl- Returns:
- list of users
- See Also:
UserGroup.getAllUsers()
-
getAllUsers
@NotNull public List<User> getAllUsers()
Description copied from interface:UserGroupReturns the set of all users included into this group, directly or through subgroups.- Specified by:
getAllUsersin interfaceUserGroup- Overrides:
getAllUsersin classUserGroupImpl- Returns:
- list of all users
- See Also:
UserGroup.getDirectUsers()
-
containsUserDirectly
public boolean containsUserDirectly(@NotNull User user)- Specified by:
containsUserDirectlyin interfaceUserGroup- Overrides:
containsUserDirectlyin classUserGroupImpl- Parameters:
user- user to check- Returns:
- true if this group contains user directly (user is returned by getDirectUsers)
-
getUsersNumber
public int getUsersNumber()
Description copied from interface:UserGroupExReturns the number of (direct) users in this group. Much more effective thangetDirectUsers().size().- Specified by:
getUsersNumberin interfaceUserGroupEx- Overrides:
getUsersNumberin classUserGroupImpl- Returns:
- the number of users in the group
-
addUser
public void addUser(@NotNull User user)Description copied from class:UserGroupImplUsers.- Specified by:
addUserin interfaceSUserGroup- Overrides:
addUserin classUserGroupImpl- Parameters:
user- the user to add
-
removeUser
public void removeUser(@NotNull User user) throws UserGroupExceptionDescription copied from interface:SUserGroupRemoves a user from this group. Does nothing if the user is not included into this group directly.The user isn't allowed to remove himself from any group.
- Specified by:
removeUserin interfaceSUserGroup- Overrides:
removeUserin classUserGroupImpl- Parameters:
user- a user to remove- Throws:
UserGroupException- if user is the authority holder, trying to remove himself
-
isAllUsersGroup
public boolean isAllUsersGroup()
Description copied from interface:UserGroupExReturns true, if the specified group is the all-users group.- Specified by:
isAllUsersGroupin interfaceUserGroupEx- Overrides:
isAllUsersGroupin classUserGroupImpl- Returns:
- true if the specified group is the all-users group, false otherwise
-
updateInfo
public void updateInfo()
Description copied from interface:UserGroupExReload main group info (name and description) from the database- Specified by:
updateInfoin interfaceUserGroupEx- Overrides:
updateInfoin classUserGroupImpl
-
updateUsers
public void updateUsers()
Description copied from interface:UserGroupExReload group users from the database- Specified by:
updateUsersin interfaceUserGroupEx- Overrides:
updateUsersin classUserGroupImpl
-
cleanupGroup
public void cleanupGroup()
Description copied from interface:UserGroupExRemoves from the group users, which were removed on the server- Specified by:
cleanupGroupin interfaceUserGroupEx- Overrides:
cleanupGroupin classUserGroupImpl
-
-