Package jetbrains.buildServer.users.impl
Class FeatureProviderUserUpdate
- java.lang.Object
-
- jetbrains.buildServer.users.impl.FeatureProviderUserUpdate
-
- All Implemented Interfaces:
PropertyUpdater<Long>,RolesUpdate<Long>,UserUpdate
public class FeatureProviderUserUpdate extends Object implements UserUpdate
-
-
Constructor Summary
Constructors Constructor Description FeatureProviderUserUpdate(FeatureProvider featureProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRole(Long id, RoleScope roleScope, Role role)Adds a role with specified scope to an entity with specified id.voidblockStateChanged(SUser user)voiddeleteProperty(Long id, PropertyKey propertyKey)voidnotifyUserChanged(SUser user)voidnotifyUserPermissionsMayHaveChanged(SUser user)voidnotifyUserPropertyChanged(SUser user, PropertyKey propertyKey)voidnotifyUserRolesChanged(SUser user)voidpersistLastLoginTimestamp(long userId, Date timestamp)Note: login timestamp will be persisted with some delay.voidremoveRole(Long id, Role role)Removes the specified role from the entity with specified id.voidremoveRole(Long id, RoleScope roleScope, Role role)Removes role with specified scope from the entity with specified id.voidremoveRole(Role role)Removes the specified role for all roles holders.voidremoveRoles(Long id, RoleScope roleScope)Removes all roles with specified scope from the entity with specified id.voidsetBuildTypesOrder(long userId, String projectId, UserImpl.BuildTypesOrder buildTypesOrder)Sets order of build typesvoidsetPassword(long userId, String password)voidsetProjectsOrder(long userId, List<String> projectsOrder)Sets order of the projects.voidsetProjectsVisibility(long userId, Collection<String> projectIds, boolean isVisible)Set visibility state for selected projects.voidsetProperties(Long id, Map<? extends PropertyKey,String> properties)voidsetProperty(Long id, PropertyKey prop, String value)voidsetVisibleProjects(long userId, Collection<String> visibleProjects)Sets projects visible for specified uservoidupdateUserAccount(long userId, String username, String name, String email)Updates user with specified id and sets his/her username and name.
-
-
-
Constructor Detail
-
FeatureProviderUserUpdate
public FeatureProviderUserUpdate(FeatureProvider featureProvider)
-
-
Method Detail
-
updateUserAccount
public void updateUserAccount(long userId, String username, String name, String email) throws UserNotFoundException, DuplicateUserAccountException, EmptyUsernameExceptionDescription copied from interface:UserUpdateUpdates user with specified id and sets his/her username and name.- Specified by:
updateUserAccountin interfaceUserUpdate- Parameters:
userId- user idusername- usernamename- full name of a user- Throws:
UserNotFoundException- if specified user no longer exists in the modelDuplicateUserAccountException- if a new username name already assigned to another userEmptyUsernameException- if username is an empty string
-
setPassword
public void setPassword(long userId, String password) throws UserNotFoundException- Specified by:
setPasswordin interfaceUserUpdate- Throws:
UserNotFoundException
-
setProjectsOrder
public void setProjectsOrder(long userId, List<String> projectsOrder) throws UserNotFoundExceptionDescription copied from interface:UserUpdateSets order of the projects.- Specified by:
setProjectsOrderin interfaceUserUpdate- Parameters:
userId- id of a userprojectsOrder- identificators of all projects in the order specified by user. The order will be reset to default (system) if null or empty.- Throws:
UserNotFoundException- if specified user no longer exists
-
setVisibleProjects
public void setVisibleProjects(long userId, Collection<String> visibleProjects) throws UserNotFoundExceptionDescription copied from interface:UserUpdateSets projects visible for specified user- Specified by:
setVisibleProjectsin interfaceUserUpdate- Parameters:
userId- id of a uservisibleProjects- collection of identifiers of visible projects- Throws:
UserNotFoundException- if specified user no longer exists
-
setBuildTypesOrder
public void setBuildTypesOrder(long userId, @NotNull String projectId, @Nullable UserImpl.BuildTypesOrder buildTypesOrder) throws UserNotFoundExceptionDescription copied from interface:UserUpdateSets order of build types- Specified by:
setBuildTypesOrderin interfaceUserUpdatebuildTypesOrder- build type internal ids- Throws:
UserNotFoundException
-
setProjectsVisibility
public void setProjectsVisibility(long userId, @NotNull Collection<String> projectIds, boolean isVisible)Description copied from interface:UserUpdateSet visibility state for selected projects. Doesn't affect other projects nor project order.- Specified by:
setProjectsVisibilityin interfaceUserUpdate
-
persistLastLoginTimestamp
public void persistLastLoginTimestamp(long userId, Date timestamp) throws UserNotFoundExceptionDescription copied from interface:UserUpdateNote: login timestamp will be persisted with some delay.- Specified by:
persistLastLoginTimestampin interfaceUserUpdate- Parameters:
userId- user idtimestamp- timestamp- Throws:
UserNotFoundException
-
notifyUserChanged
public void notifyUserChanged(@NotNull SUser user)- Specified by:
notifyUserChangedin interfaceUserUpdate
-
notifyUserPropertyChanged
public void notifyUserPropertyChanged(@NotNull SUser user, @NotNull PropertyKey propertyKey)- Specified by:
notifyUserPropertyChangedin interfaceUserUpdate
-
notifyUserRolesChanged
public void notifyUserRolesChanged(@NotNull SUser user)- Specified by:
notifyUserRolesChangedin interfaceUserUpdate
-
notifyUserPermissionsMayHaveChanged
public void notifyUserPermissionsMayHaveChanged(@NotNull SUser user)- Specified by:
notifyUserPermissionsMayHaveChangedin interfaceUserUpdate
-
blockStateChanged
public void blockStateChanged(@NotNull SUser user)- Specified by:
blockStateChangedin interfaceUserUpdate
-
addRole
public void addRole(@NotNull Long id, @NotNull RoleScope roleScope, @NotNull Role role)Description copied from interface:RolesUpdateAdds a role with specified scope to an entity with specified id.- Specified by:
addRolein interfaceRolesUpdate<Long>- Parameters:
id- uidroleScope- scope of the rolerole- role
-
removeRole
public void removeRole(@NotNull Long id, @NotNull RoleScope roleScope, @NotNull Role role)Description copied from interface:RolesUpdateRemoves role with specified scope from the entity with specified id.- Specified by:
removeRolein interfaceRolesUpdate<Long>- Parameters:
id- idroleScope- scope of the rolerole- role
-
removeRole
public void removeRole(@NotNull Long id, @NotNull Role role)Description copied from interface:RolesUpdateRemoves the specified role from the entity with specified id. The role is removed from all of the scopes.- Specified by:
removeRolein interfaceRolesUpdate<Long>- Parameters:
id- idrole- role to remove
-
removeRoles
public void removeRoles(@NotNull Long id, @NotNull RoleScope roleScope)Description copied from interface:RolesUpdateRemoves all roles with specified scope from the entity with specified id.- Specified by:
removeRolesin interfaceRolesUpdate<Long>- Parameters:
id- idroleScope- scope of the role
-
removeRole
public void removeRole(@NotNull Role role)Description copied from interface:RolesUpdateRemoves the specified role for all roles holders.- Specified by:
removeRolein interfaceRolesUpdate<Long>- Parameters:
role- role to remove
-
setProperties
public void setProperties(@NotNull Long id, @NotNull Map<? extends PropertyKey,String> properties)- Specified by:
setPropertiesin interfacePropertyUpdater<Long>
-
setProperty
public void setProperty(@NotNull Long id, @NotNull PropertyKey prop, String value)- Specified by:
setPropertyin interfacePropertyUpdater<Long>
-
deleteProperty
public void deleteProperty(@NotNull Long id, @NotNull PropertyKey propertyKey)- Specified by:
deletePropertyin interfacePropertyUpdater<Long>
-
-