protected void applyFilterChainResolver(Ini ini, Map<String, ?> defaults) { if (ini == null || ini.isEmpty()) { //nothing to use to create the resolver, just return //(the AbstractShiroFilter allows a null resolver, in which case the original FilterChain is // always used). return; } //only create a resolver if the 'filters' or 'urls' sections are defined: Ini.Section urls = ini.getSection(IniFilterChainResolverFactory.URLS); Ini.Section filters = ini.getSection(IniFilterChainResolverFactory.FILTERS); if ((urls != null && !urls.isEmpty()) || (filters != null && !filters.isEmpty())) { //either the urls section or the filters section was defined. Go ahead and create the resolver //and set it: IniFilterChainResolverFactory filterChainResolverFactory = new IniFilterChainResolverFactory(ini, defaults); filterChainResolverFactory.setFilterConfig(getFilterConfig()); FilterChainResolver resolver = filterChainResolverFactory.getInstance(); setFilterChainResolver(resolver); } }
protected void apply(Ini ini) { if (ini != null && !ini.isEmpty()) { Map<String, ?> objects = createObjects(ini); this.ini = ini; this.objects.clear(); this.objects.putAll(objects); } }