public abstract class AbstractRealm extends Object
Realm
Constructor and Description |
---|
AbstractRealm() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addUser(String name,
char[] password,
String[] groupList)
Adds new user to file realm.
|
abstract String |
getAuthType()
Returns a short (preferably less than fifteen characters) description of the kind of
authentication which is supported by this realm.
|
abstract Enumeration<String> |
getGroupNames()
Returns names of all the groups in this particular realm.
|
abstract Enumeration<String> |
getGroupNames(String username)
Returns the name of all the groups that this user belongs to
|
abstract User |
getUser(String name)
Returns the information recorded about a particular named user.
|
abstract Enumeration<String> |
getUserNames()
Returns names of all the users in this particular realm.
|
abstract void |
persist()
Persist the realm data to permanent storage
|
abstract void |
refresh()
Refreshes the realm data so that new users/groups are visible.
|
abstract void |
removeUser(String name)
Remove user from file realm.
|
abstract boolean |
supportsUserManagement() |
abstract void |
updateUser(String name,
String newName,
char[] password,
String[] groups)
Update data for an existing user.
|
public abstract String getAuthType()
public abstract Enumeration<String> getUserNames() throws BadRealmException
BadRealmException
- if realm data structures are badpublic abstract User getUser(String name) throws NoSuchUserException, BadRealmException
name
- name of the user whose information is desiredNoSuchUserException
- if the user doesn't existBadRealmException
- if realm data structures are badpublic abstract Enumeration<String> getGroupNames() throws BadRealmException
BadRealmException
- if realm data structures are badpublic abstract Enumeration<String> getGroupNames(String username) throws InvalidOperationException, NoSuchUserException
username
- name of the user in this realm whose group listing is needed.InvalidOperationException
- thrown if the realm does not support this operationNoSuchUserException
public abstract boolean supportsUserManagement()
public abstract void addUser(String name, char[] password, String[] groupList) throws BadRealmException, IASSecurityException
name
- User name.password
- Cleartext password for the user.groupList
- List of groups to which user belongs.BadRealmException
- If there are problems adding user.IASSecurityException
public abstract void updateUser(String name, String newName, char[] password, String[] groups) throws NoSuchUserException, BadRealmException, IASSecurityException
name
- Current name of the user to update.newName
- New name to give this user. It can be the same as the original name. Otherwise it
must be a new user name which does not already exist as a user.password
- Cleartext password for the user. If non-null the user password is changed to this
value. If null, the original password is retained.groups
- Array of groups to which user belongs.BadRealmException
- If there are problems adding user.NoSuchUserException
- If user does not exist.IASSecurityException
public abstract void removeUser(String name) throws NoSuchUserException, BadRealmException
name
- User name.NoSuchUserException
- If user does not exist.BadRealmException
public abstract void persist() throws BadRealmException
BadRealmException
public abstract void refresh() throws BadRealmException
BadRealmException
- if realm data structures are badCopyright © 2021. All rights reserved.