public interface PluginService
In DSpace, a "plugin" corresponds simply to a Java interface. Plugin implementations are simply classes which implement that interface (and often they are given unique names by which the plugin implementations are referenced/loaded).
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAllPluginNames(Class interfaceClass)
Returns all of the names under which a named plugin implementing
the interface can be requested (with getNamedPlugin()).
|
Object |
getNamedPlugin(Class interfaceClass,
String name)
Returns an instance of a plugin that implements the interface
and is bound to a name matching name.
|
Object[] |
getPluginSequence(Class interfaceClass)
Returns instances of all plugins that implement the interface,
in an Array.
|
Object |
getSinglePlugin(Class interfaceClass)
Returns an instance of the singleton (single) plugin implementing
the given interface.
|
boolean |
hasNamedPlugin(Class interfaceClass,
String name)
Returns whether a plugin exists which implements the specified interface
and has a specified name.
|
String[] getAllPluginNames(Class interfaceClass)
NOTE: The names are NOT returned in any deterministic order.
interfaceClass - plugin interface for which to return names.Object getNamedPlugin(Class interfaceClass, String name)
interfaceClass - the interface class of the pluginname - under which the plugin implementation is configured.boolean hasNamedPlugin(Class interfaceClass, String name)
interfaceClass - the interface class of the pluginname - under which the plugin implementation is configured.Object[] getPluginSequence(Class interfaceClass)
The order of the plugins in the array is the same as their class names in the configuration's value field.
interfaceClass - interface for which to find plugins.Object getSinglePlugin(Class interfaceClass)
PluginConfigurationError is thrown.
Note that this is the only "get plugin" method which throws an exception. It is typically used at initialization time to set up a permanent part of the system so any failure is fatal.
interfaceClass - interface Class objectCopyright © 2022 LYRASIS. All rights reserved.