Package org.apache.catalina.mbeans
Class UserMBean
java.lang.Object
org.apache.tomcat.util.modeler.BaseModelMBean
org.apache.catalina.mbeans.UserMBean
- All Implemented Interfaces:
DynamicMBean
,MBeanRegistration
,ModelMBeanNotificationBroadcaster
,NotificationBroadcaster
A ModelMBean implementation for the org.apache.catalina.User
component.
- Author:
- Craig R. McClanahan
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ManagedBean
TheManagedBean
information describing this MBean.protected final Registry
The configuration information registry for our managed beans.Fields inherited from class org.apache.tomcat.util.modeler.BaseModelMBean
attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a newGroup
to those this user belongs to.void
Add a newRole
to those this user belongs to.String[]
String[]
getRoles()
void
removeGroup
(String groupname) Remove aGroup
from those this user belongs to.void
removeRole
(String rolename) Remove aRole
from those this user belongs to.Methods inherited from class org.apache.tomcat.util.modeler.BaseModelMBean
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
-
Field Details
-
registry
The configuration information registry for our managed beans. -
managed
TheManagedBean
information describing this MBean.
-
-
Constructor Details
-
UserMBean
public UserMBean()
-
-
Method Details
-
getGroups
- Returns:
- the MBean Names of all groups this user is a member of.
-
getRoles
- Returns:
- the MBean Names of all roles assigned to this user.
-
addGroup
Add a newGroup
to those this user belongs to.- Parameters:
groupname
- Group name of the new group
-
addRole
Add a newRole
to those this user belongs to.- Parameters:
rolename
- Role name of the new role
-
removeGroup
Remove aGroup
from those this user belongs to.- Parameters:
groupname
- Group name of the old group
-
removeRole
Remove aRole
from those this user belongs to.- Parameters:
rolename
- Role name of the old role
-