Package jetbrains.buildServer.users
Interface UserAttributeStorage
-
- All Known Implementing Classes:
UserAttributeCachingStorageImpl
,UserAttributeStorageImpl
public interface UserAttributeStorage
- Author:
- Sergey Pestrikov
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
UserAttributeStorage.InvalidAttributeKeyException
static class
UserAttributeStorage.UserAttributeException
static class
UserAttributeStorage.UserAttributePersistingException
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
delete(long userId, String attributeKey)
Delete user attributevoid
deleteAll(long userId)
Delete all user attributesMap<String,String>
findAll(long userId)
Find all user attributesList<Long>
findUsersIdsByAttributeValue(String attributeKey, String attributeValue, boolean caseSensitive)
void
save(long userId, String attributeKey, String attributeValue)
Insert new user attribute or update existing one
-
-
-
Method Detail
-
findAll
@NotNull Map<String,String> findAll(long userId)
Find all user attributes- Parameters:
userId
- user id- Returns:
- a mapping of user attributes keys to their values
-
deleteAll
void deleteAll(long userId)
Delete all user attributes- Parameters:
userId
- user id
-
delete
boolean delete(long userId, @NotNull String attributeKey)
Delete user attribute- Parameters:
userId
- user idattributeKey
- attribute key- Returns:
- true if the attribute with specified key was deleted and false otherwise
-
save
void save(long userId, @NotNull String attributeKey, @NotNull String attributeValue) throws UserAttributeStorage.InvalidAttributeKeyException
Insert new user attribute or update existing one- Parameters:
userId
- user idattributeKey
- attribute keyattributeValue
- attribute value- Throws:
UserAttributeStorage.InvalidAttributeKeyException
- if a key is empty or too long string
-
-