public class DefaultPluginsManager extends Object implements PluginsManager
| Constructor and Description |
|---|
DefaultPluginsManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownTask(String name,
Runnable task,
boolean in_event_thread,
int priority)
This method allows plugins register task to do after close the application.
|
void |
addStartupTask(String name,
Runnable task,
boolean in_event_thread,
int priority)
This method allows plugins register task to do before initializacion of
all gvSIG plugins.
|
boolean |
desktopBrowse(URI uri)
Browses to a given URI
|
boolean |
desktopOpen(File file)
Open a given file
|
void |
executeShutdownTasks()
This method executes registered task to run after the close of the application.
|
void |
executeStartupTasks()
This method executes registered task to run before the initialization of
all plugins.
|
File |
getApplicationFolder()
Returns the main application folder, where the application is installed.
|
File |
getApplicationHomeFolder()
Returns the application folder in the home of user.
|
File |
getApplicationI18nFolder()
Returns the default folder where the internationalization files are installed.
|
String |
getApplicationName() |
Version |
getApplicationVersion() |
Arguments |
getArguments() |
ExclusiveUIExtension |
getExclusiveUIExtension()
Return the ExclusiveUIExtension installed in the application or
null.
|
IExtension |
getExtension(Class<? extends IExtension> extension)
Gets the instance of the extension whose class is provided.
|
IExtension |
getExtension(String extension)
Gets the instance of the extension whose class name is provided.
|
Iterator<IExtension> |
getExtensions()
Return an iterator over al extensions loaded in the application.
|
FirewallConfiguration |
getFirewallConfiguration() |
File |
getInstallFolder()
Returns the default folder with the installable package bundles.
|
PackageInfo |
getPackageInfo()
Get the package info associated to the application.
|
PackageInfo |
getPackageInfo(Class<? extends IExtension> extension)
Get the package info associated to the plugin of the extension.
|
PackageInfo |
getPackageInfo(String pluginName)
Get the package info associated to the plugin with the specified name.
|
PluginServices |
getPlugin(Class<? extends IExtension> extension)
Return the associated pluginServices to the extension class passed as
parameter.
|
PluginServices |
getPlugin(Object obj)
Return the associated pluginServices to the object passed as parameter.
|
PluginServices |
getPlugin(String pluginName)
Return the associated pluginServices to the extension plugin.
|
List<PluginServices> |
getPlugins()
Return the list of plugins loaded in the application
|
File |
getPluginsDirectory()
Deprecated.
|
File |
getPluginsFolder()
Deprecated.
|
List<File> |
getPluginsFolders()
Returns a list of folder on the plugins are instaleds.
|
File |
getTempFile(String name)
Get the file name in the temporary folder of the plugins framework.
|
File |
getTempFile(String name,
String sufix)
Create a unique file name in the temporary folder of the plugins framework.
|
File |
getTempFolder()
Gets the temporary folder of the plugins framework.
|
String |
getText(Object obj,
String msg) |
List<IUnsavedData> |
getUnsavedData()
Return a list of unsaved data
|
void |
saveUnsavedData(List<IUnsavedData> unsavedData)
Save the provided unsaved data as parameter
|
void |
setExclusiveUIExtension(ExclusiveUIExtension extension)
Set an extension to control the visivility of all the extensions
of the application.
|
String |
translate(String msg)
Translate the message key to the current language used
in the application.
|
public ExclusiveUIExtension getExclusiveUIExtension()
PluginsManagergetExclusiveUIExtension in interface PluginsManagerpublic IExtension getExtension(Class<? extends IExtension> extension)
PluginsManagergetExtension in interface PluginsManagerpublic IExtension getExtension(String extension)
PluginsManagergetExtension in interface PluginsManagerpublic Iterator<IExtension> getExtensions()
PluginsManagergetExtensions in interface PluginsManagerpublic PluginServices getPlugin(Class<? extends IExtension> extension)
getPlugin in interface PluginsManagerpublic PluginServices getPlugin(Object obj)
PluginsManagergetPlugin in interface PluginsManagerpublic PluginServices getPlugin(String pluginName)
PluginsManagergetPlugin in interface PluginsManagerpublic PackageInfo getPackageInfo(Class<? extends IExtension> extension)
PluginsManagergetPackageInfo in interface PluginsManagerextension - extension of the pluginpublic PackageInfo getPackageInfo(String pluginName)
PluginsManagergetPackageInfo in interface PluginsManagerpublic PackageInfo getPackageInfo()
PluginsManagergetPackageInfo in interface PluginsManagerpublic List<PluginServices> getPlugins()
PluginsManagergetPlugins in interface PluginsManagerpublic void setExclusiveUIExtension(ExclusiveUIExtension extension)
PluginsManagersetExclusiveUIExtension in interface PluginsManagerpublic String getText(Object obj, String msg)
getText in interface PluginsManager#translate(String)}public String translate(String msg)
PluginsManagertranslate in interface PluginsManagermsg - key to translatepublic File getApplicationFolder()
PluginsManagergetApplicationFolder in interface PluginsManagerpublic File getPluginsDirectory()
getPluginsFolders()getPluginsDirectory in interface PluginsManagerpublic File getPluginsFolder()
getPluginsFolders()PluginsManagergetPluginsFolder in interface PluginsManagerpublic List<File> getPluginsFolders()
PluginsManagergetPluginsFolders in interface PluginsManagerpublic File getInstallFolder()
PluginsManagergetInstallFolder in interface PluginsManagerpublic File getApplicationHomeFolder()
PluginsManagergetApplicationHomeFolder in interface PluginsManagerpublic void addStartupTask(String name, Runnable task, boolean in_event_thread, int priority)
PluginsManageraddStartupTask in interface PluginsManagername - of the tasktask - runnable with the code of the taskpriority - of the task.public void addShutdownTask(String name, Runnable task, boolean in_event_thread, int priority)
PluginsManageraddShutdownTask in interface PluginsManagername - of the tasktask - runnable with the code of the taskpriority - of the task.public void executeStartupTasks()
PluginsManagerexecuteStartupTasks in interface PluginsManagerpublic void executeShutdownTasks()
PluginsManagerexecuteShutdownTasks in interface PluginsManagerpublic File getApplicationI18nFolder()
PluginsManagergetApplicationI18nFolder in interface PluginsManagerpublic FirewallConfiguration getFirewallConfiguration()
getFirewallConfiguration in interface PluginsManagerpublic Version getApplicationVersion()
getApplicationVersion in interface PluginsManagerpublic List<IUnsavedData> getUnsavedData()
PluginsManagergetUnsavedData in interface PluginsManagerpublic void saveUnsavedData(List<IUnsavedData> unsavedData) throws UnsavedDataException
PluginsManagersaveUnsavedData in interface PluginsManagerUnsavedDataExceptionpublic String getApplicationName()
getApplicationName in interface PluginsManagerpublic File getTempFolder()
PluginsManagergetTempFolder in interface PluginsManagerpublic File getTempFile(String name)
PluginsManagergetTempFile in interface PluginsManagerpublic File getTempFile(String name, String sufix)
PluginsManagergetTempFile in interface PluginsManagername - base name used for create the unique file namesufix - to add the the unique file namepublic boolean desktopBrowse(URI uri)
PluginsManagerdesktopBrowse in interface PluginsManagerpublic boolean desktopOpen(File file)
PluginsManagerdesktopOpen in interface PluginsManagerpublic Arguments getArguments()
getArguments in interface PluginsManager