001package org.intellimate.izou.addon;
002
003import org.intellimate.izou.identification.Identifiable;
004import org.intellimate.izou.system.Context;
005import ro.fortsoft.pf4j.ExtensionPoint;
006import ro.fortsoft.pf4j.PluginWrapper;
007
008/**
009 * All AddOns must implement this Class.
010 *
011 * It will be instantiated and its registering-methods will be called by the PluginManager.
012 * This class has method for a properties-file named addOnID.properties (AddOnsID in the form: package.class)
013 * @author Leander Kurscheidt
014 * @version 1.0
015 */
016public interface AddOnModel extends ExtensionPoint, Identifiable {
017    /**
018     * Internal initiation of addOn - fake constructor, comes before prepare
019     * @param context the context to initialize with
020     */
021    void initAddOn(Context context);
022
023    /**
024     * use this method to register your Modules.
025     * <p>
026     * It will time out after 3 seconds!
027     * </p> 
028     */
029    void register();
030
031    /**
032     * gets the associated Plugin.
033     * @return the Plugin.
034     */
035    PluginWrapper getPlugin();
036
037    /**
038     * sets the Plugin IF it is not already set.
039     * @param plugin the plugin
040     */
041    void setPlugin(PluginWrapper plugin);
042}