import { PluginContext } from '../context'; import { PluginContextProcessorFactory } from './factory'; import { ServiceContainer } from '@govflanders/vl-widget-dependency-injection'; import { ModuleManager } from '@govflanders/vl-widget-module'; /** * Interface which describes plugin context processor discovery. */ export interface PluginContextProcessorDiscovery { /** * Resolve the plugin context processor factory. * * @param {PluginContext} pluginContext * An object which represents a plugin context. * * @return {Promise} * A promise to resolve the processor factory. */ resolvePluginContextProcessorFactory(pluginContext: PluginContext): Promise; } /** * Plugin context processor discovery which uses a inversion of control container. */ export declare class ContainerPluginContextProcessorDiscovery implements PluginContextProcessorDiscovery { /** * Holds the service container. * * @var {ServiceContainer} */ protected container: ServiceContainer; /** * Holds the plugin context processor factory service identifier. * * @var {string} */ protected processorFactoryServiceId: string; /** * Create a ContainerPluginContextProcessorDiscovery object. * * @param {ServiceContainer} container * A service container. * @param {string} processorFactoryServiceId * Name of the processor factory service. */ constructor(container: ServiceContainer, processorFactoryServiceId: string); /** * Get the service container. * * @return {ServiceContainer} * A service container. */ protected getContainer(): ServiceContainer; /** * Get the processor service factory identifier. * * @return {string} * The service identifier. */ protected getPluginContextProcessorFactoryServiceId(): string; /** * Get the processor factory from the service container. * * @param {PluginContext} pluginContext * An object which represents the plugin context. * * @return {PluginContextProcessorFactory} * An object which represents the processor factory. */ protected getPluginContextProcessorFactoryFromContainer(pluginContext: PluginContext): PluginContextProcessorFactory; /** * {@inheritdoc} */ resolvePluginContextProcessorFactory(pluginContext: PluginContext): Promise; } /** * Plugin context processor discovery which supports loading modules. */ export declare class ModulePluginContextProcessorDiscovery extends ContainerPluginContextProcessorDiscovery { /** * Holds the module manager. * * @var {ModuleManager} */ protected moduleManager: ModuleManager; /** * Create ModulePluginDiscovery object. * * @param {ModuleManager} moduleManager * The module manager. * @param {ServiceContainer} container * A service container. * @param {string} processorFactoryServiceId * Name of the processor factory service. */ constructor(moduleManager: ModuleManager, container: ServiceContainer, processorFactoryServiceId: string); /** * Get the module manager. * * @return {ModuleManager} * The module manager. */ protected getModuleManager(): ModuleManager; /** * {@inheritdoc} */ resolvePluginContextProcessorFactory(pluginContext: PluginContext): Promise; }