// since users are stored in and retrieved from a dedicated workspace
// only the system session assigned with that workspace will get the
// system user manager (special implementation that asserts the existence
// of the admin user).
UserManagerImpl um;
if (umc != null) {
Class<?>[] paramTypes = new Class[] {
SessionImpl.class,
String.class,
Properties.class,
MembershipCache.class};
um = (UserManagerImpl) umc.getUserManager(UserManagerImpl.class,
paramTypes, (SessionImpl) session, adminId, params,
getMembershipCache(session));
// TODO: should we make sure the implementation doesn't allow
// TODO: to change the autosave behavior? since the user manager
// TODO: writes to a separate workspace this would cause troubles.
} else {
um = new UserManagerImpl(session, adminId, params, getMembershipCache(session));
}
return um;
}