01: /*
02: * Copyright (C) The DNA Group. All rights reserved.
03: *
04: * This software is published under the terms of the DNA
05: * Software License version 1.1, a copy of which has been included
06: * with this distribution in the LICENSE.txt file.
07: */
08: package org.codehaus.dna;
09:
10: /**
11: * This is the interface via which component
12: * resources can be accessed via keys.
13: *
14: * @version $Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $
15: */
16: public interface ResourceLocator {
17: /**
18: * Return resource registered with specified key.
19: *
20: * @param key the key
21: * @return the resource
22: * @throws MissingResourceException if unable to locate
23: * resource with specified key
24: */
25: Object lookup(String key) throws MissingResourceException;
26:
27: /**
28: * Return true if a resource exists with specified key.
29: *
30: * @param key the key
31: * @return true if a resource exists with specified key.
32: */
33: boolean contains(String key);
34: }
|