*/
public void configure(CompassConfiguration compassConfiguration, Map configurationContext) {
Assert.notNull(grailsApplication, "grailsApplication cannot be null");
Assert.notNull(classMappingConfigurators, "classMappingConfigurators cannot be null");
CompositeSearchableGrailsDomainClassCompassClassMapper classMapper = null;
// determine which classes are mapped by which strategy
Map classesByStrategy = new HashMap();
Collection grailsDomainClasses = SearchableUtils.getGrailsDomainClasses(grailsApplication);
Set mappableClasses = new HashSet();
Set notMapped = new HashSet(grailsDomainClasses);
for (int i = 0; i < classMappingConfigurators.length; i++) {
SearchableGrailsDomainClassMappingConfigurator configurator = classMappingConfigurators[i];
// Total hack. This seems to be the easiest way to initialise this
// particular property mapping configurator.
if (configurator instanceof SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator) {
classMapper = ((SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator) configurator).
getMappingDescriptionProviderManager();
classMapper.init(
compassConfiguration,
(Map) configurationContext.get("customConverters"),
defaultExcludes,
defaultFormats);
}