Implement spring Conduit bean registry and lots of cleanup
[jpim.git] / src / de / j32 / pimstuff / conduit / Registry.java
diff --git a/src/de/j32/pimstuff/conduit/Registry.java b/src/de/j32/pimstuff/conduit/Registry.java
new file mode 100644 (file)
index 0000000..6c10e97
--- /dev/null
@@ -0,0 +1,15 @@
+package de.j32.pimstuff.conduit;
+
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+public class Registry
+{
+       static ApplicationContext context_ = new FileSystemXmlApplicationContext("conduits.xml");
+       
+       public static Conduit get(String k)
+       {
+               return context_.getBean(k, Conduit.class);
+       }
+               
+}