simplifications.
[xmlrouter] / impl / src / main / java / org / wamblee / xmlrouter / impl / SingleRouterConfig.java
index cc778fe7c707928fc10ef6673390d8a30c1cbff4..40cbcc5116234491680c7a9428f0d3e5201c7017 100644 (file)
@@ -23,7 +23,6 @@ import org.wamblee.xmlrouter.config.RouterConfig;
 import org.wamblee.xmlrouter.config.Transformation;
 
 // TODO implement equality based on ids for the single routerconfig. 
-// TODO add clear method to the routerconfig
 // TODO implement copying of routerconfig. 
 
 /**
@@ -41,27 +40,28 @@ public class SingleRouterConfig implements ExtendedRouterConfig {
     /**
      * Constructs a router configuration.
      * 
-     * @param aSequenceNumberGenerator
-     *            Sequence number generator to use.
+     * @param aId
+     *            Unique id for this configuration.
      */
     public SingleRouterConfig(Id<RouterConfig> aId) {
         id = aId;
         documentTypes = new ConfigImpl<DocumentType>(new Id<Config>(
-            "documentTypes")) {
+            aId.getId() + ".documenttypes")) {
             @Override
             public DocumentType wrap(String aPrefix, DocumentType aT) {
                 return new RobustDocumentType(aPrefix, aT);
             }
         };
         transformations = new ConfigImpl<Transformation>(new Id<Config>(
-            "transformations")) {
+            aId.getId() + ".transformations")) {
             @Override
             public Transformation wrap(String aPrefix,
                 Transformation aTransformation) {
                 return new RobustTransformation(aPrefix, aTransformation);
             }
         };
-        filters = new ConfigImpl<Filter>(new Id<Config>("filters")) {
+        filters = new ConfigImpl<Filter>(new Id<Config>(aId.getId() +
+            ".filters")) {
             @Override
             public Filter wrap(String aPrefix, Filter aFilter) {
                 return new RobustFilter(aPrefix, aFilter);
@@ -69,7 +69,6 @@ public class SingleRouterConfig implements ExtendedRouterConfig {
         };
     }
 
-    // TODO test getId.
     @Override
     public Id<RouterConfig> getId() {
         return id;