|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.useradmin.impl.RoleImpl
org.apache.felix.useradmin.impl.UserImpl
public class UserImpl
This UserImplclass represents User role. A User can be configured with credentials, password,properties etc.
Role
,
User
,
Serialized FormField Summary |
---|
Fields inherited from class org.apache.felix.useradmin.impl.RoleImpl |
---|
name, userAdmin |
Fields inherited from interface org.osgi.service.useradmin.Role |
---|
GROUP, ROLE, USER, USER_ANYONE |
Constructor Summary | |
---|---|
UserImpl()
Constructs new User. |
Method Summary | |
---|---|
Dictionary |
getCredentials()
Returns a Dictionary of the credentials of this User
object. |
int |
getType()
Returns the type of this role. |
boolean |
hasCredential(String key,
Object value)
Checks to see if this User object has a credential with the
specified key set to the specified value . |
protected boolean |
impliedBy(AuthorizationImpl authorization)
Checks if this role is implied by provided Authorization object. |
Methods inherited from class org.apache.felix.useradmin.impl.RoleImpl |
---|
getName, getProperties, getVersion, increaseVersion, setName, setUserAdmin |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.osgi.service.useradmin.Role |
---|
getName, getProperties |
Constructor Detail |
---|
public UserImpl()
Method Detail |
---|
public Dictionary getCredentials()
User
Dictionary
of the credentials of this User
object. Any changes to the returned Dictionary
object will
change the credentials of this User
object. This will cause a
UserAdminEvent
object of type
UserAdminEvent.ROLE_CHANGED
to be broadcast to any
UserAdminListeners
objects.
Only objects of type String
may be used as credential keys,
and only objects of type String
or of type byte[]
may be used as credential values. Any other types will cause an exception
of type IllegalArgumentException
to be raised.
In order to retrieve a credential from the returned Dictionary
object, a UserAdminPermission
named after the credential name (or
a prefix of it) with action getCredential
is required.
In order to add or remove a credential from the returned
Dictionary
object, a UserAdminPermission
named after
the credential name (or a prefix of it) with action
changeCredential
is required.
getCredentials
in interface User
Dictionary
object containing the credentials of this
User
object.User.getCredentials()
public boolean hasCredential(String key, Object value)
User
User
object has a credential with the
specified key
set to the specified value
.
If the specified credential value
is not of type
String
or byte[]
, it is ignored, that is,
false
is returned (as opposed to an
IllegalArgumentException
being raised).
hasCredential
in interface User
key
- The credential key
.value
- The credential value
.
true
if this user has the specified credential;
false
otherwise.User.hasCredential(String, Object)
public int getType()
Role
getType
in interface Role
getType
in class RoleImpl
Role.getType()
protected boolean impliedBy(AuthorizationImpl authorization)
impliedBy
in class RoleImpl
authorization
- Authorization instance.
org.osgi.service.useradmin.Autorization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |