public class AttributeLookupCondition extends EntitlementConditionAdaptor
Modifier and Type | Field and Description |
---|---|
static String |
MACRO_RESOURCE
Resource Macro
|
static String |
MACRO_USER
User Macro
|
Constructor and Description |
---|
AttributeLookupCondition()
Constructor.
|
AttributeLookupCondition(String key,
String value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns
true if the passed in object is equal to this object |
ConditionDecision |
evaluate(String realm,
Subject subject,
String resourceName,
Map<String,Set<String>> environment)
Returns
ConditionDecision of
EntitlementCondition evaluation. |
String |
getKey()
Returns matching key.
|
String |
getPConditionName()
Returns OpenAM policy Condition name.
|
String |
getState()
Returns state of the object.
|
String |
getValue()
Returns matching value.
|
int |
hashCode()
Returns hash code of the object.
|
void |
setKey(String key)
Sets matching key.
|
void |
setPConditionName(String pConditionName)
Sets OpenAM policy Condition name
|
void |
setState(String state)
Sets state of the object
|
void |
setValue(String value)
Set matching value.
|
org.json.JSONObject |
toJSONObject()
Returns JSONObject mapping of the object.
|
String |
toString()
Returns string representation of the object.
|
void |
validate()
Checks that this condition is configured correctly.
|
getDisplayType, init, setDisplayType, setState, toJSONObject
public static final String MACRO_USER
public static final String MACRO_RESOURCE
public void setState(String state)
state
- State of the object encoded as stringpublic String getState()
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
ConditionDecision
of
EntitlementCondition
evaluation.realm
- Realm name.subject
- EntitlementCondition who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.ConditionDecision
of
EntitlementCondition
evaluationEntitlementException
- if error occurs.public String getKey()
public String getPConditionName()
public String getValue()
public void setKey(String key)
key
- Matching key.public void setPConditionName(String pConditionName)
pConditionName
- subject name as used in OpenAM policy,
this is relevant only when UserECondition was created from
OpenAM policy Condition.public void setValue(String value)
value
- Matching value.public org.json.JSONObject toJSONObject() throws org.json.JSONException
org.json.JSONException
public boolean equals(Object obj)
true
if the passed in object is equal to this objectequals
in class EntitlementConditionAdaptor
obj
- object to check for equalitytrue
if the passed in object is equal to this objectpublic int hashCode()
hashCode
in class EntitlementConditionAdaptor
public String toString()
public void validate() throws EntitlementException
EntitlementCondition
EntitlementException
if not with an
informative message to display to the user creating/updating the policy.EntitlementException
- if the configuration state is not valid.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.