Class ResourceEnvIPCondition
- java.lang.Object
-
- com.sun.identity.entitlement.EntitlementConditionAdaptor
-
- org.forgerock.openam.entitlement.conditions.environment.ResourceEnvIPCondition
-
- All Implemented Interfaces:
EntitlementCondition
public class ResourceEnvIPCondition extends EntitlementConditionAdaptor
This condition provides the policy framework with the condition decision and advices based on the client's environment or resource such as IP address, DNS host name, location, etc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringENV_CONDITION_VALUE
-
Constructor Summary
Constructors Constructor Description ResourceEnvIPCondition()No argument constructorResourceEnvIPCondition(Debug debug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Returnstrueif the passed in object is equal to this objectConditionDecisionevaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> env)Returns condition decision.Set<String>getResourceEnvIPConditionValue()StringgetState()Returns state of the object encoded as a JSON string.inthashCode()Returns hash code of the object.voidsetResourceEnvIPConditionValue(Set<String> resourceEnvIPConditionValue)voidsetState(String state)Sets state of this object from a JSON string.StringtoString()voidvalidate()Checks that this condition is configured correctly.-
Methods inherited from class com.sun.identity.entitlement.EntitlementConditionAdaptor
getDisplayType, init, setDisplayType, setState, toJSONObject
-
-
-
-
Field Detail
-
ENV_CONDITION_VALUE
public static final String ENV_CONDITION_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResourceEnvIPCondition
public ResourceEnvIPCondition()
No argument constructor
-
ResourceEnvIPCondition
public ResourceEnvIPCondition(Debug debug)
-
-
Method Detail
-
evaluate
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> env) throws EntitlementException
Returns condition decision.- Parameters:
realm- Realm Name.subject- Subject who is under evaluation.resourceName- Resource name.env- Environment parameters.- Returns:
- resulting condition decision.
- Throws:
EntitlementException- if cannot get condition decision.
-
setState
public void setState(String state)
Description copied from interface:EntitlementConditionSets state of this object from a JSON string.- Parameters:
state- State of the object encoded as a JSON string
-
getState
public String getState()
Description copied from interface:EntitlementConditionReturns state of the object encoded as a JSON string.- Returns:
- state of the object encoded as a JSON string.
-
setResourceEnvIPConditionValue
public void setResourceEnvIPConditionValue(Set<String> resourceEnvIPConditionValue)
-
validate
public void validate() throws EntitlementExceptionDescription copied from interface:EntitlementConditionChecks 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.
-
equals
public boolean equals(Object obj)
Description copied from class:EntitlementConditionAdaptorReturnstrueif the passed in object is equal to this object- Overrides:
equalsin classEntitlementConditionAdaptor- Parameters:
obj- object to check for equality- Returns:
trueif the passed in object is equal to this object
-
hashCode
public int hashCode()
Description copied from class:EntitlementConditionAdaptorReturns hash code of the object.- Overrides:
hashCodein classEntitlementConditionAdaptor- Returns:
- hash code of the object.
-
-