ResourceType resourceType = context.getResourceType();
ScenarioManager manager = ScenarioManager.getInstance();
Set<DiscoveredResourceDetails> resourceDetails = null;
if (manager.isEnabled()) {
ResourceFactory resourceFactory = manager.getResourceFactory(resourceType.getName());
if (resourceFactory==null)
return Collections.emptySet();
resourceDetails = resourceFactory.discoverResources(context);
// If there is a plugin configuration factory defined, run it on each resource
ConfigurationFactory configurationFactory = manager.getPluginConfigurationFactory(resourceType.getName());
if (configurationFactory != null) {
for (DiscoveredResourceDetails details : resourceDetails) {