public interface UserDatabase
User
s and Group
s
that can be maintained by an application, along with definitions of
corresponding Role
s, and referenced by a Realm
for
authentication and access control.Modifier and Type | Method and Description |
---|---|
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) |
Role |
findRole(String rolename) |
User |
findUser(String username) |
Iterator<Group> |
getGroups() |
String |
getId() |
Iterator<Role> |
getRoles() |
Iterator<User> |
getUsers() |
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.
|
String getId()
void close() throws Exception
Exception
- if any exception is thrown during closingGroup createGroup(String groupname, String description)
Group
defined in this user database.groupname
- The group name of the new group (must be unique)description
- The description of this groupRole createRole(String rolename, String description)
Role
defined in this user database.rolename
- The role name of the new role (must be unique)description
- The description of this roleUser createUser(String username, String password, String fullName)
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 userGroup findGroup(String groupname)
groupname
- Name of the group to returnGroup
with the specified group name, if any;
otherwise return null
.Role findRole(String rolename)
rolename
- Name of the role to returnRole
with the specified role name, if any; otherwise
return null
.User findUser(String username)
username
- Name of the user to returnUser
with the specified user name, if any; otherwise
return null
.void open() throws Exception
Exception
- if any exception is thrown during openingvoid removeGroup(Group group)
Group
from this user database.group
- The group to be removedvoid removeRole(Role role)
Role
from this user database.role
- The role to be removedvoid removeUser(User user)
User
from this user database.user
- The user to be removedCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.