diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/api/ExamAPIDiscovery.java b/src/main/java/ch/ethz/seb/sebserver/gbl/api/ExamAPIDiscovery.java index a982a154..413230e7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/api/ExamAPIDiscovery.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/api/ExamAPIDiscovery.java @@ -12,6 +12,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; public final class ExamAPIDiscovery { @@ -28,11 +29,12 @@ public final class ExamAPIDiscovery { @JsonProperty("api-versions") public final Collection versions; + @JsonCreator public ExamAPIDiscovery( - final String title, - final String description, - final String serverLocation, - final Collection versions) { + @JsonProperty("title") final String title, + @JsonProperty("description") final String description, + @JsonProperty("server-location") final String serverLocation, + @JsonProperty("api-versions") final Collection versions) { this.title = title; this.description = description; @@ -61,9 +63,10 @@ public final class ExamAPIDiscovery { @JsonProperty("endpoints") public final Collection endpoints; + @JsonCreator public ExamAPIVersion( - final String name, - final Collection endpoints) { + @JsonProperty("name") final String name, + @JsonProperty("endpoints") final Collection endpoints) { this.name = name; this.endpoints = endpoints; @@ -92,9 +95,13 @@ public final class ExamAPIDiscovery { @JsonProperty("authorization") public final String authorization; - public Endpoint(final String name, final String descripiton, final String location, - final String authorization) { - super(); + @JsonCreator + public Endpoint( + @JsonProperty("name") final String name, + @JsonProperty("descripiton") final String descripiton, + @JsonProperty("location") final String location, + @JsonProperty("authorization") final String authorization) { + this.name = name; this.descripiton = descripiton; this.location = location; diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamForm.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamForm.java index b70b9178..f51df7a3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamForm.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamForm.java @@ -26,8 +26,8 @@ import ch.ethz.seb.sebserver.gbl.api.API; import ch.ethz.seb.sebserver.gbl.model.Domain; import ch.ethz.seb.sebserver.gbl.model.EntityKey; import ch.ethz.seb.sebserver.gbl.model.exam.Exam; -import ch.ethz.seb.sebserver.gbl.model.exam.ExamConfigurationMap; import ch.ethz.seb.sebserver.gbl.model.exam.Exam.ExamStatus; +import ch.ethz.seb.sebserver.gbl.model.exam.ExamConfigurationMap; import ch.ethz.seb.sebserver.gbl.model.exam.Indicator; import ch.ethz.seb.sebserver.gbl.model.exam.QuizData; import ch.ethz.seb.sebserver.gbl.profile.GuiProfile; @@ -283,18 +283,15 @@ public class ExamForm implements TemplateComposer { .withColumn(new ColumnDefinition<>( Domain.CONFIGURATION_NODE.ATTR_NAME, CONFIG_NAME_COLUMN_KEY, - ExamConfigurationMap::getConfigName, - false)) + ExamConfigurationMap::getConfigName)) .withColumn(new ColumnDefinition<>( Domain.CONFIGURATION_NODE.ATTR_DESCRIPTION, CONFIG_DESCRIPTION_COLUMN_KEY, - ExamConfigurationMap::getConfigDescription, - false)) + ExamConfigurationMap::getConfigDescription)) .withColumn(new ColumnDefinition<>( Domain.CONFIGURATION_NODE.ATTR_STATUS, CONFIG_STATUS_COLUMN_KEY, - this.resourceService::localizedExamConfigStatusName, - false)) + this.resourceService::localizedExamConfigStatusName)) .withDefaultActionIf( () -> editable, () -> actionBuilder @@ -350,18 +347,15 @@ public class ExamForm implements TemplateComposer { .withColumn(new ColumnDefinition<>( Domain.INDICATOR.ATTR_NAME, INDICATOR_NAME_COLUMN_KEY, - Indicator::getName, - false)) + Indicator::getName)) .withColumn(new ColumnDefinition<>( Domain.INDICATOR.ATTR_TYPE, INDICATOR_TYPE_COLUMN_KEY, - this::indicatorTypeName, - false)) + this::indicatorTypeName)) .withColumn(new ColumnDefinition<>( Domain.THRESHOLD.REFERENCE_NAME, INDICATOR_THRESHOLD_COLUMN_KEY, - ExamForm::thresholdsValue, - false)) + ExamForm::thresholdsValue)) .withDefaultActionIf( () -> editable, () -> actionBuilder diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamList.java index 38089bba..7adac9fc 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamList.java @@ -110,28 +110,28 @@ public class ExamList implements TemplateComposer { .withColumn(new ColumnDefinition<>( Domain.EXAM.ATTR_LMS_SETUP_ID, columnTitleLmsSetupKey, - examLmsSetupNameFunction(this.resourceService), - this.lmsFilter, - false)) + examLmsSetupNameFunction(this.resourceService)) + .withFilter(this.lmsFilter) + .sortable()) .withColumn(new ColumnDefinition<>( QuizData.QUIZ_ATTR_NAME, columnTitleNameKey, - Exam::getName, - this.nameFilter, - true)) + Exam::getName) + .withFilter(this.nameFilter) + .sortable()) .withColumn(new ColumnDefinition<>( QuizData.QUIZ_ATTR_START_TIME, new LocTextKey( "sebserver.exam.list.column.starttime", i18nSupport.getUsersTimeZoneTitleSuffix()), - Exam::getStartTime, - this.startTimeFilter, - true)) + Exam::getStartTime) + .withFilter(this.startTimeFilter) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.EXAM.ATTR_TYPE, columnTitleTypeKey, - this::examTypeName, - true)) + this::examTypeName) + .sortable()) .withDefaultAction(actionBuilder .newAction(ActionDefinition.EXAM_VIEW_FROM_LIST) .create()) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/InstitutionList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/InstitutionList.java index 2862ee9c..5b7f6a5b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/InstitutionList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/InstitutionList.java @@ -79,20 +79,20 @@ public class InstitutionList implements TemplateComposer { .withColumn(new ColumnDefinition<>( Domain.INSTITUTION.ATTR_NAME, NAME_TEXT_KEY, - entity -> entity.name, - true)) + Institution::getName) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.INSTITUTION.ATTR_URL_SUFFIX, URL_TEXT_KEY, - entity -> entity.urlSuffix, - true)) - .withColumn(new ColumnDefinition<>( + Institution::getUrlSuffix) + .sortable()) + .withColumn(new ColumnDefinition( Domain.INSTITUTION.ATTR_ACTIVE, ACTIVE_TEXT_KEY, entity -> this.pageService .getResourceService() - .localizedActivityResource().apply(entity.active), - true)) + .localizedActivityResource().apply(entity.active)) + .sortable()) .withDefaultAction(pageActionBuilder .newAction(ActionDefinition.INSTITUTION_VIEW_FROM_LIST) .create()) @@ -118,7 +118,6 @@ public class InstitutionList implements TemplateComposer { .withSelect(table::getSelection, PageAction::applySingleSelection, EMPTY_SELECTION_TEXT_KEY) .publishIf(() -> instGrant.m() && table.hasAnyContent()); ; - } } diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/LmsSetupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/LmsSetupList.java index 3c706c14..9bd96c0f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/LmsSetupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/LmsSetupList.java @@ -113,26 +113,27 @@ public class LmsSetupList implements TemplateComposer { () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, - lmsSetupInstitutionNameFunction(this.resourceService), - this.institutionFilter, - false)) + lmsSetupInstitutionNameFunction(this.resourceService)) + .withFilter(this.institutionFilter)) .withColumn(new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_NAME, NAME_TEXT_KEY, - entity -> entity.name, - (isSEBAdmin) ? this.nameFilter : null, - true)) + LmsSetup::getName) + .withFilter((isSEBAdmin) ? this.nameFilter : null) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_LMS_TYPE, TYPE_TEXT_KEY, - this::lmsSetupTypeName, - (isSEBAdmin) ? this.typeFilter : null, - false, true)) + this::lmsSetupTypeName) + .withFilter((isSEBAdmin) ? this.typeFilter : null) + .localized() + .sortable()) + .withColumn(new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_ACTIVE, ACTIVITY_TEXT_KEY, - entity -> entity.active, - true)) + LmsSetup::getActive) + .sortable()) .withDefaultAction(actionBuilder .newAction(ActionDefinition.LMS_SETUP_VIEW_FROM_LIST) .create()) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/QuizDiscoveryList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/QuizDiscoveryList.java index 83c9b2b4..81632524 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/QuizDiscoveryList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/QuizDiscoveryList.java @@ -128,30 +128,30 @@ public class QuizDiscoveryList implements TemplateComposer { .withColumn(new ColumnDefinition<>( QuizData.QUIZ_ATTR_LMS_SETUP_ID, LMS_TEXT_KEY, - quizDataLmsSetupNameFunction(this.resourceService), - this.lmsFilter, - false)) + quizDataLmsSetupNameFunction(this.resourceService)) + .withFilter(this.lmsFilter) + .sortable()) .withColumn(new ColumnDefinition<>( QuizData.QUIZ_ATTR_NAME, NAME_TEXT_KEY, - quizData -> quizData.name, - this.nameFilter, - true)) + QuizData::getName) + .withFilter(this.nameFilter) + .sortable()) .withColumn(new ColumnDefinition<>( QuizData.QUIZ_ATTR_START_TIME, new LocTextKey( "sebserver.quizdiscovery.list.column.starttime", i18nSupport.getUsersTimeZoneTitleSuffix()), - quizData -> quizData.startTime, - this.startTimeFilter, - true)) + QuizData::getStartTime) + .withFilter(this.startTimeFilter) + .sortable()) .withColumn(new ColumnDefinition<>( QuizData.QUIZ_ATTR_END_TIME, new LocTextKey( "sebserver.quizdiscovery.list.column.endtime", i18nSupport.getUsersTimeZoneTitleSuffix()), - quizData -> quizData.endTime, - true)) + QuizData::getEndTime) + .sortable()) .withDefaultAction(t -> actionBuilder .newAction(ActionDefinition.QUIZ_DISCOVERY_SHOW_DETAILS) .withExec(action -> this.showDetails(action, t.getSelectedROWData())) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/SebClientConfigList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/SebClientConfigList.java index 34a6a95d..152231d2 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/SebClientConfigList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/SebClientConfigList.java @@ -117,28 +117,27 @@ public class SebClientConfigList implements TemplateComposer { () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, - clientConfigInstitutionNameFunction(this.resourceService), - this.institutionFilter, - false)) + clientConfigInstitutionNameFunction(this.resourceService)) + .withFilter(this.institutionFilter)) .withColumn(new ColumnDefinition<>( Domain.SEB_CLIENT_CONFIGURATION.ATTR_NAME, NAME_TEXT_KEY, - entity -> entity.name, - this.nameFilter, - true)) + SebClientConfig::getName) + .withFilter(this.nameFilter) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.SEB_CLIENT_CONFIGURATION.ATTR_DATE, new LocTextKey( "sebserver.clientconfig.list.column.date", i18nSupport.getUsersTimeZoneTitleSuffix()), - entity -> entity.date, - this.dateFilter, - true)) + SebClientConfig::getDate) + .withFilter(this.dateFilter) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.SEB_CLIENT_CONFIGURATION.ATTR_ACTIVE, ACTIVE_TEXT_KEY, - entity -> entity.active, - true)) + SebClientConfig::getActive) + .sortable()) .withDefaultAction(pageActionBuilder .newAction(ActionDefinition.SEB_CLIENT_CONFIG_VIEW_FROM_LIST) .create()) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/SebExamConfigList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/SebExamConfigList.java index 6f446635..320bb54b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/SebExamConfigList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/SebExamConfigList.java @@ -111,27 +111,27 @@ public class SebExamConfigList implements TemplateComposer { () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, - this.resourceService::localizedExamConfigInstitutionName, - this.institutionFilter, - false)) + this.resourceService::localizedExamConfigInstitutionName) + .withFilter(this.institutionFilter) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.CONFIGURATION_NODE.ATTR_NAME, NAME_TEXT_KEY, - entity -> entity.name, - this.nameFilter, - true)) + ConfigurationNode::getName) + .withFilter(this.nameFilter) + .sortable()) .withColumn(new ColumnDefinition<>( Domain.CONFIGURATION_NODE.ATTR_DESCRIPTION, DESCRIPTION_TEXT_KEY, - entity -> entity.description, - this.nameFilter, - true)) - .withColumn(new ColumnDefinition<>( + ConfigurationNode::getDescription) + .withFilter(this.nameFilter) + .sortable()) + .withColumn(new ColumnDefinition( Domain.CONFIGURATION_NODE.ATTR_STATUS, STATUS_TEXT_KEY, - this.resourceService::localizedExamConfigStatusName, - this.statusFilter, - true)) + this.resourceService::localizedExamConfigStatusName) + .withFilter(this.statusFilter) + .sortable()) .withDefaultAction(pageActionBuilder .newAction(ActionDefinition.SEB_EXAM_CONFIG_VIEW_PROP_FROM_LIST) .create()) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/UserAccountList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/UserAccountList.java index c5f230f6..0c9d08e3 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/UserAccountList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/UserAccountList.java @@ -123,38 +123,44 @@ public class UserAccountList implements TemplateComposer { () -> new ColumnDefinition<>( Domain.USER.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, - userInstitutionNameFunction(this.resourceService), - this.institutionFilter, - false)) + userInstitutionNameFunction(this.resourceService)) + .withFilter(this.institutionFilter) + .widthProportion(2)) .withColumn(new ColumnDefinition<>( Domain.USER.ATTR_NAME, NAME_TEXT_KEY, - entity -> entity.name, - this.nameFilter, - true)) + UserInfo::getName) + .withFilter(this.nameFilter) + .sortable() + .widthProportion(2)) .withColumn(new ColumnDefinition<>( Domain.USER.ATTR_USERNAME, USER_NAME_TEXT_KEY, - entity -> entity.username, - this.usernameFilter, - true)) + UserInfo::getUsername) + .withFilter(this.usernameFilter) + .sortable() + .widthProportion(2)) .withColumn(new ColumnDefinition<>( Domain.USER.ATTR_EMAIL, MAIL_TEXT_KEY, - entity -> entity.email, - this.mailFilter, - true)) + UserInfo::getEmail) + .withFilter(this.mailFilter) + .sortable() + .widthProportion(3)) .withColumn(new ColumnDefinition<>( Domain.USER.ATTR_LANGUAGE, LANG_TEXT_KEY, - this::getLocaleDisplayText, - this.languageFilter, - true, true)) + this::getLocaleDisplayText) + .withFilter(this.languageFilter) + .localized() + .sortable() + .widthProportion(2)) .withColumn(new ColumnDefinition<>( Domain.USER.ATTR_ACTIVE, ACTIVE_TEXT_KEY, - entity -> entity.active, - true)) + UserInfo::getActive) + .sortable() + .widthProportion(1)) .withDefaultAction(actionBuilder .newAction(ActionDefinition.USER_ACCOUNT_VIEW_FROM_LIST) .create()) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/AbstractTableFieldBuilder.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/AbstractTableFieldBuilder.java index 0c450f7c..b98884fa 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/AbstractTableFieldBuilder.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/AbstractTableFieldBuilder.java @@ -69,7 +69,9 @@ public abstract class AbstractTableFieldBuilder implements InputFieldBuilder { true, false, (tableContext.orientation != null) ? tableContext.orientation.width() : 1, (tableContext.orientation != null) ? tableContext.orientation.height() : 1); - gridData.heightHint = tableContext.orientation.height * 20 + 40; + if (tableContext.orientation.height != null) { + gridData.heightHint = tableContext.orientation.height * 20 + 40; + } table.setLayoutData(gridData); table.setHeaderVisible(true); table.addListener(SWT.Resize, event -> adaptColumnWidth(table, tableContext)); @@ -267,7 +269,7 @@ public abstract class AbstractTableFieldBuilder implements InputFieldBuilder { final Map rowValues, final int index) { - if (values != null && !values.isEmpty()) { + if (!values.isEmpty()) { values.remove(index); values.add(index, rowValues); applyTableRowValues(index); diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/ActivateExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/ActivateExam.java index e5bcb2e4..611c9578 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/ActivateExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/ActivateExam.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ActivateExam extends RestCall { - protected ActivateExam() { + public ActivateExam() { super(new TypeKey<>( CallType.ACTIVATION_ACTIVATE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeactivateExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeactivateExam.java index aa5fc9c7..346e11db 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeactivateExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeactivateExam.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeactivateExam extends RestCall { - protected DeactivateExam() { + public DeactivateExam() { super(new TypeKey<>( CallType.ACTIVATION_DEACTIVATE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteExamConfigMapping.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteExamConfigMapping.java index 97087016..23d7c5e9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteExamConfigMapping.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteExamConfigMapping.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeleteExamConfigMapping extends RestCall { - protected DeleteExamConfigMapping() { + public DeleteExamConfigMapping() { super(new TypeKey<>( CallType.DELETE, EntityType.EXAM_CONFIGURATION_MAP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteIndicator.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteIndicator.java index 1f03beaa..d6517105 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/DeleteIndicator.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeleteIndicator extends RestCall { - protected DeleteIndicator() { + public DeleteIndicator() { super(new TypeKey<>( CallType.DELETE, EntityType.INDICATOR, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExam.java index 234d0efa..04304194 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExam.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExam extends RestCall { - protected GetExam() { + public GetExam() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMapping.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMapping.java index 7172d8a5..9277ba8b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMapping.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMapping.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamConfigMapping extends RestCall { - protected GetExamConfigMapping() { + public GetExamConfigMapping() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.EXAM_CONFIGURATION_MAP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingNames.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingNames.java index 26f8647f..44e93674 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingNames.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingNames.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamConfigMappingNames extends RestCall> { - protected GetExamConfigMappingNames() { + public GetExamConfigMappingNames() { super(new TypeKey<>( CallType.GET_NAMES, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingsPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingsPage.java index cd269c0b..50cf6663 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingsPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamConfigMappingsPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamConfigMappingsPage extends RestCall> { - protected GetExamConfigMappingsPage() { + public GetExamConfigMappingsPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.EXAM_CONFIGURATION_MAP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamDependencies.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamDependencies.java index fab35842..bfb2a49d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamDependencies.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamDependencies.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamDependencies extends RestCall> { - protected GetExamDependencies() { + public GetExamDependencies() { super(new TypeKey<>( CallType.GET_DEPENDENCIES, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamNames.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamNames.java index 2f120342..b310c380 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamNames.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamNames.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamNames extends RestCall> { - protected GetExamNames() { + public GetExamNames() { super(new TypeKey<>( CallType.GET_NAMES, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamPage.java index 1bd69249..7e6ae663 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetExamPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamPage extends RestCall> { - protected GetExamPage() { + public GetExamPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicator.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicator.java index 38442776..8cb8481d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicator.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetIndicator extends RestCall { - protected GetIndicator() { + public GetIndicator() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.INDICATOR, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicators.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicators.java index 5e4ab54f..abdd13b7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicators.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/GetIndicators.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetIndicators extends RestCall> { - protected GetIndicators() { + public GetIndicators() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.INDICATOR, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewExamConfigMapping.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewExamConfigMapping.java index 0056deda..07e8f469 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewExamConfigMapping.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewExamConfigMapping.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewExamConfigMapping extends RestCall { - protected NewExamConfigMapping() { + public NewExamConfigMapping() { super(new TypeKey<>( CallType.NEW, EntityType.EXAM_CONFIGURATION_MAP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewIndicator.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewIndicator.java index 20dd9442..0260e922 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/NewIndicator.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewIndicator extends RestCall { - protected NewIndicator() { + public NewIndicator() { super(new TypeKey<>( CallType.NEW, EntityType.INDICATOR, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExam.java index f0653542..f75b9d77 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExam.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveExam extends RestCall { - protected SaveExam() { + public SaveExam() { super(new TypeKey<>( CallType.SAVE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExamConfigMapping.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExamConfigMapping.java index ab5b21dc..d42bda83 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExamConfigMapping.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveExamConfigMapping.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveExamConfigMapping extends RestCall { - protected SaveExamConfigMapping() { + public SaveExamConfigMapping() { super(new TypeKey<>( CallType.SAVE, EntityType.EXAM_CONFIGURATION_MAP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveIndicator.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveIndicator.java index 1397aee7..23a03406 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/exam/SaveIndicator.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveIndicator extends RestCall { - protected SaveIndicator() { + public SaveIndicator() { super(new TypeKey<>( CallType.SAVE, EntityType.INDICATOR, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/ActivateInstitution.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/ActivateInstitution.java index 2b643164..3a23a72b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/ActivateInstitution.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/ActivateInstitution.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ActivateInstitution extends RestCall { - protected ActivateInstitution() { + public ActivateInstitution() { super(new TypeKey<>( CallType.ACTIVATION_ACTIVATE, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/DeactivateInstitution.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/DeactivateInstitution.java index fe206130..d66657a0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/DeactivateInstitution.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/DeactivateInstitution.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeactivateInstitution extends RestCall { - protected DeactivateInstitution() { + public DeactivateInstitution() { super(new TypeKey<>( CallType.ACTIVATION_DEACTIVATE, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitution.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitution.java index 0db399fb..d869c1fc 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitution.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitution.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetInstitution extends RestCall { - protected GetInstitution() { + public GetInstitution() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionDependency.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionDependency.java index 2ec060ff..55c4ea31 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionDependency.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionDependency.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetInstitutionDependency extends RestCall> { - protected GetInstitutionDependency() { + public GetInstitutionDependency() { super(new TypeKey<>( CallType.GET_DEPENDENCIES, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionNames.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionNames.java index e1049342..08c2a811 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionNames.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionNames.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetInstitutionNames extends RestCall> { - protected GetInstitutionNames() { + public GetInstitutionNames() { super(new TypeKey<>( CallType.GET_NAMES, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionPage.java index 4e27ab20..e4fba866 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetInstitutionPage extends RestCall> { - protected GetInstitutionPage() { + public GetInstitutionPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/NewInstitution.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/NewInstitution.java index c8d0d1d2..216554ab 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/NewInstitution.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/NewInstitution.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewInstitution extends RestCall { - protected NewInstitution() { + public NewInstitution() { super(new TypeKey<>( CallType.NEW, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/SaveInstitution.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/SaveInstitution.java index 1f505806..373b087b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/SaveInstitution.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/SaveInstitution.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveInstitution extends RestCall { - protected SaveInstitution() { + public SaveInstitution() { super(new TypeKey<>( CallType.SAVE, EntityType.INSTITUTION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/ActivateLmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/ActivateLmsSetup.java index 802850a3..c374d594 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/ActivateLmsSetup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/ActivateLmsSetup.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ActivateLmsSetup extends RestCall { - protected ActivateLmsSetup() { + public ActivateLmsSetup() { super(new TypeKey<>( CallType.ACTIVATION_ACTIVATE, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/DeactivateLmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/DeactivateLmsSetup.java index 0abf6ad6..5215abbf 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/DeactivateLmsSetup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/DeactivateLmsSetup.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeactivateLmsSetup extends RestCall { - protected DeactivateLmsSetup() { + public DeactivateLmsSetup() { super(new TypeKey<>( CallType.ACTIVATION_DEACTIVATE, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetup.java index 313b2739..3164662c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetup.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetLmsSetup extends RestCall { - protected GetLmsSetup() { + public GetLmsSetup() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupDependencies.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupDependencies.java index 1bea6230..addd22d1 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupDependencies.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupDependencies.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetLmsSetupDependencies extends RestCall> { - protected GetLmsSetupDependencies() { + public GetLmsSetupDependencies() { super(new TypeKey<>( CallType.GET_DEPENDENCIES, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupNames.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupNames.java index ad8427af..ad209205 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupNames.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupNames.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetLmsSetupNames extends RestCall> { - protected GetLmsSetupNames() { + public GetLmsSetupNames() { super(new TypeKey<>( CallType.GET_NAMES, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupPage.java index fbe24c66..f3f22c3d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/GetLmsSetupPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetLmsSetupPage extends RestCall> { - protected GetLmsSetupPage() { + public GetLmsSetupPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/NewLmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/NewLmsSetup.java index 9d1379b9..60df70d8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/NewLmsSetup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/NewLmsSetup.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewLmsSetup extends RestCall { - protected NewLmsSetup() { + public NewLmsSetup() { super(new TypeKey<>( CallType.NEW, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/SaveLmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/SaveLmsSetup.java index 6bbdc247..2e9445f2 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/SaveLmsSetup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/SaveLmsSetup.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveLmsSetup extends RestCall { - protected SaveLmsSetup() { + public SaveLmsSetup() { super(new TypeKey<>( CallType.SAVE, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetup.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetup.java index 4a312f22..48492eff 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetup.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class TestLmsSetup extends RestCall { - protected TestLmsSetup() { + public TestLmsSetup() { super(new TypeKey<>( CallType.UNDEFINED, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetupAdHoc.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetupAdHoc.java index cfdb5826..93c2fbf8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetupAdHoc.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/lmssetup/TestLmsSetupAdHoc.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class TestLmsSetupAdHoc extends RestCall { - protected TestLmsSetupAdHoc() { + public TestLmsSetupAdHoc() { super(new TypeKey<>( CallType.UNDEFINED, EntityType.LMS_SETUP, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizData.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizData.java index f416b562..1e48d1b7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizData.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizData.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetQuizData extends RestCall { - protected GetQuizData() { + public GetQuizData() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizPage.java index e68a4cb4..654485b0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/GetQuizPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetQuizPage extends RestCall> { - protected GetQuizPage() { + public GetQuizPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/ImportAsExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/ImportAsExam.java index 8efb589d..0a01faa4 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/ImportAsExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/quiz/ImportAsExam.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ImportAsExam extends RestCall { - protected ImportAsExam() { + public ImportAsExam() { super(new TypeKey<>( CallType.NEW, EntityType.EXAM, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ActivateClientConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ActivateClientConfig.java index 65b6f11f..58a341ba 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ActivateClientConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ActivateClientConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ActivateClientConfig extends RestCall { - protected ActivateClientConfig() { + public ActivateClientConfig() { super(new TypeKey<>( CallType.ACTIVATION_ACTIVATE, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/DeactivateClientConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/DeactivateClientConfig.java index f3c0f95c..0bae89e5 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/DeactivateClientConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/DeactivateClientConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeactivateClientConfig extends RestCall { - protected DeactivateClientConfig() { + public DeactivateClientConfig() { super(new TypeKey<>( CallType.ACTIVATION_DEACTIVATE, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ExportClientConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ExportClientConfig.java index b6e314f7..a53ad42a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ExportClientConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ExportClientConfig.java @@ -25,7 +25,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.AbstractExportCal @GuiProfile public class ExportClientConfig extends AbstractExportCall { - protected ExportClientConfig() { + public ExportClientConfig() { super(new TypeKey<>( CallType.UNDEFINED, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfig.java index ce01a9b6..c1cfc676 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetClientConfig extends RestCall { - protected GetClientConfig() { + public GetClientConfig() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfigPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfigPage.java index a3bdc0a2..a37bb9bc 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfigPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/GetClientConfigPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetClientConfigPage extends RestCall> { - protected GetClientConfigPage() { + public GetClientConfigPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/NewClientConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/NewClientConfig.java index a266ba0e..4282f9c0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/NewClientConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/NewClientConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewClientConfig extends RestCall { - protected NewClientConfig() { + public NewClientConfig() { super(new TypeKey<>( CallType.NEW, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/SaveClientConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/SaveClientConfig.java index 1c632505..d6cff1ce 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/SaveClientConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/SaveClientConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveClientConfig extends RestCall { - protected SaveClientConfig() { + public SaveClientConfig() { super(new TypeKey<>( CallType.SAVE, EntityType.SEB_CLIENT_CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ActivateExamConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ActivateExamConfig.java index 316cd897..d7268ca5 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ActivateExamConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ActivateExamConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ActivateExamConfig extends RestCall { - protected ActivateExamConfig() { + public ActivateExamConfig() { super(new TypeKey<>( CallType.ACTIVATION_ACTIVATE, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/DeactivateExamConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/DeactivateExamConfig.java index aecdd456..c3fa9848 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/DeactivateExamConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/DeactivateExamConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeactivateExamConfig extends RestCall { - protected DeactivateExamConfig() { + public DeactivateExamConfig() { super(new TypeKey<>( CallType.ACTIVATION_DEACTIVATE, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ExportPlainXML.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ExportPlainXML.java index c0b2ee9b..3999c335 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ExportPlainXML.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/ExportPlainXML.java @@ -25,7 +25,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.AbstractExportCal @GuiProfile public class ExportPlainXML extends AbstractExportCall { - protected ExportPlainXML() { + public ExportPlainXML() { super(new TypeKey<>( CallType.UNDEFINED, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfiguration.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfiguration.java index 48cb0312..a24b8e93 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfiguration.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfiguration.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetConfiguration extends RestCall { - protected GetConfiguration() { + public GetConfiguration() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationPage.java index c5110087..260230fb 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetConfigurationPage extends RestCall> { - protected GetConfigurationPage() { + public GetConfigurationPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValuePage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValuePage.java index fe24edf8..c45b871b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValuePage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValuePage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetConfigurationValuePage extends RestCall> { - protected GetConfigurationValuePage() { + public GetConfigurationValuePage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.CONFIGURATION_VALUE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValues.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValues.java index fb08395c..2660b007 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValues.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurationValues.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.PageToListCallAda @GuiProfile public class GetConfigurationValues extends PageToListCallAdapter { - protected GetConfigurationValues() { + public GetConfigurationValues() { super( GetConfigurationValuePage.class, EntityType.CONFIGURATION_VALUE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurations.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurations.java index 6910a381..39300d63 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurations.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetConfigurations.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.PageToListCallAda @GuiProfile public class GetConfigurations extends PageToListCallAdapter { - protected GetConfigurations() { + public GetConfigurations() { super( GetConfigurationPage.class, EntityType.CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNode.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNode.java index 98b25c0e..7ea2bd24 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNode.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNode.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamConfigNode extends RestCall { - protected GetExamConfigNode() { + public GetExamConfigNode() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNodePage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNodePage.java index 5924561a..aa5a5a8a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNodePage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetExamConfigNodePage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetExamConfigNodePage extends RestCall> { - protected GetExamConfigNodePage() { + public GetExamConfigNodePage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientationPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientationPage.java index b3b863e4..fc8093e7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientationPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientationPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetOrientationPage extends RestCall> { - protected GetOrientationPage() { + public GetOrientationPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.ORIENTATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientations.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientations.java index 8a1abf52..08c28d0c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientations.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetOrientations.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.PageToListCallAda @GuiProfile public class GetOrientations extends PageToListCallAdapter { - protected GetOrientations() { + public GetOrientations() { super( GetOrientationPage.class, EntityType.ORIENTATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetViewList.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetViewList.java index 80e94b85..65c7bd5e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetViewList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/GetViewList.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetViewList extends RestCall> { - protected GetViewList() { + public GetViewList() { super(new TypeKey<>( CallType.GET_LIST, EntityType.VIEW, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/NewExamConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/NewExamConfig.java index 6dd15008..a33ac734 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/NewExamConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/NewExamConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewExamConfig extends RestCall { - protected NewExamConfig() { + public NewExamConfig() { super(new TypeKey<>( CallType.NEW, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfig.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfig.java index 15710f25..c0ffb056 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfig.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveExamConfig extends RestCall { - protected SaveExamConfig() { + public SaveExamConfig() { super(new TypeKey<>( CallType.SAVE, EntityType.CONFIGURATION_NODE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigHistory.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigHistory.java index 185aa321..05b0531c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigHistory.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigHistory.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveExamConfigHistory extends RestCall { - protected SaveExamConfigHistory() { + public SaveExamConfigHistory() { super(new TypeKey<>( CallType.SAVE, EntityType.CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigTableValues.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigTableValues.java index c0c398be..5399b545 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigTableValues.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigTableValues.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveExamConfigTableValues extends RestCall { - protected SaveExamConfigTableValues() { + public SaveExamConfigTableValues() { super(new TypeKey<>( CallType.SAVE, EntityType.CONFIGURATION_VALUE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigValue.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigValue.java index 2ceb0789..6ee26bb0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigValue.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SaveExamConfigValue.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveExamConfigValue extends RestCall { - protected SaveExamConfigValue() { + public SaveExamConfigValue() { super(new TypeKey<>( CallType.SAVE, EntityType.CONFIGURATION_VALUE, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SebExamConfigUndo.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SebExamConfigUndo.java index a5c4979b..9bb4b976 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SebExamConfigUndo.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/examconfig/SebExamConfigUndo.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SebExamConfigUndo extends RestCall { - protected SebExamConfigUndo() { + public SebExamConfigUndo() { super(new TypeKey<>( CallType.SAVE, EntityType.CONFIGURATION, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ActivateUserAccount.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ActivateUserAccount.java index 0df02dec..4de15900 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ActivateUserAccount.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ActivateUserAccount.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ActivateUserAccount extends RestCall { - protected ActivateUserAccount() { + public ActivateUserAccount() { super(new TypeKey<>( CallType.ACTIVATION_ACTIVATE, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ChangePassword.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ChangePassword.java index 627e3450..ac908c07 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ChangePassword.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/ChangePassword.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class ChangePassword extends RestCall { - protected ChangePassword() { + public ChangePassword() { super(new TypeKey<>( CallType.UNDEFINED, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/DeactivateUserAccount.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/DeactivateUserAccount.java index 547a36a6..79fcc647 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/DeactivateUserAccount.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/DeactivateUserAccount.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class DeactivateUserAccount extends RestCall { - protected DeactivateUserAccount() { + public DeactivateUserAccount() { super(new TypeKey<>( CallType.ACTIVATION_DEACTIVATE, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccount.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccount.java index 85a9fe72..35f469cb 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccount.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccount.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetUserAccount extends RestCall { - protected GetUserAccount() { + public GetUserAccount() { super(new TypeKey<>( CallType.GET_SINGLE, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountNames.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountNames.java index 7f833af4..70a8e751 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountNames.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountNames.java @@ -28,7 +28,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetUserAccountNames extends RestCall> { - protected GetUserAccountNames() { + public GetUserAccountNames() { super(new TypeKey<>( CallType.GET_NAMES, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountPage.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountPage.java index d630ca6d..b39a5f38 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountPage.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/GetUserAccountPage.java @@ -27,7 +27,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class GetUserAccountPage extends RestCall> { - protected GetUserAccountPage() { + public GetUserAccountPage() { super(new TypeKey<>( CallType.GET_PAGE, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/NewUserAccount.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/NewUserAccount.java index de8d59be..5b17476d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/NewUserAccount.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/NewUserAccount.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class NewUserAccount extends RestCall { - protected NewUserAccount() { + public NewUserAccount() { super(new TypeKey<>( CallType.NEW, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/SaveUserAccount.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/SaveUserAccount.java index 8b665bde..6007a241 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/SaveUserAccount.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/useraccount/SaveUserAccount.java @@ -26,7 +26,7 @@ import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; @GuiProfile public class SaveUserAccount extends RestCall { - protected SaveUserAccount() { + public SaveUserAccount() { super(new TypeKey<>( CallType.SAVE, EntityType.USER, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/table/ColumnDefinition.java b/src/main/java/ch/ethz/seb/sebserver/gui/table/ColumnDefinition.java index fe464361..0fc87b27 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/table/ColumnDefinition.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/table/ColumnDefinition.java @@ -21,79 +21,31 @@ public final class ColumnDefinition { final String columnName; final LocTextKey displayName; - final LocTextKey tooltip; - final int widthPercent; final Function valueSupplier; - final boolean sortable; - final TableFilterAttribute filterAttribute; - final boolean localized; + + private LocTextKey tooltip; + private int widthProportion; + private boolean sortable; + private TableFilterAttribute filterAttribute; + private boolean localized; public ColumnDefinition(final String columnName, final LocTextKey displayName) { - this(columnName, displayName, null, -1); + this(columnName, displayName, null); } public ColumnDefinition( + final String columnName, + final LocTextKey displayName, + final Function valueSupplier) { + + this(columnName, displayName, null, -1, valueSupplier, null, false, false); + } + + private ColumnDefinition( final String columnName, final LocTextKey displayName, final LocTextKey tooltip, - final int widthPercent) { - - this(columnName, displayName, tooltip, widthPercent, null, null, false, false); - } - - public ColumnDefinition( - final String columnName, - final LocTextKey displayName, - final int widthPercent) { - - this(columnName, displayName, null, widthPercent, null, null, false, false); - } - - public ColumnDefinition( - final String columnName, - final LocTextKey displayName, - final Function valueSupplier, - final boolean sortable) { - - this(columnName, displayName, null, -1, valueSupplier, null, sortable, false); - } - - public ColumnDefinition( - final String columnName, - final LocTextKey displayName, - final Function valueSupplier, - final boolean sortable, - final boolean localized) { - - this(columnName, displayName, null, -1, valueSupplier, null, sortable, localized); - } - - public ColumnDefinition( - final String columnName, - final LocTextKey displayName, - final Function valueSupplier, - final TableFilterAttribute tableFilterAttribute, - final boolean sortable) { - - this(columnName, displayName, null, -1, valueSupplier, tableFilterAttribute, sortable, false); - } - - public ColumnDefinition( - final String columnName, - final LocTextKey displayName, - final Function valueSupplier, - final TableFilterAttribute tableFilterAttribute, - final boolean sortable, - final boolean localized) { - - this(columnName, displayName, null, -1, valueSupplier, tableFilterAttribute, sortable, localized); - } - - public ColumnDefinition( - final String columnName, - final LocTextKey displayName, - final LocTextKey tooltip, - final int widthPercent, + final int widthProportion, final Function valueSupplier, final TableFilterAttribute filterAttribute, final boolean sortable, @@ -102,13 +54,58 @@ public final class ColumnDefinition { this.columnName = columnName; this.displayName = displayName; this.tooltip = tooltip; - this.widthPercent = widthPercent; + this.widthProportion = widthProportion; this.valueSupplier = valueSupplier; this.filterAttribute = filterAttribute; this.sortable = sortable; this.localized = localized; } + public ColumnDefinition withFilter(final TableFilterAttribute filterAttribute) { + this.filterAttribute = filterAttribute; + return this; + } + + public ColumnDefinition withTooltip(final LocTextKey tooltip) { + this.tooltip = tooltip; + return this; + } + + public ColumnDefinition localized() { + this.localized = true; + return this; + } + + public ColumnDefinition sortable() { + this.sortable = true; + return this; + } + + public ColumnDefinition widthProportion(final int widthProportion) { + this.widthProportion = widthProportion; + return this; + } + + public LocTextKey getTooltip() { + return this.tooltip; + } + + public int getWidthProportion() { + return this.widthProportion; + } + + public boolean isSortable() { + return this.sortable; + } + + public TableFilterAttribute getFilterAttribute() { + return this.filterAttribute; + } + + public boolean isLocalized() { + return this.localized; + } + public static final class TableFilterAttribute { public final CriteriaType type; diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/table/EntityTable.java b/src/main/java/ch/ethz/seb/sebserver/gui/table/EntityTable.java index 6dd97621..f18e5c44 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/table/EntityTable.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/table/EntityTable.java @@ -110,7 +110,7 @@ public class EntityTable { this.filter = columns .stream() - .map(column -> column.filterAttribute) + .map(column -> column.getFilterAttribute()) .filter(Objects::nonNull) .findFirst() .isPresent() ? new TableFilter<>(this) : null; @@ -273,12 +273,12 @@ public class EntityTable { final TableColumn tableColumn = this.widgetFactory.tableColumnLocalized( this.table, column.displayName, - column.tooltip); + column.getTooltip()); tableColumn.addListener(SWT.Resize, this::adaptColumnWidthChange); tableColumn.setData(COLUMN_DEFINITION, column); - if (column.sortable) { + if (column.isSortable()) { tableColumn.addListener(SWT.Selection, event -> { if (!column.columnName.equals(this.sortColumn)) { applySort(column.columnName); @@ -292,7 +292,7 @@ public class EntityTable { }); } - if (column.widthPercent > 0) { + if (column.getWidthProportion() > 0) { this.columnsWithSameWidth = false; } } @@ -355,14 +355,22 @@ public class EntityTable { try { final int currentTableWidth = this.table.getParent().getClientArea().width; int index = 0; + + final int pSize = this.columns + .stream() + .filter(c -> c.getWidthProportion() > 0) + .reduce(0, + (acc, c) -> acc + c.getWidthProportion(), + (acc1, acc2) -> acc1 + acc2); + + final int columnSize = (pSize > 0) + ? currentTableWidth / pSize + : currentTableWidth / this.columns.size(); + for (final ColumnDefinition column : this.columns) { - final int percentage = (this.columnsWithSameWidth) - ? 100 / this.columns.size() - : column.widthPercent; - final TableColumn tableColumn = this.table.getColumn(index); - final int newWidth = currentTableWidth / 100 * percentage; + final int newWidth = (pSize > 0) ? columnSize * column.getWidthProportion() : columnSize; tableColumn.setWidth(newWidth); if (this.filter != null) { this.filter.adaptColumnWidth(this.table.indexOf(tableColumn), newWidth); @@ -401,7 +409,7 @@ public class EntityTable { final TableColumn[] columns = table.table.getColumns(); for (int i = 0; i < columns.length; i++) { final ColumnDefinition columnDefinition = table.columns.get(i); - if (columnDefinition.localized) { + if (columnDefinition.isLocalized()) { for (int j = 0; j < items.length; j++) { @SuppressWarnings("unchecked") final ROW rowData = (ROW) items[j].getData(TABLE_ROW_DATA); diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/table/TableFilter.java b/src/main/java/ch/ethz/seb/sebserver/gui/table/TableFilter.java index a290dd30..a200d59a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/table/TableFilter.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/table/TableFilter.java @@ -82,10 +82,10 @@ public class TableFilter { this.components.clear(); this.components.addAll(this.entityTable.columns .stream() - .map(column -> column.filterAttribute) + .map(ColumnDefinition::getFilterAttribute) .map(this::createFilterComponent) .map(comp -> comp.build(this.composite)) - .map(comp -> comp.reset()) + .map(FilterComponent::reset) .collect(Collectors.toList())); final FilterComponent lastComp = this.components.get(this.components.size() - 1); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/SebClientConfigServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/SebClientConfigServiceImpl.java index 618441a5..3f97bee9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/SebClientConfigServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/sebconfig/impl/SebClientConfigServiceImpl.java @@ -20,12 +20,12 @@ import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; +import org.springframework.core.env.Environment; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.web.context.request.RequestAttributes; @@ -55,41 +55,58 @@ import ch.ethz.seb.sebserver.webservice.servicelayer.sebconfig.impl.SebConfigEnc @WebServiceProfile public class SebClientConfigServiceImpl implements SebClientConfigService { + private static final String WEB_SERVICE_SERVER_NAME_KEY = "sebserver.webservice.http.server.name"; + private static final String WEB_SERVICE_HTTP_SCHEME_KEY = "sebserver.webservice.http.scheme"; + private static final String WEB_SERVICE_SERVER_ADDRESS_KEY = "server.address"; + private static final String WEB_SERVICE_SERVER_PORT_KEY = "server.port"; + private static final String WEB_SERVICE_EXAM_API_DISCOVERY_ENDPOINT_KEY = + "sebserver.webservice.api.exam.endpoint.discovery"; + private static final Logger log = LoggerFactory.getLogger(SebClientConfigServiceImpl.class); private final InstitutionDAO institutionDAO; private final SebClientConfigDAO sebClientConfigDAO; private final ClientCredentialService clientCredentialService; private final SebConfigEncryptionService sebConfigEncryptionService; - @Autowired - @Qualifier(WebSecurityConfig.CLIENT_PASSWORD_ENCODER_BEAN_NAME) - private PasswordEncoder clientPasswordEncoder; + private final PasswordEncoder clientPasswordEncoder; private final ZipService zipService; private final String httpScheme; private final String serverAddress; + private final String serverName; private final String serverPort; private final String discoveryEndpoint; + private final String serverURLPrefix; + protected SebClientConfigServiceImpl( final InstitutionDAO institutionDAO, final SebClientConfigDAO sebClientConfigDAO, final ClientCredentialService clientCredentialService, final SebConfigEncryptionService sebConfigEncryptionService, final ZipService zipService, - @Value("${sebserver.webservice.http.scheme}") final String httpScheme, - @Value("${server.address}") final String serverAddress, - @Value("${server.port}") final String serverPort, - @Value("${sebserver.webservice.api.exam.endpoint.discovery}") final String discoveryEndpoint) { + @Qualifier(WebSecurityConfig.CLIENT_PASSWORD_ENCODER_BEAN_NAME) final PasswordEncoder clientPasswordEncoder, + final Environment environment) { this.institutionDAO = institutionDAO; this.sebClientConfigDAO = sebClientConfigDAO; this.clientCredentialService = clientCredentialService; this.sebConfigEncryptionService = sebConfigEncryptionService; this.zipService = zipService; - this.httpScheme = httpScheme; - this.serverAddress = serverAddress; - this.serverPort = serverPort; - this.discoveryEndpoint = discoveryEndpoint; + this.clientPasswordEncoder = clientPasswordEncoder; + + this.httpScheme = environment.getRequiredProperty(WEB_SERVICE_HTTP_SCHEME_KEY); + this.serverAddress = environment.getRequiredProperty(WEB_SERVICE_SERVER_ADDRESS_KEY); + this.serverName = environment.getProperty(WEB_SERVICE_SERVER_NAME_KEY, (String) null); + this.serverPort = environment.getRequiredProperty(WEB_SERVICE_SERVER_PORT_KEY); + this.discoveryEndpoint = environment.getRequiredProperty(WEB_SERVICE_EXAM_API_DISCOVERY_ENDPOINT_KEY); + + this.serverURLPrefix = UriComponentsBuilder.newInstance() + .scheme(this.httpScheme) + .host((StringUtils.isNoneBlank(this.serverName)) + ? this.serverName + : this.serverAddress) + .port(this.serverPort) + .toUriString(); } @Override @@ -236,11 +253,7 @@ public class SebClientConfigServiceImpl implements SebClientConfigService { @Override public String getServerURL() { - return UriComponentsBuilder.newInstance() - .scheme(this.httpScheme) - .host(this.serverAddress) - .port(this.serverPort) - .toUriString(); + return this.serverURLPrefix; } private void passwordEncryption( diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAPIDiscoveryController.java b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAPIDiscoveryController.java index c6e68570..99e4a134 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAPIDiscoveryController.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ExamAPIDiscoveryController.java @@ -43,37 +43,39 @@ public class ExamAPIDiscoveryController { @PostConstruct void init() { + final String serverURL = this.sebClientConfigService.getServerURL(); this.DISCOVERY_INFO = new ExamAPIDiscovery( "Safe Exam Browser Server / Exam API Description", "This is a description of Safe Exam Browser Server's Exam API", - this.sebClientConfigService.getServerURL(), + serverURL, Arrays.asList(new ExamAPIDiscovery.ExamAPIVersion( "v1", Arrays.asList( new ExamAPIDiscovery.Endpoint( "access-token-endpoint", "request OAuth2 access token with client credentials grant", - API.OAUTH_TOKEN_ENDPOINT, + serverURL + API.OAUTH_TOKEN_ENDPOINT, "Basic"), new ExamAPIDiscovery.Endpoint( "seb-handshake-endpoint", "endpoint to establish SEB - SEB Server connection", - this.examAPI_V1_Endpoint + API.EXAM_API_HANDSHAKE_ENDPOINT, + serverURL + this.examAPI_V1_Endpoint + API.EXAM_API_HANDSHAKE_ENDPOINT, "Bearer"), new ExamAPIDiscovery.Endpoint( "seb-configuration-endpoint", "endpoint to get SEB exam configuration in exchange of connection-token and exam identifier", - this.examAPI_V1_Endpoint + API.EXAM_API_CONFIGURATION_REQUEST_ENDPOINT, + serverURL + this.examAPI_V1_Endpoint + + API.EXAM_API_CONFIGURATION_REQUEST_ENDPOINT, "Bearer"), new ExamAPIDiscovery.Endpoint( "seb-ping-endpoint", "endpoint to send pings to while running exam", - this.examAPI_V1_Endpoint + API.EXAM_API_PING_ENDPOINT, + serverURL + this.examAPI_V1_Endpoint + API.EXAM_API_PING_ENDPOINT, "Bearer"), new ExamAPIDiscovery.Endpoint( "seb-ping-endpoint", "endpoint to send log events to while running exam", - this.examAPI_V1_Endpoint + API.EXAM_API_EVENT_ENDPOINT, + serverURL + this.examAPI_V1_Endpoint + API.EXAM_API_EVENT_ENDPOINT, "Bearer"))))); } diff --git a/src/main/resources/config/application-dev-ws.properties b/src/main/resources/config/application-dev-ws.properties index e7a86205..416ff3bd 100644 --- a/src/main/resources/config/application-dev-ws.properties +++ b/src/main/resources/config/application-dev-ws.properties @@ -10,6 +10,7 @@ spring.datasource.platform=dev spring.datasource.hikari.max-lifetime=600000 sebserver.webservice.http.scheme=http +sebserver.webservice.http.server.name=localhost sebserver.webservice.api.admin.endpoint=/admin-api/v1 sebserver.webservice.api.admin.accessTokenValiditySeconds=1800 sebserver.webservice.api.admin.refreshTokenValiditySeconds=-1 diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ClientConfigTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/integration/ClientConfigTest.java similarity index 89% rename from src/test/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ClientConfigTest.java rename to src/test/java/ch/ethz/seb/sebserver/gui/integration/ClientConfigTest.java index c177e1bb..41c54640 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/seb/clientconfig/ClientConfigTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gui/integration/ClientConfigTest.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig; +package ch.ethz.seb.sebserver.gui.integration; import static org.junit.Assert.*; @@ -18,8 +18,12 @@ import ch.ethz.seb.sebserver.gbl.model.Domain; import ch.ethz.seb.sebserver.gbl.model.EntityProcessingReport; import ch.ethz.seb.sebserver.gbl.model.sebconfig.SebClientConfig; import ch.ethz.seb.sebserver.gbl.util.Result; -import ch.ethz.seb.sebserver.gui.integration.GuiIntegrationTest; import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestServiceImpl; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.ActivateClientConfig; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.DeactivateClientConfig; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.GetClientConfig; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.NewClientConfig; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.seb.clientconfig.SaveClientConfig; @Sql(scripts = { "classpath:schema-test.sql", "classpath:data-test.sql" }) public class ClientConfigTest extends GuiIntegrationTest { diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/integration/GetInstitutionTest.java similarity index 84% rename from src/test/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionTest.java rename to src/test/java/ch/ethz/seb/sebserver/gui/integration/GetInstitutionTest.java index c02d4e74..2efaeb29 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gui/service/remote/webservice/api/institution/GetInstitutionTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gui/integration/GetInstitutionTest.java @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution; +package ch.ethz.seb.sebserver.gui.integration; import static org.junit.Assert.*; @@ -14,16 +14,18 @@ import java.util.ArrayList; import java.util.Collection; import org.junit.Test; +import org.springframework.test.context.jdbc.Sql; import ch.ethz.seb.sebserver.gbl.api.API; import ch.ethz.seb.sebserver.gbl.api.JSONMapper; import ch.ethz.seb.sebserver.gbl.model.institution.Institution; import ch.ethz.seb.sebserver.gbl.util.Result; -import ch.ethz.seb.sebserver.gui.integration.GuiIntegrationTest; import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestCall; import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestServiceImpl; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.GetInstitution; import ch.ethz.seb.sebserver.gui.service.remote.webservice.auth.OAuth2AuthorizationContextHolder; +@Sql(scripts = { "classpath:schema-test.sql", "classpath:data-test.sql" }) public class GetInstitutionTest extends GuiIntegrationTest { @Test diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java new file mode 100644 index 00000000..ff07289a --- /dev/null +++ b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package ch.ethz.seb.sebserver.gui.integration; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.springframework.test.context.jdbc.Sql; + +import ch.ethz.seb.sebserver.gbl.api.API; +import ch.ethz.seb.sebserver.gbl.model.Domain; +import ch.ethz.seb.sebserver.gbl.model.EntityProcessingReport; +import ch.ethz.seb.sebserver.gbl.model.institution.Institution; +import ch.ethz.seb.sebserver.gbl.util.Result; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.RestServiceImpl; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.ActivateInstitution; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.GetInstitution; +import ch.ethz.seb.sebserver.gui.service.remote.webservice.api.institution.NewInstitution; + +@Sql(scripts = { "classpath:schema-test.sql", "classpath:data-test.sql" }) +public class UseCasesIntegrationTest extends GuiIntegrationTest { + + @Test + public void bigUseCasesTest() { + + // ************************************* + // Use Case 1: SEB Administrator creates a new institution and activate this new institution + final RestServiceImpl restService = createRestServiceForUser( + "admin", + "admin", + new NewInstitution(), + new ActivateInstitution(), + new GetInstitution()); + + final Result result = restService.getBuilder(NewInstitution.class) + .withQueryParam(Domain.INSTITUTION.ATTR_NAME, "Test Institution") + .call(); + + assertNotNull(result); + assertFalse(result.hasError()); + Institution institution = result.get(); + assertEquals("Test Institution", institution.name); + assertFalse(institution.active); + + final Result resultActivation = restService.getBuilder(ActivateInstitution.class) + .withURIVariable(API.PARAM_MODEL_ID, String.valueOf(institution.id)) + .call(); + + assertNotNull(resultActivation); + assertFalse(resultActivation.hasError()); + + final Result resultGet = restService.getBuilder(GetInstitution.class) + .withURIVariable(API.PARAM_MODEL_ID, String.valueOf(institution.id)) + .call(); + + assertNotNull(resultGet); + assertFalse(resultGet.hasError()); + institution = resultGet.get(); + assertEquals("Test Institution", institution.name); + assertTrue(institution.active); + + // ************************************* + // Use Case 2: SEB Administrator creates a new Institutional Administrator user for the + // newly created institution and activate this user + + // TODO do as much use cases as possible within this integration test + + + } + +} diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/exam/ExamDiscoveryEndpointTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/exam/ExamDiscoveryEndpointTest.java index daa4bc3b..8b80d478 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/exam/ExamDiscoveryEndpointTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/exam/ExamDiscoveryEndpointTest.java @@ -8,7 +8,7 @@ package ch.ethz.seb.sebserver.webservice.integration.api.exam; -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -16,6 +16,8 @@ import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import ch.ethz.seb.sebserver.gbl.api.ExamAPIDiscovery; +import ch.ethz.seb.sebserver.gbl.api.ExamAPIDiscovery.ExamAPIVersion; import ch.ethz.seb.sebserver.gbl.api.JSONMapper; public class ExamDiscoveryEndpointTest extends ExamAPIIntegrationTester { @@ -33,44 +35,14 @@ public class ExamDiscoveryEndpointTest extends ExamAPIIntegrationTester { .andExpect(status().isOk()) .andReturn().getResponse().getContentAsString(); - final Object json = this.jsonMapper.readValue(contentAsString, Object.class); - assertEquals( - "{\r\n" + - " \"title\" : \"Safe Exam Browser Server / Exam API Description\",\r\n" + - " \"description\" : \"This is a description of Safe Exam Browser Server's Exam API\",\r\n" + - " \"server-location\" : \"http://localhost:0\",\r\n" + - " \"api-versions\" : [ {\r\n" + - " \"name\" : \"v1\",\r\n" + - " \"endpoints\" : [ {\r\n" + - " \"name\" : \"access-token-endpoint\",\r\n" + - " \"descripiton\" : \"request OAuth2 access token with client credentials grant\",\r\n" + - " \"location\" : \"/oauth/token\",\r\n" + - " \"authorization\" : \"Basic\"\r\n" + - " }, {\r\n" + - " \"name\" : \"seb-handshake-endpoint\",\r\n" + - " \"descripiton\" : \"endpoint to establish SEB - SEB Server connection\",\r\n" + - " \"location\" : \"/exam-api/v1/handshake\",\r\n" + - " \"authorization\" : \"Bearer\"\r\n" + - " }, {\r\n" + - " \"name\" : \"seb-configuration-endpoint\",\r\n" + - " \"descripiton\" : \"endpoint to get SEB exam configuration in exchange of connection-token and exam identifier\",\r\n" - + - " \"location\" : \"/exam-api/v1/examconfig\",\r\n" + - " \"authorization\" : \"Bearer\"\r\n" + - " }, {\r\n" + - " \"name\" : \"seb-ping-endpoint\",\r\n" + - " \"descripiton\" : \"endpoint to send pings to while running exam\",\r\n" + - " \"location\" : \"/exam-api/v1/sebping\",\r\n" + - " \"authorization\" : \"Bearer\"\r\n" + - " }, {\r\n" + - " \"name\" : \"seb-ping-endpoint\",\r\n" + - " \"descripiton\" : \"endpoint to send log events to while running exam\",\r\n" + - " \"location\" : \"/exam-api/v1/seblog\",\r\n" + - " \"authorization\" : \"Bearer\"\r\n" + - " } ]\r\n" + - " } ]\r\n" + - "}", - this.jsonMapper.writerWithDefaultPrettyPrinter().writeValueAsString(json)); + final ExamAPIDiscovery examAPIDiscovery = this.jsonMapper.readValue(contentAsString, ExamAPIDiscovery.class); + assertNotNull(examAPIDiscovery); + assertEquals("Safe Exam Browser Server / Exam API Description", examAPIDiscovery.title); + assertEquals("This is a description of Safe Exam Browser Server's Exam API", examAPIDiscovery.description); + assertTrue(!examAPIDiscovery.versions.isEmpty()); + final ExamAPIVersion version1 = examAPIDiscovery.versions.iterator().next(); + assertEquals("v1", version1.name); + assertTrue(!version1.endpoints.isEmpty()); } }