Package jetbrains.buildServer.groups
Interface SUserGroup
-
- All Superinterfaces:
AuthorityHolder,Loggable,NotificationRulesHolder,PropertyHolder,RolesHolder,UserGroup
- All Known Subinterfaces:
UserGroupEx
- All Known Implementing Classes:
AllUsersGroup,SecuredUserGroup,UserGroupImpl
public interface SUserGroup extends UserGroup, NotificationRulesHolder, RolesHolder, AuthorityHolder
Represents TeamCity-server user group interface.- Since:
- 4.5
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSubgroup(UserGroup group)Adds a subgroup to this group.voidaddUser(User user)Adds a user to this group.voiddeleteGroupProperty(PropertyKey propertyKey)Deletes a property with specified key from this group.voidremoveSubgroup(UserGroup group)Removes a direct subgroup.voidremoveUser(User user)Removes a user from this group.voidsetDescription(String description)Sets the group description.voidsetGroupProperties(Map<? extends PropertyKey,String> properties)Updates properties of this group.voidsetGroupProperty(PropertyKey propertyKey, String value)Sets a property with specified key and value in this group.voidsetName(String name)Sets the group name.-
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.users.PropertyHolder
getBooleanProperty, getProperties, getPropertyValue
-
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.groups.UserGroup
containsUserDirectly, getAllSubgroups, getAllUsers, getDescription, getDirectSubgroups, getDirectUsers, getKey, getName, getParentGroups
-
-
-
-
Method Detail
-
setName
void setName(@NotNull String name) throws UserGroupExceptionSets 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.
- Parameters:
name- the new group name- Throws:
UserGroupException- if name already exists, or is empty, or is too long- See Also:
UserGroup.getName()
-
setDescription
void setDescription(@NotNull String description) throws UserGroupExceptionSets the group description.The description cannot exceed 2000 characters.
- Parameters:
description- the new description- Throws:
UserGroupException- if description is too long- See Also:
UserGroup.getDescription()
-
addSubgroup
void addSubgroup(@NotNull UserGroup group) throws UserGroupExceptionAdds a subgroup to this group. Does nothing if the subgroup is already included directly.User group cycles by inclusion are not permitted. An attempt to create a cycle results in exception.
- Parameters:
group- a subgroup to add- Throws:
UserGroupException- if addition of the subgroup leads to a cycle
-
removeSubgroup
void removeSubgroup(@NotNull UserGroup group)Removes a direct subgroup. Does nothing if the subgroup is included indirectly.- Parameters:
group- a subgroup to remove
-
addUser
void addUser(@NotNull User user)Adds a user to this group. Does nothing if the user is already included into this group directly.- Parameters:
user- the user to add
-
removeUser
void removeUser(@NotNull User user) throws UserGroupExceptionRemoves 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.
- Parameters:
user- a user to remove- Throws:
UserGroupException- if user is the authority holder, trying to remove himself
-
setGroupProperties
void setGroupProperties(@NotNull Map<? extends PropertyKey,String> properties) throws UserGroupExceptionUpdates properties of this group. 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:
UserGroupException- if specified group no longer exists
-
setGroupProperty
void setGroupProperty(@NotNull PropertyKey propertyKey, String value) throws UserGroupExceptionSets a property with specified key and value in this group.- Parameters:
propertyKey- property keyvalue- value of the property- Throws:
UserGroupException- if specified group no longer exists
-
deleteGroupProperty
void deleteGroupProperty(@NotNull PropertyKey propertyKey) throws UserGroupExceptionDeletes a property with specified key from this group.- Parameters:
propertyKey- property key- Throws:
UserGroupException- if specified group no longer exists
-
-