Class AMIdentityMembershipCondition
- java.lang.Object
-
- com.sun.identity.entitlement.EntitlementConditionAdaptor
-
- org.forgerock.openam.entitlement.conditions.environment.AMIdentityMembershipCondition
-
- All Implemented Interfaces:
EntitlementCondition
public class AMIdentityMembershipCondition extends EntitlementConditionAdaptor
An implementation of anEntitlementConditionthat will check whether the principal has the specified memberships.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description AMIdentityMembershipCondition()Constructs a new AMIdentityMembershipCondition instance.
-
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>getAmIdentityName()StringgetState()Returns state of the object encoded as a JSON string.inthashCode()Returns hash code of the object.voidsetAmIdentityNames(Set<String> nameValues)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
-
-
-
-
Method Detail
-
setState
public 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
public String getState()
Returns state of the object encoded as a JSON string.- Returns:
- state of the object encoded as a JSON string.
-
evaluate
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> env) throws EntitlementException
Description copied from interface:EntitlementConditionReturns 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.
-
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.
-
-