diff gnv/src/main/java/de/intevation/gnv/propertiesreader/PropertiesReaderFactory.java @ 36:ad381cc47217

Format Code to max 80 Chars per Row gnv/trunk@172 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 02 Oct 2009 08:54:13 +0000
parents fe6a64545552
children fccf90761825
line wrap: on
line diff
--- a/gnv/src/main/java/de/intevation/gnv/propertiesreader/PropertiesReaderFactory.java	Fri Oct 02 08:49:18 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/propertiesreader/PropertiesReaderFactory.java	Fri Oct 02 08:54:13 2009 +0000
@@ -11,18 +11,15 @@
 
 /**
  * @author Tim Englich <tim.englich@intevation.de>
- *
+ * 
  */
 public class PropertiesReaderFactory {
 
-
-    
     /**
      * the logger, used to log exceptions and additonaly information
      */
     private static Logger log = Logger.getLogger(PropertiesReaderFactory.class);
 
-    
     /**
      * The singleton Instance of this Factory.
      */
@@ -32,6 +29,7 @@
      * The ConnectionPool providing the Connections to the DatabaseBackends
      */
     private PropertiesReader propertiesReader = null;
+
     /**
      * Constructor
      */
@@ -41,37 +39,43 @@
 
     /**
      * This Method provides an singleton Instance of this Class.
+     * 
      * @return an singleton Instance of this Class
      */
-    public static PropertiesReaderFactory getInstance(){
-        if (instance == null){
+    public static PropertiesReaderFactory getInstance() {
+        if (instance == null) {
             instance = new PropertiesReaderFactory();
         }
         return instance;
     }
-    
-    
+
     /**
      * Getting the ConnectionPool
+     * 
      * @return the ConnectionPool
      */
-    public PropertiesReader getPropertiesReader(){
+    public PropertiesReader getPropertiesReader() {
         return this.propertiesReader;
     }
-    
+
     /**
      * Getting the ConnectionPool
-     * @param config The Config that should be read
+     * 
+     * @param config
+     *            The Config that should be read
      */
-    public void initPropertiesReader(Object config){
-        if (config instanceof ServletConfig){
-            this.propertiesReader = new ServletPropertiesReader((ServletConfig)config);
-        }else if (config instanceof Map){
-            this.propertiesReader = new MapPropertiesReader((Map<String, String>)config);
-        }else{
-            log.error("No PropertiesReader for Instance "+ config.getClass().getName());
+    public void initPropertiesReader(Object config) {
+        if (config instanceof ServletConfig) {
+            this.propertiesReader = new ServletPropertiesReader(
+                    (ServletConfig) config);
+        } else if (config instanceof Map) {
+            this.propertiesReader = new MapPropertiesReader(
+                    (Map<String, String>) config);
+        } else {
+            log.error("No PropertiesReader for Instance "
+                    + config.getClass().getName());
         }
-        
+
     }
 
 }

http://dive4elements.wald.intevation.org