// Add the mime type detectors in the configuration ...
for (MimeTypeDetectorConfig config : scanner.getMimeTypeDetectors()) {
detectors.addDetector(config);
}
// Add an extension-based detector by default ...
detectors.addDetector(new MimeTypeDetectorConfig("ExtensionDetector", "Extension-based MIME type detector",
ExtensionBasedMimeTypeDetector.class));
// Create the RepositoryContext that the configuration repository source should use ...
ObservationBus configurationChangeBus = new ObservationBus();
RepositoryContext configContext = new SimpleRepositoryContext(context, configurationChangeBus, null);