KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/configuration/A_CmsXmlConfiguration.java,v $
3  * Date : $Date: 2006/03/27 14:52:46 $
4  * Version: $Revision: 1.18 $
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 org.opencms.main.CmsLog;
35
36 import java.util.Map JavaDoc;
37
38 import org.apache.commons.logging.Log;
39
40 /**
41  * Abstract base implementation for xml configurations.<p>
42  *
43  * @author Alexander Kandzior
44  *
45  * @version $Revision: 1.18 $
46  *
47  * @since 6.0.0
48  */

49 public abstract class A_CmsXmlConfiguration implements I_CmsXmlConfiguration {
50
51     /** The log object for this class. */
52     private static final Log LOG = CmsLog.getLog(A_CmsXmlConfiguration.class);
53
54     /** The name of the XML file used for this configuration. */
55     private String JavaDoc m_xmlFileName;
56
57     /**
58      * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#addConfigurationParameter(java.lang.String, java.lang.String)
59      */

60     public void addConfigurationParameter(String JavaDoc paramName, String JavaDoc paramValue) {
61
62         // simple default configuration does not support parameters
63
if (LOG.isDebugEnabled()) {
64             LOG.debug(Messages.get().getBundle().key(Messages.LOG_ADD_CONFIG_PARAM_3, paramName, paramValue, this));
65         }
66     }
67
68     /**
69      * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#getConfiguration()
70      */

71     public Map JavaDoc getConfiguration() {
72
73         // simple default configuration does not support parameters
74
if (LOG.isDebugEnabled()) {
75             LOG.debug(Messages.get().getBundle().key(Messages.LOG_GET_CONFIGURATION_1, this));
76         }
77         return null;
78     }
79
80     /**
81      * @see org.opencms.configuration.I_CmsXmlConfiguration#getDtdSystemLocation()
82      */

83     public String JavaDoc getDtdSystemLocation() {
84
85         return CmsConfigurationManager.DEFAULT_DTD_LOCATION;
86     }
87
88     /**
89      * @see org.opencms.configuration.I_CmsXmlConfiguration#getDtdUrlPrefix()
90      */

91     public String JavaDoc getDtdUrlPrefix() {
92
93         return CmsConfigurationManager.DEFAULT_DTD_PREFIX;
94     }
95
96     /**
97      * @see org.opencms.configuration.I_CmsXmlConfiguration#getXmlFileName()
98      */

99     public String JavaDoc getXmlFileName() {
100
101         return m_xmlFileName;
102     }
103
104     /**
105      * @see org.opencms.configuration.I_CmsConfigurationParameterHandler#initConfiguration()
106      */

107     public void initConfiguration() {
108
109         // simple default configuration does not need to be initialized
110
if (LOG.isDebugEnabled()) {
111             LOG.debug(Messages.get().getBundle().key(Messages.LOG_INIT_CONFIGURATION_1, this));
112         }
113     }
114
115     /**
116      * Sets the file name of this XML configuration.<p>
117      *
118      * @param fileName the file name to set
119      */

120     protected void setXmlFileName(String JavaDoc fileName) {
121
122         m_xmlFileName = fileName;
123     }
124 }
125
Popular Tags