final class BooleanCondition extends java.lang.Object implements Condition
Condition.FALSE
and
Condition.TRUE
constants.Modifier and Type | Field and Description |
---|---|
private boolean |
satisfied |
Constructor and Description |
---|
BooleanCondition(boolean satisfied) |
Modifier and Type | Method and Description |
---|---|
boolean |
isMutable()
Returns whether the Condition is mutable.
|
boolean |
isPostponed()
Returns whether the evaluation must be postponed until the end of the
permission check.
|
boolean |
isSatisfied()
Returns whether the Condition is satisfied.
|
boolean |
isSatisfied(Condition[] conds,
java.util.Dictionary<java.lang.Object,java.lang.Object> context)
Returns whether the specified set of Condition objects are satisfied.
|
public boolean isPostponed()
Condition
false
(or this Condition
is immutable), then this Condition must be able to directly answer the
Condition.isSatisfied()
method. In other words, isSatisfied() will return
very quickly since no external sources, such as for example users or
networks, need to be consulted.
This method must always return the same value whenever it is called so that the Conditional Permission Admin can cache its result.
isPostponed
in interface Condition
true
to indicate the evaluation must be postponed.
Otherwise, false
if the evaluation can be performed
immediately.public boolean isSatisfied()
Condition
Condition.isSatisfied(Condition[],Dictionary)
at the end of the permission
check.isSatisfied
in interface Condition
true
to indicate the Conditions is satisfied. Otherwise,
false
if the Condition is not satisfied.public boolean isMutable()
Condition
true
) to immutable (false
) over time but never from
immutable (false
) to mutable (true
).isMutable
in interface Condition
true
Condition.isSatisfied()
can change. Otherwise,
false
if the value returned by Condition.isSatisfied()
will not change for this condition.public boolean isSatisfied(Condition[] conds, java.util.Dictionary<java.lang.Object,java.lang.Object> context)
Condition
isSatisfied
in interface Condition
conds
- The array of Condition objects, which must all be of
the same class and mutable. The receiver must be one of those
Condition objects.context
- A Dictionary object that implementors can use to track
state. If this method is invoked multiple times in the same
permission check, the same Dictionary will be passed multiple
times. The SecurityManager treats this Dictionary as an opaque
object and simply creates an empty dictionary and passes it to
subsequent invocations if multiple invocations are needed.true
if all the Condition objects are satisfied.
Otherwise, false
if one of the Condition objects is not
satisfied.