Search in sources :

Example 1 with SetApplicationSettingsAction

use of edu.stanford.bmir.protege.web.shared.app.SetApplicationSettingsAction in project webprotege by protegeproject.

the class ApplicationSettingsPresenter method applySettings.

private void applySettings() {
    ApplicationSettings applicationSettings = new ApplicationSettings(view.getApplicationName(), new EmailAddress(view.getSystemNotificationEmailAddress()), new ApplicationLocation(view.getScheme().name().toLowerCase(), getHostNameFromView(), getPathFromView(), getPortFromView()), view.isAccountCreationAllowed() ? ACCOUNT_CREATION_ALLOWED : ACCOUNT_CREATION_NOT_ALLOWED, Collections.emptyList(), view.isProjectCreationAllowed() ? EMPTY_PROJECT_CREATION_ALLOWED : EMPTY_PROJECT_CREATION_NOT_ALLOWED, Collections.emptyList(), view.isProjectUploadAllowed() ? PROJECT_UPLOAD_ALLOWED : PROJECT_UPLOAD_NOT_ALLOWED, Collections.emptyList(), view.isNotificationEmailsEnabled() ? SEND_NOTIFICATION_EMAILS : DO_NOT_SEND_NOTIFICATION_EMAILS, parseMaxUploadSize());
    dispatchServiceManager.execute(new SetApplicationSettingsAction(applicationSettings), result -> MessageBox.showMessage("Settings applied", "The application settings have successfully been applied"));
}
Also used : ApplicationSettings(edu.stanford.bmir.protege.web.shared.app.ApplicationSettings) SetApplicationSettingsAction(edu.stanford.bmir.protege.web.shared.app.SetApplicationSettingsAction) ApplicationLocation(edu.stanford.bmir.protege.web.shared.app.ApplicationLocation) EmailAddress(edu.stanford.bmir.protege.web.shared.user.EmailAddress)

Aggregations

ApplicationLocation (edu.stanford.bmir.protege.web.shared.app.ApplicationLocation)1 ApplicationSettings (edu.stanford.bmir.protege.web.shared.app.ApplicationSettings)1 SetApplicationSettingsAction (edu.stanford.bmir.protege.web.shared.app.SetApplicationSettingsAction)1 EmailAddress (edu.stanford.bmir.protege.web.shared.user.EmailAddress)1