Class DefaultPluginDescriptor<T>
java.lang.Object
de.iip_ecosphere.platform.support.plugins.DefaultPluginDescriptor<T>
- Type Parameters:
T- plugin type
- All Implemented Interfaces:
PluginDescriptor<T>
- Direct Known Subclasses:
SingletonPluginDescriptor
Default plugin descriptor implementation. May create per calling
createPlugin(File) always a new instance.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeclares the plugin supplier type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate DefaultPluginDescriptor.PluginSupplier<T> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPluginDescriptor(String id, List<String> ids, Class<T> pluginClass, DefaultPluginDescriptor.PluginSupplier<T> pluginSupplier) Creates a descriptor instance. -
Method Summary
Modifier and TypeMethodDescriptioncreatePlugin(File installDir) Creates a plugin instance.createPlugin(String id, List<String> ids, Class<T> pluginClass, DefaultPluginDescriptor.PluginSupplier<T> pluginSupplier, File installDir) Creates the plugin instance.Returns further ids this plugin represents.getId()Returns the unique/primary plugin id.getType()Returns the type of plugin being created.protected StringReturns the plugin id upon creation.Returns the additional plugin ids upon creation.protected DefaultPluginDescriptor.PluginSupplier<T> initPluginSupplier(DefaultPluginDescriptor.PluginSupplier<T> pluginSupplier) Returns the plugin supplier upon creation.
-
Field Details
-
id
-
ids
-
pluginClass
-
pluginSupplier
-
-
Constructor Details
-
DefaultPluginDescriptor
public DefaultPluginDescriptor(String id, List<String> ids, Class<T> pluginClass, DefaultPluginDescriptor.PluginSupplier<T> pluginSupplier) Creates a descriptor instance.- Parameters:
id- the plugin idids- optional secondary ids, may be null or emptypluginClass- the instance classpluginSupplier- the creator supplier- See Also:
-
-
Method Details
-
initPluginSupplier
protected DefaultPluginDescriptor.PluginSupplier<T> initPluginSupplier(DefaultPluginDescriptor.PluginSupplier<T> pluginSupplier) Returns the plugin supplier upon creation.- Parameters:
pluginSupplier- the supplied supplier- Returns:
pluginSupplier
-
initId
Returns the plugin id upon creation.- Parameters:
id- the supplied plugin id- Returns:
id
-
initIds
Returns the additional plugin ids upon creation.- Parameters:
ids- the supplied plugin ids- Returns:
ids
-
getFurtherIds
Description copied from interface:PluginDescriptorReturns further ids this plugin represents.- Specified by:
getFurtherIdsin interfacePluginDescriptor<T>- Returns:
- the further ids, may be null, empty, unmodifiable
-
getId
Description copied from interface:PluginDescriptorReturns the unique/primary plugin id.- Specified by:
getIdin interfacePluginDescriptor<T>- Returns:
- the id
-
createPlugin
Description copied from interface:PluginDescriptorCreates a plugin instance.- Specified by:
createPluginin interfacePluginDescriptor<T>- Parameters:
installDir- the installation directory, may be null- Returns:
- the plugin instance
-
createPlugin
protected Plugin<T> createPlugin(String id, List<String> ids, Class<T> pluginClass, DefaultPluginDescriptor.PluginSupplier<T> pluginSupplier, File installDir) Creates the plugin instance.- Parameters:
id- the plugin idids- optional secondary ids, may be null or emptypluginClass- the instance classpluginSupplier- the creator supplierinstallDir- the installation directory, may be null- Returns:
- the plugin instance
-
getType
Description copied from interface:PluginDescriptorReturns the type of plugin being created.- Specified by:
getTypein interfacePluginDescriptor<T>- Returns:
-