public class NotSubject extends LogicalSubject
NotSubject
is satisfied in the user is not a
member of the nested EntitlementSubject
.
We @JsonIgnore getESubjects and setESubjects (NOTE the 's' on the end) so that
we don't indicate via JSON schema exposed that we take multiple subject types.
We extend LogicalSubject but ensure that we are only allowing a single
EntitlementSubject
to be referenced by this class.Constructor and Description |
---|
NotSubject()
Constructs NotSubject
|
NotSubject(EntitlementSubject eSubject)
Constructs NotSubject
|
NotSubject(EntitlementSubject eSubject,
String pSubjectName)
Constructs NotSubject
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns
true if the passed in object is equal to this object |
SubjectDecision |
evaluate(String realm,
SubjectAttributesManager mgr,
Subject subject,
String resourceName,
Map<String,Set<String>> environment)
Returns
SubjectDecision of
EntitlementSubject evaluation. |
EntitlementSubject |
getESubject()
Returns nested EntitlementSubject.
|
Set<EntitlementSubject> |
getESubjects()
Returns the nested EntitlementSubject(s)
|
String |
getPSubjectName()
Returns OpenAM policy Subject name
|
Set<String> |
getRequiredAttributeNames()
Returns required attribute names.
|
Map<String,Set<String>> |
getSearchIndexAttributes()
Returns search index attributes.
|
String |
getState()
Returns state of the object.
|
int |
hashCode()
Returns hash code of the object
|
boolean |
isIdentity()
Returns
true is this subject is an identity object. |
void |
setESubject(EntitlementSubject eSubject)
Sets nested EntitlementSubject.
|
void |
setESubjects(Set<EntitlementSubject> eSubjects)
Sets the nested EntitlementSubject(s)
|
void |
setPSubjectName(String pSubjectName)
Sets OpenAM policy Subject 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.
|
public NotSubject()
public NotSubject(EntitlementSubject eSubject)
eSubject
- nested EntitlementSubjectpublic NotSubject(EntitlementSubject eSubject, String pSubjectName)
eSubject
- eSubject nested EntitlementSubjectpSubjectName
- subject name as used in OpenAM policy,
this is relevant only when NotrESubject was created from
OpenAM policy Subjectpublic void setState(String state)
setState
in interface EntitlementSubject
setState
in class LogicalSubject
state
- State of the object encoded as stringpublic String getState()
getState
in interface EntitlementSubject
getState
in class LogicalSubject
public SubjectDecision evaluate(String realm, SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
SubjectDecision
of
EntitlementSubject
evaluation.realm
- Realm name.subject
- EntitlementSubject who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.SubjectDecision
of
EntitlementSubject
evaluationEntitlementException
- if any errors occur.public void setESubject(EntitlementSubject eSubject)
eSubject
- nested EntitlementSubject.public void setESubjects(Set<EntitlementSubject> eSubjects)
setESubjects
in class LogicalSubject
eSubjects
- the nested EntitlementSubject(s)public EntitlementSubject getESubject()
public Set<EntitlementSubject> getESubjects()
getESubjects
in class LogicalSubject
public void setPSubjectName(String pSubjectName)
setPSubjectName
in class LogicalSubject
pSubjectName
- subject name as used in OpenAM policy,
this is relevant only when NotrESubject was created from
OpenAM policy Subjectpublic String getPSubjectName()
getPSubjectName
in class LogicalSubject
public org.json.JSONObject toJSONObject() throws org.json.JSONException
toJSONObject
in class LogicalSubject
org.json.JSONException
- if can not map to JSONObjectpublic String toString()
toString
in class LogicalSubject
public boolean equals(Object obj)
true
if the passed in object is equal to this objectequals
in class LogicalSubject
obj
- object to check for equalitytrue
if the passed in object is equal to this objectpublic int hashCode()
hashCode
in class LogicalSubject
public Map<String,Set<String>> getSearchIndexAttributes()
getSearchIndexAttributes
in interface EntitlementSubject
getSearchIndexAttributes
in class LogicalSubject
public Set<String> getRequiredAttributeNames()
getRequiredAttributeNames
in interface EntitlementSubject
getRequiredAttributeNames
in class LogicalSubject
public boolean isIdentity()
true
is this subject is an identity object.isIdentity
in interface EntitlementSubject
isIdentity
in class LogicalSubject
true
is this subject is an identity object.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.