KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/configuration/I_CmsXmlConfiguration.java,v $
3  * Date : $Date: 2005/06/23 11:11:38 $
4  * Version: $Revision: 1.21 $
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.apache.commons.digester.Digester;
35
36 import org.dom4j.Element;
37
38 /**
39  * Each configurable element in OpenCms must implement this interface.<p>
40  *
41  * @author Alexander Kandzior
42  *
43  * @version $Revision: 1.21 $
44  *
45  * @since 6.0.0
46  */

47 public interface I_CmsXmlConfiguration extends I_CmsConfigurationParameterHandler {
48
49     /** The alias attribute. */
50     String JavaDoc A_ALIAS = "alias";
51
52     /** The "class" attribute. */
53     String JavaDoc A_CLASS = "class";
54
55     /** The "count" attribute. */
56     String JavaDoc A_COUNT = "count";
57
58     /** The "destination" attribute. */
59     String JavaDoc A_DESTINATION = "destination";
60
61     /** The "enabled" attibute. */
62     String JavaDoc A_ENABLED = "enabled";
63
64     /** The "from" attribute. */
65     String JavaDoc A_FROM = "from";
66
67     /** The "handler" attribute. */
68     String JavaDoc A_HANDLER = "handler";
69
70     /** The "icon" attribute. */
71     String JavaDoc A_ICON = "icon";
72
73     /** The "id" attribute. */
74     String JavaDoc A_ID = "id";
75
76     /** The "key" attribute. */
77     String JavaDoc A_KEY = "key";
78
79     /** The "name" attribute. */
80     String JavaDoc A_NAME = "name";
81
82     /** The "order" attribute. */
83     String JavaDoc A_ORDER = "order";
84
85     /** The "password" attribute. */
86     String JavaDoc A_PASSWORD = "password";
87
88     /** The "protocol" attribute. */
89     String JavaDoc A_PROTOCOL = "protocol";
90
91     /** The suffix attribute. */
92     String JavaDoc A_SUFFIX = "suffix";
93
94     /** The "to" attribute. */
95     String JavaDoc A_TO = "to";
96
97     /** The "type" attribute. */
98     String JavaDoc A_TYPE = "type";
99
100     /** The "uri" attribute. */
101     String JavaDoc A_URI = "uri";
102
103     /** The "user" attribute. */
104     String JavaDoc A_USER = "user";
105
106     /** The "value" attribute. */
107     String JavaDoc A_VALUE = "value";
108
109     /** Individual export point node. */
110     String JavaDoc N_EXPORTPOINT = "exportpoint";
111
112     /** Export points master node. */
113     String JavaDoc N_EXPORTPOINTS = "exportpoints";
114
115     /** An individual name node. */
116     String JavaDoc N_NAME = "name";
117
118     /** The "param" node name for generic parameters. */
119     String JavaDoc N_PARAM = "param";
120
121     /** An individual property node. */
122     String JavaDoc N_PROPERTY = "property";
123
124     /** An individual resource node. */
125     String JavaDoc N_RESOURCE = "resource";
126
127     /** An individual site node. */
128     String JavaDoc N_SITE = "site";
129
130     /** An individual value node. */
131     String JavaDoc N_VALUE = "value";
132
133     /**
134      * Digests an XML node and creates an instance of this configurable class.<p>
135      *
136      * @param digester the digester to use
137      */

138     void addXmlDigesterRules(Digester digester);
139
140     /**
141      * Generates the XML element for this configurable class.<p>
142      *
143      * @param parent the parent element in the XML tree
144      * @return the XML element for this configurable class
145      */

146     Element generateXml(Element parent);
147
148     /**
149      * Returns the name of the DTD file for this XML configuration,
150      * e.g. <code>opencms-configuration.dtd</code>.<p>
151      *
152      * @return the name of the DTD file for this XML configuration
153      * @see #getDtdSystemLocation()
154      * @see #getDtdUrlPrefix()
155      */

156     String JavaDoc getDtdFilename();
157
158     /**
159      * Returns the internal system location of the DTD file for this XML configuration,
160      * e.g. <code>org/opencms/configuration/</code>.<p>
161      *
162      * If this is not <code>null</code>, then the DTD is not read through the
163      * web URL, but an internal name resolution is added that resolves the
164      * system id of the DTD to
165      * <code>{@link #getDtdSystemLocation()} + {@link #getDtdUrlPrefix()}</code>.<p>
166      *
167      * @return the system location of the DTD file for this XML configuration
168      * @see #getDtdUrlPrefix()
169      * @see #getDtdFilename()
170      */

171     String JavaDoc getDtdSystemLocation();
172
173     /**
174      * Returns the external system id prefix of the DTD file for this XML configuration,
175      * e.g. <code>http://www.opencms.org/dtd/6.0/</code>.<p>
176      *
177      * The full system id for the DTD is calculated like this:
178      * <code>{@link #getDtdSystemLocation()} + {@link #getDtdUrlPrefix()}</code>.<p>
179      *
180      * @return the system id prefix of the DTD file for this XML configuration
181      * @see #getDtdSystemLocation()
182      * @see #getDtdFilename()
183      */

184     String JavaDoc getDtdUrlPrefix();
185
186     /**
187      * Returns the name of the XML input file for this configuration,
188      * e.g. <code>opencms.xml</code>.<p>
189      *
190      * @return the name of the XML input file for this configuration
191      */

192     String JavaDoc getXmlFileName();
193 }
Popular Tags