Class AbstractCustomPolicyProcessor
java.lang.Object
ch.tocco.nice2.persist.security.api.provider.AbstractCustomPolicyProcessor
- All Implemented Interfaces:
PolicyProcessor
- Direct Known Subclasses:
AbstractMembershipHierarchyPolicyProcessor
Base class for custom
PolicyProcessor that can be used for
optimizing the performance of flows.
These policy processors should be registered for the Phase.GUARD and
Phase.QUERY phases.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendRule(PolicyBuilder policy, EntityModel entityModel, AccessPermission permission, Node condition, boolean negative) protected abstract voiddoProcessPolicy(PolicyBuilder policy, EntityModel entityModel) protected abstract booleanhandleEntityModel(EntityModel entityModel) protected abstract booleanhandlePrincipal(Principal principal) protected voidprependRule(PolicyBuilder policy, EntityModel entityModel, AccessPermission permission, Node condition, boolean negative) voidprocessPolicy(PolicyBuilder policy, Object target) Post-process the given policy.
-
Field Details
-
typeManager
-
-
Constructor Details
-
AbstractCustomPolicyProcessor
-
-
Method Details
-
processPolicy
Description copied from interface:PolicyProcessorPost-process the given policy. On phase `LOGIN`, the `target` is the principal being logged in, on phase `GUARD`, it's the object being guarded. On phase `LOGIN` the `policy` is the entire policy containing all rules that affect the current user, on phase `GUARD` the policy only contains the rules that are relevant to the guarded objects (the entire policy, if needed, can be retrieved from theSecurityContext).- Specified by:
processPolicyin interfacePolicyProcessor
-
doProcessPolicy
-
handlePrincipal
-
handleEntityModel
-
appendRule
protected void appendRule(PolicyBuilder policy, EntityModel entityModel, AccessPermission permission, Node condition, boolean negative) -
prependRule
protected void prependRule(PolicyBuilder policy, EntityModel entityModel, AccessPermission permission, Node condition, boolean negative)
-