01: /*
02: * Created on Jan 6, 2005
03: */
04: package uk.org.ponder.servletutil;
05:
06: import java.util.HashMap;
07: import java.util.List;
08:
09: /**
10: * @author Antranig Basman (antranig@caret.cam.ac.uk)
11: *
12: */
13: public class ToolDispatcherCollection {
14: HashMap tools = new HashMap();
15:
16: public void setToolDispatchers(List toollist) {
17: for (int i = 0; i < toollist.size(); ++i) {
18: WebServiceDispatcher dispatcher = (WebServiceDispatcher) toollist
19: .get(i);
20: tools.put(dispatcher.getName(), dispatcher);
21: }
22: }
23:
24: public WebServiceDispatcher getDispatcher(String toolname) {
25: return ((WebServiceDispatcher) tools.get(toolname)).copy();
26: }
27: }
|