work in progress: solving of the bug number 3043572 - Main application changed
[indepmod.git] / IndependentModeler / src / cz / cvut / promod / plugin / Plugin.java
blob7b990782767d7e8e4118160116ce2a78ffc51019
1 package cz.cvut.promod.plugin;
3 import cz.cvut.promod.gui.settings.SettingPageData;
5 import java.util.List;
7 /**
8 * ProMod, master thesis project
9 * User: Petr Zverina, petr.zverina@gmail.com
10 * Date: 20:57:14, 12.10.2009
13 /**
14 * Plugin is the base class for all plugins.
16 * @see cz.cvut.promod.plugin.notationSpecificPlugIn.notation.Notation
17 * @see cz.cvut.promod.plugin.notationSpecificPlugIn.module.Module
19 public interface Plugin {
22 /**
23 * Returns it's identifier. All notations have to have unique identifier during one ProMod run and all
24 * modules related to the same Notation have to have unique identifier. It means that for example Module M1 which is
25 * related to a Notation N1 and a Module M2 which is related to a Notation N2 can have the same identifier.
27 * @return it's identifier
29 public String getIdentifier();
31 /**
32 * Returns descriptive name of the plugin.
34 * @return descriptive name of the plugin
36 public String getName();
38 /**
39 * Returns detail plugin description.
41 * @return detail plugin description
43 public String getDescription();
45 /**
46 * When the init() method of any plugin is invoked, it means that this plugin has
47 * been accepted by the ProMod application.
49 * All plugins are supposed to use 'dependent' services only in this method or later (init() method of all plugins
50 * are invoked by the ProMod only once). No 'dependent' services are available before. SO NO PLUGIN SHOULD
51 * USE 'DEPENDENT' SERVICES IN IT'S CONSTRUCTING TIME.
53 * @see cz.cvut.promod.IndependentModelerMain and it's JavaDocs for more info about 'dependent' & 'independent' types of services.
56 public void init();
59 /**
60 * Is invoked when the ProMod is shutting down (not on application fall). This method is invoked by the
61 * modelerExit() method
62 * @see cz.cvut.promod.gui.Modeler
64 public void finish();
66 /**
67 * Returns a list of pages that are supposed to be inserted into the Settings Dialog of ProMod. Because the Option
68 * Dialog works in a tree style all pages are supposed to have a parent.
70 * The parent of the first item in the list will be set automatically. Parents of all other items are supposed to
71 * be defined by the developer. If not, Modeler will set the same parent as the first page to all pages that do
72 * not have a parent. If the tree structure is defined by the developer, it's his/her responsibility to defined
73 * the correct tree structure whether the root has event no parent of the parent is the first page of the list.
75 * Important note: If a page has a parent, then the parent is not supposed to hold any actual view. This parent
76 * page serves only as a container a when this parent is selected in the Settings dialog navigation, the view of
77 * it's first child is shown.
80 * @return list of all pages that are supposed to be inserted into the Modeler's Settings dialog
82 public SettingPageData getSettingPages();