public class NumericAttributeCondition extends EntitlementConditionAdaptor
Modifier and Type | Class and Description |
---|---|
static class |
NumericAttributeCondition.Operator |
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_NAME_ATTRIBUTE_NAME |
static String |
ATTR_NAME_OPERATOR |
static String |
ATTR_NAME_VALUE |
Constructor and Description |
---|
NumericAttributeCondition() |
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() |
NumericAttributeCondition.Operator |
getOperator() |
String |
getState()
Returns state of the object encoded as a JSON string.
|
float |
getValue() |
int |
hashCode()
Returns hash code of the object.
|
void |
init(Map<String,Set<String>> parameters)
Initializes the condition object.
|
void |
setAttributeName(String attributeName) |
void |
setOperator(NumericAttributeCondition.Operator operator) |
void |
setState(String state)
Sets state of this object from a JSON string.
|
void |
setValue(float 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_OPERATOR
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 setOperator(NumericAttributeCondition.Operator operator)
public void setValue(float value)
public String getAttributeName()
public NumericAttributeCondition.Operator getOperator()
public float getValue()
public int hashCode()
EntitlementConditionAdaptor
hashCode
in class EntitlementConditionAdaptor
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 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.