org.openpermis.policy.bean.basic.predicate
Class Present

java.lang.Object
  extended by org.openpermis.policy.bean.basic.BasicPart
      extended by org.openpermis.policy.bean.basic.BasicPartBean
          extended by org.openpermis.policy.bean.basic.predicate.AbstractPredicate<Value<?>>
              extended by org.openpermis.policy.bean.basic.predicate.Present
All Implemented Interfaces:
Serializable, PartBean, PredicateBean, Part, Predicate

public class Present
extends AbstractPredicate<Value<?>>

Present operation.

See Also:
Serialized Form
Since:
0.1.0

Constructor Summary
Present(SerialNumber serial, Value<?> value)
          Creates a present operation.
 
Method Summary
protected  int basicHashCode()
          Returns the hash code of this basic.
protected  boolean checkLocalConsistency(PartProblemReporter reporter)
          Checks if the extended state of this part is consistent.
protected  boolean comparablePart(BasicPart part)
          Check if the part specified is comparable to this part.
 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 class org.openpermis.policy.bean.basic.predicate.AbstractPredicate
accept, equalPart, getOperand, getOperandCount, getOperands, partHashCode
 
Methods inherited from class org.openpermis.policy.bean.basic.BasicPartBean
accept, addPropertyChangeListener, equalSerialNumber, findBySerialNumber, firePropertyChange, getPartBeanType, getSerialNumber, getSerialNumberString, instanceOf, notifyIdentityChange, notifyNameChange, removePropertyChangeListener, toShortString
 
Methods inherited from class org.openpermis.policy.bean.basic.BasicPart
appendDetails, appendPartDetails, areIdentitiesUnique, areNamesUnique, checkLocalPartConsistency, equals, getIdentity, getName, getSimpleClassName, hashCode, hasPartIdentity, hasPartName, isIdentityValid, isNameValid, reportProblem, setIdentity, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openpermis.policy.bean.PartBean
accept, addPropertyChangeListener, checkLocalPartConsistency, equalSerialNumber, findBySerialNumber, getPartBeanType, getSerialNumber, instanceOf, removePropertyChangeListener, toShortString
 
Methods inherited from interface org.openpermis.policy.Part
equals, hashCode, toString
 

Constructor Detail

Present

public Present(SerialNumber serial,
               Value<?> value)
Creates a present operation.

Parameters:
serial - the serial number of this part.
value - operand.
Since:
0.1.0
Method Detail

checkLocalConsistency

protected boolean checkLocalConsistency(PartProblemReporter reporter)
Description copied from class: BasicPart
Checks if the extended state of this part is consistent.

Overrides:
checkLocalConsistency in class BasicPart
Parameters:
reporter - the problem reporter to use, may be null.
Since:
0.9.0

matches

public boolean matches(TimeStamp timeStamp,
                       Map<String,?> arguments)
Description copied from interface: Predicate
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.
Since:
0.1.0

isMatchable

public boolean isMatchable(Map<String,Class<?>> arguments)
Description copied from interface: Predicate
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

comparablePart

protected boolean comparablePart(BasicPart part)
Description copied from class: BasicPart
Check if the part specified is comparable to this part.

Specified by:
comparablePart in class BasicPart
Parameters:
part - the part to check.
See Also:
BasicPart
Returns:
true if the part supplied is comparable to this part.
Since:
0.1.0

basicHashCode

protected int basicHashCode()
Description copied from class: AbstractPredicate
Returns the hash code of this basic.

Specified by:
basicHashCode in class AbstractPredicate<Value<?>>
Returns:
hash code of this basic.
Since:
0.1.0


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