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
Modifier and TypeClassDescriptionstatic final class
Builder to help construct decisions. -
Constructor Summary
ConstructorDescriptionConditionDecision
(boolean satisfied, Map<String, Set<String>> advices) Deprecated.ConditionDecision
(boolean satisfied, Map<String, Set<String>> advices, long ttl) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdvices
(ConditionDecision decision) Deprecated.void
Deprecated.Advices associated with thisConditionDecision
.Retrieves the response attributes.long
Returns the time to live (TTL) of thisConditionDecision
.boolean
Whether thisConditionDecision
is satisfied.static ConditionDecision.Builder
newBuilder
(boolean satisfied) New decision builder.static ConditionDecision.Builder
New builder representing a failure.static ConditionDecision.Builder
New 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 thisConditionDecision
is satisfied.- Returns:
true
ifConditionDecision
is 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
- TheConditionDecision
whose 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
-