use of org.bimserver.database.actions.ServerSettingsSetter in project BIMserver by opensourceBIM.
the class SettingsServiceImpl method setSendConfirmationEmailAfterRegistration.
@Override
public void setSendConfirmationEmailAfterRegistration(final Boolean sendConfirmationEmailAfterRegistration) throws ServerException, UserException {
requireAdminAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
SetServerSettingDatabaseAction action = new SetServerSettingDatabaseAction(getBimServer(), session, getInternalAccessMethod(), new ServerSettingsSetter() {
@Override
public void set(ServerSettings serverSettings) {
serverSettings.setSendConfirmationEmailAfterRegistration(sendConfirmationEmailAfterRegistration);
}
});
session.executeAndCommitAction(action);
} catch (BimserverDatabaseException e) {
handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.database.actions.ServerSettingsSetter in project BIMserver by opensourceBIM.
the class SettingsServiceImpl method setGenerateGeometryOnCheckin.
@Override
public void setGenerateGeometryOnCheckin(final Boolean generateGeometryOnCheckin) throws ServerException, UserException {
requireAdminAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
SetServerSettingDatabaseAction action = new SetServerSettingDatabaseAction(getBimServer(), session, getInternalAccessMethod(), new ServerSettingsSetter() {
@Override
public void set(ServerSettings serverSettings) {
serverSettings.setGenerateGeometryOnCheckin(generateGeometryOnCheckin);
}
});
session.executeAndCommitAction(action);
} catch (BimserverDatabaseException e) {
handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.database.actions.ServerSettingsSetter in project BIMserver by opensourceBIM.
the class SettingsServiceImpl method setCacheOutputFiles.
@Override
public void setCacheOutputFiles(final Boolean cacheOutputFiles) throws ServerException, UserException {
requireAdminAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
SetServerSettingDatabaseAction action = new SetServerSettingDatabaseAction(getBimServer(), session, getInternalAccessMethod(), new ServerSettingsSetter() {
@Override
public void set(ServerSettings serverSettings) {
serverSettings.setCacheOutputFiles(cacheOutputFiles);
}
});
session.executeAndCommitAction(action);
} catch (BimserverDatabaseException e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations