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
public class UserMBean extends BaseModelMBean
A ModelMBean implementation for the
org.apache.catalina.Usercomponent.- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description protected ManagedBeanmanagedTheManagedBeaninformation describing this MBean.protected RegistryregistryThe 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
Constructors Constructor Description UserMBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGroup(String groupname)Add a newGroupto those this user belongs to.voidaddRole(String rolename)Add a newRoleto those this user belongs to.String[]getGroups()String[]getRoles()voidremoveGroup(String groupname)Remove aGroupfrom those this user belongs to.voidremoveRole(String rolename)Remove aRolefrom 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 Detail
-
registry
protected final Registry registry
The configuration information registry for our managed beans.
-
managed
protected final ManagedBean managed
TheManagedBeaninformation describing this MBean.
-
-
Method Detail
-
getGroups
public String[] getGroups()
- Returns:
- the MBean Names of all groups this user is a member of.
-
getRoles
public String[] getRoles()
- Returns:
- the MBean Names of all roles assigned to this user.
-
addGroup
public void addGroup(String groupname)
Add a newGroupto those this user belongs to.- Parameters:
groupname- Group name of the new group
-
addRole
public void addRole(String rolename)
Add a newRoleto those this user belongs to.- Parameters:
rolename- Role name of the new role
-
removeGroup
public void removeGroup(String groupname)
Remove aGroupfrom those this user belongs to.- Parameters:
groupname- Group name of the old group
-
-