Top Description Fields Constructors Methods
org.apache.catalina.mbeans

public Class DataSourceUserDatabaseMBean

extends BaseModelMBean
Class Inheritance
Imports
java.util.ArrayList, .Iterator, .List, org.apache.catalina.Group, .Role, .User, .UserDatabase, org.apache.tomcat.util.modeler.BaseModelMBean, .ManagedBean, .Registry

A ModelMBean implementation for the org.apache.catalina.users.DataSourceUserDatabase component.

Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
protected final ManagedBean
managed

The ManagedBean information describing this MBean.

protected final Registry
registry

The configuration information registry for our managed beans.

Inherited from org.apache.tomcat.util.modeler.BaseModelMBean:
attributeBroadcastergeneralBroadcastermanagedBeanonameresourceresourceType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addGroupRole(String
The group name
groupname
,
String
The role name
rolename
)

Add role to a group.

public void
addUserGroup(String
The user name
username
,
String
The group name
groupname
)

Add group to user.

public void
addUserRole(String
The user name
username
,
String
The role name
rolename
)

Add specified role to the user.

public void
changeUserPassword(String
The user name
username
,
String
The new credentials
password
)

Change user credentials.

public String

Returns:

the new group name
createGroup
(String
Group name of the new group
groupname
,
String
Description of the new group
description
)

Create a new Group and return the corresponding name.

public String

Returns:

the new role name
createRole
(String
Group name of the new group
rolename
,
String
Description of the new group
description
)

Create a new Role and return the corresponding name.

public String

Returns:

the new user name
createUser
(String
User name of the new user
username
,
String
Password for the new user
password
,
String
Full name for the new user
fullName
)

Create a new User and return the corresponding name.

public String[]

Returns:

Array of role names
getGroupRoles
(String
The group name
groupname
)

Get roles for a group.

public String[]

Returns:

the names of all groups defined in this database.
getGroups
()

public String[]

Returns:

the names of all roles defined in this database.
getRoles
()

public String[]

Returns:

Array of group names
getUserGroups
(String
The user name
username
)

Get groups for a user.

public String[]

Returns:

Array of role names
getUserRoles
(String
The user name
username
)

Get roles for a user.

public String[]

Returns:

the names of all users defined in this database.
getUsers
()

public void
removeGroup(String
Group name to remove
groupname
)

Remove an existing group.

public void
removeGroupRole(String
The group name
groupname
,
String
The role name
rolename
)

Remove role from a group.

public void
removeRole(String
Role name to remove
rolename
)

Remove an existing role.

public void
removeUser(String
User name to remove
username
)

Remove an existing user.

public void
removeUserGroup(String
The user name
username
,
String
The group name
groupname
)

Remove group from user.

public void
removeUserRole(String
The user name
username
,
String
The role name
rolename
)

Remove specified role from the user.

Inherited from org.apache.tomcat.util.modeler.BaseModelMBean:
addAttributeChangeNotificationListeneraddNotificationListenergetAttributegetAttributesgetClassNamegetJmxNamegetManagedResourcegetMBeanInfogetModelerTypegetNotificationInfogetObjectNameinvokepostDeregisterpostRegisterpreDeregisterpreRegisterremoveAttributeChangeNotificationListenerremoveNotificationListenersendAttributeChangeNotificationsendAttributeChangeNotificationsendNotificationsendNotificationsetAttributesetAttributessetManagedBeansetManagedResourcetoString

Field Detail

managedback to summary
protected final ManagedBean managed

The ManagedBean information describing this MBean.

registryback to summary
protected final Registry registry

The configuration information registry for our managed beans.

Constructor Detail

DataSourceUserDatabaseMBeanback to summary
public DataSourceUserDatabaseMBean()

Method Detail

addGroupRoleback to summary
public void addGroupRole(String groupname, String rolename)

Add role to a group.

Parameters
groupname:String

The group name

rolename:String

The role name

addUserGroupback to summary
public void addUserGroup(String username, String groupname)

Add group to user.

Parameters
username:String

The user name

groupname:String

The group name

addUserRoleback to summary
public void addUserRole(String username, String rolename)

Add specified role to the user.

Parameters
username:String

The user name

rolename:String

The role name

changeUserPasswordback to summary
public void changeUserPassword(String username, String password)

Change user credentials.

Parameters
username:String

The user name

password:String

The new credentials

createGroupback to summary
public String createGroup(String groupname, String description)

Create a new Group and return the corresponding name.

Parameters
groupname:String

Group name of the new group

description:String

Description of the new group

Returns:String

the new group name

createRoleback to summary
public String createRole(String rolename, String description)

Create a new Role and return the corresponding name.

Parameters
rolename:String

Group name of the new group

description:String

Description of the new group

Returns:String

the new role name

createUserback to summary
public String createUser(String username, String password, String fullName)

Create a new User and return the corresponding name.

Parameters
username:String

User name of the new user

password:String

Password for the new user

fullName:String

Full name for the new user

Returns:String

the new user name

getGroupRolesback to summary
public String[] getGroupRoles(String groupname)

Get roles for a group.

Parameters
groupname:String

The group name

Returns:String[]

Array of role names

getGroupsback to summary
public String[] getGroups()
Returns:String[]

the names of all groups defined in this database.

getRolesback to summary
public String[] getRoles()
Returns:String[]

the names of all roles defined in this database.

getUserGroupsback to summary
public String[] getUserGroups(String username)

Get groups for a user.

Parameters
username:String

The user name

Returns:String[]

Array of group names

getUserRolesback to summary
public String[] getUserRoles(String username)

Get roles for a user.

Parameters
username:String

The user name

Returns:String[]

Array of role names

getUsersback to summary
public String[] getUsers()
Returns:String[]

the names of all users defined in this database.

removeGroupback to summary
public void removeGroup(String groupname)

Remove an existing group.

Parameters
groupname:String

Group name to remove

removeGroupRoleback to summary
public void removeGroupRole(String groupname, String rolename)

Remove role from a group.

Parameters
groupname:String

The group name

rolename:String

The role name

removeRoleback to summary
public void removeRole(String rolename)

Remove an existing role.

Parameters
rolename:String

Role name to remove

removeUserback to summary
public void removeUser(String username)

Remove an existing user.

Parameters
username:String

User name to remove

removeUserGroupback to summary
public void removeUserGroup(String username, String groupname)

Remove group from user.

Parameters
username:String

The user name

groupname:String

The group name

removeUserRoleback to summary
public void removeUserRole(String username, String rolename)

Remove specified role from the user.

Parameters
username:String

The user name

rolename:String

The role name