|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserAdminMBean
This MBean provides the management interface to the OSGi User Manager Service
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
Create a Role |
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 |
Field Detail |
---|
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 TYPE_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:
Method Detail |
---|
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 fails
IllegalArgumentException
- if the user name 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 fails
IllegalArgumentException
- 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 group
IOException
- if the operation failsvoid 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 name
IOException
- if the operation failsvoid 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 property
IOException
- if the operation failsboolean addRequiredMember(String groupname, String rolename) throws IOException
groupname
- The group name that is adddedrolename
- The role that
IOException
- if the operation failsvoid createUser(String name) throws IOException
name
- Name of the user to create
IOException
- if the operation failsvoid createGroup(String name) throws IOException
name
- Name of the group to create
IOException
- if the operation failsvoid createRole(String name) throws IOException
name
- of the role to create
IOException
- if the operation failsCompositeData getAuthorization(String user) throws IOException
AUTORIZATION_TYPE
.
user
- The user name
AUTORIZATION_TYPE
.
IOException
- if the operation fails
IllegalArgumentException
- if the user name is not a UserTabularData getCredentials(String username) throws IOException
JmxConstants.PROPERTIES_TYPE
.
username
- The user name
JmxConstants.PROPERTIES_TYPE
IOException
- if the operation fails
IllegalArgumentException
- if the user name is not a UserCompositeData getGroup(String groupname) throws IOException
GROUP_TYPE
groupname
- The group name
GROUP_TYPE
IOException
- if the operation fails
IllegalArgumentException
- 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 apply
IOException
- if the operation failsString[] getImpliedRoles(String username) throws IOException
username
- The name of the user that has the implied roles
IOException
- if the operation fails
IllegalArgumentException
- if the username is not a UserString[] getMembers(String groupname) throws IOException
groupname
- The name of the group to get the members from
IOException
- if the operation fails
IllegalArgumentException
- if the groupname
is not a
groupTabularData getProperties(String rolename) throws IOException
JmxConstants.PROPERTIES_TYPE
.
rolename
- The name of the role to get properties from
JmxConstants.PROPERTIES_TYPE
IOException
- if the operation failsString[] getRequiredMembers(String groupname) throws IOException
groupname
- The name of the group to get the required members from
IOException
- if the operation fails
IllegalArgumentException
- 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 from
ROLE_TYPE
IOException
- if the operation failsString[] 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 user
USER_TYPE
IOException
- if the operation fails
IllegalArgumentException
- if the username
is not a
UserString getUserWithProperty(String key, String value) throws IOException
key
- The key to comparevalue
- The value to compare
IOException
- if the operation failsString[] listUsers() throws IOException
IOException
- if the operation failsString[] getUsers(String filter) throws IOException
filter
- The filter to apply
IOException
- 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
removed
IOException
- if the operation fails
IllegalArgumentException
- if the username is not a Userboolean removeMember(String groupname, String rolename) throws IOException
groupname
- The group namerolename
-
IOException
- if the operation fails
IllegalArgumentException
- if the groupname is not a Groupvoid removeProperty(String key, String rolename) throws IOException
key
- rolename
-
IOException
- if the operation failsboolean removeRole(String name) throws IOException
name
-
IOException
- if the operation failsboolean removeGroup(String name) throws IOException
name
-
IOException
- if the operation failsboolean removeUser(String name) throws IOException
name
-
IOException
- if the operation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |