public interface RoleRepositoryStore
The role object returned by this backend can be a different implementation than org.apache.felix.useradmin.impl.role.RoleImpl, in which case the backend is made fully responsible for keeping track of the changes in the role object and persisting them!
Modifier and Type | Method and Description |
---|---|
org.osgi.service.useradmin.Role |
addRole(String roleName,
int type)
Adds a given role to this backend.
|
org.osgi.service.useradmin.Role |
getRoleByName(String roleName)
Returns a
Role by its name. |
org.osgi.service.useradmin.Role[] |
getRoles(String filter)
Returns all roles in this backend matching the given filter criteria.
|
org.osgi.service.useradmin.Role |
removeRole(String roleName)
Removes a given role from this backend.
|
org.osgi.service.useradmin.Role addRole(String roleName, int type) throws Exception
If the given role is already contained by this backed, this method
should not do anything and return null
to denote this.
roleName
- the name of the role to add, cannot be null
;type
- the type of role to add, either Role.USER
or Role.GROUP
.null
in case the role already
exists.IllegalArgumentException
- in case the given name was null
;Exception
- in case of problems adding the role.org.osgi.service.useradmin.Role[] getRoles(String filter) throws Exception
filter
- the (optional) filter to apply, can be null
in which case all roles will be returned.null
, but can be empty.Exception
- in case of problems retrieving the set of roles.org.osgi.service.useradmin.Role getRoleByName(String roleName) throws Exception
Role
by its name.roleName
- the name of the role to return, cannot be null
.null
if no such role exists.IllegalArgumentException
- in case the given argument was null
;Exception
- in case of problems retrieving the requested role.org.osgi.service.useradmin.Role removeRole(String roleName) throws Exception
If the given role is not contained by this backed, this method
should not do anything and return null
to denote this.
roleName
- the name of the role to remove, cannot be null
.null
if the role was not contained by
this backend or could not be removed.IllegalArgumentException
- in case the given argument was null
;Exception
- in case of problems removing the requested role.Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.