public abstract class LogicalCondition extends EntitlementConditionAdaptor
Constructor and Description |
---|
LogicalCondition()
Constructor.
|
LogicalCondition(Set<EntitlementCondition> eConditions)
Constructor.
|
LogicalCondition(Set<EntitlementCondition> eConditions,
String pConditionName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns
true if the passed in object is equal to this object |
abstract ConditionDecision |
evaluate(String realm,
Subject subject,
String resourceName,
Map<String,Set<String>> environment)
Returns
ConditionDecision of
EntitlementCondition evaluation |
Set<EntitlementCondition> |
getEConditions()
Returns the nested
EntitlementCondition (s). |
String |
getPConditionName()
Returns OpenAM policy Condition name
|
String |
getState()
Returns state of the object.
|
int |
hashCode()
Returns hash code of the object
|
void |
setEConditions(Set<EntitlementCondition> eConditions)
Sets the nested
EntitlementCondition (s). |
void |
setPConditionName(String pConditionName)
Sets OpenAM policy Condition name
|
void |
setState(String state)
Sets state of the object
|
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 LogicalCondition()
public LogicalCondition(Set<EntitlementCondition> eConditions)
eConditions
- wrapped EntitlementCondition
(s)public LogicalCondition(Set<EntitlementCondition> eConditions, String pConditionName)
eConditions
- wrapped EntitlementCondition
(s)pConditionName
- subject name as used in OpenAM policy,
this is relevant only when UserECondition was created from
OpenAM policy Conditionpublic void setState(String state)
state
- State of the object encoded as stringpublic String getState()
public abstract ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
ConditionDecision
of
EntitlementCondition
evaluationrealm
- Realm name.subject
- EntitlementCondition who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.ConditionDecision
of
EntitlementCondition
evaluationEntitlementException
- if error occurs.public void setEConditions(Set<EntitlementCondition> eConditions)
EntitlementCondition
(s).eConditions
- the nested EntitlementCondition
(s)public Set<EntitlementCondition> getEConditions()
EntitlementCondition
(s).EntitlementCondition
(s).public void setPConditionName(String pConditionName)
pConditionName
- subject name as used in OpenAM policy,
this is relevant only when UserECondition was created from
OpenAM policy Conditionpublic String getPConditionName()
public org.json.JSONObject toJSONObject() throws org.json.JSONException
org.json.JSONException
- if can not map to JSONObjectpublic String toString()
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 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.