Author: carlos
Date: Fri Jul 28 09:31:55 2006
New Revision: 426601

URL: http://svn.apache.org/viewvc?rev=426601&view=rev
Log:
Merged rev# 426599 from trunk. Added javadocs

Modified:
    
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
    
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java

Modified: 
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java?rev=426601&r1=426600&r2=426601&view=diff
==============================================================================
--- 
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
 (original)
+++ 
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
 Fri Jul 28 09:31:55 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.artifact.metadata;
 
 /*
- * Copyright 2001-2005 The Apache Software Foundation.
+ * Copyright 2001-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,10 +18,14 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
 
 import java.util.List;
 
 /**
+ * Provides some metadata operations, like querying the remote repository for 
a list of versions available for an
+ * artifact.
+ * 
  * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl </a>
  * @version $Id$
  */
@@ -32,6 +36,17 @@
     ResolutionGroup retrieve( Artifact artifact, ArtifactRepository 
localRepository, List remoteRepositories )
         throws ArtifactMetadataRetrievalException;
 
+    /**
+     * Get a list of available versions for an artifact in the remote 
repository
+     * 
+     * @param artifact artifact we are interested in. Only 
<code>groupid</code> and <code>artifactId</code>
+     *                 are needed, for instance the following code will work 
+     *                 <code>artifactFactory.createProjectArtifact( 
"org.apache.maven", "maven", "" )</code>
+     * @param localRepository local repository
+     * @param remoteRepositories remote repositories, [EMAIL PROTECTED] List} 
$lt; [EMAIL PROTECTED] ArtifactRepository} >
+     * @return [EMAIL PROTECTED] List} $lt; [EMAIL PROTECTED] ArtifactVersion} 
>
+     * @throws ArtifactMetadataRetrievalException
+     */
     List retrieveAvailableVersions( Artifact artifact, ArtifactRepository 
localRepository, List remoteRepositories )
         throws ArtifactMetadataRetrievalException;
 }

Modified: 
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java?rev=426601&r1=426600&r2=426601&view=diff
==============================================================================
--- 
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
 (original)
+++ 
maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
 Fri Jul 28 09:31:55 2006
@@ -70,6 +70,22 @@
         return new VersionRange( recommendedVersion, copiedRestrictions );
     }
 
+    /**
+     * Create a version range from a string representation
+     * 
+     * Some spec examples are
+     * <ul>
+     *   <li><code>1.0</code> Version 1.0</li>
+     *   <li><code>[1.0,2.0)</code> Versions 1.0 (included) to 2.0 (not 
included)</li>
+     *   <li><code>[1.0,2.0]</code> Versions 1.0 to 2.0 (both included)</li>
+     *   <li><code>[1.5,)</code> Versions 1.5 and higher</li>
+     *   <li><code>(,1.0],[1.2,)</code> Versions up to 1.0 (included) and 1.2 
or higher</li>
+     * </ul>
+     * 
+     * @param spec string representation of a version or version range
+     * @return a new [EMAIL PROTECTED] VersionRange} object that represents 
the spec
+     * @throws InvalidVersionSpecificationException
+     */
     public static VersionRange createFromVersionSpec( String spec )
         throws InvalidVersionSpecificationException
     {


Reply via email to