|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface UserModel
Manager of various user-oriented operations in TeamCity
| Method Summary | |
|---|---|
void |
addListener(UserModelListener listener)
Adds listener to the user model |
SUser |
createUserAccount(java.lang.String realm,
java.lang.String username)
Creates a new user. |
SUser |
findUserAccount(java.lang.String realm,
java.lang.String username)
Searches for a user account with specified realm and username |
SUser |
findUserAccount(java.lang.String realm,
java.lang.String username,
java.lang.String password)
Searches for a user account with specified realm, username and password |
SUser |
findUserById(long userId)
Searches for a user by id in the current login domain. |
UserSet<SUser> |
findUsersByPropertyValue(PropertyKey propertyKey,
java.lang.String propertyValue,
boolean caseSensitive)
Returns UserSet of users having specified property in the profile. |
UserSet<SUser> |
getAllUsers()
Returns all of the registered users |
SUser |
getGuestUser()
Returns guest user |
int |
getNumberOfRegisteredUsers()
Returns number of users currently registered in the system. |
boolean |
hasAdministratorAccount()
Returns true if there is at least one administrator that can be authenticated by specified login module. |
boolean |
isGuestUser(User user)
Returns true if the specified user is guest |
void |
removeListener(UserModelListener listener)
Removes listener from the user model |
void |
removeUserAccount(long userId)
Removes user account from database. |
| Method Detail |
|---|
SUser createUserAccount(java.lang.String realm,
java.lang.String username)
throws DuplicateUserAccountException,
MaxNumberOfUserAccountsReachedException,
EmptyUsernameException
realm - realm in which to create this user, can be nullusername - username
DuplicateUserAccountException - if user with specified username already exists in specified realm
MaxNumberOfUserAccountsReachedException - thrown is maximum number of user accounts reached
EmptyUsernameException - if username is an empty string@Nullable SUser findUserById(long userId)
userId - id of the user
@Nullable
SUser findUserAccount(java.lang.String realm,
java.lang.String username)
realm - can be null, in this case realm will not be considered when search is performedusername - username
@Nullable
SUser findUserAccount(java.lang.String realm,
java.lang.String username,
java.lang.String password)
realm - can be nullusername - usernamepassword - user password
UserSet<SUser> findUsersByPropertyValue(PropertyKey propertyKey,
java.lang.String propertyValue,
boolean caseSensitive)
propertyKey - property keypropertyValue - property valuecaseSensitive - whether to perform case sensitive search
UserSet<SUser> getAllUsers()
int getNumberOfRegisteredUsers()
boolean hasAdministratorAccount()
void removeUserAccount(long userId)
userId - id of the uservoid addListener(UserModelListener listener)
listener - listener to addvoid removeListener(UserModelListener listener)
listener - to remove
boolean isGuestUser(@NotNull
User user)
user - user to check
@NotNull SUser getGuestUser()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||