cziegeler 2004/05/24 04:26:40
Modified: src/java/org/apache/cocoon/environment SourceResolver.java
AbstractEnvironment.java
src/test/org/apache/cocoon/environment/mock
MockEnvironment.java
src/java/org/apache/cocoon/environment/wrapper
MutableEnvironmentFacade.java
. status.xml
src/documentation/xdocs/plan updating.xml
src/test/org/apache/cocoon/components/source
SourceResolverAdapter.java
Removed: src/deprecated/java/org/apache/cocoon/components/url
URLFactoryImpl.java URLFactory.java
ContextURLFactory.java ResourceURLFactory.java
src/deprecated/java/org/apache/cocoon/components/source
FileSourceFactory.java AbstractStreamSource.java
AbstractSAXSource.java CocoonSourceFactory.java
URLSource.java DelayedRefreshSourceWrapper.java
SitemapSource.java
AbstractStreamWriteableSource.java
SourceHandler.java ModifiableTraversableSource.java
TraversableSource.java FileSource.java
SourceHandlerImpl.java SourceFactory.java
src/deprecated/java/org/apache/cocoon/components/source/impl
URLFactoryWrapper.java SourceFactoryWrapper.java
AvalonToCocoonSource.java CocoonToAvalonSource.java
AvalonToCocoonSourceInvocationHandler.java
src/java/org/apache/cocoon/environment Source.java
src/deprecated/java/org/apache/cocoon/components/xslt
XSLTProcessor.java XSLTProcessorImpl.java
src/deprecated/java/org/apache/cocoon/environment
WriteableSource.java URLFactorySourceResolver.java
ModifiableSource.java
Log:
Remove deprecated XSLT Processor. Excalibur XMLUtils is used instead.
Remove deprecated Source handling. Excalibur Sourceresolve is used
instead.
Revision Changes Path
1.4 +1 -15
cocoon-2.1/src/java/org/apache/cocoon/environment/SourceResolver.java
Index: SourceResolver.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/SourceResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SourceResolver.java 5 Mar 2004 13:02:54 -0000 1.3
+++ SourceResolver.java 24 May 2004 11:26:39 -0000 1.4
@@ -15,11 +15,6 @@
*/
package org.apache.cocoon.environment;
-import java.io.IOException;
-
-import org.apache.cocoon.ProcessingException;
-import org.xml.sax.SAXException;
-
/**
* Base interface for resolving a source by system identifiers. This
* component is a special extension of the Avalon Excalibur
@@ -32,15 +27,6 @@
public interface SourceResolver
extends org.apache.excalibur.source.SourceResolver {
-
- /**
- * Resolve the source.
- * @param systemID This is either a system identifier
- * (<code>java.net.URL</code> or a local file.
- * @deprecated Use the resolveURI methods instead
- */
- Source resolve(String systemID)
- throws ProcessingException, SAXException, IOException;
}
1.21 +1 -61
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.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- AbstractEnvironment.java 24 May 2004 11:15:40 -0000 1.20
+++ AbstractEnvironment.java 24 May 2004 11:26:39 -0000 1.21
@@ -18,7 +18,6 @@
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
-import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.util.Enumeration;
import java.util.HashMap;
@@ -29,14 +28,11 @@
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.cocoon.Constants;
-import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.CocoonComponentManager;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.util.BufferedOutputStream;
-import org.apache.cocoon.util.ClassUtils;
import org.apache.commons.collections.iterators.IteratorEnumeration;
import org.apache.excalibur.source.SourceException;
-import org.xml.sax.SAXException;
/**
* Base class for any environment
@@ -87,9 +83,6 @@
/** The real output stream */
protected OutputStream outputStream;
- /** The AvalonToCocoonSourceWrapper (this is for the deprecated support)
*/
- static protected Method avalonToCocoonSourceWrapper;
-
/** Do we have our components ? */
protected boolean initializedComponents = false;
@@ -356,59 +349,6 @@
*/
public Map getObjectModel() {
return this.objectModel;
- }
-
- /**
- * Resolve an entity.
- * @deprecated Use the resolveURI methods instead
- */
- public Source resolve(String systemId)
- throws ProcessingException, SAXException, IOException {
- if ( !this.initializedComponents) {
- this.initComponents();
- }
- if (getLogger().isDebugEnabled()) {
- this.getLogger().debug("Resolving '"+systemId+"' in context '" +
this.context + "'");
- }
- if (systemId == null) throw new SAXException("Invalid System ID");
-
- // get the wrapper class - we don't want to import the wrapper
directly
- // to avoid a direct dependency from the core to the deprecation
package
- Class clazz;
- try {
- clazz =
ClassUtils.loadClass("org.apache.cocoon.components.source.impl.AvalonToCocoonSourceInvocationHandler");
- } 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"
- +" install the deprecation
support.", e);
- }
- if ( null == avalonToCocoonSourceWrapper ) {
- synchronized (this.getClass()) {
- try {
- avalonToCocoonSourceWrapper =
clazz.getDeclaredMethod("createProxy",
- new Class[]
{ClassUtils.loadClass("org.apache.excalibur.source.Source"),
-
ClassUtils.loadClass("org.apache.excalibur.source.SourceResolver"),
-
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"
- +" install the deprecation
support.", e);
- }
- }
-
- }
- try {
- org.apache.excalibur.source.Source source = this.resolveURI(
systemId );
- Source wrappedSource;
- wrappedSource = (Source)avalonToCocoonSourceWrapper.invoke(clazz,
- new Object[] {source, this.sourceResolver, this,
this.manager});
- return wrappedSource;
- } catch (SourceException se) {
- throw SourceUtil.handle(se);
- } catch (Exception e) {
- throw new ProcessingException("Unable to create source
wrapper.", e);
- }
}
/* (non-Javadoc)
1.8 +0 -12
cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java
Index: MockEnvironment.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MockEnvironment.java 18 Mar 2004 15:08:13 -0000 1.7
+++ MockEnvironment.java 24 May 2004 11:26:39 -0000 1.8
@@ -28,7 +28,6 @@
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.Source;
import org.apache.excalibur.source.SourceResolver;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
@@ -114,11 +113,6 @@
return status;
}
- public OutputStream getOutputStream() throws IOException {
- outputstream = new ByteArrayOutputStream();
- return outputstream;
- }
-
public OutputStream getOutputStream(int bufferSize) throws IOException {
outputstream = new ByteArrayOutputStream();
return outputstream;
@@ -172,12 +166,6 @@
throw new AssertionFailedError("Not implemented");
}
-
- public Source resolve(String systemID)
- throws ProcessingException, SAXException, IOException {
-
- throw new AssertionFailedError("Not not use deprecated methods!");
- }
public void toSAX(org.apache.excalibur.source.Source source,
ContentHandler handler)
1.9 +1 -11
cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/MutableEnvironmentFacade.java
Index: MutableEnvironmentFacade.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/MutableEnvironmentFacade.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MutableEnvironmentFacade.java 24 May 2004 11:15:40 -0000 1.8
+++ MutableEnvironmentFacade.java 24 May 2004 11:26:39 -0000 1.9
@@ -21,10 +21,7 @@
import java.util.Enumeration;
import java.util.Map;
-import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.Source;
-import org.xml.sax.SAXException;
/**
* Enviroment facade, whose delegate object can be changed. This class is
required to handle internal redirects
@@ -283,13 +280,6 @@
*/
public boolean isInternalRedirect() {
return env.isInternalRedirect();
- }
-
- /* (non-Javadoc)
- * @see
org.apache.cocoon.environment.SourceResolver#resolve(java.lang.String)
- */
- public Source resolve(String systemID) throws ProcessingException,
SAXException, IOException {
- return env.resolve(systemID);
}
/* (non-Javadoc)
1.335 +7 -1 cocoon-2.1/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/status.xml,v
retrieving revision 1.334
retrieving revision 1.335
diff -u -r1.334 -r1.335
--- status.xml 24 May 2004 11:15:40 -0000 1.334
+++ status.xml 24 May 2004 11:26:39 -0000 1.335
@@ -212,6 +212,12 @@
<release version="@version@" date="@date@">
<action dev="CZ" type="update">
+ Remove deprecated XSLT Processor. Excalibur XMLUtils is used instead.
+ </action>
+ <action dev="CZ" type="update">
+ Remove deprecated Source handling. Excalibur Sourceresolve is used
instead.
+ </action>
+ <action dev="CZ" type="update">
Remove deprecated getOutputStream() method from Environment.
</action>
<action dev="CZ" type="fix">
1.8 +6 -4 cocoon-2.1/src/documentation/xdocs/plan/updating.xml
Index: updating.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/plan/updating.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- updating.xml 24 May 2004 11:04:54 -0000 1.7
+++ updating.xml 24 May 2004 11:26:40 -0000 1.8
@@ -106,10 +106,12 @@
<li><em>org.apache.cocoon.components.source.DelayedRefreshSourceWrapper</em> -
org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper</li>
<li><em>org.apache.cocoon.components.source.FileSource</em> -
Excalibur SourceResolver</li>
<li><em>org.apache.cocoon.components.source.FileSourceFactory</em> -
Not needed anymore</li>
+
<li><em>org.apache.cocoon.components.source.ModifiableTraversableSource</em> -
Excalibur SourceResolver</li>
<li><em>org.apache.cocoon.components.source.SitemapSource</em> -
org.apache.cocoon.components.source.impl.SitemapSource</li>
<li><em>org.apache.cocoon.components.source.SourceFactory</em> -
org.apache.cocoon.components.source.impl.SitemapSourceFactory</li>
<li><em>org.apache.cocoon.components.source.SourceHandler</em> - Not
needed anymore</li>
<li><em>org.apache.cocoon.components.source.SourceHandlerImpl</em> -
Not needed anymore</li>
+ <li><em>org.apache.cocoon.components.source.TraversableSource</em> -
Excalibur SourceResolver</li>
<li><em>org.apache.cocoon.components.source.URLSource</em> -
Excalibur SourceResolver</li>
<li><em>org.apache.cocoon.components.source.impl.AvalonToCocoonSource</em> -
Not needed anymore</li>
<li><em>org.apache.cocoon.components.source.impl.AvalonToCocoonSourceInvocationHandler</em>
- Not needed anymore</li>
@@ -122,7 +124,7 @@
<li><em>org.apache.cocoon.components.url.URLFactoryImpl</em> - Not
needed anymore</li>
</ul>
</s2>
- <s2 title="XML Parsing">
+ <s2 title="XML Parsing (TBD)">
<ul>
<li><em>org.apache.cocoon.components.parser.JaxpParser</em> -
Excalibur XMLUtils</li>
<li><em>org.apache.cocoon.components.parser.Parser</em> - Excalibur
XMLUtils</li>
@@ -130,13 +132,13 @@
<li><em>org.apache.cocoon.components.parser.XercesParser</em> -
Excalibur XMLUtils</li>
</ul>
</s2>
- <s2 title="XML Entity Resolver">
+ <s2 title="XML Entity Resolver (TBD)">
<ul>
<li><em>org.apache.cocoon.components.resolver.Resolver</em> -
Excalibur XMLUtils</li>
<li><em>org.apache.cocoon.components.resolver.ResolverImpl</em> -
Excalibur XMLUtils</li>
</ul>
</s2>
- <s2 title="Stores">
+ <s2 title="Stores (TBD)">
<ul>
<li><em>org.apache.cocoon.components.store.FilesystemStore</em> -
Excalibur Store</li>
<li><em>org.apache.cocoon.components.store.JispFilesystemStore</em>
- Excalibur Store</li>
@@ -154,7 +156,7 @@
<li><em>org.apache.cocoon.components.xslt.XSLTProcessorImpl</em> -
Excalibur XMLUtils</li>
</ul>
</s2>
- <s2 title="Sitemap Components">
+ <s2 title="Sitemap Components (TBD)">
<ul>
<li><em>org.apache.cocoon.matching.RegexpTargetHostMatcher</em> -
org.apache.cocoon.matching.RegexpHostMatcher</li>
<li><em>org.apache.cocoon.matching.RequestParamMatcher</em> -
org.apache.cocoon.matching.RequestParameterMatcher</li>
1.11 +8 -20
cocoon-2.1/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java
Index: SourceResolverAdapter.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SourceResolverAdapter.java 5 Mar 2004 13:03:03 -0000 1.10
+++ SourceResolverAdapter.java 24 May 2004 11:26:40 -0000 1.11
@@ -21,10 +21,9 @@
import java.util.Map;
import org.apache.avalon.framework.component.ComponentManager;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.Source;
import org.apache.cocoon.environment.SourceResolver;
-import org.xml.sax.SAXException;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
/**
* An adapter for the Excalibur SourceResolver.
@@ -44,8 +43,8 @@
* This is a shortcut for <code>resolve(location, null, null)</code>
* @throws org.apache.excalibur.source.SourceException if the source
cannot be resolved
*/
- public org.apache.excalibur.source.Source resolveURI( String location )
- throws MalformedURLException, IOException,
org.apache.excalibur.source.SourceException {
+ public Source resolveURI( String location )
+ throws MalformedURLException, IOException, SourceException {
return this.resolver.resolveURI(location);
}
@@ -62,10 +61,10 @@
* are specific to the used protocol.
* @throws org.apache.excalibur.source.SourceException if the source
cannot be resolved
*/
- public org.apache.excalibur.source.Source resolveURI( String location,
+ public Source resolveURI( String location,
String base,
Map parameters )
- throws MalformedURLException, IOException,
org.apache.excalibur.source.SourceException {
+ throws MalformedURLException, IOException, SourceException {
return this.resolver.resolveURI(location, base, parameters);
}
@@ -73,19 +72,8 @@
/**
* Releases a resolved resource
*/
- public void release( org.apache.excalibur.source.Source source ) {
+ public void release( Source source ) {
this.resolver.release(source);
}
- /**
- * Resolve the source.
- * @param systemID This is either a system identifier
- * (<code>java.net.URL</code> or a local file.
- * @deprecated Use the resolveURI methods instead
- */
- public Source resolve(String systemID)
- throws ProcessingException, SAXException, IOException {
-
- throw new RuntimeException("Method SourceResolver.resolve(String) is
deprecated");
- }
}