forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r476987 - in /forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest: core/Controller.java reader/ChainedReader.java reader/FileReader.java reader/HTTPReader.java reader/IReader.java
Date Mon, 20 Nov 2006 00:07:13 GMT
Author: rgardler
Date: Sun Nov 19 16:07:12 2006
New Revision: 476987

URL: http://svn.apache.org/viewvc?view=rev&rev=476987
Log:
@refactor update to cope with recent refactoring

Modified:
    forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java
    forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/ChainedReader.java
    forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/FileReader.java
    forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/HTTPReader.java
    forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/IReader.java

Modified: forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java?view=diff&rev=476987&r1=476986&r2=476987
==============================================================================
--- forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java (original)
+++ forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/core/Controller.java Sun
Nov 19 16:07:12 2006
@@ -281,7 +281,7 @@
 		} catch (Exception e) {
 			try {
 				throw new ProcessingException("Unable to get a reader for : "
-						+ location.getSourceURL().toExternalForm(), e);
+						+ location.getResolvedSourceURL().toExternalForm(), e);
 			} catch (MalformedURLException e1) {
 				throw new ProcessingException("Unable to get a reader", e1);
 			}

Modified: forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/ChainedReader.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/ChainedReader.java?view=diff&rev=476987&r1=476986&r2=476987
==============================================================================
--- forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/ChainedReader.java
(original)
+++ forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/ChainedReader.java
Sun Nov 19 16:07:12 2006
@@ -23,6 +23,7 @@
 import org.apache.forrest.core.IController;
 import org.apache.forrest.core.document.AbstractSourceDocument;
 import org.apache.forrest.core.document.DefaultSourceDocument;
+import org.apache.forrest.core.exception.ProcessingException;
 import org.apache.forrest.core.locationMap.Location;
 
 /**
@@ -61,7 +62,7 @@
 	private String docType;
 	
 	public AbstractSourceDocument read(IController controller,
-			final Location location) {
+			final Location location) throws ProcessingException {
 		DefaultSourceDocument doc = null;
 		final URI psudeoURI = location.getSourceURI();
 		final String ssp = psudeoURI.getSchemeSpecificPart();

Modified: forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/FileReader.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/FileReader.java?view=diff&rev=476987&r1=476986&r2=476987
==============================================================================
--- forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/FileReader.java (original)
+++ forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/FileReader.java Sun
Nov 19 16:07:12 2006
@@ -42,7 +42,7 @@
 		AbstractSourceDocument result = null;
 		try {
 			final InputStream is = new FileInputStream(new File(location
-					.getSourceURL().toURI()));
+					.getResolvedSourceURL().toURI()));
 			result = DocumentFactory.getSourceDocumentFor(is);
 		} catch (final Exception e) {
 			if (location.isRequired())

Modified: forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/HTTPReader.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/HTTPReader.java?view=diff&rev=476987&r1=476986&r2=476987
==============================================================================
--- forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/HTTPReader.java (original)
+++ forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/HTTPReader.java Sun
Nov 19 16:07:12 2006
@@ -58,7 +58,7 @@
 		InputStream is;
 		DefaultSourceDocument result = null;
 		final ByteArrayOutputStream out = new ByteArrayOutputStream();
-		final GetMethod get = new GetMethod(location.getSourceURL()
+		final GetMethod get = new GetMethod(location.getResolvedSourceURL()
 				.toExternalForm());
 		get.setFollowRedirects(true);
 		try {

Modified: forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/IReader.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/IReader.java?view=diff&rev=476987&r1=476986&r2=476987
==============================================================================
--- forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/IReader.java (original)
+++ forrest/trunk/whiteboard/forrest2/src/core/org/apache/forrest/reader/IReader.java Sun
Nov 19 16:07:12 2006
@@ -20,6 +20,7 @@
 
 import org.apache.forrest.core.IController;
 import org.apache.forrest.core.document.AbstractSourceDocument;
+import org.apache.forrest.core.exception.ProcessingException;
 import org.apache.forrest.core.locationMap.Location;
 
 public interface IReader {
@@ -40,8 +41,9 @@
 	 * @param location
 	 * @return
 	 * @throws MalformedURLException
+	 * @throws ProcessingException 
 	 */
 	public abstract AbstractSourceDocument read(IController controller, Location location)
-			throws MalformedURLException;
+			throws MalformedURLException, ProcessingException;
 
 }



Mime
View raw message