public abstract class AbstractStatefulRealm extends AbstractRealm implements Comparable<Realm>
| Modifier and Type | Field and Description |
|---|---|
protected GroupMapper |
groupMapper |
static String |
PARAM_GROUP_MAPPING |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStatefulRealm()
The default the constructor creates a realm which will later be initialized,
either from properties or by deserializing.
|
| Modifier and Type | Method and Description |
|---|---|
protected String[] |
addAssignGroups(String[] groups)
Add assign groups to given array of groups.
|
int |
compareTo(Realm otherRealm)
Compares a realm to another.
|
protected String |
getDefaultDigestAlgorithm() |
String |
getJAASContext()
Returns name of JAAS context used by this realm.
|
protected ArrayList<String> |
getMappedGroupNames(String group) |
String |
getName()
Returns the name of this realm.
|
protected Properties |
getProperties()
Return properties of the realm.
|
String |
getProperty(String name)
Get a realm property.
|
protected void |
init(Properties properties)
Initialize a realm with some properties.
|
void |
refresh(String configName)
Refreshes the realm data so that new users/groups are visible.
|
protected void |
setName(String name)
Assigns the name of this realm, and stores it in the cache of realms.
|
void |
setProperty(String name,
String value)
Set a realm property.
|
String |
toString()
Returns the name of this realm.
|
addUser, getAuthType, getGroupNames, getGroupNames, getUser, getUserNames, persist, refresh, removeUser, supportsUserManagement, updateUserpublic static final String PARAM_GROUP_MAPPING
protected GroupMapper groupMapper
protected AbstractStatefulRealm()
protected void init(Properties properties) throws BadRealmException, NoSuchRealmException
properties - initialization parameters used by this realm.BadRealmException - if the configuration parameters identify a corrupt realmNoSuchRealmException - if the configuration parameters specify a realm which doesn't
existprotected String[] addAssignGroups(String[] groups)
groups - public void refresh(String configName) throws BadRealmException
configName - BadRealmException - if realm data structures are badpublic final String getName()
protected final void setName(String name)
name - name to be assigned to this realm.protected String getDefaultDigestAlgorithm()
public String getProperty(String name)
name - property name.public void setProperty(String name, String value)
name - property name.value - property value.protected Properties getProperties()
public String getJAASContext()
JAAS context determines the login module(s) to be invoked by means of JAAS configuration file (login.conf
in domain config directory).
Default implementation uses value of realm's property jaas-context.
public String toString()
public int compareTo(Realm otherRealm)
The comparison first considers the authentication type, so that realms supporting the same kind of user authentication are grouped together. Then it compares realm realm names. Realms compare "before" other kinds of objects (i.e. there's only a partial order defined, in the case that those other objects compare themselves "before" a realm object).
compareTo in interface Comparable<Realm>Copyright © 2019. All rights reserved.