Class PolicySubject
- java.lang.Object
-
- com.sun.identity.entitlement.opensso.PolicySubject
-
- All Implemented Interfaces:
EntitlementSubject
public class PolicySubject extends Object implements EntitlementSubject
This subject wraps all OpenAM policy subjects.
-
-
Constructor Summary
Constructors Constructor Description PolicySubject()PolicySubject(String name, String className, Set<String> values, boolean exclusive)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubjectDecisionevaluate(String realm, SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String,Set<String>> environment)Returns subject decision.StringgetClassName()Returns class name.StringgetName()Returns name.SubjectgetPolicySubject()Constructs a legacy policy subject based on the information in this adapter.Set<String>getRequiredAttributeNames()Returns required attribute names.Map<String,Set<String>>getSearchIndexAttributes()Returns search index attributes.StringgetState()Returns state of this subject.Set<String>getValues()Returns values.booleanisExclusive()Returnstrueif this is an exclusive subject.booleanisIdentity()Returnstrueis this subject is an identity object.voidsetState(String state)Sets states
-
-
-
Method Detail
-
getName
public String getName()
Returns name.- Returns:
- name.
-
getClassName
public String getClassName()
Returns class name.- Returns:
- class name.
-
isExclusive
public boolean isExclusive()
Returnstrueif this is an exclusive subject.- Returns:
trueif this is an exclusive subject.
-
setState
public void setState(String state)
Sets states- Specified by:
setStatein interfaceEntitlementSubject- Parameters:
state- State.
-
getState
public String getState()
Returns state of this subject.- Specified by:
getStatein interfaceEntitlementSubject- Returns:
- state of this subject.
-
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.
-
evaluate
public SubjectDecision evaluate(String realm, SubjectAttributesManager mgr, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
Returns subject decision.- Specified by:
evaluatein interfaceEntitlementSubject- Parameters:
realm- Realm name.mgr- Subject attribute managersubject- Subject to be evaluated.resourceName- Resource name to be evaluated.environment- Environment map.- Returns:
- subject decision.
- Throws:
EntitlementException- if error occurs.
-
isIdentity
public boolean isIdentity()
Returnstrueis this subject is an identity object.- Specified by:
isIdentityin interfaceEntitlementSubject- Returns:
trueis this subject is an identity object.
-
getPolicySubject
public Subject getPolicySubject() throws EntitlementException
Constructs a legacy policy subject based on the information in this adapter.- Returns:
- the legacy policy subject
- Throws:
EntitlementException- if an error occurs constructing the subject.
-
-