Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Code Block
    static Object getSinglePlugin(Class intface)
         throws PluginConfigurationError;
    Returns an instance of the singleton (single) plugin implementing the given interface. There must be exactly one single plugin configured for this interface, otherwise the 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.See the plugin.single configuration key for configuration details.
  • Wiki Markupcode
    _static Object\[\] getPluginSequence(Class intface);_ 
    Returns instances of all plugins that implement the interface _intface_, in an _Array_. Returns an empty array if no there are no matching plugins.The order of the plugins in the array is the same as their class names in the configuration's value field.See the _plugin.sequence_ configuration key for configuration details.
  • Code Block
    static Object getNamedPlugin(Class intface, String name);
    Returns an instance of a plugin that implements the interface intface and is bound to a name matching name. If there is no matching plugin, it returns null. The names are matched by String.equals().See the plugin.named and plugin.selfnamed configuration keys for configuration details.
  • Code Block
    static void releasePlugin(Object plugin);
    Tells the Plugin Manager to let go of any references to a reusable plugin, to prevent it from being given out again and to allow the object to be garbage-collected. Call this when a plugin instance must be taken out of circulation.
  • Wiki Markupcode
    _static String\[\] getAllPluginNames(Class intface);_ 
    Returns all of the names under which a named plugin implementing the interface _intface_ can be requested (with _getNamedPlugin()_). The array is empty if there are no matches. Use this to populate a menu of plugins for interactive selection, or to document what the possible choices are.The names are NOT returned in any predictable order, so you may wish to sort them first.Note: Since a plugin may be bound to more than one name, the list of names this returns does not represent the list of plugins. To get the list of unique implementation classes corresponding to the names, you might have to eliminate duplicates (i.e. create a Set of classes).
  • Code Block
    static void checkConfiguration();
    Validates the keys in the DSpace ConfigurationManager pertaining to the Plugin Manager and reports any errors by logging them. This is intended to be used interactively by a DSpace administrator, to check the configuration file after modifying it. See the section about validating configuration for details.

...