yes and no, the loop I proposed is easy and allows nice things like this loop - suppose I implement filters using a prefix:
super.database.pwd, default = databases:super.pwd --no value--> database:super.pwd --filter databse--> decrypt:97548739JVD --decrypt filter--> T@m@ya (the password ;)) Said otherwise it allows to build values based on other configuration values. Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2015-01-05 9:32 GMT+01:00 Mark Struberg <[email protected]>: > the filtering question depends on what we like to do with the Filter. > Initially it was only meant to be a straight forward filter. For variable > expression evaluation (which is actually not really 'filtering' we would need > something like AST to fully work. All other resolutions would not fully work > imo. And having a full AST would rather lead us to EL. That's way out of > reach imo. > > LieGrue, > strub > > > > > > >> On Monday, 5 January 2015, 8:37, Romain Manni-Bucau <[email protected]> >> wrote: >> > Hi guys, >> >> if we keep current impl, >> ServiceContext.getInstance().getService(ConfigurationContext.class).get() >> should be done in the constructor IMO and not be contextual which >> often leads to some issues at runtime - basically it would be possible >> to leak configuration. >> >> Also the usage of PropertyFilter doesnt fully work, a single loop is >> not enough since a filter can return a filterable value so it should >> basically be a: >> >> String old = null; >> do { >> old = unfilteredValue; >> for(PropertyFilter filter: >> >> ServiceContext.getInstance().getService(ConfigurationContext.class).get().getPropertyFilters()){ >> unfilteredValue = filter.filterProperty(key, unfilteredValue, >> (String k) -> key.equals(k)?null:get(k).orElse(null)); >> } >> >> } while (old != null && unfilteredValue != null && >> !old.equals(unfilteredValue)); >> >> >> or sthg like that. >> >> wdyt? >> >> Romain Manni-Bucau >> @rmannibucau >> http://www.tomitribe.com >> http://rmannibucau.wordpress.com >> https://github.com/rmannibucau >>
