org.apache.catalina
Interface UserDatabase
- MemoryUserDatabase
public interface UserDatabase
Abstract representation of a database of
Users and
Groups that can be maintained by an application,
along with definitions of corresponding
Roles, and
referenced by a
Realm for authentication and access control.
Version:
- Craig R. McClanahan
- 4.1
void | close()- Finalize access to this user database.
|
Group | createGroup(String groupname, String description)- Create and return a new
Group defined in this user database.
|
Role | createRole(String rolename, String description)- Create and return a new
Role defined in this user database.
|
User | createUser(String username, String password, String fullName)- Create and return a new
User defined in this user database.
|
Group | findGroup(String groupname)- Return the
Group with the specified group name, if any;
otherwise return null.
|
Role | findRole(String rolename)- Return the
Role with the specified role name, if any;
otherwise return null.
|
User | findUser(String username)- Return the
User with the specified user name, if any;
otherwise return null.
|
Iterator | getGroups()- Return the set of
Groups defined in this user database.
|
String | getId()- Return the unique global identifier of this user database.
|
Iterator | getRoles()- Return the set of
Roles defined in this user database.
|
Iterator | getUsers()- Return the set of
Users defined in this user database.
|
void | open()- Initialize access to this user database.
|
void | removeGroup(Group group)- Remove the specified
Group from this user database.
|
void | removeRole(Role role)- Remove the specified
Role from this user database.
|
void | removeUser(User user)- Remove the specified
User from this user database.
|
void | save()- Save any updated information to the persistent storage location for
this user database.
|
close
public void close()
throws Exception Finalize access to this user database.
createGroup
public Group createGroup(String groupname,
String description) Create and return a new
Group defined in this user database.
groupname - The group name of the new group (must be unique)description - The description of this group
createRole
public Role createRole(String rolename,
String description) Create and return a new
Role defined in this user database.
rolename - The role name of the new role (must be unique)description - The description of this role
createUser
public User createUser(String username,
String password,
String fullName) Create and return a new
User defined in this user database.
username - The logon username of the new user (must be unique)password - The logon password of the new userfullName - The full name of the new user
findGroup
public Group findGroup(String groupname)
Return the
Group with the specified group name, if any;
otherwise return
null.
groupname - Name of the group to return
findRole
public Role findRole(String rolename)
Return the
Role with the specified role name, if any;
otherwise return
null.
rolename - Name of the role to return
findUser
public User findUser(String username)
Return the
User with the specified user name, if any;
otherwise return
null.
username - Name of the user to return
getGroups
public Iterator getGroups()
Return the set of
Groups defined in this user database.
getId
public String getId()
Return the unique global identifier of this user database.
getRoles
public Iterator getRoles()
Return the set of
Roles defined in this user database.
getUsers
public Iterator getUsers()
Return the set of
Users defined in this user database.
open
public void open()
throws Exception Initialize access to this user database.
removeGroup
public void removeGroup(Group group)
Remove the specified
Group from this user database.
group - The group to be removed
removeRole
public void removeRole(Role role)
Remove the specified
Role from this user database.
role - The role to be removed
removeUser
public void removeUser(User user)
Remove the specified
User from this user database.
user - The user to be removed
save
public void save()
throws Exception Save any updated information to the persistent storage location for
this user database.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.