Package com.sun.identity.entitlement
Interface EntitlementCondition
-
@SupportedAll public interface EntitlementCondition
Encapsulates a Strategy to decide if aPrivilege
applies to a given request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConditionDecision
evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment)
Returns condition decision.String
getDisplayType()
Returns display type.String
getState()
Returns state of the object encoded as a JSON string.void
init(Map<String,Set<String>> parameters)
Initializes the condition object.void
setDisplayType(String displayType)
Sets display type.void
setState(String state)
Sets state of this object from a JSON string.void
validate()
Checks that this condition is configured correctly.
-
-
-
Method Detail
-
setDisplayType
void setDisplayType(String displayType)
Sets display type.- Parameters:
displayType
- Display Type.
-
getDisplayType
String getDisplayType()
Returns display type.- Returns:
- Display Type.
-
init
void init(Map<String,Set<String>> parameters)
Initializes the condition object.- Parameters:
parameters
- Parameters for initializing the condition.
-
setState
void setState(String state)
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
void validate() throws EntitlementException
Checks that this condition is configured correctly. ThrowsEntitlementException
if 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 EntitlementException
Returns 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.
-
-