X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FSingleRouterConfig.java;h=40cbcc5116234491680c7a9428f0d3e5201c7017;hb=ef3c789029b09fe8bc279a07a7b2208e286957f0;hp=5e2fffe4829009b1d67cc26c8f66bc2808b776a7;hpb=e52385618670b54a5c6a4f2fbfab381bef43a905;p=xmlrouter diff --git a/impl/src/main/java/org/wamblee/xmlrouter/impl/SingleRouterConfig.java b/impl/src/main/java/org/wamblee/xmlrouter/impl/SingleRouterConfig.java index 5e2fffe..40cbcc5 100644 --- a/impl/src/main/java/org/wamblee/xmlrouter/impl/SingleRouterConfig.java +++ b/impl/src/main/java/org/wamblee/xmlrouter/impl/SingleRouterConfig.java @@ -22,6 +22,9 @@ import org.wamblee.xmlrouter.config.Filter; import org.wamblee.xmlrouter.config.RouterConfig; import org.wamblee.xmlrouter.config.Transformation; +// TODO implement equality based on ids for the single routerconfig. +// TODO implement copying of routerconfig. + /** * Represents a single configuration set of a single configuration client of the * XML router. @@ -37,34 +40,35 @@ 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 aId) { id = aId; documentTypes = new ConfigImpl(new Id( - "documentTypes")) { + aId.getId() + ".documenttypes")) { @Override - public DocumentType wrap(DocumentType aT) { - return new RobustDocumentType(aT); + public DocumentType wrap(String aPrefix, DocumentType aT) { + return new RobustDocumentType(aPrefix, aT); } }; transformations = new ConfigImpl(new Id( - "transformations")) { + aId.getId() + ".transformations")) { @Override - public Transformation wrap(Transformation aTransformation) { - return new RobustTransformation(aTransformation); + public Transformation wrap(String aPrefix, + Transformation aTransformation) { + return new RobustTransformation(aPrefix, aTransformation); } }; - filters = new ConfigImpl(new Id("filters")) { + filters = new ConfigImpl(new Id(aId.getId() + + ".filters")) { @Override - public Filter wrap(Filter aFilter) { - return new RobustFilter(aFilter); + public Filter wrap(String aPrefix, Filter aFilter) { + return new RobustFilter(aPrefix, aFilter); } }; } - // TODO test getId. @Override public Id getId() { return id;