Package com.sun.identity.entitlement
Interface EntitlementSubject
Encapsulates a Strategy to decide if a
Privilege
applies to a given
Subject
.-
Method Summary
Modifier and TypeMethodDescriptionevaluate
(String realm, com.sun.identity.entitlement.SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String, Set<String>> environment) ReturnsSubjectDecision
ofEntitlementSubject
evaluation.Returns a set of attribute names that are used for evaluation.Returns attribute names and values that could be used for indexing.getState()
Returns state of the object encoded as a JSON string.boolean
Returnstrue
is this subject is an identity object.void
Sets state of this object from a JSON string.
-
Method Details
-
setState
Sets state of this object from a JSON string.- Parameters:
state
- State of the object encoded as a JSON string
-
getState
String getState()Returns state of the object encoded as a JSON string.- Returns:
- state of the object encoded as a JSON string.
-
getSearchIndexAttributes
Returns attribute names and values that could be used for indexing. These values will be used by the authorization engine to obtain the applicable policies for a given Subject.- Returns:
- a map of key-value pairs that will be used for indexing the
entitlements that contain this
EntitlementSubject
.
-
getRequiredAttributeNames
Returns a set of attribute names that are used for evaluation. During evaluation, theEvaluator
would try to populate these attributes in the Subject for theEntitlementSubject
's consumption.- Returns:
- a set of attributes that would be required by the
EntitlementSubject
's implementation.
-
evaluate
SubjectDecision evaluate(String realm, com.sun.identity.entitlement.SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String, Set<String>> environment) throws EntitlementExceptionReturnsSubjectDecision
ofEntitlementSubject
evaluation.- Parameters:
realm
- Realm name.subject
- Subject who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.- Returns:
SubjectDecision
ofSubject
evaluation.- Throws:
EntitlementException
- if any errors occur.
-
isIdentity
boolean isIdentity()Returnstrue
is this subject is an identity object.- Returns:
true
is this subject is an identity object.
-