public class Evaluator extends Object
PolicyEvaluator.REALM_DN
field containing the realm's DN representation.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_POLICY_EVAL_THREAD |
Constructor and Description |
---|
Evaluator(Subject subject)
Constructor to create an evaluator the default service type.
|
Evaluator(Subject subject,
String applicationName)
Constructor to create an evaluator given the service type.
|
Modifier and Type | Method and Description |
---|---|
List<Entitlement> |
evaluate(String realm,
Subject subject,
Set<String> resourceNames,
Map<String,Set<String>> environment)
Returns a list of entitlements for a given subject, resource names and environment.
|
List<Entitlement> |
evaluate(String realm,
Subject subject,
String resourceName,
Map<String,Set<String>> environment,
boolean recursive)
Returns a list of entitlements for a given subject, resource name
and environment.
|
String |
getApplicationName()
Returns application name.
|
boolean |
hasEntitlement(String realm,
Subject subject,
Entitlement e,
Map<String,Set<String>> envParameters)
Returns
true if the subject is granted to an entitlement. |
public static final int DEFAULT_POLICY_EVAL_THREAD
public Evaluator(Subject subject) throws EntitlementException
subject
- Subject who credential is used for performing the evaluation.EntitlementException
- if any other abnormal condition occurred.public Evaluator(Subject subject, String applicationName) throws EntitlementException
subject
- Subject who credential is used for performing the evaluation.applicationName
- the name of the aplication for which this evaluator can be used.EntitlementException
- if any other abnormal condition occurred.public boolean hasEntitlement(String realm, Subject subject, Entitlement e, Map<String,Set<String>> envParameters) throws EntitlementException
true
if the subject is granted to an entitlement.realm
- Realm name.subject
- Subject who is under evaluation.e
- Entitlement object which describes the resource name and actions.envParameters
- Map of environment parameters.true
if the subject is granted to an entitlement.EntitlementException
- if the result cannot be determined.public List<Entitlement> evaluate(String realm, Subject subject, Set<String> resourceNames, Map<String,Set<String>> environment) throws EntitlementException
realm
- Realm Name.subject
- Subject who is under evaluation.resourceNames
- Resource names.environment
- Environment parameters.EntitlementException
- if the result cannot be determined.public List<Entitlement> evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment, boolean recursive) throws EntitlementException
realm
- Realm Name.subject
- Subject who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.recursive
- true
to perform evaluation on sub resources from the given resource name.EntitlementException
- if the result cannot be determined.public String getApplicationName()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.