public class PluginController extends java.lang.Object
It loads the plugins, takes care of the list of active plugins and control the tasks that are exchanged between plugins and core plugins
| Constructor and Description |
|---|
PluginController(java.io.File pathToPluginDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(TaskRequest task) |
void |
doRemove(java.net.URI uri,
StorageInterface si) |
java.util.HashMap<java.lang.String,java.lang.String> |
getAdvancedSettingsHelp(java.lang.String pluginName) |
IndexerInterface |
getIndexerByName(java.lang.String name,
boolean onlyEnabled) |
java.util.Collection<IndexerInterface> |
getIndexingPlugins(boolean onlyEnabled) |
static PluginController |
getInstance() |
java.util.List<javax.swing.JMenuItem> |
getMenuItems()
Deprecated.
|
java.util.Collection<QueryInterface> |
getQueryPlugins(boolean onlyEnabled) |
QueryInterface |
getQueryProviderByName(java.lang.String name,
boolean onlyEnabled) |
java.util.List<java.lang.String> |
getQueryProvidersName(boolean enabled) |
java.util.List<javax.swing.JMenuItem> |
getRightButtonItems()
Deprecated.
|
StorageInterface |
getStorageForSchema(java.lang.String scheme)
Retrieve a storage interface capable of handling files with the given scheme.
|
StorageInterface |
getStorageForSchema(java.net.URI location)
Retrieve a storage interface capable of handling files on a given location.
|
java.util.Collection<StorageInterface> |
getStoragePlugins(boolean onlyEnabled) |
java.util.List<javax.swing.JPanel> |
getTabItems()
Deprecated.
|
java.lang.String |
getWebUIModuleJS(java.lang.String name)
Retrieve the web UI plugin module code.
|
java.lang.String |
getWebUIPackageJSON(java.lang.String name)
Retrieve the web UI plugin descriptor package.json.
|
WebUIPlugin |
getWebUIPlugin(java.lang.String name)
Retrieve the web UI plugin descriptor of the plugin with the given name.
|
java.util.Collection<WebUIPlugin> |
getWebUIPlugins(java.lang.String... ids)
Retrieve all web UI plugin descriptors for the given slot id.
|
boolean |
hasAdvancedSettings(java.lang.String pluginName)
TODO: REVIEW! BELOW
Checks if the plugin exists and has advanced/internal settings.
|
java.util.List<Task<Report>> |
index(java.lang.String pluginName,
java.net.URI path) |
java.util.List<Task<Report>> |
index(java.net.URI path) |
java.util.List<Report> |
indexBlocking(java.net.URI path) |
JointQueryTask |
query(JointQueryTask holder,
java.util.List<java.lang.String> querySources,
java.lang.String query,
java.lang.Object... parameters) |
Task<java.lang.Iterable<SearchResult>> |
query(java.lang.String querySource,
java.lang.String query,
java.lang.Object... parameters) |
JointQueryTask |
queryAll(JointQueryTask holder,
java.lang.String query,
java.lang.Object... parameters) |
void |
remove(java.net.URI uri) |
java.lang.Iterable<StorageInputStream> |
resolveURI(java.net.URI location,
java.lang.Object... args)
Resolve a URI to a DicomInputStream
|
void |
shutdown()
Stops the plugins and saves the settings
|
void |
startPlugin(java.lang.String pluginName) |
void |
stopPlugin(java.lang.String pluginName)
stops a pluginset.
|
void |
unindex(java.net.URI path) |
void |
unindex(java.net.URI path,
java.util.Collection<java.lang.String> indexProviders)
Issue the removal of indexed entries in a path from the given indexers.
|
public PluginController(java.io.File pathToPluginDirectory)
public static PluginController getInstance()
public void shutdown() throws java.io.IOException
java.io.IOExceptionpublic void stopPlugin(java.lang.String pluginName)
pluginName - public void startPlugin(java.lang.String pluginName)
public java.util.Collection<IndexerInterface> getIndexingPlugins(boolean onlyEnabled)
public java.util.Collection<StorageInterface> getStoragePlugins(boolean onlyEnabled)
public java.lang.Iterable<StorageInputStream> resolveURI(java.net.URI location, java.lang.Object... args)
location - args - public StorageInterface getStorageForSchema(java.net.URI location)
location - a URI of the location, only the scheme matterspublic StorageInterface getStorageForSchema(java.lang.String scheme)
scheme - a URI of the location, only the scheme matterspublic java.util.Collection<QueryInterface> getQueryPlugins(boolean onlyEnabled)
public void addTask(TaskRequest task)
public java.util.List<java.lang.String> getQueryProvidersName(boolean enabled)
public QueryInterface getQueryProviderByName(java.lang.String name, boolean onlyEnabled)
public IndexerInterface getIndexerByName(java.lang.String name, boolean onlyEnabled)
public JointQueryTask queryAll(JointQueryTask holder, java.lang.String query, java.lang.Object... parameters)
public Task<java.lang.Iterable<SearchResult>> query(java.lang.String querySource, java.lang.String query, java.lang.Object... parameters)
public JointQueryTask query(JointQueryTask holder, java.util.List<java.lang.String> querySources, java.lang.String query, java.lang.Object... parameters)
public void unindex(java.net.URI path)
public void unindex(java.net.URI path, java.util.Collection<java.lang.String> indexProviders)
path - the URI of the directory or file to unindexindexProviders - a collection of providerspublic void remove(java.net.URI uri)
public void doRemove(java.net.URI uri, StorageInterface si)
public java.util.List<Report> indexBlocking(java.net.URI path)
@Deprecated public java.util.List<javax.swing.JMenuItem> getRightButtonItems()
@Deprecated public java.util.List<javax.swing.JPanel> getTabItems()
@Deprecated public java.util.List<javax.swing.JMenuItem> getMenuItems()
public java.util.Collection<WebUIPlugin> getWebUIPlugins(java.lang.String... ids)
ids - the slot id's for the plugin ("query", "result", "menu", ...), empty or null for any slotpublic WebUIPlugin getWebUIPlugin(java.lang.String name)
name - the unique name of the pluginpublic java.lang.String getWebUIPackageJSON(java.lang.String name)
name - the unique name of the pluginpublic java.lang.String getWebUIModuleJS(java.lang.String name)
name - the unique name of the pluginpublic boolean hasAdvancedSettings(java.lang.String pluginName)
pluginName - the name of the plugin.public java.util.HashMap<java.lang.String,java.lang.String> getAdvancedSettingsHelp(java.lang.String pluginName)