issrg.test.ptb
Class PTBClock

java.lang.Object
  extended by issrg.pba.rbac.Time
      extended by issrg.pba.rbac.Clock
          extended by issrg.test.ptb.PTBClock
All Implemented Interfaces:
java.lang.Comparable

public class PTBClock
extends Clock

This class is the adapted implementation of the Clock interface for the Permis Test Bench. It has a method to specify a particular date to be returned. In this way, we are able to change the date used to perform the decisions.


Field Summary
 
Fields inherited from class issrg.pba.rbac.Time
log, s_defaultTimeZone, TIME_TYPE
 
Constructor Summary
PTBClock()
           
 
Method Summary
 java.util.Date getTime()
          This method returns the time returned by the last call to latch, so all calculations will be consistent.
 java.util.Date latch()
          This method gets the actual time and keeps it for later reference.
 boolean setTime(java.lang.String s)
           
 
Methods inherited from class issrg.pba.rbac.Clock
getEvaluationTime
 
Methods inherited from class issrg.pba.rbac.Time
calendarToTime, calendarToTime, compareTo, equals, getDefaultTimeZone, parse, register, setDefaultTimeZone, setDefaultTimeZone, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PTBClock

public PTBClock()
Method Detail

getTime

public java.util.Date getTime()
Description copied from class: Clock
This method returns the time returned by the last call to latch, so all calculations will be consistent.

Specified by:
getTime in class Clock
Returns:
the time returned by the last call to latch

latch

public java.util.Date latch()
Description copied from class: Clock
This method gets the actual time and keeps it for later reference. Subsequent calls to getTime will return the same value (needed in operations extended in time).

Specified by:
latch in class Clock
Returns:
the current time

setTime

public boolean setTime(java.lang.String s)