KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
20  * Definition of a Configuration Service
21  *
22  * @author gavinc
23  */

24 public interface ConfigService
25 {
26    /**
27     * Retrieves the configuration for the given object
28     *
29     * @param object The object to use as the basis of the lookup
30     * @return The Config object containing all the matching configuration data
31     */

32    public Config getConfig(Object JavaDoc object);
33
34    /**
35     * Retrieves the configuration for the given object using the given context
36     *
37     * @param object The object to use as the basis of the lookup
38     * @param context The context to use for the lookup
39     * @return The Config object containing all the matching configuration data
40     */

41    public Config getConfig(Object JavaDoc object, ConfigLookupContext context);
42    
43    /**
44     * Returns just the global configuration, this allows the config service to be
45     * used independently of objects if desired (all config is placed in a global section).
46     *
47     * @return The global config section or null if there isn't one
48     */

49    public Config getGlobalConfig();
50 }
51
Popular Tags