001: /*
002: * File : $Source: /usr/local/cvs/opencms/src/org/opencms/configuration/I_CmsXmlConfiguration.java,v $
003: * Date : $Date: 2008-02-27 12:05:48 $
004: * Version: $Revision: 1.24 $
005: *
006: * This library is part of OpenCms -
007: * the Open Source Content Management System
008: *
009: * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010: *
011: * This library is free software; you can redistribute it and/or
012: * modify it under the terms of the GNU Lesser General Public
013: * License as published by the Free Software Foundation; either
014: * version 2.1 of the License, or (at your option) any later version.
015: *
016: * This library is distributed in the hope that it will be useful,
017: * but WITHOUT ANY WARRANTY; without even the implied warranty of
018: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: * Lesser General Public License for more details.
020: *
021: * For further information about Alkacon Software GmbH, please see the
022: * company website: http://www.alkacon.com
023: *
024: * For further information about OpenCms, please see the
025: * project website: http://www.opencms.org
026: *
027: * You should have received a copy of the GNU Lesser General Public
028: * License along with this library; if not, write to the Free Software
029: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030: */
031:
032: package org.opencms.configuration;
033:
034: import org.apache.commons.digester.Digester;
035:
036: import org.dom4j.Element;
037:
038: /**
039: * Each configurable element in OpenCms must implement this interface.<p>
040: *
041: * @author Alexander Kandzior
042: *
043: * @version $Revision: 1.24 $
044: *
045: * @since 6.0.0
046: */
047: public interface I_CmsXmlConfiguration extends
048: I_CmsConfigurationParameterHandler {
049:
050: /** The "alias" attribute. */
051: String A_ALIAS = "alias";
052:
053: /** The "class" attribute. */
054: String A_CLASS = "class";
055:
056: /** The "count" attribute. */
057: String A_COUNT = "count";
058:
059: /** The "default" attribute. */
060: String A_DEFAULT = "default";
061:
062: /** The "destination" attribute. */
063: String A_DESTINATION = "destination";
064:
065: /** The "enabled" attibute. */
066: String A_ENABLED = "enabled";
067:
068: /** The "from" attribute. */
069: String A_FROM = "from";
070:
071: /** The "handler" attribute. */
072: String A_HANDLER = "handler";
073:
074: /** The "icon" attribute. */
075: String A_ICON = "icon";
076:
077: /** The "id" attribute. */
078: String A_ID = "id";
079:
080: /** The "key" attribute. */
081: String A_KEY = "key";
082:
083: /** The "name" attribute. */
084: String A_NAME = "name";
085:
086: /** The "order" attribute. */
087: String A_ORDER = "order";
088:
089: /** The "password" attribute. */
090: String A_PASSWORD = "password";
091:
092: /** The "protocol" attribute. */
093: String A_PROTOCOL = "protocol";
094:
095: /** The suffix attribute. */
096: String A_SUFFIX = "suffix";
097:
098: /** The "to" attribute. */
099: String A_TO = "to";
100:
101: /** The "type" attribute. */
102: String A_TYPE = "type";
103:
104: /** The "uri" attribute. */
105: String A_URI = "uri";
106:
107: /** The "user" attribute. */
108: String A_USER = "user";
109:
110: /** The "value" attribute. */
111: String A_VALUE = "value";
112:
113: /** Individual export point node. */
114: String N_EXPORTPOINT = "exportpoint";
115:
116: /** Export points master node. */
117: String N_EXPORTPOINTS = "exportpoints";
118:
119: /** An individual name node. */
120: String N_NAME = "name";
121:
122: /** The "param" node name for generic parameters. */
123: String N_PARAM = "param";
124:
125: /** An individual property node. */
126: String N_PROPERTY = "property";
127:
128: /** An individual resource node. */
129: String N_RESOURCE = "resource";
130:
131: /** An individual site node. */
132: String N_SITE = "site";
133:
134: /** An individual value node. */
135: String N_VALUE = "value";
136:
137: /**
138: * Digests an XML node and creates an instance of this configurable class.<p>
139: *
140: * @param digester the digester to use
141: */
142: void addXmlDigesterRules(Digester digester);
143:
144: /**
145: * Generates the XML element for this configurable class.<p>
146: *
147: * @param parent the parent element in the XML tree
148: * @return the XML element for this configurable class
149: */
150: Element generateXml(Element parent);
151:
152: /**
153: * Returns the name of the DTD file for this XML configuration,
154: * e.g. <code>opencms-configuration.dtd</code>.<p>
155: *
156: * @return the name of the DTD file for this XML configuration
157: * @see #getDtdSystemLocation()
158: * @see #getDtdUrlPrefix()
159: */
160: String getDtdFilename();
161:
162: /**
163: * Returns the internal system location of the DTD file for this XML configuration,
164: * e.g. <code>org/opencms/configuration/</code>.<p>
165: *
166: * If this is not <code>null</code>, then the DTD is not read through the
167: * web URL, but an internal name resolution is added that resolves the
168: * system id of the DTD to
169: * <code>{@link #getDtdSystemLocation()} + {@link #getDtdUrlPrefix()}</code>.<p>
170: *
171: * @return the system location of the DTD file for this XML configuration
172: * @see #getDtdUrlPrefix()
173: * @see #getDtdFilename()
174: */
175: String getDtdSystemLocation();
176:
177: /**
178: * Returns the external system id prefix of the DTD file for this XML configuration,
179: * e.g. <code>http://www.opencms.org/dtd/6.0/</code>.<p>
180: *
181: * The full system id for the DTD is calculated like this:
182: * <code>{@link #getDtdSystemLocation()} + {@link #getDtdUrlPrefix()}</code>.<p>
183: *
184: * @return the system id prefix of the DTD file for this XML configuration
185: * @see #getDtdSystemLocation()
186: * @see #getDtdFilename()
187: */
188: String getDtdUrlPrefix();
189:
190: /**
191: * Returns the name of the XML input file for this configuration,
192: * e.g. <code>opencms.xml</code>.<p>
193: *
194: * @return the name of the XML input file for this configuration
195: */
196: String getXmlFileName();
197: }
|