KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > configuration > I_CmsConfigurationParameterHandler


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/configuration/I_CmsConfigurationParameterHandler.java,v $
3  * Date : $Date: 2005/06/27 23:22:20 $
4  * Version: $Revision: 1.9 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.configuration;
33
34 import java.util.Map JavaDoc;
35
36 /**
37  * Used for classes that are configurable using
38  * <code>&lt;param name="name"&gt;value&lt;/param&gt;</code>
39  * in the XML configuration.<p>
40  *
41  * Such "param" nodes can be used to add some arbitary names
42  * parameters to classes that otherwise share the same XML configuration.
43  *
44  * @author Alexander Kandzior
45  *
46  * @version $Revision: 1.9 $
47  *
48  * @since 6.0.0
49  */

50 public interface I_CmsConfigurationParameterHandler {
51     
52     /** The name of the addConfigurationParameter() method. */
53     String JavaDoc ADD_PARAMETER_METHOD = "addConfigurationParameter";
54     
55     /** The name of the initConfiguration() method. */
56     String JavaDoc INIT_CONFIGURATION_METHOD = "initConfiguration";
57     
58     /**
59      * Adds a configuration parameter to this parameter configurable class instance.<p>
60      *
61      * @param paramName the name of the parameter
62      * @param paramValue the value for the parameter
63      */

64     void addConfigurationParameter(String JavaDoc paramName, String JavaDoc paramValue);
65     
66     /**
67      * Returns the configuration of this parameter configurable class instance,
68      * or <code>null</code> if the class does not need to be configured.<p>
69      *
70      * All elements in the configuration are key, value String pairs,
71      * set using the {@link #addConfigurationParameter(String, String)} method
72      * during initialization of the loader.<p>
73      *
74      * Implementations will (should) not to return a direct reference to
75      * the internal configuration but just a copy of it, to avoid
76      * unwanted external manipulation.<p>
77      *
78      * @return the configuration of this resource loader, or <code>null</code>
79      */

80     Map JavaDoc getConfiguration();
81     
82     /**
83      * Initializes a configuration after all parameters have been added.<p>
84      *
85      * @throws CmsConfigurationException if something goes wrong
86      */

87     void initConfiguration() throws CmsConfigurationException;
88 }
89
Popular Tags