GroupMBean (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.catalina.mbeans, class: GroupMBean

# Class GroupMBean

java.lang.Object
org.apache.tomcat.util.modeler.BaseModelMBean
org.apache.catalina.mbeans.GroupMBean

All Implemented Interfaces:
  `DynamicMBean, MBeanRegistration, ModelMBeanNotificationBroadcaster, NotificationBroadcaster`

public class GroupMBean extends BaseModelMBean

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final ManagedBean`
  `managed`
  The `ManagedBean` information describing this MBean.
  `protected final Registry`
  `registry`
  The configuration information registry for our managed beans.

  ### Fields inherited from class BaseModelMBean

  `attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GroupMBean()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addRole(String rolename)`
  Add a new `Role` to those this group belongs to.
  `String[]`
  `getRoles()`
  `String[]`
  `getUsers()`
  `void`
  `removeRole(String rolename)`
  Remove a `Role` from those this group belongs to.

  ### Methods inherited from class 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`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### registry

    protected final Registry registry
    The configuration information registry for our managed beans.

  - ### managed

    protected final ManagedBean managed
    The `ManagedBean` information describing this MBean.

- ## Constructor Details

  - ### GroupMBean

    public GroupMBean()

- ## Method Details

  - ### getRoles

    public String[] getRoles()
    Returns:
      the MBean Names of all authorized roles for this group.

  - ### getUsers

    public String[] getUsers()
    Returns:
      the MBean Names of all users that are members of this group.

  - ### addRole

    public void addRole(String rolename)
    Add a new `Role` to those this group belongs to.
    Parameters:
      `rolename` - Role name of the new role

  - ### removeRole

    public void removeRole(String rolename)
    Remove a `Role` from those this group belongs to.
    Parameters:
      `rolename` - Role name of the old role