Package com.sun.identity.entitlement
Class AttributeSubject
- java.lang.Object
-
- com.sun.identity.entitlement.AttributeSubject
-
- All Implemented Interfaces:
EntitlementSubject
,SubjectImplementation
public class AttributeSubject extends Object implements SubjectImplementation
-
-
Constructor Summary
Constructors Constructor Description AttributeSubject()
ConstructorAttributeSubject(String id, String value)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
SubjectDecision
evaluate(String realm, SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String,Set<String>> environment)
ReturnsSubjectDecision
ofEntitlementSubject
evaluationString
getID()
Returns the Identifier.Set<String>
getRequiredAttributeNames()
Returns required attribute names.Map<String,Set<String>>
getSearchIndexAttributes()
Returns search index attributes.String
getState()
Returns state of the object.String
getValue()
Returns attribute value.int
hashCode()
boolean
isExclusive()
Returnstrue
for exclusive.boolean
isIdentity()
Returnstrue
is this subject is an identity object.void
setExclusive(boolean flag)
Sets exclusive.void
setID(String id)
Sets the Identifier.void
setState(String state)
Sets state of the objectvoid
setValue(String value)
Sets attribute value.org.json.JSONObject
toJSONObject()
Returns JSONObject mapping of the object.String
toString()
Returns string representation of the object.
-
-
-
Method Detail
-
getValue
public String getValue()
Returns attribute value.- Returns:
- attribute value
-
setValue
public void setValue(String value)
Sets attribute value.- Parameters:
value
- attribute value
-
setID
public void setID(String id)
Sets the Identifier.- Parameters:
id
- Identifier.
-
getID
public String getID()
Returns the Identifier.- Returns:
- Identifier.
-
evaluate
public SubjectDecision evaluate(String realm, SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
ReturnsSubjectDecision
ofEntitlementSubject
evaluation- Specified by:
evaluate
in interfaceEntitlementSubject
- Parameters:
realm
- Realm name.subject
- EntitlementSubject who is under evaluation.resourceName
- Resource name.environment
- Environment parameters.- Returns:
SubjectDecision
ofEntitlementSubject
evaluation- Throws:
EntitlementException
- if any errors occur.
-
setState
public void setState(String state)
Sets state of the object- Specified by:
setState
in interfaceEntitlementSubject
- Parameters:
state
- State of the object encoded as string
-
getState
public String getState()
Returns state of the object.- Specified by:
getState
in interfaceEntitlementSubject
- Returns:
- state of the object encoded as string.
-
toJSONObject
public org.json.JSONObject toJSONObject() throws org.json.JSONException
Returns JSONObject mapping of the object.- Returns:
- JSONObject mapping of the object.
- Throws:
org.json.JSONException
-
toString
public String toString()
Returns string representation of the object.
-
getSearchIndexAttributes
public Map<String,Set<String>> getSearchIndexAttributes()
Returns search index attributes.- Specified by:
getSearchIndexAttributes
in interfaceEntitlementSubject
- Returns:
- search index attributes.
-
getRequiredAttributeNames
public Set<String> getRequiredAttributeNames()
Returns required attribute names.- Specified by:
getRequiredAttributeNames
in interfaceEntitlementSubject
- Returns:
- required attribute names.
-
isIdentity
public boolean isIdentity()
Returnstrue
is this subject is an identity object.- Specified by:
isIdentity
in interfaceEntitlementSubject
- Returns:
true
is this subject is an identity object.
-
isExclusive
public boolean isExclusive()
Returnstrue
for exclusive.- Returns:
true
for exclusive.
-
setExclusive
public void setExclusive(boolean flag)
Sets exclusive.- Parameters:
flag
-true
for exclusive.
-
-