cziegeler 2003/10/15 12:25:48
Modified: src/java/org/apache/cocoon/environment/wrapper
MutableEnvironmentFacade.java
src/java/org/apache/cocoon/environment/commandline
AbstractCommandLineEnvironment.java
Log:
Removing deprecated code
Revision Changes Path
1.3 +1 -32
cocoon-2.2/src/java/org/apache/cocoon/environment/wrapper/MutableEnvironmentFacade.java
Index: MutableEnvironmentFacade.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/wrapper/MutableEnvironmentFacade.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MutableEnvironmentFacade.java 1 Oct 2003 08:53:49 -0000 1.2
+++ MutableEnvironmentFacade.java 15 Oct 2003 19:25:47 -0000 1.3
@@ -52,14 +52,10 @@
import java.io.IOException;
import java.io.OutputStream;
-import java.net.MalformedURLException;
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
@@ -316,31 +312,4 @@
return env.isExternal();
}
- /* (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)
- * @see
org.apache.excalibur.source.SourceResolver#resolveURI(java.lang.String)
- */
- public org.apache.excalibur.source.Source resolveURI(String arg0)
throws MalformedURLException, IOException {
- return env.resolveURI(arg0);
- }
-
- /* (non-Javadoc)
- * @see
org.apache.excalibur.source.SourceResolver#resolveURI(java.lang.String,
java.lang.String, java.util.Map)
- */
- public org.apache.excalibur.source.Source resolveURI(String arg0,
String arg1, Map arg2) throws MalformedURLException, IOException {
- return env.resolveURI(arg0, arg1, arg2);
- }
-
- /* (non-Javadoc)
- * @see
org.apache.excalibur.source.SourceResolver#release(org.apache.excalibur.source.Source)
- */
- public void release(org.apache.excalibur.source.Source arg0) {
- env.release(arg0);
- }
}
1.5 +8 -5
cocoon-2.2/src/java/org/apache/cocoon/environment/commandline/AbstractCommandLineEnvironment.java
Index: AbstractCommandLineEnvironment.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/commandline/AbstractCommandLineEnvironment.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractCommandLineEnvironment.java 6 Jul 2003 20:37:48 -0000
1.4
+++ AbstractCommandLineEnvironment.java 15 Oct 2003 19:25:48 -0000
1.5
@@ -101,6 +101,9 @@
public void redirect(boolean sessionmode, String newURL)
throws IOException {
+ if ( !this.initializedComponents) {
+ this.initComponents();
+ }
this.hasRedirected = true;
if (sessionmode) {
@@ -133,7 +136,7 @@
Source redirectSource = null;
try {
- redirectSource = this.resolveURI(newURL);
+ redirectSource = this.sourceResolver.resolveURI(newURL);
SourceUtil.parse( this.manager, redirectSource, ls);
} catch (SourceException se) {
throw new CascadingIOException("SourceException: " + se, se);
@@ -142,12 +145,12 @@
} catch (ProcessingException pe) {
throw new CascadingIOException("ProcessingException: " + pe,
pe);
} finally {
- this.release( redirectSource );
+ this.sourceResolver.release( redirectSource );
}
} else {
Source redirectSource = null;
try {
- redirectSource = this.resolveURI(newURL);
+ redirectSource = this.sourceResolver.resolveURI(newURL);
InputStream is = redirectSource.getInputStream();
byte[] buffer = new byte[8192];
int length = -1;
@@ -158,7 +161,7 @@
} catch (SourceException se) {
throw new CascadingIOException("SourceException: " + se, se);
} finally {
- this.release( redirectSource);
+ this.sourceResolver.release( redirectSource);
}
}
}