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 void
addSubgroup(UserGroup group)
Adds a subgroup to this group.void
addUser(User user)
Adds a user to this group.void
deleteGroupProperty(PropertyKey propertyKey)
Deletes a property with specified key from this group.void
removeSubgroup(UserGroup group)
Removes a direct subgroup.void
removeUser(User user)
Removes a user from this group.void
setDescription(String description)
Sets the group description.void
setGroupProperties(Map<? extends PropertyKey,String> properties)
Updates properties of this group.void
setGroupProperty(PropertyKey propertyKey, String value)
Sets a property with specified key and value in this group.void
setName(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 UserGroupException
Sets the group name.Note: group name must be unique among all user groups. If
name
already 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 UserGroupException
Sets 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 UserGroupException
Adds 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 UserGroupException
Removes 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 UserGroupException
Updates 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 UserGroupException
Sets 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 UserGroupException
Deletes a property with specified key from this group.- Parameters:
propertyKey
- property key- Throws:
UserGroupException
- if specified group no longer exists
-
-