akarasulu 2003/11/11 21:59:22
Modified: repository/impl/src/java/org/apache/avalon/repository/impl
DefaultFileRepository.java
Log:
Readding the extra getArtifact overload since it
is needed in the composition project group.
Revision Changes Path
1.7 +28 -1
avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFileRepository.java
Index: DefaultFileRepository.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultFileRepository.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultFileRepository.java 12 Nov 2003 02:31:22 -0000 1.6
+++ DefaultFileRepository.java 12 Nov 2003 05:59:22 -0000 1.7
@@ -220,6 +220,33 @@
/**
+ * Get a resource relative to the supplied artifact name where the artifact
+ * name is equivalent to the group and resource name seperated by a colon.
+ *
+ * @param artifact the artifact name
+ * @param version the version identifier
+ * @param type the resource type
+ * @return the resource
+ */
+ public URL getArtifact(
+ final String artifact, final String version, final String type )
+ throws RepositoryException
+ {
+ int n = artifact.indexOf( SEPERATOR ) ;
+
+ if( n < 1 )
+ {
+ final String error = "Invalid artifact name: " + artifact ;
+ throw new RepositoryException( error ) ;
+ }
+
+ final String group = artifact.substring( 0, n ) ;
+ final String name = artifact.substring( n + 1 ) ;
+ return getArtifact( group, name, version, type ) ;
+ }
+
+
+ /**
* Get a resource relative to the supplied application name,
* resource name, version and resource type.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]