bloritsch 01/01/14 20:44:26
Modified: src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
Added: src/org/apache/cocoon/util Tag: xml-cocoon2 RoleUtils.java
Log:
Added initial support for simplified configuration. The attribute "type"
is to be used for the shorthand name, and the attribute role retains its
meaning.
Revision Changes Path
No revision
No revision
1.4.2.41 +8 -2 xml-cocoon/src/org/apache/cocoon/Cocoon.java
Index: Cocoon.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
retrieving revision 1.4.2.40
retrieving revision 1.4.2.41
diff -u -r1.4.2.40 -r1.4.2.41
--- Cocoon.java 2001/01/05 16:20:57 1.4.2.40
+++ Cocoon.java 2001/01/15 04:44:26 1.4.2.41
@@ -46,7 +46,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.4.2.40 $ $Date: 2001/01/05 16:20:57 $
+ * @version CVS $Revision: 1.4.2.41 $ $Date: 2001/01/15 04:44:26 $
*/
public class Cocoon
implements Component, Configurable, ComponentManager, Modifiable,
Processor, Constants {
@@ -188,8 +188,14 @@
Iterator e = conf.getChildren("component");
while (e.hasNext()) {
Configuration co = (Configuration) e.next();
- String role = co.getAttribute("role");
+ String type = co.getAttribute("type", "");
+ String role = co.getAttribute("role", "");
String className = co.getAttribute("class");
+
+ if (! type.equals("")) {
+ role = RoleUtils.lookup(type);
+ }
+
try {
log.debug("Adding component (" + role + " = " + className +
")");
componentManager.addComponent(role,ClassUtils.loadClass(className),co);
No revision
No revision
1.1.2.1 +47 -0
xml-cocoon/src/org/apache/cocoon/util/Attic/RoleUtils.java