Trigger.java

codebase/src/net/sourceforge/pain/logic/Trigger.java · 867 B

From the archive pain_0_44.tgz

Download the archive   « Back to the archive contents

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();
}

Site Stats

Snippets: 1791
Codebases: 571