public class StringAttributeCondition extends EntitlementConditionAdaptor
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_NAME_ATTRIBUTE_NAME |
static String |
ATTR_NAME_CASE_SENSITIVE |
static String |
ATTR_NAME_VALUE |
Constructor and Description |
---|
StringAttributeCondition() |
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 condition decision.
|
String |
getAttributeName() |
String |
getState()
Returns state of the object encoded as a JSON string.
|
String |
getValue() |
int |
hashCode()
Returns hash code of the object.
|
void |
init(Map<String,Set<String>> parameters)
Initializes the condition object.
|
boolean |
isCaseSensitive() |
void |
setAttributeName(String attributeName) |
void |
setCaseSensitive(boolean flag) |
void |
setState(String state)
Sets state of this object from a JSON string.
|
void |
setValue(String value) |
void |
validate()
Checks that this condition is configured correctly.
|
getDisplayType, setDisplayType, setState, toJSONObject
public static final String ATTR_NAME_ATTRIBUTE_NAME
public static final String ATTR_NAME_CASE_SENSITIVE
public static final String ATTR_NAME_VALUE
public void init(Map<String,Set<String>> parameters)
EntitlementConditionAdaptor
init
in interface EntitlementCondition
init
in class EntitlementConditionAdaptor
parameters
- Parameters for initializing the condition.public void setState(String state)
EntitlementCondition
state
- State of the object encoded as a JSON stringpublic String getState()
EntitlementCondition
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
EntitlementCondition
realm
- Realm Name.subject
- Subject who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.EntitlementException
- if cannot get condition decision.public void setAttributeName(String attributeName)
public void setCaseSensitive(boolean flag)
public void setValue(String value)
public String getAttributeName()
public boolean isCaseSensitive()
public String getValue()
public boolean equals(Object obj)
EntitlementConditionAdaptor
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()
EntitlementConditionAdaptor
hashCode
in class EntitlementConditionAdaptor
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.