|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.jmx.useradmin.UserAdmin
public class UserAdmin
UserAdmin represents UserAdminMBean
implementation.
UserAdminMBean
Field Summary |
---|
Fields inherited from interface org.osgi.jmx.service.useradmin.UserAdminMBean |
---|
AUTORIZATION_TYPE, CREDENTIALS, CREDENTIALS_ITEM, GROUP_TYPE, MEMBERS, MEMBERS_ITEM, NAME, NAME_ITEM, OBJECTNAME, PROPERTIES, PROPERTIES_ITEM, REQUIRED_MEMBERS, REQUIRED_MEMBERS_ITEM, ROLE_TYPE, ROLES, ROLES_ITEM, TYPE, TYPE_ITEM, USER_TYPE |
Constructor Summary | |
---|---|
UserAdmin(org.osgi.service.useradmin.UserAdmin userAdmin)
Constructs new UserAdmin MBean. |
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 username)
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserAdmin(org.osgi.service.useradmin.UserAdmin userAdmin)
userAdmin
- UserAdmin
service reference.Method Detail |
---|
public void addCredential(String key, byte[] value, String username) throws IOException
UserAdminMBean
addCredential
in interface UserAdminMBean
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 failsUserAdminMBean.addCredential(java.lang.String, byte[], java.lang.String)
public void addCredentialString(String key, String value, String username) throws IOException
UserAdminMBean
addCredentialString
in interface UserAdminMBean
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 failsUserAdminMBean.addCredentialString(String, String, String)
public boolean addMember(String groupname, String rolename) throws IOException
UserAdminMBean
addMember
in interface UserAdminMBean
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 failsUserAdminMBean.addMember(java.lang.String, java.lang.String)
public void addPropertyString(String key, String value, String rolename) throws IOException
UserAdminMBean
addPropertyString
in interface UserAdminMBean
key
- The key of the property to addvalue
- The value of the property to add (String
)rolename
- The role name
IOException
- if the operation failsUserAdminMBean.addPropertyString(String, String, String)
public void addProperty(String key, byte[] value, String rolename) throws IOException
UserAdminMBean
addProperty
in interface UserAdminMBean
key
- The added property keyvalue
- The added byte[] property valuerolename
- The role name that receives the property
IOException
- if the operation failsUserAdminMBean.addProperty(java.lang.String, byte[], java.lang.String)
public boolean addRequiredMember(String groupname, String rolename) throws IOException
UserAdminMBean
addRequiredMember
in interface UserAdminMBean
groupname
- The group name that is adddedrolename
- The role that
IOException
- if the operation failsUserAdminMBean.addRequiredMember(java.lang.String, java.lang.String)
public void createGroup(String name) throws IOException
UserAdminMBean
createGroup
in interface UserAdminMBean
name
- Name of the group to create
IOException
- if the operation failsUserAdminMBean.createGroup(java.lang.String)
public void createRole(String name) throws IOException
UserAdminMBean
createRole
in interface UserAdminMBean
name
- of the role to create
IOException
- if the operation failsUserAdminMBean.createRole(java.lang.String)
public void createUser(String name) throws IOException
UserAdminMBean
createUser
in interface UserAdminMBean
name
- Name of the user to create
IOException
- if the operation failsUserAdminMBean.createUser(java.lang.String)
public CompositeData getAuthorization(String username) throws IOException
UserAdminMBean
UserAdminMBean.AUTORIZATION_TYPE
.
getAuthorization
in interface UserAdminMBean
username
- The user name
UserAdminMBean.AUTORIZATION_TYPE
.
IOException
- if the operation failsUserAdminMBean.getAuthorization(java.lang.String)
public TabularData getCredentials(String username) throws IOException
UserAdminMBean
JmxConstants.PROPERTIES_TYPE
.
getCredentials
in interface UserAdminMBean
username
- The user name
JmxConstants.PROPERTIES_TYPE
IOException
- if the operation failsUserAdminMBean.getCredentials(java.lang.String)
public CompositeData getGroup(String groupname) throws IOException
UserAdminMBean
UserAdminMBean.GROUP_TYPE
getGroup
in interface UserAdminMBean
groupname
- The group name
UserAdminMBean.GROUP_TYPE
IOException
- if the operation failsUserAdminMBean.getGroup(java.lang.String)
public String[] getGroups(String filter) throws IOException
UserAdminMBean
getGroups
in interface UserAdminMBean
filter
- The filter to apply
IOException
- if the operation failsUserAdminMBean.getGroups(java.lang.String)
public String[] getImpliedRoles(String username) throws IOException
UserAdminMBean
getImpliedRoles
in interface UserAdminMBean
username
- The name of the user that has the implied roles
IOException
- if the operation failsUserAdminMBean.getImpliedRoles(java.lang.String)
public String[] getMembers(String groupname) throws IOException
UserAdminMBean
getMembers
in interface UserAdminMBean
groupname
- The name of the group to get the members from
IOException
- if the operation failsUserAdminMBean.getMembers(java.lang.String)
public TabularData getProperties(String rolename) throws IOException
UserAdminMBean
JmxConstants.PROPERTIES_TYPE
.
getProperties
in interface UserAdminMBean
rolename
- The name of the role to get properties from
JmxConstants.PROPERTIES_TYPE
IOException
- if the operation failsUserAdminMBean.getProperties(java.lang.String)
public String[] getRequiredMembers(String groupname) throws IOException
UserAdminMBean
getRequiredMembers
in interface UserAdminMBean
groupname
- The name of the group to get the required members from
IOException
- if the operation failsUserAdminMBean.getRequiredMembers(java.lang.String)
public CompositeData getRole(String name) throws IOException
UserAdminMBean
UserAdminMBean.ROLE_TYPE
.
getRole
in interface UserAdminMBean
name
- The name of the role to get the data from
UserAdminMBean.ROLE_TYPE
IOException
- if the operation failsUserAdminMBean.getRole(java.lang.String)
public String[] getRoles(String filter) throws IOException
UserAdminMBean
getRoles
in interface UserAdminMBean
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 failsUserAdminMBean.getRoles(java.lang.String)
public CompositeData getUser(String username) throws IOException
UserAdminMBean
UserAdminMBean.USER_TYPE
.
getUser
in interface UserAdminMBean
username
- The name of the requested user
UserAdminMBean.USER_TYPE
IOException
- if the operation failsUserAdminMBean.getUser(java.lang.String)
public String getUserWithProperty(String key, String value) throws IOException
UserAdminMBean
getUserWithProperty
in interface UserAdminMBean
key
- The key to comparevalue
- The value to compare
IOException
- if the operation failsUserAdminMBean.getUserWithProperty(String, String)
public String[] getUsers(String filter) throws IOException
UserAdminMBean
getUsers
in interface UserAdminMBean
filter
- The filter to apply
IOException
- if the operation failsUserAdminMBean.getUsers(java.lang.String)
public String[] listGroups() throws IOException
UserAdminMBean
listGroups
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.listGroups()
public String[] listRoles() throws IOException
UserAdminMBean
listRoles
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.listRoles()
public String[] listUsers() throws IOException
UserAdminMBean
listUsers
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.listUsers()
public void removeCredential(String key, String username) throws IOException
UserAdminMBean
removeCredential
in interface UserAdminMBean
key
- The key of the credential to removeusername
- The name of the user for which the credential must be
removed
IOException
- if the operation failsUserAdminMBean.removeCredential(java.lang.String, java.lang.String)
public boolean removeGroup(String name) throws IOException
UserAdminMBean
removeGroup
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.removeGroup(java.lang.String)
public boolean removeMember(String groupname, String rolename) throws IOException
UserAdminMBean
removeMember
in interface UserAdminMBean
groupname
- The group name
IOException
- if the operation failsUserAdminMBean.removeMember(java.lang.String, java.lang.String)
public void removeProperty(String key, String rolename) throws IOException
UserAdminMBean
removeProperty
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.removeProperty(java.lang.String, java.lang.String)
public boolean removeRole(String name) throws IOException
UserAdminMBean
removeRole
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.removeRole(java.lang.String)
public boolean removeUser(String name) throws IOException
UserAdminMBean
removeUser
in interface UserAdminMBean
IOException
- if the operation failsUserAdminMBean.removeUser(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |