The plugin framework can be extend with plugin providers which provides plugins access to different forms of data at runtime.
Follow these steps to implement a plugin provider:
public class ExecutionInfoProviderImpl implements ExecutionInfoProvider { public ExecutionInfo get(ExecutionResult result) { // TODO Auto-generated method stub return null; } }
<!-- define execution info provider --> <bean id="executionInfoProviderImpl" class="com.alpha.pineapple.execution.ExecutionInfoProviderImpl" />
/** * Execution info provider. */ @Resource ExecutionInfoProvider executionInfoProvider;
// register execution info provider factory.registerSingleton(EXECUTION_INFO_PROVIDER_BEANID, executionInfoProvider);
The result is that the same provider instance which is used by the core compoent is injected into all plugin contexts.