Class UserGroupRoleUpdater
- java.lang.Object
-
- jetbrains.buildServer.groups.impl.UserGroupRoleUpdater
-
- All Implemented Interfaces:
RolesUpdate<String>
public class UserGroupRoleUpdater extends Object implements RolesUpdate<String>
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description UserGroupRoleUpdater(SQLRunnerEx sqlRunner, RolesManager rolesManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRole(String id, RoleScope roleScope, Role role)
Adds a role with specified scope to an entity with specified id.void
clearCaches(String id)
Map<RoleScope,Set<Role>>
getRoles(String id)
void
removeGroup(String id)
void
removeRole(String id, Role role)
Removes the specified role from the entity with specified id.void
removeRole(String id, RoleScope roleScope, Role role)
Removes role with specified scope from the entity with specified id.void
removeRole(Role role)
Removes the specified role for all roles holders.void
removeRoles(String id, RoleScope roleScope)
Removes all roles with specified scope from the entity with specified id.
-
-
-
Constructor Detail
-
UserGroupRoleUpdater
public UserGroupRoleUpdater(@NotNull SQLRunnerEx sqlRunner, @NotNull RolesManager rolesManager)
-
-
Method Detail
-
addRole
public void addRole(@NotNull String id, @NotNull RoleScope roleScope, @NotNull Role role)
Description copied from interface:RolesUpdate
Adds a role with specified scope to an entity with specified id.- Specified by:
addRole
in interfaceRolesUpdate<String>
- Parameters:
id
- uidroleScope
- scope of the rolerole
- role
-
removeRole
public void removeRole(@NotNull String id, @NotNull RoleScope roleScope, @NotNull Role role)
Description copied from interface:RolesUpdate
Removes role with specified scope from the entity with specified id.- Specified by:
removeRole
in interfaceRolesUpdate<String>
- Parameters:
id
- idroleScope
- scope of the rolerole
- role
-
removeRole
public void removeRole(@NotNull String id, @NotNull Role role)
Description copied from interface:RolesUpdate
Removes the specified role from the entity with specified id. The role is removed from all of the scopes.- Specified by:
removeRole
in interfaceRolesUpdate<String>
- Parameters:
id
- idrole
- role to remove
-
removeRoles
public void removeRoles(@NotNull String id, @NotNull RoleScope roleScope)
Description copied from interface:RolesUpdate
Removes all roles with specified scope from the entity with specified id.- Specified by:
removeRoles
in interfaceRolesUpdate<String>
- Parameters:
id
- idroleScope
- scope of the role
-
removeRole
public void removeRole(@NotNull Role role)
Description copied from interface:RolesUpdate
Removes the specified role for all roles holders.- Specified by:
removeRole
in interfaceRolesUpdate<String>
- Parameters:
role
- role to remove
-
removeGroup
public void removeGroup(@NotNull String id)
-
clearCaches
public void clearCaches(@Nullable String id)
-
-