public class NotCondition extends LogicalCondition
NotCondition
is satisfied in the user is not a
member of the nested EntitlementCondition
.
We @JsonIgnore getEConditions and setEConditions (NOTE the 's' on the end) so that
we don't indicate via JSON schema exposed that we take multiple condition types.
We extend LogicalCondition but ensure that we are only allowing a single
EntitlementCondition
to be referenced by this class.Constructor and Description |
---|
NotCondition()
Constructs
NotCondition |
NotCondition(EntitlementCondition eCondition)
Constructs NotCondition
|
NotCondition(EntitlementCondition eConditions,
String pConditionName)
Constructs
NotCondition . |
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 |
EntitlementCondition |
getECondition()
Returns the nested
EntitlementCondition (s). |
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 |
setECondition(EntitlementCondition eCondition)
Sets the nested
EntitlementCondition (s). |
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 NotCondition()
NotCondition
public NotCondition(EntitlementCondition eCondition)
eCondition
- wrapped EntitlementCondition
(s)public NotCondition(EntitlementCondition eConditions, String pConditionName)
NotCondition
.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)
setState
in interface EntitlementCondition
setState
in class LogicalCondition
state
- State of the object encoded as stringpublic String getState()
getState
in interface EntitlementCondition
getState
in class LogicalCondition
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
ConditionDecision
of
EntitlementCondition
evaluationevaluate
in interface EntitlementCondition
evaluate
in class LogicalCondition
realm
- Realm name.subject
- EntitlementCondition who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.ConditionDecision
of
EntitlementCondition
evaluationEntitlementException
- if error occurs.public void setECondition(EntitlementCondition eCondition)
EntitlementCondition
(s).eCondition
- the nested EntitlementCondition
(s)public EntitlementCondition getECondition()
EntitlementCondition
(s).EntitlementCondition
(s).public void setEConditions(Set<EntitlementCondition> eConditions)
EntitlementCondition
(s).setEConditions
in class LogicalCondition
eConditions
- the nested EntitlementCondition
(s)public Set<EntitlementCondition> getEConditions()
EntitlementCondition
(s).getEConditions
in class LogicalCondition
EntitlementCondition
(s).public void setPConditionName(String pConditionName)
setPConditionName
in class LogicalCondition
pConditionName
- subject name as used in OpenAM policy,
this is relevant only when UserECondition was created from
OpenAM policy Conditionpublic String getPConditionName()
getPConditionName
in class LogicalCondition
public org.json.JSONObject toJSONObject() throws org.json.JSONException
toJSONObject
in class LogicalCondition
org.json.JSONException
- if can not map to JSONObjectpublic String toString()
toString
in class LogicalCondition
public boolean equals(Object obj)
true
if the passed in object is equal to this objectequals
in class LogicalCondition
obj
- object to check for equalitytrue
if the passed in object is equal to this objectpublic int hashCode()
hashCode
in class LogicalCondition
public void validate() throws EntitlementException
EntitlementCondition
EntitlementException
if not with an
informative message to display to the user creating/updating the policy.validate
in interface EntitlementCondition
validate
in class LogicalCondition
EntitlementException
- if the configuration state is not valid.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.