01: /*
02: * Created on Nov 15, 2005
03: */
04: package uk.org.ponder.rsf.renderer;
05:
06: import java.util.HashMap;
07:
08: import uk.org.ponder.messageutil.TargettedMessage;
09: import uk.org.ponder.messageutil.TargettedMessageList;
10: import uk.org.ponder.rsf.template.XMLLump;
11:
12: public class MessageTargetMap {
13: private HashMap map = new HashMap();
14:
15: public void setTarget(XMLLump forlump, TargettedMessage message) {
16: TargettedMessageList messages = (TargettedMessageList) map
17: .get(forlump);
18: if (messages == null) {
19: messages = new TargettedMessageList();
20: map.put(forlump, messages);
21: }
22: messages.addMessage(message);
23: }
24:
25: public TargettedMessageList getMessages(XMLLump forlump) {
26: return (TargettedMessageList) map.get(forlump);
27: }
28:
29: }
|