Package com.sun.identity.entitlement
Interface EntitlementCondition
-
- All Known Implementing Classes:
AMIdentityMembershipCondition,AndCondition,AttributeLookupCondition,AuthenticateToRealmCondition,AuthenticateToServiceCondition,AuthLevelCondition,AuthSchemeCondition,CachingEntitlementCondition,EntitlementConditionAdaptor,IPv4Condition,IPv6Condition,LDAPFilterCondition,LEAuthLevelCondition,LogicalCondition,NotCondition,NumericAttributeCondition,OAuth2ScopeCondition,OrCondition,PolicyCondition,ResourceEnvIPCondition,ScriptCondition,SessionCondition,SessionPropertyCondition,SimpleTimeCondition,StringAttributeCondition
public interface EntitlementConditionEncapsulates a Strategy to decide if aPrivilegeapplies to a given request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConditionDecisionevaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment)Returns condition decision.StringgetDisplayType()Returns display type.StringgetState()Returns state of the object encoded as a JSON string.voidinit(Map<String,Set<String>> parameters)Initializes the condition object.voidsetDisplayType(String displayType)Sets display type.voidsetState(String state)Sets state of this object from a JSON string.voidvalidate()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 EntitlementExceptionChecks 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 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.
-
-