public class MemoryUserDatabaseMBean extends BaseModelMBean
A ModelMBean implementation for the
org.apache.catalina.users.MemoryUserDatabase
component.
Modifier and Type | Field and Description |
---|---|
protected ManagedBean |
managed
The
ManagedBean information describing this MBean. |
protected ManagedBean |
managedGroup
The
ManagedBean information describing Group MBeans. |
protected ManagedBean |
managedRole
The
ManagedBean information describing Group MBeans. |
protected ManagedBean |
managedUser
The
ManagedBean information describing User MBeans. |
protected Registry |
registry
The configuration information registry for our managed beans.
|
attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType
Constructor and Description |
---|
MemoryUserDatabaseMBean()
Construct a
ModelMBean with default
ModelMBeanInfo information. |
Modifier and Type | Method and Description |
---|---|
String |
createGroup(String groupname,
String description)
Create a new Group and return the corresponding MBean Name.
|
String |
createRole(String rolename,
String description)
Create a new Role and return the corresponding MBean Name.
|
String |
createUser(String username,
String password,
String fullName)
Create a new User and return the corresponding MBean Name.
|
String |
findGroup(String groupname)
Return the MBean Name for the specified group name (if any);
otherwise return
null . |
String |
findRole(String rolename)
Return the MBean Name for the specified role name (if any);
otherwise return
null . |
String |
findUser(String username)
Return the MBean Name for the specified user name (if any);
otherwise return
null . |
String[] |
getGroups()
Return the MBean Names of all groups defined in this database.
|
String[] |
getRoles()
Return the MBean Names of all roles defined in this database.
|
String[] |
getUsers()
Return the MBean Names of all users defined in this database.
|
void |
removeGroup(String groupname)
Remove an existing group and destroy the corresponding MBean.
|
void |
removeRole(String rolename)
Remove an existing role and destroy the corresponding MBean.
|
void |
removeUser(String username)
Remove an existing user and destroy the corresponding MBean.
|
addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, invoke, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedBean, setManagedResource, toString
protected final Registry registry
protected final ManagedBean managed
ManagedBean
information describing this MBean.protected final ManagedBean managedGroup
ManagedBean
information describing Group MBeans.protected final ManagedBean managedRole
ManagedBean
information describing Group MBeans.protected final ManagedBean managedUser
ManagedBean
information describing User MBeans.public MemoryUserDatabaseMBean() throws MBeanException, RuntimeOperationsException
ModelMBean
with default
ModelMBeanInfo
information.MBeanException
- if the initializer of an object
throws an exceptionRuntimeOperationsException
- if an IllegalArgumentException
occurspublic String[] getGroups()
public String[] getRoles()
public String[] getUsers()
public String createGroup(String groupname, String description)
groupname
- Group name of the new groupdescription
- Description of the new grouppublic String createRole(String rolename, String description)
rolename
- Group name of the new groupdescription
- Description of the new grouppublic String createUser(String username, String password, String fullName)
username
- User name of the new userpassword
- Password for the new userfullName
- Full name for the new userpublic String findGroup(String groupname)
null
.groupname
- Group name to look uppublic String findRole(String rolename)
null
.rolename
- Role name to look uppublic String findUser(String username)
null
.username
- User name to look uppublic void removeGroup(String groupname)
groupname
- Group name to removepublic void removeRole(String rolename)
rolename
- Role name to removepublic void removeUser(String username)
username
- User name to removeCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.