public static class Subject.Implementation extends Object implements Subject.Mutable
Subject.Mutable
Subject
.
Initializing / updating the explicit roles returned by roles()
is thread-safe.Subject.Implementation, Subject.Mutable
Constructor and Description |
---|
Implementation(String name)
Implementation detail constructor that might change in the future.
|
Implementation(String name,
Set<Role> roles)
Implementation detail constructor that might change in the future.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCachedEffectivePermissions()
Implementation-specific method to clear the cached effective roles.
|
Map<Resource,Permission> |
effectivePermissions()
Returns a collection containing all effective permissions, meaning the
combined permissions of all effective roles as returned by
Subject.effectiveRoles() . |
void |
initializeEffectivePermissions() |
String |
name() |
void |
reinitializeEffectivePermissions() |
Set<Role> |
roles() |
void |
setRoles(Collection<? extends Role> roles)
Updates the explicit roles of this subject instance, i.e.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
effectiveRoles, hasPermission, update
public Implementation(String name, Set<Role> roles)
public Implementation(String name)
public final void initializeEffectivePermissions()
public final void reinitializeEffectivePermissions()
public final void clearCachedEffectivePermissions()
public final String name()
public final Map<Resource,Permission> effectivePermissions()
Subject.effectiveRoles()
. If multiple permissions apply to the same
Resource
, the permission with the highest significance (highest
absolut value of its weight) supersedes the others.effectivePermissions
in interface Subject
public void setRoles(Collection<? extends Role> roles)
Subject.roles()
.setRoles
in interface Subject.Mutable
roles
- the new Role
instances to be used.