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 booleanequals(Object o)SubjectDecisionevaluate(String realm, SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String,Set<String>> environment)ReturnsSubjectDecisionofEntitlementSubjectevaluationStringgetID()Returns the Identifier.Set<String>getRequiredAttributeNames()Returns required attribute names.Map<String,Set<String>>getSearchIndexAttributes()Returns search index attributes.StringgetState()Returns state of the object.StringgetValue()Returns attribute value.inthashCode()booleanisExclusive()Returnstruefor exclusive.booleanisIdentity()Returnstrueis this subject is an identity object.voidsetExclusive(boolean flag)Sets exclusive.voidsetID(String id)Sets the Identifier.voidsetState(String state)Sets state of the objectvoidsetValue(String value)Sets attribute value.org.json.JSONObjecttoJSONObject()Returns JSONObject mapping of the object.StringtoString()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
ReturnsSubjectDecisionofEntitlementSubjectevaluation- Specified by:
evaluatein interfaceEntitlementSubject- Parameters:
realm- Realm name.subject- EntitlementSubject who is under evaluation.resourceName- Resource name.environment- Environment parameters.- Returns:
SubjectDecisionofEntitlementSubjectevaluation- Throws:
EntitlementException- if any errors occur.
-
setState
public void setState(String state)
Sets state of the object- Specified by:
setStatein interfaceEntitlementSubject- Parameters:
state- State of the object encoded as string
-
getState
public String getState()
Returns state of the object.- Specified by:
getStatein interfaceEntitlementSubject- Returns:
- state of the object encoded as string.
-
toJSONObject
public org.json.JSONObject toJSONObject() throws org.json.JSONExceptionReturns 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:
getSearchIndexAttributesin interfaceEntitlementSubject- Returns:
- search index attributes.
-
getRequiredAttributeNames
public Set<String> getRequiredAttributeNames()
Returns required attribute names.- Specified by:
getRequiredAttributeNamesin interfaceEntitlementSubject- Returns:
- required attribute names.
-
isIdentity
public boolean isIdentity()
Returnstrueis this subject is an identity object.- Specified by:
isIdentityin interfaceEntitlementSubject- Returns:
trueis this subject is an identity object.
-
isExclusive
public boolean isExclusive()
Returnstruefor exclusive.- Returns:
truefor exclusive.
-
setExclusive
public void setExclusive(boolean flag)
Sets exclusive.- Parameters:
flag-truefor exclusive.
-
-