|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UsersRepository
Interface for a repository of users. A repository represents a logical grouping of users, typically by common purpose. E.g. the users served by an email server or the members of a mailing list.
Field Summary | |
---|---|
static java.lang.String |
ROLE
The component role used by components implementing this service |
static java.lang.String |
USER
|
Method Summary | |
---|---|
void |
addUser(java.lang.String name,
java.lang.Object attributes)
Adds a user to the repository with the specified attributes. |
boolean |
addUser(java.lang.String username,
java.lang.String password)
Adds a user to the repository with the specified password |
boolean |
addUser(User user)
Adds a user to the repository with the specified User object. |
boolean |
contains(java.lang.String name)
Returns whether or not this user is in the repository |
boolean |
containsCaseInsensitive(java.lang.String name)
Returns whether or not this user is in the repository. |
int |
countUsers()
Returns a count of the users in the repository. |
java.lang.String |
getRealName(java.lang.String name)
Returns the user name of the user matching name on an equalsIgnoreCase basis. |
User |
getUserByName(java.lang.String name)
Get the user object with the specified user name. |
User |
getUserByNameCaseInsensitive(java.lang.String name)
Get the user object with the specified user name. |
java.util.Iterator |
list()
List users in repository. |
void |
removeUser(java.lang.String name)
Removes a user from the repository |
boolean |
test(java.lang.String name,
java.lang.String password)
Test if user with name 'name' has password 'password'. |
boolean |
updateUser(User user)
Update the repository with the specified user object. |
Field Detail |
---|
static final java.lang.String ROLE
static final java.lang.String USER
Method Detail |
---|
boolean addUser(User user)
user
- the user to be added
void addUser(java.lang.String name, java.lang.Object attributes)
name
- the name of the user to be addedattributes
- see decriptionboolean addUser(java.lang.String username, java.lang.String password)
username
- the username of the user to be addedpassword
- the password of the user to add
User getUserByName(java.lang.String name)
name
- the name of the user to retrieve
User getUserByNameCaseInsensitive(java.lang.String name)
name
- the name of the user to retrieve
java.lang.String getRealName(java.lang.String name)
name
- the name to case-correct
boolean updateUser(User user)
void removeUser(java.lang.String name)
name
- the user to remove from the repositoryboolean contains(java.lang.String name)
name
- the name to check in the repository
boolean containsCaseInsensitive(java.lang.String name)
name
- the name to check in the repository
boolean test(java.lang.String name, java.lang.String password)
name
- the name of the user to be testedpassword
- the password to be tested
int countUsers()
java.util.Iterator list()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |