Oxygen XML Editor, Version 14.2

ro.sync.exml.plugin
Class PluginManager

java.lang.Object
  extended by ro.sync.exml.plugin.PluginManager

public class PluginManager
extends java.lang.Object

The plugin manager is responsable to find and instantiate plugins.

Version:
$Revision: 1.38 $

Field Summary
static PluginManager instance
          The plugin manager's instance.
 
Method Summary
static void disableLateDelegationCLForTests(boolean disableLateDelegationCL)
          Disable/enable late delegation class loader for tests
 java.util.List<PluginContributedToolbar> getAllContributedToolbarIDs()
          Get all contributed toolbar IDs.
 java.util.List<PluginContributedView> getAllContributedViewIDs()
          Get all contributed view IDs.
 java.util.List<java.io.File> getAllPluginDirs()
          Get all plugin installation directories.
 java.lang.String getDefaultPluginsDir()
          Get the plugins directory.
 java.util.List getExceptions()
          Get the exceptions raised durring the plugin initialization.
static PluginManager getInstance()
          Get the singleton instance of the plugin manager.
 java.util.List<Plugin> getPlugins()
          Get the registered plugins.
static java.io.File getUserPrefsPluginsDir()
          Gets the plugins root directory from user preferences.
static java.io.File[] getUserPrefsPluginsDirs()
          Get plugins directories from the user preferences.
 boolean hasCustomURLHandlerPlugin(java.lang.String protocol)
          Check if there are any custom URL handler plugin registered...
 java.net.URLConnection openConnectionWithTargetedURLHandler(java.net.URL url)
          Open the URL connection with the URL handlers provided by the Targeted URL Stream Handlers.
static boolean pluginsUpdateInProgress()
           
static void setPluginsDir(java.lang.String pluginsDir)
          This method is used only for tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static PluginManager instance
The plugin manager's instance.

Method Detail

setPluginsDir

public static void setPluginsDir(java.lang.String pluginsDir)
This method is used only for tests.

Parameters:
pluginsDir - The custom plugins directory.

getInstance

public static PluginManager getInstance()
Get the singleton instance of the plugin manager.

Returns:
The instance value

getUserPrefsPluginsDir

public static java.io.File getUserPrefsPluginsDir()
Gets the plugins root directory from user preferences.

Returns:
The directory from the user preferences where we look for plugins.

getUserPrefsPluginsDirs

public static java.io.File[] getUserPrefsPluginsDirs()
Get plugins directories from the user preferences.

Returns:
Plugins directories from the user preferences.

getPlugins

public java.util.List<Plugin> getPlugins()
Get the registered plugins.

Returns:
a List of Plugin objects.

getAllPluginDirs

public java.util.List<java.io.File> getAllPluginDirs()
Get all plugin installation directories.

Returns:
All plugin installation directories.

getAllContributedViewIDs

public java.util.List<PluginContributedView> getAllContributedViewIDs()
Get all contributed view IDs.

Returns:
A list with all contributed view IDs.

getDefaultPluginsDir

public java.lang.String getDefaultPluginsDir()
Get the plugins directory.

Returns:
The plugins directory.

disableLateDelegationCLForTests

public static void disableLateDelegationCLForTests(boolean disableLateDelegationCL)
Disable/enable late delegation class loader for tests

Parameters:
disableLateDelegationCL - true to disable late delegation

getExceptions

public java.util.List getExceptions()
Get the exceptions raised durring the plugin initialization.

Returns:
a List of exceptions.

hasCustomURLHandlerPlugin

public boolean hasCustomURLHandlerPlugin(java.lang.String protocol)
Check if there are any custom URL handler plugin registered...

Parameters:
protocol - The protocol to be checked.
Returns:
true If the protocol is known, false otherwise.

pluginsUpdateInProgress

public static boolean pluginsUpdateInProgress()
Returns:
true if the plugin manager is updating plugins and cannot yet return them.

getAllContributedToolbarIDs

public java.util.List<PluginContributedToolbar> getAllContributedToolbarIDs()
Get all contributed toolbar IDs.

Returns:
All contributed toolbar IDs.

openConnectionWithTargetedURLHandler

public java.net.URLConnection openConnectionWithTargetedURLHandler(java.net.URL url)
                                                            throws java.io.IOException
Open the URL connection with the URL handlers provided by the Targeted URL Stream Handlers.

Parameters:
url - The URL to open connection for.
Returns:
The URL connection or null if there is no of PluginDescriptor.TARGETED_URL_HANDLER plugin type that can handle this URL open connection.
Throws:
java.io.IOException

Oxygen XML Editor, Version 14.2

© Copyright Syncro Soft SRL 2002 - 2013. All rights reserved.