public Set<DiscoveredResourceDetails> discoverResources( ResourceDiscoveryContext<T> discoveryContext) throws InvalidPluginConfigurationException, Exception { Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>(1); List<String> includes = determineIncludeGlobs(discoveryContext); List<String> excludes = determineExcludeGlobs(discoveryContext); Configuration pluginConfig = discoveryContext.getDefaultPluginConfiguration(); PropertySimple includeProps = getGlobList(AugeasConfigurationComponent.INCLUDE_GLOBS_PROP, includes); PropertySimple excludeProps = getGlobList(AugeasConfigurationComponent.EXCLUDE_GLOBS_PROP, excludes); pluginConfig.put(includeProps); pluginConfig.put(excludeProps); try { checkFiles(pluginConfig); DiscoveredResourceDetails resource = createResourceDetails(discoveryContext, pluginConfig); discoveredResources.add(resource); log.debug( "Discovered " + discoveryContext.getResourceType().getName() + " Resource with key [" + resource.getResourceKey() + "]."); } catch (IllegalStateException e) { // Thrown by augeas if it can not read a file log.warn("Discovery failed: " + e.getMessage()); } return discoveredResources; }