01: package org.concern.controller.spring;
02:
03: import org.concern.controller.ResourceLocator;
04:
05: import java.util.Map;
06: import java.util.HashMap;
07: import org.concern.controller.Controller;
08:
09: public class LocalResourceLocator implements ResourceLocator {
10: private Controller controller;
11:
12: Map resources = new HashMap();
13:
14: public LocalResourceLocator() {
15: }
16:
17: public LocalResourceLocator(Map resources) {
18: this .resources = resources;
19: }
20:
21: public Map getResources() {
22: return resources;
23: }
24:
25: public void setResources(Map resources) {
26: this .resources = resources;
27: }
28:
29: public Object lookup(String name) {
30: return resources.get(name);
31: }
32:
33: public void setController(Controller controller) {
34: this.controller = controller;
35: }
36: }
|