KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > config > Config


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.config;
18
19 import java.util.List JavaDoc;
20 import java.util.Map JavaDoc;
21
22 /**
23  * Definition of a object that represents the results of a lookup.
24  *
25  * @author gavinc
26  */

27 public interface Config
28 {
29     /**
30      * Returns the config element with the given name, if there is more
31      * than one with the given name the first one added is returned.
32      *
33      * @param name
34      * Name of the config element to retrieve
35      * @return The ConfigElement object or null if it doesn't exist
36      */

37     public ConfigElement getConfigElement(String JavaDoc name);
38
39     /**
40      * Returns the given config element as a list.
41      *
42      * @param name Name of the config element to retrieve
43      * @return A list of the config elements with the given name
44      * or null if it doesn't exist
45      */

46     public List JavaDoc<ConfigElement> getConfigElementList(String JavaDoc name);
47     
48     /**
49      * Returns all the config elements
50      *
51      * @return All the config elements
52      */

53     public Map JavaDoc<String JavaDoc, Object JavaDoc> getConfigElements();
54
55     /**
56      * Determines whether the given config element exists
57      *
58      * @param name The name of the config element to look for
59      * @return true if the config element exists
60      */

61     public boolean hasConfigElement(String JavaDoc name);
62     
63     // TODO: Add more methods to this interface to allow for easier client
64
// access to the results i.e. by using an XPath expression for
65
// example?
66
}
67
Popular Tags