- 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 theRule
applied to allow or deny access.There are four main policies:
Policy.Allow
that applies to everyonePolicy.Deny
that applies to everyonePolicy.TargetedAllow
that applies to target users, roles or groups.Policy.TargetedDeny
that 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 class
Policy.Allow
A policy that validates the rule to allow access.static class
Policy.Deny
A policy that validates the rule to deny access.static class
Policy.TargetedAllow
A policy that validates the rule to allow access for specific target users, roles or groups.static class
Policy.TargetedDeny
A policy that validates the rule to deny access for specific target users, roles or groups.static class
Policy.TargetedPolicy
static class
Policy.Type
Superclass 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:Item
Returns 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:
template
in classItem<Policy.Type>
- Returns:
- the matching entity template
-
category
protected java.lang.Class<? extends Policy> category()
Description copied from class:Item
Returns the target entity category. This method should be implemented by subclasses to specify the entity category.- Specified by:
category
in classItem<Policy.Type>
- Returns:
- the target entity category
-
-