org.eigenbase.util.property
Class TriggerBase

java.lang.Object
  extended by org.eigenbase.util.property.TriggerBase
All Implemented Interfaces:
Trigger

public class TriggerBase
extends Object
implements Trigger

Basic implementation of a trigger, which doesn't do anything.

Since:
5 July 2005
Version:
$Id: //open/dev/farrago/src/org/eigenbase/util/property/TriggerBase.java#7 $
Author:
Julian Hyde

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eigenbase.util.property.Trigger
Trigger.VetoRT
 
Field Summary
private  boolean persistent
           
 
Fields inherited from interface org.eigenbase.util.property.Trigger
PRIMARY_PHASE, SECONDARY_PHASE, TERTIARY_PHASE
 
Constructor Summary
TriggerBase(boolean persistent)
           
 
Method Summary
 void execute(Property property, String value)
          Executes the trigger, passing in the key of the property whose change triggered the execution.
 boolean isPersistent()
          If a Trigger is associated with a class or singleton, then it should return true because its associated object is not subject to garbage collection.
 int phase()
          Which phase does this Trigger belong to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

persistent

private final boolean persistent
Constructor Detail

TriggerBase

public TriggerBase(boolean persistent)
Method Detail

isPersistent

public boolean isPersistent()
Description copied from interface: Trigger
If a Trigger is associated with a class or singleton, then it should return true because its associated object is not subject to garbage collection. On the other hand, if a Trigger is associated with an object which will be garbage collected, then this method must return false so that the Trigger will be wrapped in a WeakReference and thus can itself be garbage collected.

Specified by:
isPersistent in interface Trigger
Returns:
whether trigger is persistent

phase

public int phase()
Description copied from interface: Trigger
Which phase does this Trigger belong to.

Specified by:
phase in interface Trigger
Returns:
phase trigger belongs to

execute

public void execute(Property property,
                    String value)
             throws Trigger.VetoRT
Description copied from interface: Trigger
Executes the trigger, passing in the key of the property whose change triggered the execution.

Specified by:
execute in interface Trigger
Parameters:
property - Property being changed
value - New value of property
Throws:
Trigger.VetoRT