public static class AuthorizationRegistry.Implementation extends Object implements AuthorizationRegistry
AuthorizationRegistry
default implementation that is comprised of delegate
PermissionRegistry
, RoleRegistry
and SubjectRegistry
instances.AuthorizationRegistry.Implementation
Modifier and Type | Method and Description |
---|---|
Object |
lockPermissionRegistry()
Returns the lock instance that is internally used by this registry instance.
|
Object |
lockRoleRegistry()
Returns the lock instance that is internally used by this registry instance.
|
Object |
lockSubjectRegistry()
Returns the lock instance that is internally used by this registry instance.
|
Permission |
permission(Resource resource,
Integer factor)
Looks up the
Permission instance representing the passed Resource instance with the passed
factor value. |
Role |
role(String roleName)
Returns the
Role instance identified by the passed role name. |
Map<String,Role> |
roles()
Returns a read-only map of all known
Role instances (values), identified by their names (keys). |
Subject |
subject(String subjectName)
Returns the
Subject instance identified by the passed subject name. |
Map<String,Subject> |
subjects()
Returns a read-only map of all known
Subject instances (values), identified by their names (keys). |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
New, New, New
New, New, New, New, permission
New, New, New, New
New, New, New, New
public final Permission permission(Resource resource, Integer factor)
Permission
instance representing the passed Resource
instance with the passed
factor value. If no suitable Permission
instance can be found, null is returned.permission
in interface PermissionRegistry
resource
- the Resource
instance for which the associated Permission
instance shall be
returned.factor
- the factor value of the Resource
instance for which the associated Permission
instance shall be returned.Permission
instance specified by the passed values.public Role role(String roleName)
Role
instance identified by the passed role name.role
in interface RoleRegistry
roleName
- the name identifying the desired Role
instance.Role
instance identified by the passed name.public Subject subject(String subjectName)
Subject
instance identified by the passed subject name.subject
in interface SubjectRegistry
subjectName
- the name identifying the desired Subject
instance.Subject
instance identified by the passed name.public Map<String,Role> roles()
Role
instances (values), identified by their names (keys).roles
in interface RoleRegistry
public Object lockPermissionRegistry()
lockPermissionRegistry
in interface PermissionRegistry
public Object lockRoleRegistry()
lockRoleRegistry
in interface RoleRegistry
public Map<String,Subject> subjects()
Subject
instances (values), identified by their names (keys).subjects
in interface SubjectRegistry
public Object lockSubjectRegistry()
lockSubjectRegistry
in interface SubjectRegistry