Package ch.tocco.nice2.security.spi
Class DefaultListGuard
java.lang.Object
ch.tocco.nice2.security.api.AbstractListGuard
ch.tocco.nice2.security.spi.DefaultListGuard
- All Implemented Interfaces:
ListGuard
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.slf4j.Logger
protected final SecurityManager
-
Constructor Summary
ConstructorDescriptionDefaultListGuard
(org.slf4j.Logger log, SecurityManager manager, List<?> secured, GuardContext guardContext) -
Method Summary
Modifier and TypeMethodDescriptiondoEvaluatePermissions
(Permission permission, Guard.Decision[] initialDecision) evaluatePermissions
(Permission permission) Evaluates a permission.List
<?> protected Guard.Decision[]
toArray
(Guard.Decision decision, int times) toGuard()
protected <E> List
<E> toList
(E value, int times) Methods inherited from class ch.tocco.nice2.security.api.AbstractListGuard
checkPermission
-
Field Details
-
log
protected final org.slf4j.Logger log -
manager
-
-
Constructor Details
-
DefaultListGuard
public DefaultListGuard(org.slf4j.Logger log, SecurityManager manager, List<?> secured, GuardContext guardContext)
-
-
Method Details
-
getPrincipal
-
getSecured
- Returns:
- The objects this guard is protecting.
-
getSecurityContext
-
evaluatePermissions
Description copied from interface:ListGuard
Evaluates a permission. This method returns anGuard.Decision
providing some more information about *why* a permission is granted or denied.- Parameters:
permission
- The permission to evaluate.- Returns:
- An
Guard.Decision
.
-
doEvaluatePermissions
public Guard.Decision[] doEvaluatePermissions(Permission permission, Guard.Decision[] initialDecision) -
toGuard
Description copied from interface:ListGuard
-
toArray
-
toList
-