/**
* Need to recreate aliases whenever logout/login.
*/
private AliasRegistry reAdapt(final AliasRegistry aliasesRegistry) {
final AliasRegistry newAliasesRegistry = new AliasRegistryDefault();
// first pass: root adapters
for (final Map.Entry<String, ObjectAdapter> aliasAdapter : aliasesRegistry) {
final String alias = aliasAdapter.getKey();
final ObjectAdapter oldAdapter = aliasAdapter.getValue();
if (oldAdapter.getOid() instanceof AggregatedOid) {
continue;
}
newAliasesRegistry.aliasAs(alias, getAdapterManager().adapterFor(oldAdapter.getObject()));
}
// for now, not supporting aggregated adapters (difficulty in looking up
// the parent adapter because the Oid changes)