org.openpermis.policy
Interface Predicate

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

public interface Predicate
extends Part

A boolean expression.

Since:
0.1.0

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 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, toString
 

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


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG