org.osgi.jmx.compendium
Interface UserManagerMBean


public interface UserManagerMBean

Author:
Hal Hildebrand Date: Dec 2, 2008 Time: 2:41:26 PM This MBean provides the management interface to the OSGi User Manager Service

Field Summary
static java.lang.String[] AUTHORIZATION
           
static java.lang.String ENCODED_CREDENTIALS
           
static java.lang.String ENCODED_ROLE
           
static java.lang.String ENCODED_USER
           
static java.lang.String[] GROUP
           
static java.lang.String GROUP_MEMBERS
           
static java.lang.String GROUP_REQUIRED_MEMBERS
           
static java.lang.String[] ROLE
           
static java.lang.String ROLE_ENCODED_PROPERTIES
           
static java.lang.String ROLE_NAME
           
static java.lang.String ROLE_NAMES
           
static java.lang.String ROLE_TYPE
           
static java.lang.String[] USER
           
static java.lang.String USER_NAME
           
 
Method Summary
 void addCredential(java.lang.String key, byte[] value, java.lang.String username)
          Add credentials to a user, associated with the supplied key
 void addCredential(java.lang.String key, java.lang.String value, java.lang.String username)
          Add credentials to a user, associated with the supplied key
 boolean addMember(java.lang.String groupname, java.lang.String rolename)
          Add a role to the group
 void addProperty(java.lang.String key, byte[] value, java.lang.String rolename)
          Add or update a property on a role
 void addProperty(java.lang.String key, java.lang.String value, java.lang.String rolename)
          Add or update a property on a role
 boolean addRequiredMember(java.lang.String groupname, java.lang.String rolename)
          Add a required member to the group
 void createGroup(java.lang.String name)
          Create a Group
 void createUser(java.lang.String name)
          Create a User
 javax.management.openmbean.CompositeData getAuthorization(java.lang.String user)
          Answer the authorization for the user name
 javax.management.openmbean.TabularData getCredentials(java.lang.String username)
          Answer the credentials associated with a user
 javax.management.openmbean.CompositeData getGroup(java.lang.String groupname)
          Answer the Group associated with the groupname
 java.lang.String[] getGroups()
          Answer the list of group names
 java.lang.String[] getGroups(java.lang.String filter)
          Answer the list of group names
 java.lang.String[] getImpliedRoles(java.lang.String username)
          Answer the list of implied roles for a user
 java.lang.String[] getMembers(java.lang.String groupname)
          Answer the the user names which are members of the group
 javax.management.openmbean.TabularData getProperties(java.lang.String rolename)
          Answer the credentials associated with a role
 java.lang.String[] getRequiredMembers(java.lang.String groupname)
          Answer the list of user names which are required members of this group
 javax.management.openmbean.CompositeData getRole(java.lang.String name)
          Answer the role associated with a name
 java.lang.String[] getRoles()
          Answer the list of role names in the User Admin database
 java.lang.String[] getRoles(java.lang.String filter)
          Answer the list of role names which match the supplied filter
 javax.management.openmbean.CompositeData getUser(java.lang.String username)
          Answer the User associated with the username
 java.lang.String getUser(java.lang.String key, java.lang.String value)
          Answer the user name with the given property key-value pair from the User Admin service database.
 java.lang.String[] getUsers()
          Answer the list of user names in the User Admin database
 java.lang.String[] getUsers(java.lang.String filter)
          Answer the list of user names in the User Admin database
 void removeCredential(java.lang.String key, java.lang.String username)
          Remove the credentials associated with the key for the user
 boolean removeMember(java.lang.String groupname, java.lang.String rolename)
          Remove a role from the group
 void removeProperty(java.lang.String key, java.lang.String rolename)
          Remove a property from a role
 boolean removeRole(java.lang.String name)
          Remove the Role associated with the name
 

Field Detail

ROLE_NAME

static final java.lang.String ROLE_NAME
See Also:
Constant Field Values

ROLE_TYPE

static final java.lang.String ROLE_TYPE
See Also:
Constant Field Values

