Package org.gvsig.andami.impl
Class DefaultPluginsManager
java.lang.Object
org.gvsig.andami.impl.DefaultPluginsManager
- All Implemented Interfaces:
PluginsManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddShutdownTask(String name, Runnable task, boolean in_event_thread, int priority) This method allows plugins register task to do after close the application.voidaddStartupTask(String name, Runnable task, boolean in_event_thread, int priority) This method allows plugins register task to do before initializacion of all gvSIG plugins.booleandesktopBrowse(URI uri) Browses to a given URIbooleandesktopOpen(File file) Open a given filevoidThis method executes registered task to run after the close of the application.voidThis method executes registered task to run before the initialization of all plugins.Returns the main application folder, where the application is installed.Returns the application folder in the home of user.Returns the default folder where the internationalization files are installed.org.gvsig.installer.lib.api.VersionReturn the ExclusiveUIExtension installed in the application or null.getExtension(Class<? extends IExtension> extension) Gets the instance of the extension whose class is provided.getExtension(String extension) Gets the instance of the extension whose class name is provided.Return an iterator over al extensions loaded in the application.Returns the default folder with the installable package bundles.org.gvsig.installer.lib.api.PackageInfoGet the package info associated to the application.org.gvsig.installer.lib.api.PackageInfogetPackageInfo(Class<? extends IExtension> extension) Get the package info associated to the plugin of the extension.org.gvsig.installer.lib.api.PackageInfogetPackageInfo(String pluginName) Get the package info associated to the plugin with the specified name.getPlugin(Class<? extends IExtension> extension) Return the associated pluginServices to the extension class passed as parameter.Return the associated pluginServices to the object passed as parameter.Return the associated pluginServices to the extension plugin.getPluginHomeFolder(String pluginName) Return the list of plugins loaded in the applicationReturns the plugins folder.Returns a list of folder on the plugins are instaleds.getTempFile(String name) Get the file name in the temporary folder of the plugins framework.getTempFile(String name, String sufix) Create a unique file name in the temporary folder of the plugins framework.Gets the temporary folder of the plugins framework.Return a list of unsaved datavoidsaveUnsavedData(List<IUnsavedData> unsavedData) Save the provided unsaved data as parametervoidsetExclusiveUIExtension(ExclusiveUIExtension extension) Set an extension to control the visivility of all the extensions of the application.Translate the message key to the current language used in the application.
-
Constructor Details
-
DefaultPluginsManager
public DefaultPluginsManager()
-
-
Method Details
-
getExclusiveUIExtension
Description copied from interface:PluginsManagerReturn the ExclusiveUIExtension installed in the application or null.- Specified by:
getExclusiveUIExtensionin interfacePluginsManager- Returns:
-
getExtension
Description copied from interface:PluginsManagerGets the instance of the extension whose class is provided.- Specified by:
getExtensionin interfacePluginsManager- Parameters:
extension- , class of the extension to retrieve- Returns:
- The instance of the extension, or null if the instance does not exist.
-
getExtension
Description copied from interface:PluginsManagerGets the instance of the extension whose class name is provided.- Specified by:
getExtensionin interfacePluginsManager- Parameters:
extension- , class name of the extension to retrieve- Returns:
- The instance of the extension, or null if the instance does not exist.
-
getExtensions
Description copied from interface:PluginsManagerReturn an iterator over al extensions loaded in the application.- Specified by:
getExtensionsin interfacePluginsManager- Returns:
- iterator over extensions
-
getPlugin
Return the associated pluginServices to the extension class passed as parameter.- Specified by:
getPluginin interfacePluginsManager- Parameters:
extension-- Returns:
- plugin services
-
getPlugin
Description copied from interface:PluginsManagerReturn the associated pluginServices to the object passed as parameter.- Specified by:
getPluginin interfacePluginsManager- Returns:
- plugin services
-
getPlugin
Description copied from interface:PluginsManagerReturn the associated pluginServices to the extension plugin.- Specified by:
getPluginin interfacePluginsManager- Parameters:
pluginName- , name of the plugin- Returns:
- plugin services
-
getPluginHomeFolder
- Specified by:
getPluginHomeFolderin interfacePluginsManager
-
getPackageInfo
public org.gvsig.installer.lib.api.PackageInfo getPackageInfo(Class<? extends IExtension> extension) Description copied from interface:PluginsManagerGet the package info associated to the plugin of the extension.- Specified by:
getPackageInfoin interfacePluginsManager- Parameters:
extension- extension of the plugin- Returns:
- plugin package info
-
getPackageInfo
Description copied from interface:PluginsManagerGet the package info associated to the plugin with the specified name.- Specified by:
getPackageInfoin interfacePluginsManager- Parameters:
pluginName- , name of the plugin- Returns:
- plugin package info
-
getPackageInfo
public org.gvsig.installer.lib.api.PackageInfo getPackageInfo()Description copied from interface:PluginsManagerGet the package info associated to the application.- Specified by:
getPackageInfoin interfacePluginsManager- Returns:
- application package info
-
getPlugins
Description copied from interface:PluginsManagerReturn the list of plugins loaded in the application- Specified by:
getPluginsin interfacePluginsManager- Returns:
- list of plugins
-
setExclusiveUIExtension
Description copied from interface:PluginsManagerSet an extension to control the visivility of all the extensions of the application.- Specified by:
setExclusiveUIExtensionin interfacePluginsManager- Parameters:
extension-
-
getText
- Specified by:
getTextin interfacePluginsManager
-
translate
Description copied from interface:PluginsManagerTranslate the message key to the current language used in the application.- Specified by:
translatein interfacePluginsManager- Parameters:
msg- key to translate- Returns:
- message traslated or the key
-
getApplicationFolder
Description copied from interface:PluginsManagerReturns the main application folder, where the application is installed.- Specified by:
getApplicationFolderin interfacePluginsManager- Returns:
- the main application folder
-
getPluginsDirectory
- Specified by:
getPluginsDirectoryin interfacePluginsManager
-
getPluginsFolder
Description copied from interface:PluginsManagerReturns the plugins folder.- Specified by:
getPluginsFolderin interfacePluginsManager- Returns:
- the plugins folder
-
getPluginsFolders
Description copied from interface:PluginsManagerReturns a list of folder on the plugins are instaleds.- Specified by:
getPluginsFoldersin interfacePluginsManager- Returns:
- list of folders File of the plugins.
-
getInstallFolder
Description copied from interface:PluginsManagerReturns the default folder with the installable package bundles.- Specified by:
getInstallFolderin interfacePluginsManager- Returns:
- the default folder with the installable package bundles
-
getApplicationHomeFolder
Description copied from interface:PluginsManagerReturns the application folder in the home of user.- Specified by:
getApplicationHomeFolderin interfacePluginsManager- Returns:
- the main application folder
-
addStartupTask
Description copied from interface:PluginsManagerThis method allows plugins register task to do before initializacion of all gvSIG plugins. Task with higher priority value are executed after.- Specified by:
addStartupTaskin interfacePluginsManager- Parameters:
name- of the tasktask- runnable with the code of the taskin_event_thread- , true if the task shoul run in the AWT event thread.priority- of the task.
-
addShutdownTask
Description copied from interface:PluginsManagerThis method allows plugins register task to do after close the application. Task with higher priority value are executed after.- Specified by:
addShutdownTaskin interfacePluginsManager- Parameters:
name- of the tasktask- runnable with the code of the taskin_event_thread- , true if the task shoul run in the AWT event thread.priority- of the task.
-
executeStartupTasks
public void executeStartupTasks()Description copied from interface:PluginsManagerThis method executes registered task to run before the initialization of all plugins. The tasks are sorted according to the priority and executed in a separated thread.- Specified by:
executeStartupTasksin interfacePluginsManager
-
executeShutdownTasks
public void executeShutdownTasks()Description copied from interface:PluginsManagerThis method executes registered task to run after the close of the application. The tasks are sorted according to the priority and executed in a separated thread.- Specified by:
executeShutdownTasksin interfacePluginsManager
-
getApplicationI18nFolder
Description copied from interface:PluginsManagerReturns the default folder where the internationalization files are installed.- Specified by:
getApplicationI18nFolderin interfacePluginsManager- Returns:
- the default folder where the internationalization files are installed.
-
getFirewallConfiguration
- Specified by:
getFirewallConfigurationin interfacePluginsManager
-
getApplicationVersion
public org.gvsig.installer.lib.api.Version getApplicationVersion()- Specified by:
getApplicationVersionin interfacePluginsManager
-
getUnsavedData
Description copied from interface:PluginsManagerReturn a list of unsaved data- Specified by:
getUnsavedDatain interfacePluginsManager- Returns:
-
saveUnsavedData
Description copied from interface:PluginsManagerSave the provided unsaved data as parameter- Specified by:
saveUnsavedDatain interfacePluginsManager- Parameters:
unsavedData-- Throws:
UnsavedDataException
-
getApplicationName
- Specified by:
getApplicationNamein interfacePluginsManager
-
getTempFolder
Description copied from interface:PluginsManagerGets the temporary folder of the plugins framework.- Specified by:
getTempFolderin interfacePluginsManager- Returns:
- the temp folder
-
getTempFile
Description copied from interface:PluginsManagerGet the file name in the temporary folder of the plugins framework.- Specified by:
getTempFilein interfacePluginsManager- Parameters:
name-- Returns:
-
getTempFile
Description copied from interface:PluginsManagerCreate a unique file name in the temporary folder of the plugins framework.- Specified by:
getTempFilein interfacePluginsManager- Parameters:
name- base name used for create the unique file namesufix- to add the the unique file name- Returns:
-
desktopBrowse
Description copied from interface:PluginsManagerBrowses to a given URI- Specified by:
desktopBrowsein interfacePluginsManager- Parameters:
uri-- Returns:
-
desktopOpen
Description copied from interface:PluginsManagerOpen a given file- Specified by:
desktopOpenin interfacePluginsManager- Parameters:
file-- Returns:
-
getArguments
- Specified by:
getArgumentsin interfacePluginsManager
-