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 2003/05/16 09:12:31 UTC
cvs commit: cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source SitemapSource.java
cziegeler 2003/05/16 00:12:31
Modified: src/scratchpad/src/org/apache/cocoon/generation
JXFormsGenerator.java JXTemplateGenerator.java
src/deprecated/java/org/apache/cocoon/transformation
CachingCIncludeTransformer.java
src/deprecated/java/org/apache/cocoon/components/source/impl
AvalonToCocoonSource.java
src/java/org/apache/cocoon/environment
AbstractEnvironment.java
src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation
ConfigurationGenerator.java
src/deprecated/java/org/apache/cocoon/components/source
SitemapSource.java
Log:
Start removing automatic conversion
Revision Changes Path
1.16 +2 -2 cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JXFormsGenerator.java
Index: JXFormsGenerator.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JXFormsGenerator.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JXFormsGenerator.java 7 May 2003 11:36:18 -0000 1.15
+++ JXFormsGenerator.java 16 May 2003 07:12:27 -0000 1.16
@@ -86,7 +86,7 @@
* <p><a href="http://jakarta.apache.org/commons/jxpath"><em>JX</em>Path</a> based implementation of <a href="http://www.w3.org/TR/xforms"><em>XForms</em></a></p>
*/
-public class JXFormsGenerator extends AbstractGenerator {
+public class JXFormsGenerator extends ComposerGenerator {
private static final JXPathContextFactory
jxpathContextFactory = JXPathContextFactory.newInstance();
@@ -1211,7 +1211,7 @@
if (startEvent == null) {
long compileTime = inputSource.getLastModified();
Parser parser = new Parser();
- this.resolver.toSAX(this.inputSource, parser);
+ SourceUtil.parse(this.manager, this.inputSource, parser);
startEvent = parser.getStartEvent();
startEvent.compileTime = compileTime;
synchronized (cache) {
1.11 +3 -3 cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JXTemplateGenerator.java
Index: JXTemplateGenerator.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JXTemplateGenerator.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- JXTemplateGenerator.java 13 May 2003 12:57:54 -0000 1.10
+++ JXTemplateGenerator.java 16 May 2003 07:12:27 -0000 1.11
@@ -309,7 +309,7 @@
* </table>
* </pre></p>
*/
-public class JXTemplateGenerator extends AbstractGenerator {
+public class JXTemplateGenerator extends ComposerGenerator {
private static final JXPathContextFactory
jxpathContextFactory = JXPathContextFactory.newInstance();
@@ -2054,7 +2054,7 @@
if (startEvent == null) {
long compileTime = inputSource.getLastModified();
Parser parser = new Parser();
- this.resolver.toSAX(this.inputSource, parser);
+ SourceUtil.parse(this.manager, this.inputSource, parser);
startEvent = parser.getStartEvent();
startEvent.compileTime = compileTime;
synchronized (cache) {
@@ -2870,7 +2870,7 @@
if (doc == null) {
try {
Parser parser = new Parser();
- this.resolver.toSAX(input, parser);
+ SourceUtil.parse(this.manager, input, parser);
doc = parser.getStartEvent();
doc.compileTime = lastMod;
} catch (Exception exc) {
1.2 +3 -2 cocoon-2.1/src/deprecated/java/org/apache/cocoon/transformation/CachingCIncludeTransformer.java
Index: CachingCIncludeTransformer.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/transformation/CachingCIncludeTransformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CachingCIncludeTransformer.java 9 Mar 2003 00:07:15 -0000 1.1
+++ CachingCIncludeTransformer.java 16 May 2003 07:12:28 -0000 1.2
@@ -60,6 +60,7 @@
import org.apache.cocoon.caching.CacheValidity;
import org.apache.cocoon.caching.Cacheable;
import org.apache.cocoon.caching.IncludeCacheValidity;
+import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.xml.IncludeXMLConsumer;
@@ -216,7 +217,7 @@
Source source = null;
try {
source = this.sourceResolver.resolveURI(src);
- this.sourceResolver.toSAX(source, getConsumer());
+ SourceUtil.parse(this.manager, source, getConsumer());
} catch (Exception e) {
throw new SAXException("CachingCIncludeTransformer could not read resource", e);
} finally {
1.3 +9 -3 cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source/impl/AvalonToCocoonSource.java
Index: AvalonToCocoonSource.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source/impl/AvalonToCocoonSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AvalonToCocoonSource.java 16 Mar 2003 17:49:11 -0000 1.2
+++ AvalonToCocoonSource.java 16 May 2003 07:12:29 -0000 1.3
@@ -50,6 +50,7 @@
*/
package org.apache.cocoon.components.source.impl;
+import org.apache.avalon.framework.component.ComponentManager;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.environment.Environment;
@@ -85,15 +86,20 @@
/** The environment */
protected Environment environment;
+ /** The manager */
+ protected ComponentManager manager;
+
/**
* Constructor
*/
public AvalonToCocoonSource(Source source,
SourceResolver resolver,
- Environment environment) {
+ Environment environment,
+ ComponentManager manager) {
this.source = source;
this.resolver = resolver;
this.environment = environment;
+ this.manager = manager;
}
/**
@@ -170,7 +176,7 @@
public void toSAX(ContentHandler handler)
throws SAXException {
try {
- this.environment.toSAX(this.source, handler);
+ SourceUtil.parse(this.manager, this.source, handler);
} catch (ProcessingException pe) {
throw new SAXException("ProcessingException during streaming.", pe);
} catch (IOException ioe) {
1.13 +5 -4 cocoon-2.1/src/java/org/apache/cocoon/environment/AbstractEnvironment.java
Index: AbstractEnvironment.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/AbstractEnvironment.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- AbstractEnvironment.java 16 May 2003 07:04:55 -0000 1.12
+++ AbstractEnvironment.java 16 May 2003 07:12:29 -0000 1.13
@@ -365,8 +365,9 @@
try {
Class clazz = ClassUtils.loadClass("org.apache.cocoon.components.source.impl.AvalonToCocoonSource");
avalonToCocoonSourceWrapper = clazz.getConstructor(new Class[] {ClassUtils.loadClass("org.apache.excalibur.source.Source"),
- ClassUtils.loadClass("org.apache.excalibur.source.SourceResolver"),
- ClassUtils.loadClass("org.apache.cocoon.environment.Environment")});
+ ClassUtils.loadClass(SourceResolver.class.getName()),
+ ClassUtils.loadClass(Environment.class.getName()),
+ ClassUtils.loadClass(ComponentManager.class.getName())});
} catch (Exception e) {
throw new ProcessingException("The deprecated resolve() method of the environment was called."
+"Please either update your code to use the new resolveURI() method or"
@@ -377,7 +378,7 @@
try {
org.apache.excalibur.source.Source source = this.resolveURI( systemId );
Source wrappedSource;
- wrappedSource = (Source)avalonToCocoonSourceWrapper.newInstance(new Object[] {source, this.sourceResolver, this});
+ wrappedSource = (Source)avalonToCocoonSourceWrapper.newInstance(new Object[] {source, this.sourceResolver, this, this.manager});
return wrappedSource;
} catch (SourceException se) {
throw SourceUtil.handle(se);
1.3 +2 -2 cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation/ConfigurationGenerator.java
Index: ConfigurationGenerator.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation/ConfigurationGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConfigurationGenerator.java 4 May 2003 20:19:42 -0000 1.2
+++ ConfigurationGenerator.java 16 May 2003 07:12:29 -0000 1.3
@@ -676,7 +676,7 @@
null,
parameters,
this.resolver);
- this.resolver.toSAX(source, new DefaultHandler());
+ SourceUtil.parse(this.manager, source, new DefaultHandler());
} catch (SourceException se) {
throw SourceUtil.handle(se);
} finally {
1.3 +2 -2 cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source/SitemapSource.java
Index: SitemapSource.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/source/SitemapSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SitemapSource.java 12 Mar 2003 12:55:16 -0000 1.2
+++ SitemapSource.java 16 May 2003 07:12:29 -0000 1.3
@@ -331,7 +331,7 @@
consumer = new ContentHandlerWrapper(contentHandler);
}
if (this.redirectSource != null) {
- this.environment.toSAX(this.redirectSource, consumer);
+ SourceUtil.parse(this.manager, this.redirectSource, consumer);
} else {
// We have to buffer the result in order to get
// clean environment stack handling.