ROLE_ENCODED_PROPERTIES

static final java.lang.String ROLE_ENCODED_PROPERTIES
See Also:
Constant Field Values

ENCODED_USER

static final java.lang.String ENCODED_USER
See Also:
Constant Field Values

GROUP_MEMBERS

static final java.lang.String GROUP_MEMBERS
See Also:
Constant Field Values

GROUP_REQUIRED_MEMBERS

static final java.lang.String GROUP_REQUIRED_MEMBERS
See Also:
Constant Field Values

USER_NAME

static final java.lang.String USER_NAME
See Also:
Constant Field Values

ROLE_NAMES

static final java.lang.String ROLE_NAMES
See Also:
Constant Field Values

ENCODED_ROLE

static final java.lang.String ENCODED_ROLE
See Also:
Constant Field Values

ENCODED_CREDENTIALS

static final java.lang.String ENCODED_CREDENTIALS
See Also:
Constant Field Values

AUTHORIZATION

static final java.lang.String[] AUTHORIZATION

USER

static final java.lang.String[] USER

ROLE

static final java.lang.String[] ROLE

GROUP

static final java.lang.String[] GROUP
Method Detail

addCredential

void addCredential(java.lang.String key,
                   byte[] value,
                   java.lang.String username)
                   throws java.io.IOException
Add credentials to a user, associated with the supplied key

Parameters:
key -
value -
username -
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User

addCredential

void addCredential(java.lang.String key,
                   java.lang.String value,
                   java.lang.String username)
                   throws java.io.IOException
Add credentials to a user, associated with the supplied key

Parameters:
key -
value -
username -
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User

addMember

boolean addMember(java.lang.String groupname,
                  java.lang.String rolename)
                  throws java.io.IOException
Add a role to the group

Parameters:
groupname -
rolename -
Returns:
true if the role was added to the group
Throws:
java.io.IOException - if the operation fails

addProperty

void addProperty(java.lang.String key,
                 java.lang.String value,
                 java.lang.String rolename)
                 throws java.io.IOException
Add or update a property on a role

Parameters:
key - - the property key
value - - the String property value
rolename - - the role name
Throws:
java.io.IOException - if the operation fails

addProperty

void addProperty(java.lang.String key,
                 byte[] value,
                 java.lang.String rolename)
                 throws java.io.IOException
Add or update a property on a role

Parameters:
key - - the property key
value - - the byte[] property value
rolename - - the role name
Throws:
java.io.IOException - if the operation fails

addRequiredMember

boolean addRequiredMember(java.lang.String groupname,
                          java.lang.String rolename)
                          throws java.io.IOException
Add a required member to the group

Parameters:
groupname -
rolename -
Returns:
true if the role was added to the group
Throws:
java.io.IOException - if the operation fails

createUser

void createUser(java.lang.String name)
                throws java.io.IOException
Create a User

Parameters:
name - - the user to create
Throws:
java.io.IOException - if the operation fails

createGroup

void createGroup(java.lang.String name)
                 throws java.io.IOException
Create a Group

Parameters:
name - - the group to create
Throws:
java.io.IOException - if the operation fails

getAuthorization

javax.management.openmbean.CompositeData getAuthorization(java.lang.String user)
                                                          throws java.io.IOException
Answer the authorization for the user name

Parameters:
user -
Returns:
the Authorization
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
See Also:
for the details of the CompositeType


getCredentials

javax.management.openmbean.TabularData getCredentials(java.lang.String username)
                                                      throws java.io.IOException
Answer the credentials associated with a user

Parameters:
username -
Returns:
the credentials associated with the user
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
See Also:
for the details of the TabularType


getGroup

javax.management.openmbean.CompositeData getGroup(java.lang.String groupname)
                                                  throws java.io.IOException
Answer the Group associated with the groupname

Parameters:
groupname -
Returns:
the Group
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the groupname is not a Group
See Also:
for the details of the CompositeType


getGroups

java.lang.String[] getGroups()
                             throws java.io.IOException
Answer the list of group names

