Package com.sun.identity.entitlement
Interface EntitlementCondition
Encapsulates a Strategy to decide if a
Privilege applies to a given request.-
Method Summary
Modifier and TypeMethodDescriptionReturns condition decision.Returns display type.getState()Returns state of the object encoded as a JSON string.voidInitializes the condition object.voidsetDisplayType(String displayType) Sets display type.voidSets state of this object from a JSON string.voidvalidate()Checks that this condition is configured correctly.
-
Method Details
-
setDisplayType
Sets display type.- Parameters:
displayType- Display Type.
-
getDisplayType
String getDisplayType()Returns display type.- Returns:
- Display Type.
-
init
Initializes the condition object.- Parameters:
parameters- Parameters for initializing the condition.
-
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.
-
validate
Checks that this condition is configured correctly. ThrowsEntitlementExceptionif not with an informative message to display to the user creating/updating the policy.- Throws:
EntitlementException- if the configuration state is not valid.
-
evaluate
ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String, Set<String>> environment) throws EntitlementExceptionReturns condition decision.- Parameters:
realm- Realm Name.subject- Subject who is under evaluation.resourceName- Resource name.environment- Environment parameters.- Returns:
- resulting condition decision.
- Throws:
EntitlementException- if cannot get condition decision.
-