activateService(user.getOid(), (InternalServicePluginConfiguration) pluginConfiguration);
/** * Load all users from the database and their configured services. Registers each service. * * @param session * @throws BimserverDatabaseException * @throws BimserverLockConflictException */ public void activateServices() throws BimserverDatabaseException, BimserverLockConflictException { try (DatabaseSession session = bimDatabase.createSession()) { IfcModelInterface allOfType = session.getAllOfType(StorePackage.eINSTANCE.getUser(), OldQuery.getDefault()); for (User user : allOfType.getAll(User.class)) { updateUserSettings(session, user); UserSettings userSettings = user.getUserSettings(); for (InternalServicePluginConfiguration internalServicePluginConfiguration : userSettings.getServices()) { activateService(user.getOid(), internalServicePluginConfiguration); } } } }
for (InternalServicePluginConfiguration internalServicePluginConfiguration : all) { if (internalServicePluginConfiguration.getPluginDescriptor().getIdentifier().equals(newPluginContext.getIdentifier())) { activateService(internalServicePluginConfiguration.getUserSettings().getOid(), internalServicePluginConfiguration);