- java.lang.Object
-
- aeonics.template.Item<Policy.Type>
-
- aeonics.entity.security.Policy
-
- Direct Known Subclasses:
Policy.Allow,Policy.Deny,Policy.TargetedPolicy
public abstract class Policy extends Item<Policy.Type>
This item plays a role in the definition of theSecurity. It allows to define theRuleapplied to allow or deny access.There are four main policies:
Policy.Allowthat applies to everyonePolicy.Denythat applies to everyonePolicy.TargetedAllowthat applies to target users, roles or groups.Policy.TargetedDenythat applies to target users, roles or groups.
Policy.Type.isAllowed(User.Type, Data)andPolicy.Type.isDenied(User.Type, Data).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPolicy.AllowA policy that validates the rule to allow access.static classPolicy.DenyA policy that validates the rule to deny access.static classPolicy.TargetedAllowA policy that validates the rule to allow access for specific target users, roles or groups.static classPolicy.TargetedDenyA policy that validates the rule to deny access for specific target users, roles or groups.static classPolicy.TargetedPolicystatic classPolicy.TypeSuperclass for all policy entities.
-
Constructor Summary
Constructors Constructor Description Policy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class<? extends Policy>category()Returns the target entity category.Template<? extends Policy.Type>template()Returns the template to build the target entity.-
Methods inherited from class aeonics.template.Item
creator, creator, defaultCreator, defaultTarget, defaultType, from, target, target, type, type
-
-
-
-
Method Detail
-
template
public Template<? extends Policy.Type> template()
Description copied from class:ItemReturns the template to build the target entity.This method should ultimately be used to provide the final entity template. Although, it may also provide a partial template that subclassed may complement.
- Overrides:
templatein classItem<Policy.Type>- Returns:
- the matching entity template
-
category
protected java.lang.Class<? extends Policy> category()
Description copied from class:ItemReturns the target entity category. This method should be implemented by subclasses to specify the entity category.- Specified by:
categoryin classItem<Policy.Type>- Returns:
- the target entity category
-
-