You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2002/02/12 10:21:10 UTC
cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap ActNodeBuilder.java ActionSetNodeBuilder.java RedirectToNodeBuilder.java SelectNodeBuilder.java
sylvain 02/02/12 01:21:10
Modified: src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap
ActNodeBuilder.java ActionSetNodeBuilder.java
RedirectToNodeBuilder.java SelectNodeBuilder.java
Log:
Fix bug #6386, plus some minor cleanup
Revision Changes Path
1.6 +1 -7 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/ActNodeBuilder.java
Index: ActNodeBuilder.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/ActNodeBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ActNodeBuilder.java 6 Feb 2002 18:22:28 -0000 1.5
+++ ActNodeBuilder.java 12 Feb 2002 09:21:10 -0000 1.6
@@ -55,9 +55,6 @@
package org.apache.cocoon.treeprocessor.sitemap;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -75,19 +72,16 @@
/**
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: ActNodeBuilder.java,v 1.5 2002/02/06 18:22:28 sylvain Exp $
+ * @version CVS $Id: ActNodeBuilder.java,v 1.6 2002/02/12 09:21:10 sylvain Exp $
*/
public class ActNodeBuilder extends AbstractParentProcessingNodeBuilder
implements LinkedProcessingNodeBuilder {
- private ComponentManager manager;
-
private ActSetNode actSetNode;
private String actSetName;
public ProcessingNode buildNode(Configuration config) throws Exception {
-
// Is it an action-set call ?
this.actSetName = config.getAttribute("set", null);
1.6 +1 -6 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/ActionSetNodeBuilder.java
Index: ActionSetNodeBuilder.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/ActionSetNodeBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ActionSetNodeBuilder.java 6 Feb 2002 18:22:28 -0000 1.5
+++ ActionSetNodeBuilder.java 12 Feb 2002 09:21:10 -0000 1.6
@@ -55,9 +55,6 @@
package org.apache.cocoon.treeprocessor.sitemap;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.thread.ThreadSafe;
@@ -73,12 +70,10 @@
/**
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: ActionSetNodeBuilder.java,v 1.5 2002/02/06 18:22:28 sylvain Exp $
+ * @version CVS $Id: ActionSetNodeBuilder.java,v 1.6 2002/02/12 09:21:10 sylvain Exp $
*/
public class ActionSetNodeBuilder extends AbstractProcessingNodeBuilder implements ThreadSafe {
-
- private ComponentManager manager;
public ProcessingNode buildNode(Configuration config) throws Exception {
1.5 +15 -8 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/RedirectToNodeBuilder.java
Index: RedirectToNodeBuilder.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/RedirectToNodeBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RedirectToNodeBuilder.java 4 Feb 2002 14:39:53 -0000 1.4
+++ RedirectToNodeBuilder.java 12 Feb 2002 09:21:10 -0000 1.5
@@ -69,7 +69,7 @@
/**
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: RedirectToNodeBuilder.java,v 1.4 2002/02/04 14:39:53 cziegeler Exp $
+ * @version CVS $Id: RedirectToNodeBuilder.java,v 1.5 2002/02/12 09:21:10 sylvain Exp $
*/
public class RedirectToNodeBuilder extends AbstractProcessingNodeBuilder
@@ -84,15 +84,14 @@
}
public ProcessingNode buildNode(Configuration config) throws Exception {
-
+
// Is it a redirect to resource ?
- String uri = config.getAttribute("uri", null);
- if (uri != null) {
- ProcessingNode URINode = new RedirectToURINode(uri, config.getAttributeAsBoolean("session", false));
- return this.treeBuilder.setupNode(URINode, config);
+ this.resourceName = config.getAttribute("resource", null);
+ if (this.resourceName != null) {
+
+ getLogger().warn("Redirect to resource is deprecated. Use map:call instead at " +
+ config.getLocation());
- } else {
- this.resourceName = config.getAttribute("resource");
this.callNode = new CallNode();
this.treeBuilder.setupNode(this.callNode, config);
@@ -103,6 +102,14 @@
this.callNode.setParameters(params);
}
return this.callNode;
+
+ } else {
+ ProcessingNode URINode = new RedirectToURINode(
+ config.getAttribute("uri"),
+ config.getAttributeAsBoolean("session", false)
+ );
+ return this.treeBuilder.setupNode(URINode, config);
+
}
}
1.6 +6 -13 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/SelectNodeBuilder.java
Index: SelectNodeBuilder.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/treeprocessor/sitemap/SelectNodeBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SelectNodeBuilder.java 5 Feb 2002 20:32:50 -0000 1.5
+++ SelectNodeBuilder.java 12 Feb 2002 09:21:10 -0000 1.6
@@ -55,9 +55,6 @@
package org.apache.cocoon.treeprocessor.sitemap;
-import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.thread.ThreadSafe;
@@ -74,27 +71,23 @@
/**
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: SelectNodeBuilder.java,v 1.5 2002/02/05 20:32:50 sylvain Exp $
+ * @version CVS $Id: SelectNodeBuilder.java,v 1.6 2002/02/12 09:21:10 sylvain Exp $
*/
public class SelectNodeBuilder extends AbstractParentProcessingNodeBuilder implements ThreadSafe {
- private ComponentManager manager;
- private SelectNode node;
-
public ProcessingNode buildNode(Configuration config) throws Exception {
String type = this.treeBuilder.getTypeForStatement(config, Selector.ROLE + "Selector");
- this.node = new SelectNode(type);
- this.treeBuilder.setupNode(this.node, config);
- // Selector is set in linkNode() since it isn't visible now
+ SelectNode node = new SelectNode(type);
+ this.treeBuilder.setupNode(node, config);
// Lists of ProcessingNode[] and test resolvers for each "when"
List whenChildren = new ArrayList();
List whenTests = new ArrayList();
- // Nodes for otherwhise (if any)
+ // Nodes for otherwise (if any)
ProcessingNode[] otherwhiseNodes = null;
Configuration[] childrenConfig = config.getChildren();
@@ -131,12 +124,12 @@
}
}
- this.node.setCases(
+ node.setCases(
(ProcessingNode[][])whenChildren.toArray(new ProcessingNode[0][0]),
(MapStackResolver[])whenTests.toArray(new MapStackResolver[whenTests.size()]),
otherwhiseNodes
);
- return this.node;
+ return node;
}
}
----------------------------------------------------------------------
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