public abstract class EntitlementCombiner extends Object
Entitlement
s.
Across the system, these can also be referred to as "decision combiners"; for example, the set of registered
EntitlementCombiners can be retrieved from the /json/decisioncombiners
REST endpoint.
This is the base class and is, for example, extended by DenyOverride
.
init
needs to be called after it is created.Constructor and Description |
---|
EntitlementCombiner() |
Modifier and Type | Method and Description |
---|---|
void |
add(List<Entitlement> entitlements)
Adds a set of entitlements to the overall entitlement decision.
|
protected abstract boolean |
combine(Boolean b1,
Boolean b2)
Returns the result of combining two entitlement decisions.
|
protected Set<String> |
getActions()
Returns action names.
|
String |
getName()
Returns the name of this class for ease of reference.
|
protected ResourceName |
getResourceComparator()
Returns the resource comparator.
|
List<Entitlement> |
getResults()
Returns entitlements which are the result of combining a set of entitlements.
|
protected Entitlement |
getRootE()
Returns the entitlement which will act as the root for sub tree evaluations.
|
void |
init(String normalisedResourceName,
String requestedResourceName,
Set<String> actions,
boolean isRecursive,
Application application)
Initializes the combiner.
|
void |
init(String realm,
String applicationName,
String normalisedResourceName,
String requestedResourceName,
Set<String> actions,
boolean isRecursive)
Initializes the combiner.
|
protected abstract boolean |
isCompleted()
Returns
true if policy decision can also be determined. |
boolean |
isDone()
Returns
true if policy decision can also be determined. |
protected boolean |
isRecursive()
Returns
true if this entitlement combiner is working on sub tree evaluation. |
protected void |
mergeActionValues(Entitlement e1,
Entitlement e2)
Sets the action values of the first entitlement to be the union of all action values from the first and second
entitlements; if a particular action value is contained in both entitlements, then the two values are combined
(using the implementation-dependent)
combine(java.lang.Boolean, java.lang.Boolean) method) before being added to the first entitlement. |
protected void |
mergeAdvices(Entitlement e1,
Entitlement e2)
Sets the advices of the first entitlement to be the union of all advices from the first and second entitlements.
|
protected void |
mergeAttributes(Entitlement e1,
Entitlement e2)
Sets the attributes of the first entitlement to be the union of all attributes from the first and second
entitlements.
|
protected void |
mergeTimeToLiveValue(Entitlement e1,
Entitlement e2)
Merges time to live values.
|
public void init(String realm, String applicationName, String normalisedResourceName, String requestedResourceName, Set<String> actions, boolean isRecursive) throws EntitlementException
realm
- Realm name.applicationName
- Application Name.normalisedResourceName
- The normalised resource name.requestedResourceName
- The requested resource name.actions
- Action names to be evaluated.isRecursive
- true<
for subtree evaluation.EntitlementException
public void init(String normalisedResourceName, String requestedResourceName, Set<String> actions, boolean isRecursive, Application application) throws EntitlementException
normalisedResourceName
- The normalised resource name.requestedResourceName
- The requested resource name.actions
- Action names to be evaluated.isRecursive
- true<
for subtree evaluation.application
- The defining application.EntitlementException
public void add(List<Entitlement> entitlements)
entitlements
- Set of entitlements.protected void mergeActionValues(Entitlement e1, Entitlement e2)
combine(java.lang.Boolean, java.lang.Boolean)
method) before being added to the first entitlement.e1
- Entitlement.e2
- Entitlement.protected void mergeAdvices(Entitlement e1, Entitlement e2)
e1
- Entitlement.e2
- Entitlement.protected void mergeAttributes(Entitlement e1, Entitlement e2)
e1
- Entitlemente2
- Entitlementprotected void mergeTimeToLiveValue(Entitlement e1, Entitlement e2)
e1
- Entitlemente2
- Entitlementprotected boolean isRecursive()
true
if this entitlement combiner is working on sub tree evaluation.true
if this entitlement combiner is working on sub tree evaluation.protected Entitlement getRootE()
protected ResourceName getResourceComparator()
public boolean isDone()
true
if policy decision can also be determined.true
if policy decision can also be determined.public List<Entitlement> getResults()
protected abstract boolean combine(Boolean b1, Boolean b2)
b1
- entitlement decision.b2
- entitlement decision.protected abstract boolean isCompleted()
true
if policy decision can also be determined.
This method is called by derived classes. #isDone method shall be set if this returns true.true
if policy decision can also be determined.public String getName()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.