|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.useradmin.impl.AuthorizationImpl
public class AuthorizationImpl
Authorization
Constructor Summary | |
---|---|
AuthorizationImpl(User user,
UserAdminServiceImpl userAdmin)
Construct new Authorization object with provided user and UserAdmin service implementation. |
Method Summary | |
---|---|
protected void |
addWorkingOnRole(Role role)
Adds working role to working on roles by this Autorization object. |
String |
getName()
Gets the name of the User that this Authorization
context was created for. |
String[] |
getRoles()
Looking for all Roles implied by this Authorization object. |
boolean |
hasRole(String name)
Checks if the role with the specified name is implied by this Authorization context. |
protected boolean |
isWorkingOnRole(Role role)
Check if current Autorization object is working on provided role. |
protected void |
removeWorkingOnRole(Role role)
Removes working on role. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthorizationImpl(User user, UserAdminServiceImpl userAdmin)
Construct new Authorization object with provided user and UserAdmin service implementation.
user
- User for who authorization can be checkeduserAdmin
- UserAdmin service implementationMethod Detail |
---|
public String getName()
Authorization
User
that this Authorization
context was created for.
getName
in interface Authorization
User
object that this
Authorization
context was created for, or
null
if no user was specified when this
Authorization
context was created.Authorization.getName()
public String[] getRoles()
getRoles
in interface Authorization
Authorization
context, or null
if no roles
are in the context. The predefined role user.anyone
will not be included in this list.Authorization.getRoles()
public boolean hasRole(String name)
Authorization
Authorization
context.
Bundles must define globally unique role names that are associated with
the privilege of accessing restricted resources or operations. Operators
will grant users access to these resources, by creating a Group
object for each role and adding User
objects to it.
hasRole
in interface Authorization
name
- The name of the role to check for.
true
if this Authorization
context implies
the specified role, otherwise false
.Authorization.hasRole(java.lang.String)
protected void addWorkingOnRole(Role role)
role
- to be added role.protected void removeWorkingOnRole(Role role)
role
- to be removed from working by this Autorization object roles.protected boolean isWorkingOnRole(Role role)
role
- Role on which Autorization object is working.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |