Config no longer implements Identifiable because this was in violation of the contrac...
[xmlrouter] / impl / src / main / java / org / wamblee / xmlrouter / impl / ConfigImpl.java
index 777ecd0ac2c45864328605eeff9955419197673a..ae2351f97d37c2e4ae08c5dd0d7a7d5ea090352a 100644 (file)
@@ -23,8 +23,6 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.wamblee.xmlrouter.common.Id;
-import org.wamblee.xmlrouter.config.Config;
-import org.wamblee.xmlrouter.config.ConfigException;
 import org.wamblee.xmlrouter.config.Identifiable;
 
 /**
@@ -38,17 +36,17 @@ public abstract class ConfigImpl<T extends Identifiable<T>> implements
     ExtendedConfig<T> {
 
     private Class<T> type;
-    private Id<Config> id;
+    private String prefix;
     private Map<Id<T>, T> registered;
 
     /**
      * Constructs the object.
      */
-    public ConfigImpl(Class<T> aType, Id<Config> aId) {
+    public ConfigImpl(Class<T> aType, String aPrefix) {
         notNull("type", aType);
-        notNull("id", aId);
+        notNull("id", aPrefix);
         type = aType;
-        id = aId;
+        prefix = aPrefix;
         registered = new HashMap<Id<T>, T>();
     }
 
@@ -65,7 +63,7 @@ public abstract class ConfigImpl<T extends Identifiable<T>> implements
      */
     public ConfigImpl(ConfigImpl<T> aConfig) {
         notNull("config", aConfig);
-        id = aConfig.id;
+        prefix = aConfig.prefix;
         registered = new HashMap<Id<T>, T>();
         for (Map.Entry<Id<T>, T> entry : aConfig.registered.entrySet()) {
             registered.put(entry.getKey(), entry.getValue());
@@ -73,8 +71,8 @@ public abstract class ConfigImpl<T extends Identifiable<T>> implements
     }
 
     @Override
-    public Id<Config> getId() {
-        return id;
+    public String getPrefix() {
+        return prefix;
     }
 
     /*