Class PolicyCondition
- java.lang.Object
-
- com.sun.identity.entitlement.EntitlementConditionAdaptor
-
- com.sun.identity.entitlement.opensso.PolicyCondition
-
- All Implemented Interfaces:
EntitlementCondition
public class PolicyCondition extends EntitlementConditionAdaptor
This condition wraps all OpenAM policy conditions.
-
-
Constructor Summary
Constructors Constructor Description PolicyCondition()PolicyCondition(String name, String className, Map<String,Set<String>> properties)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Returnstrueif the passed in object is equal to this objectConditionDecisionevaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment)Returns condition decision.StringgetClassName()Returns class name.StringgetDisplayType()Returns display type.StringgetName()Returns name.ConditiongetPolicyCondition()Constructs a legacy policyConditionobject based on the information contained in this adapter.Map<String,Set<String>>getProperties()Returns properties.StringgetState()Returns state of this condition.inthashCode()Returns hash code of the object.voidsetState(String state)Sets the state of this condition.voidvalidate()Checks that this condition is configured correctly.-
Methods inherited from class com.sun.identity.entitlement.EntitlementConditionAdaptor
init, setDisplayType, setState, toJSONObject
-
-
-
-
Method Detail
-
getClassName
public String getClassName()
Returns class name.- Returns:
- class name.
-
getName
public String getName()
Returns name.- Returns:
- name.
-
getProperties
public Map<String,Set<String>> getProperties()
Returns properties.- Returns:
- properties.
-
setState
public void setState(String state)
Sets the state of this condition.- Parameters:
state- State of this condition.
-
getState
public String getState()
Returns state of this condition.- Returns:
- state of this condition.
-
evaluate
public ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String,Set<String>> environment) throws EntitlementException
Returns condition decision.- Parameters:
realm- Realm name.subject- Subject to be evaluated.resourceName- Resource name.environment- Environment map.- Returns:
- condition decision.
- Throws:
EntitlementException- if error occur.
-
equals
public boolean equals(Object obj)
Description copied from class:EntitlementConditionAdaptorReturnstrueif the passed in object is equal to this object- Overrides:
equalsin classEntitlementConditionAdaptor- Parameters:
obj- object to check for equality- Returns:
trueif the passed in object is equal to this object
-
getDisplayType
public String getDisplayType()
Description copied from class:EntitlementConditionAdaptorReturns display type.- Specified by:
getDisplayTypein interfaceEntitlementCondition- Overrides:
getDisplayTypein classEntitlementConditionAdaptor- Returns:
- Display Type.
-
getPolicyCondition
public Condition getPolicyCondition() throws EntitlementException
Constructs a legacy policyConditionobject based on the information contained in this adapter.- Returns:
- the legacy policy condition.
- Throws:
EntitlementException- if an error occurs constructing the condition.
-
validate
public void validate() throws EntitlementExceptionDescription copied from interface:EntitlementConditionChecks that this condition is configured correctly. ThrowsEntitlementExceptionif not with an informative message to display to the user creating/updating the policy.- Throws:
EntitlementException- if the configuration state is not valid.
-
hashCode
public int hashCode()
Description copied from class:EntitlementConditionAdaptorReturns hash code of the object.- Overrides:
hashCodein classEntitlementConditionAdaptor- Returns:
- hash code of the object.
-
-