public class PolicyCondition extends EntitlementConditionAdaptor
Constructor and Description |
---|
PolicyCondition() |
PolicyCondition(String name,
String className,
Map<String,Set<String>> properties)
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 condition decision.
|
String |
getClassName()
Returns class name.
|
String |
getDisplayType()
Returns display type.
|
String |
getName()
Returns name.
|
Condition |
getPolicyCondition()
Constructs a legacy policy
Condition object based on the information contained in this adapter. |
Map<String,Set<String>> |
getProperties()
Returns properties.
|
String |
getState()
Returns state of this condition.
|
int |
hashCode()
Returns hash code of the object.
|
void |
setState(String state)
Sets the state of this condition.
|
void |
validate()
Checks that this condition is configured correctly.
|
init, setDisplayType, setState, toJSONObject
public String getClassName()
public String getName()
public Map<String,Set<String>> getProperties()
public void setState(String state)
state
- State of this condition.public String getState()
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
realm
- Realm name.subject
- Subject to be evaluated.resourceName
- Resource name.environment
- Environment map.EntitlementException
- if error occur.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 String getDisplayType()
EntitlementConditionAdaptor
getDisplayType
in interface EntitlementCondition
getDisplayType
in class EntitlementConditionAdaptor
public Condition getPolicyCondition() throws EntitlementException
Condition
object based on the information contained in this adapter.EntitlementException
- if an error occurs constructing the condition.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.public int hashCode()
EntitlementConditionAdaptor
hashCode
in class EntitlementConditionAdaptor
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.