You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by cz...@apache.org on 2001/11/14 08:46:53 UTC
cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source SourceFactory.java SourceParameters.java SourceResolverImpl.java URLSource.java
cziegeler 01/11/13 23:46:53
Modified: src/scratchpad/org/apache/avalon/excalibur/source
SourceFactory.java SourceParameters.java
SourceResolverImpl.java URLSource.java
Log:
Added parameters to SourceFactory
Revision Changes Path
1.3 +3 -3 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceFactory.java
Index: SourceFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SourceFactory.java 2001/11/13 12:48:45 1.2
+++ SourceFactory.java 2001/11/14 07:46:52 1.3
@@ -14,7 +14,7 @@
/**
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version $Id: SourceFactory.java,v 1.2 2001/11/13 12:48:45 cziegeler Exp $
+ * @version $Id: SourceFactory.java,v 1.3 2001/11/14 07:46:52 cziegeler Exp $
*/
public interface SourceFactory
extends Component {
@@ -23,9 +23,9 @@
/**
* Get a <code>Source</code> object.
- * @param environment This is optional.
+ * @param parameters This is optional.
*/
- Source getSource(String location)
+ Source getSource(String location, SourceParameters parameters)
throws MalformedURLException, IOException;
}
1.2 +2 -2 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceParameters.java
Index: SourceParameters.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceParameters.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SourceParameters.java 2001/11/13 15:04:48 1.1
+++ SourceParameters.java 2001/11/14 07:46:52 1.2
@@ -12,12 +12,12 @@
import java.util.*;
/**
- * This class is holds parameters for a <code>Source</code> object.
+ * This class holds parameters for a <code>Source</code> object.
* It differs from the usual Parameters object because in can hold
* more than one value for a parameter.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version $Id: SourceParameters.java,v 1.1 2001/11/13 15:04:48 cziegeler Exp $
+ * @version $Id: SourceParameters.java,v 1.2 2001/11/14 07:46:52 cziegeler Exp $
*/
public final class SourceParameters
implements Serializable {
1.4 +4 -4 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceResolverImpl.java
Index: SourceResolverImpl.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/SourceResolverImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SourceResolverImpl.java 2001/11/13 15:04:48 1.3
+++ SourceResolverImpl.java 2001/11/14 07:46:52 1.4
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version $Id: SourceResolverImpl.java,v 1.3 2001/11/13 15:04:48 cziegeler Exp $
+ * @version $Id: SourceResolverImpl.java,v 1.4 2001/11/14 07:46:52 cziegeler Exp $
*/
public class SourceResolverImpl
extends AbstractLoggable
@@ -214,7 +214,7 @@
final String protocol = systemID.substring(0, protocolPos);
final SourceFactory factory = ( SourceFactory )this.sourceFactories.get( protocol );
if (factory != null) {
- return factory.getSource( systemID );
+ return factory.getSource( systemID, parameters );
}
}
@@ -222,11 +222,11 @@
// no factory found, so usual url handling stuff...
try {
getLogger().debug("Making URL from " + systemID);
- return new URLSource(new URL(systemID), this.manager);
+ return new URLSource(new URL(systemID), parameters, this.manager);
} catch (MalformedURLException mue) {
getLogger().debug("Making URL - MalformedURLException in getURL:" , mue);
getLogger().debug("Making URL a File (assuming that it is full path):" + systemID);
- return new URLSource((new File(systemID)).toURL(), this.manager);
+ return new URLSource((new File(systemID)).toURL(), parameters, this.manager);
}
}
1.4 +5 -2 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/URLSource.java
Index: URLSource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/source/URLSource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- URLSource.java 2001/11/13 15:04:48 1.3
+++ URLSource.java 2001/11/14 07:46:52 1.4
@@ -25,7 +25,7 @@
* Description of a source which is described by an URL.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.3 $ $Date: 2001/11/13 15:04:48 $
+ * @version CVS $Revision: 1.4 $ $Date: 2001/11/14 07:46:52 $
*/
public final class URLSource implements ModifiableSource, XMLizable {
@@ -59,8 +59,11 @@
/**
* Construct a new object
+ * @param parameters This is optional
*/
- public URLSource(URL url, ComponentManager manager)
+ public URLSource(URL url,
+ SourceParameters parameters,
+ ComponentManager manager)
throws IOException {
this.manager = manager;
this.systemId = url.toExternalForm();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>