Package ch.tocco.nice2.security.api
Interface SecurityContext
- All Known Implementing Classes:
SecurityContextImpl
public interface SecurityContext
The security context of the current principal and factory for
Guards.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Returns aGuardfor exactly one client.getGuardForList(List<?> clients) @Nullable UUIDboolean@Nullable NodeprepareCondition(Node condition)
-
Method Details
-
getPrincipal
Principal getPrincipal()- Returns:
- The principal, may be anonymous.
-
getSessionId
-
isFixedPolicy
boolean isFixedPolicy() -
getGuard
Returns aGuardfor exactly one client.- Parameters:
client- For example an Entity or an EntityManager.
-
getGuardForList
- Returns:
- A
ListGuardfor efficiently evaluating permissions of multiple objects of the same type.
-
getPolicy
Policy getPolicy()- Returns:
- the unfiltered policy contained in this SecurityContext
-
prepareCondition
- Throws:
EvaluationException
-
destroy
void destroy()
-