diff artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java @ 127:0245a87df368

Made the user factory available in the artifact database. artifacts/trunk@1351 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 01 Mar 2011 18:45:34 +0000
parents 0e0c27bc0b90
children 147610c43863
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java	Tue Mar 01 17:49:17 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java	Tue Mar 01 18:45:34 2011 +0000
@@ -350,6 +350,11 @@
     protected HashMap     name2service;
 
     /**
+     * The factory that is used to create and list users.
+     */
+    protected UserFactory userFactory;
+
+    /**
      * Reference to the storage backend.
      */
     protected Backend     backend;
@@ -399,6 +404,7 @@
 
         setupArtifactFactories(bootstrap);
         setupServices(bootstrap);
+        setupUserFactory(bootstrap);
 
         context      = bootstrap.getContext();
         exportSecret = bootstrap.getExportSecret();
@@ -431,6 +437,14 @@
         }
     }
 
+
+    /**
+     * Used to extract the user factory from the bootstrap.
+     */
+    protected void setupUserFactory(FactoryBootstrap bootstrap) {
+        userFactory = bootstrap.getUserFactory();
+    }
+
     /**
      * Used to extract the service factories from the bootstrap
      * parameters, setting up the services and building the internal

http://dive4elements.wald.intevation.org