now making sure that ids re prefixed by the config id.
[xmlrouter] / impl / src / main / java / org / wamblee / xmlrouter / impl / ConfigImpl.java
index c561e364b287958a169a90eb611baa58769ed3fc..5beeed5c12da92ece9bb9833d39bbe0c0bc2241e 100644 (file)
@@ -31,6 +31,8 @@ import org.wamblee.xmlrouter.config.Identifiable;
  * 
  * @param <T>
  */
+// TODO make sure that each item inside this config is prefixed with the id of
+// the config.
 public abstract class ConfigImpl<T extends Identifiable> implements
     ExtendedConfig<T> {
 
@@ -60,7 +62,7 @@ public abstract class ConfigImpl<T extends Identifiable> implements
     public synchronized void add(T aT) {
         // TODO test duplicate ids.
         notNull(aT);
-        registered.add(wrap(aT));
+        registered.add(wrap(id.getId() + ".", aT));
     }
 
     /**
@@ -70,7 +72,7 @@ public abstract class ConfigImpl<T extends Identifiable> implements
      *            Object to wrap.
      * @return Wrapped object.
      */
-    public abstract T wrap(T aT);
+    public abstract T wrap(String aPrefix, T aT);
 
     /*
      * (non-Javadoc)