Package org.apache.catalina.mbeans
Class DataSourceUserDatabaseMBean
java.lang.Object
org.apache.tomcat.util.modeler.BaseModelMBean
org.apache.catalina.mbeans.DataSourceUserDatabaseMBean
- All Implemented Interfaces:
- DynamicMBean,- MBeanRegistration,- ModelMBeanNotificationBroadcaster,- NotificationBroadcaster
 A ModelMBean implementation for the org.apache.catalina.users.DataSourceUserDatabase
 component.
 
- Author:
- Craig R. McClanahan
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final ManagedBeanTheManagedBeaninformation describing this MBean.protected final RegistryThe configuration information registry for our managed beans.Fields inherited from class org.apache.tomcat.util.modeler.BaseModelMBeanattributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddGroupRole(String groupname, String rolename) Add role to a group.voidaddUserGroup(String username, String groupname) Add group to user.voidaddUserRole(String username, String rolename) Add specified role to the user.voidchangeUserPassword(String username, String password) Change user credentials.createGroup(String groupname, String description) Create a new Group and return the corresponding name.createRole(String rolename, String description) Create a new Role and return the corresponding name.createUser(String username, String password, String fullName) Create a new User and return the corresponding name.String[]getGroupRoles(String groupname) Get roles for a group.String[]String[]getRoles()String[]getUserGroups(String username) Get groups for a user.String[]getUserRoles(String username) Get roles for a user.String[]getUsers()voidremoveGroup(String groupname) Remove an existing group.voidremoveGroupRole(String groupname, String rolename) Remove role from a group.voidremoveRole(String rolename) Remove an existing role.voidremoveUser(String username) Remove an existing user.voidremoveUserGroup(String username, String groupname) Remove group from user.voidremoveUserRole(String username, String rolename) Remove specified role from the user.Methods inherited from class org.apache.tomcat.util.modeler.BaseModelMBeanaddAttributeChangeNotificationListener, 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- 
registryThe configuration information registry for our managed beans.
- 
managedTheManagedBeaninformation describing this MBean.
 
- 
- 
Constructor Details- 
DataSourceUserDatabaseMBeanpublic DataSourceUserDatabaseMBean()
 
- 
- 
Method Details- 
getGroups- Returns:
- the names of all groups defined in this database.
 
- 
getRoles- Returns:
- the names of all roles defined in this database.
 
- 
getUsers- Returns:
- the names of all users defined in this database.
 
- 
createGroupCreate a new Group and return the corresponding name.- Parameters:
- groupname- Group name of the new group
- description- Description of the new group
- Returns:
- the new group name
 
- 
createRoleCreate a new Role and return the corresponding name.- Parameters:
- rolename- Group name of the new group
- description- Description of the new group
- Returns:
- the new role name
 
- 
createUserCreate a new User and return the corresponding name.- Parameters:
- username- User name of the new user
- password- Password for the new user
- fullName- Full name for the new user
- Returns:
- the new user name
 
- 
removeGroupRemove an existing group.- Parameters:
- groupname- Group name to remove
 
- 
removeRoleRemove an existing role.- Parameters:
- rolename- Role name to remove
 
- 
removeUserRemove an existing user.- Parameters:
- username- User name to remove
 
- 
changeUserPasswordChange user credentials.- Parameters:
- username- The user name
- password- The new credentials
 
- 
addUserRoleAdd specified role to the user.- Parameters:
- username- The user name
- rolename- The role name
 
- 
removeUserRoleRemove specified role from the user.- Parameters:
- username- The user name
- rolename- The role name
 
- 
getUserRolesGet roles for a user.- Parameters:
- username- The user name
- Returns:
- Array of role names
 
- 
addUserGroupAdd group to user.- Parameters:
- username- The user name
- groupname- The group name
 
- 
removeUserGroupRemove group from user.- Parameters:
- username- The user name
- groupname- The group name
 
- 
getUserGroupsGet groups for a user.- Parameters:
- username- The user name
- Returns:
- Array of group names
 
- 
addGroupRoleAdd role to a group.- Parameters:
- groupname- The group name
- rolename- The role name
 
- 
removeGroupRoleRemove role from a group.- Parameters:
- groupname- The group name
- rolename- The role name
 
- 
getGroupRolesGet roles for a group.- Parameters:
- groupname- The group name
- Returns:
- Array of role names
 
 
-