* @param defaultSource the source to use when no scheme matches, not null
* @param schemePrefixToSourceMap the map of sources by scheme to switch on, not null
*/
public DelegatingPositionSource(PositionSource defaultSource, Map<String, PositionSource> schemePrefixToSourceMap) {
super(defaultSource, schemePrefixToSourceMap);
AggregatingChangeManager changeManager = new AggregatingChangeManager();
// REVIEW jonathan 2011-08-03 -- this assumes that the delegating source lasts for the lifetime of the engine as we
// never detach from the underlying change managers.
changeManager.addChangeManager(defaultSource.changeManager());
for (PositionSource source : schemePrefixToSourceMap.values()) {
changeManager.addChangeManager(source.changeManager());
}
_changeManager = changeManager;
}