org.openpermis.policy
Interface Predicate

All Superinterfaces:
Part, Serializable
All Known Implementing Classes:
AbstractPredicate, And, Not, Or, Present, SubstringOf, ValueRelationalPredicate, ValueSetRelationalPredicate

public interface Predicate
extends Part

Interface for all nodes and leaves of the predicate tree.

Since:
0.1.0

Field Summary
static Predicate FALSE
          A predicate that evaluates always to false.
static Predicate TRUE
          A predicate that evaluates always to true.
 
Method Summary
 boolean isMatchable(Map<String,Class<?>> arguments)
          Try to match the predicate with arguments, without evaluating the predicates but to check that no runtime exception is thrown at runtime.
 boolean isValid()
          Validates this predicate.
 boolean matches(TimeStamp timeStamp, Map<String,?> arguments)
          Try to match the predicate according to time and arguments.
 
Methods inherited from interface org.openpermis.policy.Part
equals, hashCode, isValid, toString
 

Field Detail

TRUE

static final Predicate TRUE
A predicate that evaluates always to true.

Since:
0.1.0

FALSE

static final Predicate FALSE
A predicate that evaluates always to false.

Since:
0.1.0
Method Detail

matches

boolean matches(TimeStamp timeStamp,
                Map<String,?> arguments)
Try to match the predicate according to time and arguments.

Parameters:
timeStamp - the current TimeStamp.
arguments - a Map of arguments.
Returns:
the result of this predicate.
Throws:
IllegalStateException - if the predicate is not valid.
Since:
0.1.0

isMatchable

boolean isMatchable(Map<String,Class<?>> arguments)
Try to match the predicate with arguments, without evaluating the predicates but to check that no runtime exception is thrown at runtime.

Parameters:
arguments - a Map of arguments.
Returns:
true if this predicate is matchable and won't throw an exception at runtime.
Since:
0.3.0

isValid

boolean isValid()
Validates this predicate.

Returns:
true if this predicate is valid.
Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:49
Copyright (c) 2002-2007 Ergon Informatik AG