*/
@SuppressWarnings("unchecked")
protected DefinitionDAO<Locale> createLocaleDefinitionDao(TilesApplicationContext applicationContext,
TilesRequestContextFactory contextFactory,
LocaleResolver resolver) {
BaseLocaleUrlDefinitionDAO definitionDao = instantiateLocaleDefinitionDao(
applicationContext, contextFactory, resolver);
definitionDao.setReader(createDefinitionsReader(applicationContext, contextFactory));
definitionDao.setSourceURLs(getSourceURLs(applicationContext, contextFactory));
definitionDao.setApplicationContext(applicationContext);
if (definitionDao instanceof PatternDefinitionResolverAware) {
((PatternDefinitionResolverAware<Locale>) definitionDao)
.setPatternDefinitionResolver(createPatternDefinitionResolver(Locale.class));
}
return definitionDao;