public interface MDIApplication
| Modifier and Type | Method and Description |
|---|---|
void |
disposeApplication()
Dispose of the Application, calling all necessary code before effectively calling
System.exit(0). |
void |
endAction(MDIAction action)
Ends a generic action.
|
default void |
executeAction(MDIAction action)
Execute a generic Action.
|
default void |
executeAction(MDIAction action,
java.lang.ClassLoader loader)
Execute a generic Action, using a specific Classloader.
|
void |
executeAction(MDIAction action,
short blockingType)
Execute a generic Action.
|
void |
executeAction(MDIAction action,
short blockingType,
java.lang.ClassLoader loader)
Execute a generic Action, using a specific Classloader.
|
java.util.Map<java.lang.String,AppliManifestType> |
getAdditionalPluginTypes()
Return the optional additional Plugin Types.
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getAllowedPluginTypes()
Return the allowed Plugin Types.
|
default ApplicationDesc |
getApplicationDesc()
Return the Application description.
|
default java.lang.String |
getApplicationID()
Return the ApplicationID.
|
default java.util.Map<java.lang.String,java.lang.String> |
getCommandLineArguments()
Return the launch arguments of the application.
|
ConfigurationManager |
getConfigurationManager()
Return the Configuration Manager.
|
ErrorLogger |
getErrorLogger()
Return the error logger.
|
default Plugin |
getPlugin(java.lang.String clazz)
Return the Plugin, given its associated class path.
|
Plugin |
getPlugin(java.lang.String clazz,
boolean acceptAll)
Return the Plugin, given its associated class path.If
acceptAll is false and the plugin is not enabled, it will return null. |
default Plugin |
getPluginForName(java.lang.String name)
Return a Plugin, given its associated name.
|
Plugin |
getPluginForName(java.lang.String name,
boolean acceptAll)
Return a Plugin, given its associated name.
|
java.util.List<Plugin> |
getPlugins()
Return the Plugins List.
|
default short |
getPluginsDeactivationPolicy()
Return the plugins deactivation policy.
|
default PluginsEDTSupport |
getPluginsEDTSupport(PluginsManager manager)
Return the support class for the GUI initialization of Plugins.
|
PluginsManager |
getPluginsManager()
Return the PluginsManager.
|
java.util.Map<java.lang.String,Plugin> |
getPluginsMap()
Return Plugins Map.
|
default java.io.File |
getStartDirectory()
Return the starting directory of the application.
|
long |
getTime()
Return the time after the last operation.
|
default boolean |
hasEnabledPlugin(java.lang.String name)
Return true if the application has an enabled Plugin of a specified name.
|
boolean |
hasPlugin(java.lang.String name)
Return true if the application has a Plugin of a specified name.
|
default void |
initConfiguration(java.util.prefs.Preferences prefRoot)
Creates the Configuration, and initialize it with a root Preference.
|
default void |
initConfiguration(java.util.prefs.Preferences prefRoot,
short mdiPluginsInitMode)
Creates the Configuration, and initialize it with a root Preference.
|
default boolean |
isDefaultBlockingActions()
Return true if actions are blocking by default.
|
boolean |
isEnabled(Plugin plugin)
Return true if a plugin is enabled.
|
boolean |
isEnabled(java.lang.String pluginName)
Return true if a plugin is enabled.
|
void |
noTimeMessages()
Avoid to write time in messages for the current MDIAction.
|
void |
noWriteMessages()
Avoid to write messages for the current MDIAction.
|
default void |
serializeConfiguration()
Serialize the configuration.
|
default void |
setDefaultBlockingActions(boolean isBlocking)
Set if actions are blocking by default.
|
default boolean |
setPluginsDeactivationPolicy(short policy)
Set the plugins deactivation policy.Defer to
PluginsManager.setPluginsDeactivationPolicy(short) by default. |
void |
showActionException(java.lang.String message,
java.lang.Exception e)
Show the last Exception associated with an Action.
|
void |
startTime(MDIAction action)
Start to count the time for the last operation, and show the statusBar progress.
|
long |
stopTime(MDIAction action)
Stop the time counting.
|
java.util.Map<java.lang.String,java.lang.Boolean> getAllowedPluginTypes()
PluginsManager.KEY_PLUGIN_TYPE attribute in their
manifest will have to match one of the Application allowed plugin type names.java.util.Map<java.lang.String,AppliManifestType> getAdditionalPluginTypes()
PluginsManager.setAdditionalPluginTypes(java.util.Map)ConfigurationManager getConfigurationManager()
ErrorLogger getErrorLogger()
PluginsManager getPluginsManager()
boolean isEnabled(java.lang.String pluginName)
pluginName - the plugin nameboolean isEnabled(Plugin plugin)
plugin - the plugindefault java.io.File getStartDirectory()
default void executeAction(MDIAction action)
action - the Actiondefault void setDefaultBlockingActions(boolean isBlocking)
isBlocking - true if actions are blocking by defaultdefault boolean isDefaultBlockingActions()
default PluginsEDTSupport getPluginsEDTSupport(PluginsManager manager)
DefaultPluginsEDTSupport by default.manager - the PluginsManagervoid executeAction(MDIAction action, short blockingType)
BlockingType.DEFAULT: use the default blocking type of the applicationBlockingType.BLOCKING: if the action should be blockingBlockingType.NOT_BLOCKING: if the action should not be blockingaction - the ActionblockingType - the enumeration specifying if the action should be blockingdefault void executeAction(MDIAction action, java.lang.ClassLoader loader)
action - the Actionloader - the ClassLoadervoid executeAction(MDIAction action, short blockingType, java.lang.ClassLoader loader)
BlockingType.DEFAULT: use the default blocking type of the applicationBlockingType.BLOCKING: if the action should be blockingBlockingType.NOT_BLOCKING: if the action should not be blockingaction - the ActionblockingType - the enumeration specifying if the action should be blockingloader - the ClassLoadervoid showActionException(java.lang.String message,
java.lang.Exception e)
message - the messagee - the Exceptionjava.util.List<Plugin> getPlugins()
java.util.Map<java.lang.String,Plugin> getPluginsMap()
default Plugin getPluginForName(java.lang.String name)
null.name - the Plugin namePlugin getPluginForName(java.lang.String name, boolean acceptAll)
acceptAll is false and the plugin is not enabled, it will return null.name - the Plugin nameacceptAll - true if disabled plugins are acceptedboolean hasPlugin(java.lang.String name)
name - the Plugin namedefault boolean hasEnabledPlugin(java.lang.String name)
name - the Plugin namedefault Plugin getPlugin(java.lang.String clazz)
null.clazz - the plugin class pathPlugin getPlugin(java.lang.String clazz, boolean acceptAll)
acceptAll is false and the plugin is not enabled, it will return null.clazz - the plugin class pathacceptAll - true if disabled plugins are accepteddefault boolean setPluginsDeactivationPolicy(short policy)
PluginsManager.setPluginsDeactivationPolicy(short) by default.policy - the policydefault short getPluginsDeactivationPolicy()
PluginsManager.getPluginsDeactivationPolicy() by default.default void initConfiguration(java.util.prefs.Preferences prefRoot)
initConfiguration(java.util.prefs.Preferences, short) by default., with the MDIPluginsInitMode.INIT_DEFAULT argument.prefRoot - the root Preference, or null if there is no Preference for this MDIApplicationPluginsManagerdefault void initConfiguration(java.util.prefs.Preferences prefRoot,
short mdiPluginsInitMode)
prefRoot - the root Preference, or null if there is no Preference for this MDIApplicationmdiPluginsInitMode - the plugins initialization modePluginsManagerdefault void serializeConfiguration()
void startTime(MDIAction action)
action - the Actionlong getTime()
long stopTime(MDIAction action)
action - the Actionvoid endAction(MDIAction action)
action - the actionvoid noWriteMessages()
void noTimeMessages()
default ApplicationDesc getApplicationDesc()
default java.lang.String getApplicationID()
void disposeApplication()
System.exit(0).default java.util.Map<java.lang.String,java.lang.String> getCommandLineArguments()