Package com.sun.identity.entitlement
Class ConditionDecision
java.lang.Object
com.sun.identity.entitlement.ConditionDecision
Class to represent
EntitlementCondition evaluation match result and - if applicable - its advice.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder to help construct decisions. -
Constructor Summary
ConstructorsConstructorDescriptionConditionDecision(boolean satisfied, Map<String, Set<String>> advices) Deprecated.ConditionDecision(boolean satisfied, Map<String, Set<String>> advices, long ttl) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdvices(ConditionDecision decision) Deprecated.voidDeprecated.Advices associated with thisConditionDecision.Retrieves the response attributes.longReturns the time to live (TTL) of thisConditionDecision.booleanWhether thisConditionDecisionis satisfied.static ConditionDecision.BuildernewBuilder(boolean satisfied) New decision builder.static ConditionDecision.BuilderNew builder representing a failure.static ConditionDecision.BuilderNew builder representing a satisfied.
-
Constructor Details
-
ConditionDecision
Deprecated.Constructs an instance ofConditionDecision.
Deprecated, favour the factory methods.- Parameters:
satisfied- result of thisConditionDecision.advices- Advice map of thisConditionDecision.
-
ConditionDecision
Deprecated.Constructs an instance ofConditionDecision.
Deprecated, favour the factory methods.- Parameters:
satisfied- Result of thisConditionDecision.advices- Advice map of thisConditionDecision.ttl- The TTL of thisConditionDecision.
-
-
Method Details
-
isSatisfied
public boolean isSatisfied()Whether thisConditionDecisionis satisfied.- Returns:
trueifConditionDecisionis fulfilled.
-
getAdvice
Advices associated with thisConditionDecision.- Returns:
- advice of
ConditionDecision.
-
getResponseAttributes
Retrieves the response attributes.- Returns:
- the response attributes
-
getTimeToLive
public long getTimeToLive()Returns the time to live (TTL) of thisConditionDecision.- Returns:
- The TTL time in ms.
-
clearAdvices
Deprecated.Clears the current advice associated with thisConditionDecision.
Deprecated method as a given instance should be immutable. -
addAdvices
Deprecated.Adds an advice (from anotherConditionDecision) to thisConditionDecision.
Deprecated method as a given instance should be immutable.- Parameters:
decision- TheConditionDecisionwhose advice should be added to thisConditionDecision.
-
newBuilder
New decision builder.- Parameters:
satisfied- whether the decision represents a successful evaluation or not- Returns:
- new builder instance
-
newSuccessBuilder
New builder representing a satisfied.- Returns:
- new builder instance
-
newFailureBuilder
New builder representing a failure.- Returns:
- new builder instance
-