src/java/de/uapcore/lightpit/AbstractLightPITServlet.java

changeset 17
d1036b776eee
parent 15
bb594abac796
child 18
a94b172c3a93
--- a/src/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Sat Dec 30 20:35:23 2017 +0100
+++ b/src/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Sat Dec 30 20:41:55 2017 +0100
@@ -84,6 +84,14 @@
         return (ModuleManager) getServletContext().getAttribute(ModuleManager.SC_ATTR_NAME);
     }
     
+    /**
+     * Gives implementing modules access to the {@link DatabaseFacade}.
+     * @return the database facade
+     */
+    protected final DatabaseFacade getDatabaseFacade() {
+        return (DatabaseFacade) getServletContext().getAttribute(DatabaseFacade.SC_ATTR_NAME);
+    }
+    
     private ResponseType invokeMapping(Method method, HttpServletRequest req, HttpServletResponse resp)
             throws IOException, ServletException {
         try {

mercurial