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 anEntitlementCondition
that 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 boolean
equals(Object obj)
Returnstrue
if the passed in object is equal to this objectConditionDecision
evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> env)
Returns condition decision.Set<String>
getAmIdentityName()
String
getState()
Returns state of the object encoded as a JSON string.int
hashCode()
Returns hash code of the object.void
setAmIdentityNames(Set<String> nameValues)
void
setState(String state)
Sets state of this object from a JSON string.String
toString()
void
validate()
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:EntitlementCondition
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.
-
validate
public void validate() throws EntitlementException
Description copied from interface:EntitlementCondition
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.
-
equals
public boolean equals(Object obj)
Description copied from class:EntitlementConditionAdaptor
Returnstrue
if the passed in object is equal to this object- Overrides:
equals
in classEntitlementConditionAdaptor
- Parameters:
obj
- object to check for equality- Returns:
true
if the passed in object is equal to this object
-
hashCode
public int hashCode()
Description copied from class:EntitlementConditionAdaptor
Returns hash code of the object.- Overrides:
hashCode
in classEntitlementConditionAdaptor
- Returns:
- hash code of the object.
-
-