Returns:
the list of group names
Throws:
java.io.IOException - if the operation fails

getGroups

java.lang.String[] getGroups(java.lang.String filter)
                             throws java.io.IOException
Answer the list of group names

Parameters:
filter - - the filter to apply
Returns:
the list of group names
Throws:
java.io.IOException - if the operation fails

getImpliedRoles

java.lang.String[] getImpliedRoles(java.lang.String username)
                                   throws java.io.IOException
Answer the list of implied roles for a user

Parameters:
username -
Returns:
the list of role names
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User

getMembers

java.lang.String[] getMembers(java.lang.String groupname)
                              throws java.io.IOException
Answer the the user names which are members of the group

Parameters:
groupname -
Returns:
the list of user names
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the groupname is not a group

getProperties

javax.management.openmbean.TabularData getProperties(java.lang.String rolename)
                                                     throws java.io.IOException
Answer the credentials associated with a role

Parameters:
rolename -
Returns:
the credentials associated with the role
Throws:
java.io.IOException - if the operation fails
See Also:
for the details of the TabularType


getRequiredMembers

java.lang.String[] getRequiredMembers(java.lang.String groupname)
                                      throws java.io.IOException
Answer the list of user names which are required members of this group

Parameters:
groupname -
Returns:
the list of user names
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the groupname is not a group

getRole

javax.management.openmbean.CompositeData getRole(java.lang.String name)
                                                 throws java.io.IOException
Answer the role associated with a name

Parameters:
name -
Returns:
the Role
Throws:
java.io.IOException - if the operation fails
See Also:
for the details of the CompositeType


getRoles

java.lang.String[] getRoles()
                            throws java.io.IOException
Answer the list of role names in the User Admin database

Returns:
the list of role names
Throws:
java.io.IOException - if the operation fails

getRoles

java.lang.String[] getRoles(java.lang.String filter)
                            throws java.io.IOException
Answer the list of role names which match the supplied filter

Parameters:
filter - - the string representation of the org.osgi.framework.Filter
Returns:
the list the role names
Throws:
java.io.IOException - if the operation fails

getUser

javax.management.openmbean.CompositeData getUser(java.lang.String username)
                                                 throws java.io.IOException
Answer the User associated with the username

Parameters:
username -
Returns:
the User
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
See Also:
for the details of the CompositeType


getUser

java.lang.String getUser(java.lang.String key,
                         java.lang.String value)
                         throws java.io.IOException
Answer the user name with the given property key-value pair from the User Admin service database.

Parameters:
key - - the key to compare
value - - the value to compare
Returns:
the User
Throws:
java.io.IOException - if the operation fails

getUsers

java.lang.String[] getUsers()
                            throws java.io.IOException
Answer the list of user names in the User Admin database

Returns:
the list of user names
Throws:
java.io.IOException - if the operation fails

getUsers

java.lang.String[] getUsers(java.lang.String filter)
                            throws java.io.IOException
Answer the list of user names in the User Admin database

Parameters:
filter - - the filter to apply
Returns:
the list of user names
Throws:
java.io.IOException - if the operation fails

removeCredential

void removeCredential(java.lang.String key,
                      java.lang.String username)
                      throws java.io.IOException
Remove the credentials associated with the key for the user

Parameters:
key -
username -
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User

removeMember

boolean removeMember(java.lang.String groupname,
                     java.lang.String rolename)
                     throws java.io.IOException
Remove a role from the group

Parameters:
groupname -
rolename -
Returns:
true if the role was removed from the group
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the groupname is not a Group

removeProperty

void removeProperty(java.lang.String key,
                    java.lang.String rolename)
                    throws java.io.IOException
Remove a property from a role

Parameters:
key -
rolename -
Throws:
java.io.IOException - if the operation fails

removeRole

boolean removeRole(java.lang.String name)
                   throws java.io.IOException
Remove the Role associated with the name

Parameters:
name -
Returns:
true if the remove succeeded
Throws:
java.io.IOException - if the operation fails


Copyright © 2009. All Rights Reserved.