You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/06/04 10:31:18 UTC
cvs commit: xml-cocoon2/src/webapp/samples/portal sitemap.xmap
cziegeler 2002/06/04 01:31:18
Modified: src/java/org/apache/cocoon/components
CocoonComponentManager.java
src/webapp/samples/portal sitemap.xmap
Log:
Now it is possible to use the role hint for component configurations
Revision Changes Path
1.25 +11 -9 xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java
Index: CocoonComponentManager.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- CocoonComponentManager.java 4 Jun 2002 07:52:01 -0000 1.24
+++ CocoonComponentManager.java 4 Jun 2002 08:31:18 -0000 1.25
@@ -82,7 +82,7 @@
* and by handling the lookup of the <code>SourceResolver</code> (in development)
*
* @author <a href="mailto:cziegeler@org.com">Carsten Ziegeler</a>
- * @version CVS $Id: CocoonComponentManager.java,v 1.24 2002/06/04 07:52:01 cziegeler Exp $
+ * @version CVS $Id: CocoonComponentManager.java,v 1.25 2002/06/04 08:31:18 cziegeler Exp $
*/
public final class CocoonComponentManager
extends ExcaliburComponentManager
@@ -242,22 +242,24 @@
if (component instanceof SitemapConfigurable) {
for(int i=0; i < stack.size(); i++) {
Object[] o = (Object[])stack.get(i);
- Configuration cc = (Configuration)o[5];
- if ( null != cc ) {
- cc = cc.getChild( role, false );
+ Configuration parent = (Configuration)o[5];
+ if ( null != parent ) {
+ Configuration cc = parent.getChild( role, false );
if ( null != cc ) {
((SitemapConfigurable) component).setSitemapConfiguration(cc);
} else if ( null != this.roleManager) {
-/*
+
// check for hint
- Configuration[] childs = cc.getChildren();
+ Configuration[] childs = parent.getChildren();
if ( null != childs ) {
for(int m = 0; m < childs.length; m++) {
- System.out.println("Testing: " + childs[m].getName());
final String r = this.roleManager.getRoleForName(childs[m].getName());
- System.out.println("Role: " + r);
+ if ( role.equals(r) ) {
+ ((SitemapConfigurable) component).setSitemapConfiguration(childs[m]);
+ m = childs.length;
+ }
}
- }*/
+ }
}
}
}
1.2 +2 -2 xml-cocoon2/src/webapp/samples/portal/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/portal/sitemap.xmap,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sitemap.xmap 3 Jun 2002 11:45:53 -0000 1.1
+++ sitemap.xmap 4 Jun 2002 08:31:18 -0000 1.2
@@ -18,7 +18,7 @@
<map:pipelines>
<map:component-configurations>
- <org.apache.cocoon.webapps.authentication.components.AuthenticationManager>
+ <authentication-manager>
<handlers>
<handler name="portalhandler">
<redirect-to uri="cocoon://samples/portal/sunspotdemoportal"/>
@@ -58,7 +58,7 @@
</applications>
</handler>
</handlers>
- </org.apache.cocoon.webapps.authentication.components.AuthenticationManager>
+ </authentication-manager>
</map:component-configurations>
<map:pipeline>
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org