From 3d67b4ed9c7b0089f2e623ce6ab4302e35b9cd2f Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 26 Jun 2019 15:31:18 +0200 Subject: [PATCH] SEBSERV-62 Model, DAO and service implementation --- pom.xml | 6 +- .../java/ch/ethz/seb/sebserver/SEBServer.java | 8 +- .../sebserver/gbl/model/exam/Indicator.java | 22 ++- .../gbl/model/session/ClientConnection.java | 2 +- .../model/session/ClientConnectionData.java | 57 ++++++ .../gbl/model/session/ClientEvent.java | 36 +++- .../gbl/model/session/IndicatorValue.java | 20 ++ .../model/session/IndicatorValueHolder.java | 19 ++ .../model/session/SimpleIndicatorValue.java | 55 ++++++ .../servicelayer/dao/ClientEventDAO.java | 15 ++ .../webservice/servicelayer/dao/ExamDAO.java | 5 + .../servicelayer/dao/FilterMap.java | 32 ++++ .../dao/impl/ClientConnectionDAOImpl.java | 3 +- .../dao/impl/ClientEventDAOImpl.java | 172 ++++++++++++++++++ .../servicelayer/dao/impl/ExamDAOImpl.java | 17 ++ .../servicelayer/session/ClientIndicator.java | 39 ++++ .../session/ClientIndicatorService.java | 13 ++ .../session/EventHandlingStrategy.java | 21 +++ .../session/ExamSessionService.java | 29 +++ .../session/SebClientConnectionService.java | 25 +++ .../session/impl/AbstractClientIndicator.java | 61 +++++++ .../session/impl/AbstractPingIndicator.java | 40 ++++ .../impl/AsyncBatchEventSaveStrategy.java | 156 ++++++++++++++++ .../impl/ClientConnectionDataInternal.java | 54 ++++++ .../session/impl/ClientIndicatorFactory.java | 79 ++++++++ .../impl/ErrorCountClientIndicator.java | 71 ++++++++ .../session/impl/ExamSessionCacheService.java | 132 ++++++++++++++ .../session/impl/ExamSessionServiceImpl.java | 114 ++++++++++++ .../impl/PingIntervalClientIndicator.java | 47 +++++ .../session/impl/SingleEventSaveStrategy.java | 43 +++++ .../config/application-dev-ws.properties | 1 + .../impl/PingIntervalClientIndicatorTest.java | 52 ++++++ 32 files changed, 1433 insertions(+), 13 deletions(-) create mode 100644 src/main/java/ch/ethz/seb/sebserver/gbl/model/session/ClientConnectionData.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/gbl/model/session/IndicatorValue.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/gbl/model/session/IndicatorValueHolder.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/gbl/model/session/SimpleIndicatorValue.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/ClientEventDAO.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ClientEventDAOImpl.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ClientIndicator.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ClientIndicatorService.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/EventHandlingStrategy.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ExamSessionService.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/SebClientConnectionService.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AbstractClientIndicator.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AbstractPingIndicator.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AsyncBatchEventSaveStrategy.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ClientConnectionDataInternal.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ClientIndicatorFactory.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ErrorCountClientIndicator.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionCacheService.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamSessionServiceImpl.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/PingIntervalClientIndicator.java create mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SingleEventSaveStrategy.java create mode 100644 src/test/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/PingIntervalClientIndicatorTest.java diff --git a/pom.xml b/pom.xml index a3280ec5..2003ba40 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ **/batis/mapper/*.java **/batis/model/*.java - + @@ -242,6 +242,10 @@ org.springframework.boot spring-boot-starter-security + + org.springframework.boot + spring-boot-starter-cache +