org.eu.sk.zero.acd
Class Trigger

java.lang.Object
  |
  +--org.eu.sk.zero.acd.PropertyType
        |
        +--org.eu.sk.zero.acd.Trigger

public abstract class Trigger
extends PropertyType

Triggers are functions that are executed automaticly when certain events occur. These evetns can be e.g. adding or removing a component, modifying values of a component. Each trigger is attached to a certain Component type, it has assigned a name by which its appropriate event is identified. The trigger's body is executed on a certain component.

Implemented trigger events:

Version:
$Id: Trigger.java,v 1.2 2003/03/12 20:53:06 robo Exp $
See Also:
ComponentType, Component

Field Summary
 
Fields inherited from class org.eu.sk.zero.acd.PropertyType
id
 
Constructor Summary
Trigger(String s)
          Do not directly construct Trigger.
 
Method Summary
abstract  boolean body(org.eu.sk.zero.acd.Component c)
          The body() method is executed on the gived component whenever the trigger itself is "executed".
 
Methods inherited from class org.eu.sk.zero.acd.PropertyType
dump, getId, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Trigger

public Trigger(String s)
Do not directly construct Trigger. To create a trigger for a certain event on a certain component type, subclass the Trigger, override it's body() method, assign a proper name indicating event required to fire this trigger. And finally add the created trigger to the required component type.

Method Detail

body

public abstract boolean body(org.eu.sk.zero.acd.Component c)
The body() method is executed on the gived component whenever the trigger itself is "executed". This method returns false when denying to perform the requested action. True means the action can be performed.