Package com.sun.identity.entitlement
Class ConditionDecision
- java.lang.Object
-
- com.sun.identity.entitlement.ConditionDecision
-
@SupportedAll public class ConditionDecision extends Object
Class to representEntitlementCondition
evaluation match result and - if applicable - its advice.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConditionDecision.Builder
Builder to help construct decisions.
-
Constructor Summary
Constructors Constructor Description ConditionDecision(boolean satisfied, Map<String,Set<String>> advices)
Deprecated.ConditionDecision(boolean satisfied, Map<String,Set<String>> advices, long ttl)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAdvices(ConditionDecision decision)
Deprecated.void
clearAdvices()
Deprecated.Map<String,Set<String>>
getAdvice()
Advices associated with thisConditionDecision
.Map<String,Set<String>>
getResponseAttributes()
Retrieves the response attributes.long
getTimeToLive()
Returns the time to live (TTL) of thisConditionDecision
.boolean
isSatisfied()
Whether thisConditionDecision
is satisfied.static ConditionDecision.Builder
newBuilder(boolean satisfied)
New decision builder.static ConditionDecision.Builder
newFailureBuilder()
New builder representing a failure.static ConditionDecision.Builder
newSuccessBuilder()
New builder representing a satisfied.
-
-
-
Constructor Detail
-
ConditionDecision
@Deprecated public ConditionDecision(boolean satisfied, Map<String,Set<String>> advices)
Deprecated.Constructs an instance ofConditionDecision
.
Deprecated, favour the factory methods.- Parameters:
satisfied
- result of thisConditionDecision
.advices
- Advice map of thisConditionDecision
.
-
ConditionDecision
@Deprecated public ConditionDecision(boolean satisfied, Map<String,Set<String>> advices, long ttl)
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 Detail
-
isSatisfied
public boolean isSatisfied()
Whether thisConditionDecision
is satisfied.- Returns:
true
ifConditionDecision
is fulfilled.
-
getAdvice
public Map<String,Set<String>> getAdvice()
Advices associated with thisConditionDecision
.- Returns:
- advice of
ConditionDecision
.
-
getResponseAttributes
public Map<String,Set<String>> 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 public void clearAdvices()
Deprecated.Clears the current advice associated with thisConditionDecision
.
Deprecated method as a given instance should be immutable.
-
addAdvices
@Deprecated public void addAdvices(ConditionDecision decision)
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
public static ConditionDecision.Builder newBuilder(boolean satisfied)
New decision builder.- Parameters:
satisfied
- whether the decision represents a successful evaluation or not- Returns:
- new builder instance
-
newSuccessBuilder
public static ConditionDecision.Builder newSuccessBuilder()
New builder representing a satisfied.- Returns:
- new builder instance
-
newFailureBuilder
public static ConditionDecision.Builder newFailureBuilder()
New builder representing a failure.- Returns:
- new builder instance
-
-