public class ExtensionLoader extends Object
Constructor and Description |
---|
ExtensionLoader(Model model,
View view) |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(Extension extension) |
void |
addonFilesAdded() |
void |
addonFilesRemoved() |
void |
addOnInstalled(AddOn addOn)
Notifies
Extension s' AddOnInstallationStatusListener s that the given add-on
was installed. |
void |
addOnSoftUninstalled(AddOn addOn,
boolean successfully)
Notifies
Extension s' AddOnInstallationStatusListener s that the given add-on
was soft uninstalled. |
void |
addOnUninstalled(AddOn addOn,
boolean successfully)
Notifies
Extension s' AddOnInstallationStatusListener s that the given add-on
was uninstalled. |
void |
addProxyServer(ProxyServer proxyServer)
Adds the given proxy server, to be automatically updated with proxy related listeners.
|
void |
databaseOpen(Database db) |
void |
destroyAllExtension() |
List<String> |
getActiveActions()
Gets the names of all active actions of all the extensions.
|
<T extends Extension> |
getExtension(Class<T> clazz)
Gets the
Extension with the given class. |
Extension |
getExtension(int i) |
Extension |
getExtension(String name)
Gets the
Extension with the given name. |
Extension |
getExtensionByClassName(String name) |
int |
getExtensionCount() |
List<String> |
getUnsavedResources()
Gets the names of all unsaved resources of all the extensions.
|
void |
hookCommandLineListener(CommandLine cmdLine)
Hook command line listener with the command line processor
|
void |
hookConnectRequestProxyListeners(Proxy proxy)
Hooks (adds) the
ConnectRequestProxyListener s of the loaded extensions to the given
proxy . |
void |
hookOverrideMessageProxyListener(Proxy proxy) |
void |
hookPersistentConnectionListener(Proxy proxy) |
void |
hookProxyListener(Proxy proxy) |
void |
hookScannerHook(Scanner scan) |
void |
hookSiteMapListener(SiteMapPanel siteMapPanel) |
boolean |
isExtensionEnabled(String extensionName)
Tells whether or not an
Extension with the given extensionName is enabled. |
void |
optionsChangedAllPlugin(OptionsParam options) |
void |
removeEditMenuItem(JMenuItem menuItem) |
void |
removeExtension(Extension extension)
Removes the given extension and any components added through its extension hook.
|
void |
removeFileMenuItem(JMenuItem menuItem) |
void |
removeHelpMenuItem(JMenuItem menuItem) |
void |
removeOptionsPanel(AbstractParamPanel panel) |
void |
removeOptionsParamSet(AbstractParam params) |
void |
removePopupMenuItem(ExtensionPopupMenuItem popupMenuItem) |
void |
removeProxyServer(ProxyServer proxyServer)
Removes the given proxy server.
|
void |
removeReportMenuItem(JMenuItem menuItem) |
void |
removeStatusPanel(AbstractPanel panel) |
void |
removeToolsMenuItem(JMenuItem menuItem) |
void |
removeViewMenuItem(JMenuItem menuItem) |
void |
removeWorkPanel(AbstractPanel panel) |
void |
runCommandLine() |
void |
sessionAboutToChangeAllPlugin(Session session) |
void |
sessionChangedAllPlugin(Session session) |
void |
sessionModeChangedAllPlugin(Control.Mode mode) |
void |
sessionPropertiesChangedAllPlugin(Session session)
Notifies that the properties (e.g.
|
void |
sessionScopeChangedAllPlugin(Session session) |
void |
startAllExtension(double progressFactor) |
void |
startLifeCycle()
Initialize and start all Extensions This function loops for all getExtensionCount() exts
launching each specific initialization element (model, xml, view, hook, etc.)
|
void |
startLifeCycle(Extension ext)
Initialize a specific Extension
|
void |
stopAllExtension() |
public void addExtension(Extension extension)
public void destroyAllExtension()
public Extension getExtension(int i)
public Extension getExtension(String name)
Extension
with the given name.name
- the name of the Extension
.Extension
or null
if not found/enabled.getExtension(Class)
public <T extends Extension> T getExtension(Class<T> clazz)
Extension
with the given class.clazz
- the class of the Extension
Extension
or null
if not found/enabled.public boolean isExtensionEnabled(String extensionName)
Extension
with the given extensionName
is enabled.extensionName
- the name of the extensiontrue
if the extension is enabled, false
otherwise.IllegalArgumentException
- if the extensionName
is null
.getExtension(String)
,
Extension
public int getExtensionCount()
public void addProxyServer(ProxyServer proxyServer)
proxyServer
- the proxy server to add, must not be null.removeProxyServer(ProxyServer)
public void removeProxyServer(ProxyServer proxyServer)
proxyServer
- the proxy server to remove, must not be null.addProxyServer(ProxyServer)
public void hookProxyListener(Proxy proxy)
public void hookOverrideMessageProxyListener(Proxy proxy)
public void hookConnectRequestProxyListeners(Proxy proxy)
ConnectRequestProxyListener
s of the loaded extensions to the given
proxy
.
Note: even if public this method is expected to be called only by core
classes (for example, Control
).
proxy
- the local proxypublic void hookPersistentConnectionListener(Proxy proxy)
public void hookSiteMapListener(SiteMapPanel siteMapPanel)
public void hookScannerHook(Scanner scan)
public void optionsChangedAllPlugin(OptionsParam options)
public void runCommandLine()
public void sessionChangedAllPlugin(Session session)
public void databaseOpen(Database db)
public void sessionAboutToChangeAllPlugin(Session session)
public void sessionScopeChangedAllPlugin(Session session)
public void sessionModeChangedAllPlugin(Control.Mode mode)
public void sessionPropertiesChangedAllPlugin(Session session)
Should be called only by "core" classes.
session
- the session changed.public void addonFilesAdded()
public void addonFilesRemoved()
public void addOnInstalled(AddOn addOn)
Extension
s' AddOnInstallationStatusListener
s that the given add-on
was installed.addOn
- the add-on that was installed, must not be null
public void addOnSoftUninstalled(AddOn addOn, boolean successfully)
Extension
s' AddOnInstallationStatusListener
s that the given add-on
was soft uninstalled.addOn
- the add-on that was soft uninstalled, must not be null
successfully
- if the soft uninstallation was successful, that is, no errors occurred
while uninstalling itpublic void addOnUninstalled(AddOn addOn, boolean successfully)
Extension
s' AddOnInstallationStatusListener
s that the given add-on
was uninstalled.addOn
- the add-on that was uninstalled, must not be null
successfully
- if the uninstallation was successful, that is, no errors occurred while
uninstalling itpublic void startAllExtension(double progressFactor)
public void startLifeCycle()
public void startLifeCycle(Extension ext) throws DatabaseException, DatabaseUnsupportedException
ext
- the Extension that need to be initializedDatabaseUnsupportedException
DatabaseException
public void stopAllExtension()
public void hookCommandLineListener(CommandLine cmdLine) throws Exception
cmdLine
- Exception
public void removeStatusPanel(AbstractPanel panel)
public void removeOptionsPanel(AbstractParamPanel panel)
public void removeOptionsParamSet(AbstractParam params)
public void removeWorkPanel(AbstractPanel panel)
public void removePopupMenuItem(ExtensionPopupMenuItem popupMenuItem)
public void removeFileMenuItem(JMenuItem menuItem)
public void removeEditMenuItem(JMenuItem menuItem)
public void removeViewMenuItem(JMenuItem menuItem)
public void removeToolsMenuItem(JMenuItem menuItem)
public void removeHelpMenuItem(JMenuItem menuItem)
public void removeReportMenuItem(JMenuItem menuItem)
public void removeExtension(Extension extension)
Note: This method should be called only by bootstrap classes.
extension
- the extension to remove.public List<String> getUnsavedResources()
List
containing all the unsaved resources of all add-ons, never null
Extension.getActiveActions()
public List<String> getActiveActions()
List
containing all the active actions of all add-ons, never null
Extension.getActiveActions()