01: /*
02: * $Id: DefaultResourceLocator.java 430 2005-04-14 13:51:34Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.org).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern.controller;
15:
16: import org.concern.controller.ResourceLocator;
17:
18: import java.util.Map;
19: import java.util.HashMap;
20: import org.concern.controller.Controller;
21:
22: public class DefaultResourceLocator implements ResourceLocator {
23: private Controller controller;
24:
25: Map resources = new HashMap();
26:
27: public DefaultResourceLocator() {
28: }
29:
30: public DefaultResourceLocator(Map resources) {
31: this .resources = resources;
32: }
33:
34: public Map getResources() {
35: return resources;
36: }
37:
38: public void setResources(Map resources) {
39: this .resources = resources;
40: }
41:
42: public Object lookup(String name) {
43: return resources.get(name);
44: }
45:
46: public void setController(Controller controller) {
47: this.controller = controller;
48: }
49: }
|