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 |
---|---|
java.lang.String |
createGroup(java.lang.String groupname,
java.lang.String description)
Create a new Group and return the corresponding MBean Name.
|
java.lang.String |
createRole(java.lang.String rolename,
java.lang.String description)
Create a new Role and return the corresponding MBean Name.
|
java.lang.String |
createUser(java.lang.String username,
java.lang.String password,
java.lang.String fullName)
Create a new User and return the corresponding MBean Name.
|
java.lang.String |
findGroup(java.lang.String groupname)
Return the MBean Name for the specified group name (if any);
otherwise return
null . |
java.lang.String |
findRole(java.lang.String rolename)
Return the MBean Name for the specified role name (if any);
otherwise return
null . |
java.lang.String |
findUser(java.lang.String username)
Return the MBean Name for the specified user name (if any);
otherwise return
null . |
java.lang.String[] |
getGroups() |
java.lang.String[] |
getRoles() |
java.lang.String[] |
getUsers() |
void |
removeGroup(java.lang.String groupname)
Remove an existing group and destroy the corresponding MBean.
|
void |
removeRole(java.lang.String rolename)
Remove an existing role and destroy the corresponding MBean.
|
void |
removeUser(java.lang.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 javax.management.MBeanException, javax.management.RuntimeOperationsException
ModelMBean
with default
ModelMBeanInfo
information.javax.management.MBeanException
- if the initializer of an object
throws an exceptionjavax.management.RuntimeOperationsException
- if an IllegalArgumentException
occurspublic java.lang.String[] getGroups()
public java.lang.String[] getRoles()
public java.lang.String[] getUsers()
public java.lang.String createGroup(java.lang.String groupname, java.lang.String description)
groupname
- Group name of the new groupdescription
- Description of the new grouppublic java.lang.String createRole(java.lang.String rolename, java.lang.String description)
rolename
- Group name of the new groupdescription
- Description of the new grouppublic java.lang.String createUser(java.lang.String username, java.lang.String password, java.lang.String fullName)
username
- User name of the new userpassword
- Password for the new userfullName
- Full name for the new userpublic java.lang.String findGroup(java.lang.String groupname)
null
.groupname
- Group name to look uppublic java.lang.String findRole(java.lang.String rolename)
null
.rolename
- Role name to look uppublic java.lang.String findUser(java.lang.String username)
null
.username
- User name to look uppublic void removeGroup(java.lang.String groupname)
groupname
- Group name to removepublic void removeRole(java.lang.String rolename)
rolename
- Role name to removepublic void removeUser(java.lang.String username)
username
- User name to removeCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.