1.1 --- a/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 09 14:26:31 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 09 14:37:15 2020 +0200 1.3 @@ -28,25 +28,22 @@ 1.4 */ 1.5 package de.uapcore.lightpit; 1.6 1.7 -import de.uapcore.lightpit.entities.CoreDAOFactory; 1.8 +import de.uapcore.lightpit.dao.CoreDAOFactory; 1.9 +import de.uapcore.lightpit.dao.ModuleDao; 1.10 import de.uapcore.lightpit.entities.Module; 1.11 -import de.uapcore.lightpit.entities.ModuleDao; 1.12 -import java.sql.Connection; 1.13 -import java.sql.SQLException; 1.14 -import java.util.Collections; 1.15 -import java.util.HashMap; 1.16 -import java.util.List; 1.17 -import java.util.Map; 1.18 -import java.util.Optional; 1.19 -import java.util.concurrent.atomic.AtomicBoolean; 1.20 -import java.util.stream.Collectors; 1.21 +import org.slf4j.Logger; 1.22 +import org.slf4j.LoggerFactory; 1.23 + 1.24 import javax.servlet.Registration; 1.25 import javax.servlet.ServletContext; 1.26 import javax.servlet.ServletContextEvent; 1.27 import javax.servlet.ServletContextListener; 1.28 import javax.servlet.annotation.WebListener; 1.29 -import org.slf4j.Logger; 1.30 -import org.slf4j.LoggerFactory; 1.31 +import java.sql.Connection; 1.32 +import java.sql.SQLException; 1.33 +import java.util.*; 1.34 +import java.util.concurrent.atomic.AtomicBoolean; 1.35 +import java.util.stream.Collectors; 1.36 1.37 /** 1.38 * Scans registered servlets for LightPIT modules. 1.39 @@ -144,17 +141,17 @@ 1.40 dirty.set(true); 1.41 LOG.info("Modules loaded."); 1.42 } 1.43 - 1.44 + 1.45 /** 1.46 * Synchronizes module information with the database. 1.47 - * 1.48 + * <p> 1.49 * This must be called from the {@link AbstractLightPITServlet}. 1.50 * Admittedly the call will perform the synchronization once after reload 1.51 * and be a no-op, afterwards. 1.52 - * However, we since the DatabaseFacade might be loaded after the module 1.53 + * However, since the DatabaseFacade might be loaded after the module 1.54 * manager, we must defer the synchronization to the first request 1.55 * handled by the Servlet. 1.56 - * 1.57 + * 1.58 * @param db interface to the database 1.59 */ 1.60 public void syncWithDatabase(DatabaseFacade db) {