KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > interfaces > ConfigurationRepository


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.interfaces;
9
10 import org.apache.avalon.framework.configuration.Configuration;
11 import org.apache.avalon.framework.configuration.ConfigurationException;
12
13 /**
14  * Repository from which all configuration data is retrieved.
15  *
16  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
17  */

18 public interface ConfigurationRepository
19 {
20     String JavaDoc ROLE = ConfigurationRepository.class.getName();
21
22     /**
23      * Retrieve configuration information from the repository
24      *
25      * @param application Application name
26      * @param block Block name to get configuration for
27      *
28      * @return Configuration information
29      *
30      * @throws ConfigurationException if no configuration could be found
31      */

32     Configuration getConfiguration( String JavaDoc application, String JavaDoc block )
33         throws ConfigurationException;
34
35     /**
36      * Store configuration information in the repository
37      *
38      * @param application Application name
39      * @param block Block name to store configuration for
40      * @param configuration information to store.
41      *
42      * @throws ConfigurationException if configuration could not be stored
43      */

44     void storeConfiguration( String JavaDoc application,
45                              String JavaDoc block,
46                              Configuration configuration )
47         throws ConfigurationException;
48
49     /**
50      * Remove configuration information in the repository
51      *
52      * @param application Application name
53      * @param block Block name to store configuration for
54      * @param configuration information to store.
55      *
56      * @throws ConfigurationException if configuration could not be removed
57      */

58     void removeConfiguration( String JavaDoc application,
59                               String JavaDoc block )
60         throws ConfigurationException;
61 }
62
Popular Tags