Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.mbeans
Class UserMBean

    java.lang.Object
      org.apache.commons.modeler.BaseModelMBean
          org.apache.catalina.mbeans.UserMBean

All Implemented Interfaces:
  javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.modelmbean.ModelMBean, javax.management.modelmbean.ModelMBeanNotificationBroadcaster, javax.management.NotificationBroadcaster, javax.management.PersistentMBean

public class UserMBean
extends org.apache.commons.modeler.BaseModelMBean

A ModelMBean implementation for the `org.apache.catalina.User` component.

Version:
  $Revision: 1.4 $ $Date: 2004/08/26 21:36:09 $
Author:
  Craig R. McClanahan

Field Summary
`protected org.apache.commons.modeler.ManagedBean` | `managed` The `ManagedBean` information describing this MBean.
`protected javax.management.MBeanServer` | `mserver` The `MBeanServer` in which we are registered.
`protected org.apache.commons.modeler.Registry` | `registry` The configuration information registry for our managed beans.

Fields inherited from class org.apache.commons.modeler.BaseModelMBean
`attributeBroadcaster, attributes, generalBroadcaster, info, oname, resource, resourceType, source`

Constructor Summary
`UserMBean()` Construct a `ModelMBean` with default `ModelMBeanInfo` information.

Method Summary
`void` | `addGroup(java.lang.String groupname)` Add a new `Group` to those this user belongs to.
`void` | `addRole(java.lang.String rolename)` Add a new `Role` to those this user belongs to.
`java.lang.String[]` | `getGroups()` Return the MBean Names of all groups this user is a member of.
`java.lang.String[]` | `getRoles()` Return the MBean Names of all roles assigned to this user.
`void` | `removeGroup(java.lang.String groupname)` Remove a `Group` from those this user belongs to.
`void` | `removeRole(java.lang.String rolename)` Remove a `Role` from those this user belongs to.

Methods inherited from class org.apache.commons.modeler.BaseModelMBean
`addAttributeChangeNotificationListener, addNotificationListener, createDefaultModelMBeanInfo, createResource, getAttribute, getAttributes, getClassName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, getRegistry, initModelInfo, invoke, isModelMBeanInfoValid, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedResource, setModeledType, setModelMBeanInfo, setRegistry, store, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### registry

    protected org.apache.commons.modeler.Registry registry

  The configuration information registry for our managed beans.

### mserver

    protected javax.management.MBeanServer mserver

  The `MBeanServer` in which we are registered.

### managed

    protected org.apache.commons.modeler.ManagedBean managed

  The `ManagedBean` information describing this MBean.

Constructor Detail

### UserMBean

    public UserMBean()
              throws javax.management.MBeanException,
                     javax.management.RuntimeOperationsException

  Construct a `ModelMBean` with default `ModelMBeanInfo` information.

Throws:
  `javax.management.MBeanException` - if the initializer of an object throws an exception
  `javax.management.RuntimeOperationsException` - if an IllegalArgumentException occurs

Method Detail

### getGroups

    public java.lang.String[] getGroups()

  Return the MBean Names of all groups this user is a member of.

### getRoles

    public java.lang.String[] getRoles()

  Return the MBean Names of all roles assigned to this user.

### addGroup

    public void addGroup(java.lang.String groupname)

  Add a new `Group` to those this user belongs to.

  Parameters:
    `groupname` - Group name of the new group

### addRole

    public void addRole(java.lang.String rolename)

  Add a new `Role` to those this user belongs to.

  Parameters:
    `rolename` - Role name of the new role

### removeGroup

    public void removeGroup(java.lang.String groupname)

  Remove a `Group` from those this user belongs to.

  Parameters:
    `groupname` - Group name of the old group

### removeRole

    public void removeRole(java.lang.String rolename)

  Remove a `Role` from those this user belongs to.

  Parameters:
    `rolename` - Role name of the old role

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.