|
OSGi™ Enterprise Release 5 |
|||||||||
| 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 javax.management.openmbean.CompositeType |
AUTORIZATION_TYPE
The Composite Type for an Authorization object. |
static java.lang.String |
CREDENTIALS
The CREDENTIALS key, used in CREDENTIALS_ITEM. |
static Item |
CREDENTIALS_ITEM
The item containing the credentials of a user. |
static javax.management.openmbean.CompositeType |
GROUP_TYPE
The Composite Type for a Group. |
static java.lang.String |
MEMBERS
The MEMBERS key, used in MEMBERS_ITEM. |
static Item |
MEMBERS_ITEM
The item containing the members of a group. |
static java.lang.String |
NAME
The key NAME, used in NAME_ITEM. |
static Item |
NAME_ITEM
The item for the user name for an authorization object. |
static java.lang.String |
OBJECTNAME
User Admin MBean object name. |
static java.lang.String |
PROPERTIES
The PROPERTIES key, used in PROPERTIES_ITEM. |
static Item |
PROPERTIES_ITEM
The item containing the properties of a Role. |
static java.lang.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 javax.management.openmbean.CompositeType |
ROLE_TYPE
The Composite Type for a Role. |
static java.lang.String |
ROLES
The key ROLES, used in ROLES_ITEM. |
static Item |
ROLES_ITEM
The item containing the roles for this authorization object. |
static java.lang.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 javax.management.openmbean.CompositeType |
USER_TYPE
A Composite Type for a User. |
| 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 |
addCredentialString(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 member to the group. |
void |
addProperty(java.lang.String key,
byte[] value,
java.lang.String rolename)
Add or update a property on a role. |
void |
addPropertyString(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 |
createRole(java.lang.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(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 group name. |
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 properties 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(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 user name. |
java.lang.String[] |
getUsers(java.lang.String filter)
Answer the list of user names in the User Admin database |
java.lang.String |
getUserWithProperty(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[] |
listGroups()
Answer the list of group names |
java.lang.String[] |
listRoles()
Answer the list of role names in the User Admin database |
java.lang.String[] |
listUsers()
Answer the list of user names in the User Admin database |
void |
removeCredential(java.lang.String key,
java.lang.String username)
Remove the credential associated with the given user |
boolean |
removeGroup(java.lang.String name)
Remove the Group associated with the name |
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 |
boolean |
removeUser(java.lang.String name)
Remove the User associated with the name |
| Field Detail |
|---|
static final java.lang.String OBJECTNAME
static final java.lang.String NAME
NAME_ITEM.
static final Item NAME_ITEM
NAME and the type is SimpleType.STRING.
static final java.lang.String ROLES
ROLES_ITEM.
static final Item ROLES_ITEM
ROLES. and the type is JmxConstants.STRING_ARRAY_TYPE.
static final javax.management.openmbean.CompositeType AUTORIZATION_TYPE
NAME_ITEM and TYPE_ITEM items.
static final java.lang.String TYPE
TYPE_ITEM.
static final Item TYPE_ITEM
TYPE and the type is
SimpleType.INTEGER.
static final java.lang.String PROPERTIES
PROPERTIES_ITEM.
static final Item PROPERTIES_ITEM
PROPERTIES and the type is JmxConstants.PROPERTIES_TYPE.
static final javax.management.openmbean.CompositeType ROLE_TYPE
static final java.lang.String CREDENTIALS
CREDENTIALS_ITEM.
static final Item CREDENTIALS_ITEM
CREDENTIALS and the type is JmxConstants.PROPERTIES_TYPE
.
static final javax.management.openmbean.CompositeType USER_TYPE
ROLE_TYPE and adds
CREDENTIALS_ITEM.
This type extends the ROLE_TYPE. It adds:
static final java.lang.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 java.lang.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 javax.management.openmbean.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.
| Method Detail |
|---|
void addCredential(java.lang.String key,
byte[] value,
java.lang.String username)
throws java.io.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.
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
void addCredentialString(java.lang.String key,
java.lang.String value,
java.lang.String username)
throws java.io.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.
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
boolean addMember(java.lang.String groupname,
java.lang.String rolename)
throws java.io.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
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if an invalid group name or role name is
specified
void addPropertyString(java.lang.String key,
java.lang.String value,
java.lang.String rolename)
throws java.io.IOException
key - The key of the property to addvalue - The value of the property to add (String)rolename - The role name
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if an invalid role name is specified
void addProperty(java.lang.String key,
byte[] value,
java.lang.String rolename)
throws java.io.IOException
key - The added property keyvalue - The added byte[] property valuerolename - The role name that receives the property
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if an invalid role name is specified
boolean addRequiredMember(java.lang.String groupname,
java.lang.String rolename)
throws java.io.IOException
groupname - The group name that is adddedrolename - The role that
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if an invalid group name or role name is
specified
void createUser(java.lang.String name)
throws java.io.IOException
name - Name of the user to create
java.io.IOException - if the operation fails
void createGroup(java.lang.String name)
throws java.io.IOException
name - Name of the group to create
java.io.IOException - if the operation fails
void createRole(java.lang.String name)
throws java.io.IOException
createUser(String) or
createGroup(String).
name - Ignored.
java.io.IOException - This method will throw an exception if called.
javax.management.openmbean.CompositeData getAuthorization(java.lang.String user)
throws java.io.IOException
AUTORIZATION_TYPE.
user - The user name
AUTORIZATION_TYPE.
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the user name is not a User
javax.management.openmbean.TabularData getCredentials(java.lang.String username)
throws java.io.IOException
JmxConstants.PROPERTIES_TYPE.
username - The user name
JmxConstants.PROPERTIES_TYPE
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the user name is not a User
javax.management.openmbean.CompositeData getGroup(java.lang.String groupname)
throws java.io.IOException
GROUP_TYPE
groupname - The group name
GROUP_TYPE
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the group name is not a Group
java.lang.String[] listGroups()
throws java.io.IOException
java.io.IOException - if the operation fails
java.lang.String[] getGroups(java.lang.String filter)
throws java.io.IOException
filter - The filter to apply
java.io.IOException - if the operation fails
java.lang.String[] getImpliedRoles(java.lang.String username)
throws java.io.IOException
username - The name of the user that has the implied roles
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
java.lang.String[] getMembers(java.lang.String groupname)
throws java.io.IOException
groupname - The name of the group to get the members from
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the groupname is not a Group
javax.management.openmbean.TabularData getProperties(java.lang.String rolename)
throws java.io.IOException
JmxConstants.PROPERTIES_TYPE.
rolename - The name of the role to get properties from
JmxConstants.PROPERTIES_TYPE
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the rolename is not a role
java.lang.String[] getRequiredMembers(java.lang.String groupname)
throws java.io.IOException
groupname - The name of the group to get the required members from
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the group name is not a Group
javax.management.openmbean.CompositeData getRole(java.lang.String name)
throws java.io.IOException
ROLE_TYPE.
name - The name of the role to get the data from
ROLE_TYPE
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the name is not a role
java.lang.String[] listRoles()
throws java.io.IOException
java.io.IOException - if the operation fails
java.lang.String[] getRoles(java.lang.String filter)
throws java.io.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.
java.io.IOException - if the operation fails
javax.management.openmbean.CompositeData getUser(java.lang.String username)
throws java.io.IOException
USER_TYPE.
username - The name of the requested user
USER_TYPE
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
java.lang.String getUserWithProperty(java.lang.String key,
java.lang.String value)
throws java.io.IOException
key - The key to comparevalue - The value to compare
java.io.IOException - if the operation fails
java.lang.String[] listUsers()
throws java.io.IOException
java.io.IOException - if the operation fails
java.lang.String[] getUsers(java.lang.String filter)
throws java.io.IOException
filter - The filter to apply
java.io.IOException - if the operation fails
void removeCredential(java.lang.String key,
java.lang.String username)
throws java.io.IOException
key - The key of the credential to removeusername - The name of the user for which the credential must be
removed
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the username is not a User
boolean removeMember(java.lang.String groupname,
java.lang.String rolename)
throws java.io.IOException
groupname - The group namerolename -
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the groupname is not a Group
void removeProperty(java.lang.String key,
java.lang.String rolename)
throws java.io.IOException
key - rolename -
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the rolename is not a role
boolean removeRole(java.lang.String name)
throws java.io.IOException
name -
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the name is not a role
boolean removeGroup(java.lang.String name)
throws java.io.IOException
name -
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the name is not a Group
boolean removeUser(java.lang.String name)
throws java.io.IOException
name -
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the name is not a User
|
OSGi™ Enterprise Release 5 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||