package net.sourceforge.pain.logic; import net.sourceforge.pain.data.*; /** * Base class for all triggers logic impls (controller over persistent TriggerData). * This class is linked statically, * all it's subclasses should be located in ...logic.triggers(.impl) package * and will be linked dynamically (could be reloaded) */ public abstract class Trigger { protected TriggerData td; /** constructor used to create trigger with existing model: persistent TriggerData object */ public Trigger(TriggerData td) { this.td = td; } /** * factory method, used to avoid reflection and security checks for * new trigger instance creations * should return new instance of trigger initialized with TriggerData */ public abstract Trigger newInstance(TriggerData td); public abstract int getTriggerEventType(); }