public interface UserAdminMBean
Modifier and Type | Field and Description |
---|---|
static CompositeType |
AUTORIZATION_TYPE
The Composite Type for an Authorization object.
|
static String |
CREDENTIALS
The CREDENTIALS key, used in
CREDENTIALS_ITEM . |
static Item |
CREDENTIALS_ITEM
The item containing the credentials of a user.
|
static CompositeType |
GROUP_TYPE
The Composite Type for a Group.
|
static String |
MEMBERS
The MEMBERS key, used in
MEMBERS_ITEM . |
static Item |
MEMBERS_ITEM
The item containing the members of a group.
|
static String |
NAME
The key NAME, used in
NAME_ITEM . |
static Item |
NAME_ITEM
The item for the user name for an authorization object.
|
static String |
OBJECTNAME
User Admin MBean object name.
|
static String |
PROPERTIES
The PROPERTIES key, used in
PROPERTIES_ITEM . |
static Item |
PROPERTIES_ITEM
The item containing the properties of a Role.
|
static String |
REQUIRED_MEMBERS
The REQUIRED_MEMBERS key, used in
REQUIRED_MEMBERS_ITEM . |
static Item |
REQUIRED_MEMBERS_ITEM
The item containing the required members of a group.
|
static CompositeType |
ROLE_TYPE
The Composite Type for a Role.
|
static String |
ROLES
The key ROLES, used in
ROLES_ITEM . |
static Item |
ROLES_ITEM
The item containing the roles for this authorization object.
|
static String |
TYPE
The Role TYPE key, used in
TYPE_ITEM . |
static Item |
TYPE_ITEM
The item containing the type of the roles encapsulated by this
authorization object.
|
static CompositeType |
USER_TYPE
A Composite Type for a User.
|
Modifier and Type | Method and Description |
---|---|
void |
addCredential(String key,
byte[] value,
String username)
Add credentials to a user, associated with the supplied key
|
void |
addCredentialString(String key,
String value,
String username)
Add credentials to a user, associated with the supplied key
|
boolean |
addMember(String groupname,
String rolename)
Add a member to the group.
|
void |
addProperty(String key,
byte[] value,
String rolename)
Add or update a property on a role.
|
void |
addPropertyString(String key,
String value,
String rolename)
Add or update a property on a role
|
boolean |
addRequiredMember(String groupname,
String rolename)
Add a required member to the group
|
void |
createGroup(String name)
Create a Group
|
void |
createRole(String name)
Deprecated.
This method was specified in error. It does not function and
must not be used. Use either
createUser(String) or
createGroup(String) . |
void |
createUser(String name)
Create a User
|
CompositeData |
getAuthorization(String user)
Answer the authorization for the user name.
|
TabularData |
getCredentials(String username)
Answer the credentials associated with a user.
|
CompositeData |
getGroup(String groupname)
Answer the Group associated with the group name.
|
String[] |
getGroups(String filter)
Answer the list of group names
|
String[] |
getImpliedRoles(String username)
Answer the list of implied roles for a user
|
String[] |
getMembers(String groupname)
Answer the the user names which are members of the group
|
TabularData |
getProperties(String rolename)
Answer the properties associated with a role.
|
String[] |
getRequiredMembers(String groupname)
Answer the list of user names which are required members of this group
|
CompositeData |
getRole(String name)
Answer the role associated with a name.
|
String[] |
getRoles(String filter)
Answer the list of role names which match the supplied filter
|
CompositeData |
getUser(String username)
Answer the User associated with the user name.
|
String[] |
getUsers(String filter)
Answer the list of user names in the User Admin database
|
String |
getUserWithProperty(String key,
String value)
Answer the user name with the given property key-value pair from the User
Admin service database.
|
String[] |
listGroups()
Answer the list of group names
|
String[] |
listRoles()
Answer the list of role names in the User Admin database
|
String[] |
listUsers()
Answer the list of user names in the User Admin database
|
void |
removeCredential(String key,
String username)
Remove the credential associated with the given user
|
boolean |
removeGroup(String name)
Remove the Group associated with the name
|
boolean |
removeMember(String groupname,
String rolename)
Remove a role from the group
|
void |
removeProperty(String key,
String rolename)
Remove a property from a role
|
boolean |
removeRole(String name)
Remove the Role associated with the name
|
boolean |
removeUser(String name)
Remove the User associated with the name
|
static final String OBJECTNAME
static final String NAME
NAME_ITEM
.static final Item NAME_ITEM
NAME
and the type is SimpleType.STRING
.static final String ROLES
ROLES_ITEM
.static final Item ROLES_ITEM
ROLES
. and the type is JmxConstants.STRING_ARRAY_TYPE
.static final CompositeType AUTORIZATION_TYPE
NAME_ITEM
and ROLES_ITEM
items.static final String TYPE
TYPE_ITEM
.static final Item TYPE_ITEM
TYPE
and the type is
SimpleType.INTEGER
.static final String PROPERTIES
PROPERTIES_ITEM
.static final Item PROPERTIES_ITEM
PROPERTIES
and the type is JmxConstants.PROPERTIES_TYPE
.static final CompositeType ROLE_TYPE
static final String CREDENTIALS
CREDENTIALS_ITEM
.static final Item CREDENTIALS_ITEM
CREDENTIALS
and the type is JmxConstants.PROPERTIES_TYPE
.static final CompositeType USER_TYPE
ROLE_TYPE
and adds
CREDENTIALS_ITEM
.
This type extends the ROLE_TYPE
. It adds:
static final String MEMBERS
MEMBERS_ITEM
.static final Item MEMBERS_ITEM
MEMBERS
and the type is JmxConstants.STRING_ARRAY_TYPE
. It is used in
GROUP_TYPE
.static final String REQUIRED_MEMBERS
REQUIRED_MEMBERS_ITEM
.static final Item REQUIRED_MEMBERS_ITEM
REQUIRED_MEMBERS
and the type is
JmxConstants.STRING_ARRAY_TYPE
. It is used in GROUP_TYPE
.static final CompositeType GROUP_TYPE
USER_TYPE
and adds
MEMBERS_ITEM
, and REQUIRED_MEMBERS_ITEM
.
This type extends the USER_TYPE
. It adds:
If there are no members or required members an empty array is returned in
the respective items.void addCredential(String key, byte[] value, String username) throws IOException
key
- The key of the credential to addvalue
- The value of the credential to addusername
- The name of the user that gets the credential.IOException
- if the operation failsIllegalArgumentException
- if the username is not a Uservoid addCredentialString(String key, String value, String username) throws IOException
key
- The key of the credential to addvalue
- The value of the credential to addusername
- The name of the user that gets the credential.IOException
- if the operation failsIllegalArgumentException
- if the username is not a Userboolean addMember(String groupname, String rolename) throws IOException
groupname
- The group name that receives the rolename
as
member.rolename
- The rolename
(User or Group) that must be added.true
if the role was added to the groupIOException
- if the operation failsIllegalArgumentException
- if an invalid group name or role name is
specifiedvoid addPropertyString(String key, String value, String rolename) throws IOException
key
- The key of the property to addvalue
- The value of the property to add (String
)rolename
- The role nameIOException
- if the operation failsIllegalArgumentException
- if an invalid role name is specifiedvoid addProperty(String key, byte[] value, String rolename) throws IOException
key
- The added property keyvalue
- The added byte[] property valuerolename
- The role name that receives the propertyIOException
- if the operation failsIllegalArgumentException
- if an invalid role name is specifiedboolean addRequiredMember(String groupname, String rolename) throws IOException
groupname
- The group name that is adddedrolename
- The role thatIOException
- if the operation failsIllegalArgumentException
- if an invalid group name or role name is
specifiedvoid createUser(String name) throws IOException
name
- Name of the user to createIOException
- if the operation failsvoid createGroup(String name) throws IOException
name
- Name of the group to createIOException
- if the operation failsvoid createRole(String name) throws IOException
createUser(String)
or
createGroup(String)
.name
- Ignored.IOException
- This method will throw an exception if called.CompositeData getAuthorization(String user) throws IOException
AUTORIZATION_TYPE
.user
- The user nameAUTORIZATION_TYPE
.IOException
- if the operation failsIllegalArgumentException
- if the user name is not a UserTabularData getCredentials(String username) throws IOException
JmxConstants.PROPERTIES_TYPE
.username
- The user nameJmxConstants.PROPERTIES_TYPE
IOException
- if the operation failsIllegalArgumentException
- if the user name is not a UserCompositeData getGroup(String groupname) throws IOException
GROUP_TYPE
groupname
- The group nameGROUP_TYPE
IOException
- if the operation failsIllegalArgumentException
- if the group name is not a GroupString[] listGroups() throws IOException
IOException
- if the operation failsString[] getGroups(String filter) throws IOException
filter
- The filter to applyIOException
- if the operation failsString[] getImpliedRoles(String username) throws IOException
username
- The name of the user that has the implied rolesIOException
- if the operation failsIllegalArgumentException
- if the username is not a UserString[] getMembers(String groupname) throws IOException
groupname
- The name of the group to get the members fromIOException
- if the operation failsIllegalArgumentException
- if the groupname is not a GroupTabularData getProperties(String rolename) throws IOException
JmxConstants.PROPERTIES_TYPE
.rolename
- The name of the role to get properties fromJmxConstants.PROPERTIES_TYPE
IOException
- if the operation failsIllegalArgumentException
- if the rolename is not a roleString[] getRequiredMembers(String groupname) throws IOException
groupname
- The name of the group to get the required members fromIOException
- if the operation failsIllegalArgumentException
- if the group name is not a GroupCompositeData getRole(String name) throws IOException
ROLE_TYPE
.name
- The name of the role to get the data fromROLE_TYPE
IOException
- if the operation failsIllegalArgumentException
- if the name is not a roleString[] listRoles() throws IOException
IOException
- if the operation failsString[] getRoles(String filter) throws IOException
filter
- The string representation of the
org.osgi.framework.Filter
that is used to filter the roles
by applying to the properties, if null
all roles are
returned.IOException
- if the operation failsCompositeData getUser(String username) throws IOException
USER_TYPE
.username
- The name of the requested userUSER_TYPE
IOException
- if the operation failsIllegalArgumentException
- if the username is not a UserString getUserWithProperty(String key, String value) throws IOException
key
- The key to comparevalue
- The value to compareIOException
- if the operation failsString[] listUsers() throws IOException
IOException
- if the operation failsString[] getUsers(String filter) throws IOException
filter
- The filter to applyIOException
- if the operation failsvoid removeCredential(String key, String username) throws IOException
key
- The key of the credential to removeusername
- The name of the user for which the credential must be
removedIOException
- if the operation failsIllegalArgumentException
- if the username is not a Userboolean removeMember(String groupname, String rolename) throws IOException
groupname
- The group namerolename
- IOException
- if the operation failsIllegalArgumentException
- if the groupname is not a Groupvoid removeProperty(String key, String rolename) throws IOException
key
- rolename
- IOException
- if the operation failsIllegalArgumentException
- if the rolename is not a roleboolean removeRole(String name) throws IOException
name
- IOException
- if the operation failsIllegalArgumentException
- if the name is not a roleboolean removeGroup(String name) throws IOException
name
- IOException
- if the operation failsIllegalArgumentException
- if the name is not a Groupboolean removeUser(String name) throws IOException
name
- IOException
- if the operation failsIllegalArgumentException
- if the name is not a UserCopyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0