X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=config%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fconfig%2FConfig.java;h=17c0c4123255acb198018268dcaee089d4378c46;hb=75f42f00e16ceee9ea333e598c9287de20ede1c3;hp=b90b34c4bfb58a0739d760d0b545a139bf19df0c;hpb=b2375f35a2f897e1417e8b5ec5b19b3257a11586;p=xmlrouter diff --git a/config/src/main/java/org/wamblee/xmlrouter/config/Config.java b/config/src/main/java/org/wamblee/xmlrouter/config/Config.java index b90b34c..17c0c41 100644 --- a/config/src/main/java/org/wamblee/xmlrouter/config/Config.java +++ b/config/src/main/java/org/wamblee/xmlrouter/config/Config.java @@ -15,29 +15,29 @@ */ package org.wamblee.xmlrouter.config; -import java.util.Collection; +import java.util.List; import org.wamblee.xmlrouter.common.Id; /** - * Basic configuration interface for managing a set of configuration items of a - * given type with unique ids. + * Interface for managing a set of configuration items of a given type with + * unique ids. * * @author Erik Brakkee * * @param * Type for which ids are generated. */ -public interface Config { - +public interface Config extends Identifiable { /** - * Adds a item + * Adds an item. No item with the same id may exist. * * @param aT * item - * @return Unique id. + * @throws ConfigException + * In case an object with the same id already exists. */ - Id add(T aT); + void add(T aT); /** * Removes the item with a given id. @@ -49,17 +49,7 @@ public interface Config { boolean remove(Id aId); /** - * @return All available ids. - */ - Collection> ids(); - - /** - * Gets the item for the given id. - * - * @param aId - * Item id. - * @return Item, or null if not found. + * @return All available items. */ - T get(Id aId); - + List values(); } \ No newline at end of file