You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@depot.apache.org by mm...@apache.org on 2004/07/14 19:01:18 UTC

svn commit: rev 22913 - in incubator/depot/trunk/update/src/java/org/apache/depot/update: artifact config download impl util util/io util/net

Author: mmay
Date: Wed Jul 14 12:01:17 2004
New Revision: 22913

Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/config/UpdaterConfig.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/ResolvedFile.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java
Log:
Added JavaDoc for a better understanding of the API


Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java	Wed Jul 14 12:01:17 2004
@@ -15,6 +15,8 @@
  */
 package org.apache.depot.update.artifact;
 /**
+ * 
+ * 
  * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
  */
 public class ArtifactGroup {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/config/UpdaterConfig.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/config/UpdaterConfig.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/config/UpdaterConfig.java	Wed Jul 14 12:01:17 2004
@@ -30,7 +30,12 @@
 import org.apache.depot.update.util.xml.XMLParser;
 
 /**
- * @author anou_mana
+ * Provides the configuration of the depot-updater application. Basically reads the configuration
+ * xml-file. 
+ * 
+ * :TODO: Right now this class is pretty useless, is it?????????
+ * 
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
  */
 public class UpdaterConfig {
 	private static boolean l_configured = false;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java	Wed Jul 14 12:01:17 2004
@@ -45,6 +45,9 @@
 		initClass();
 	}
 	
+	/**
+	 * Initializes this class
+	 */
 	private void initClass() {
 	}
 
@@ -64,13 +67,6 @@
 
 		RepositoryWrapper target =
 			new RepositoryWrapper(targetRepository, m_context);
-
-		//		for (Iterator i = result.iterator(); i.hasNext();) {
-		//			List group = (List) i.next();
-		//
-		//			for (Iterator j = group.iterator(); j.hasNext();) {
-		//				Resource resource = (Resource) j.next();
-		//
 
 		for (Iterator i = instances.iterator(); i.hasNext();) {
 			ArtifactInstance resource = (ArtifactInstance) i.next();

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java	Wed Jul 14 12:01:17 2004
@@ -30,7 +30,7 @@
 
 /**
  * The ArtifactUpdaterContext provides some contextual information for an Artifact
- * 
+ *  
  * 
  * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
  */

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java	Wed Jul 14 12:01:17 2004
@@ -23,7 +23,9 @@
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 
 /**
- * @author arb_jack
+ * Provides some basic constants which can be used throughout the depot-updater application.
+ * 
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
  */
 public class UpdateConstants {
 	public final static List EMPTY_LIST = new ArrayList();
@@ -35,7 +37,7 @@
 	public final static String DEFAULT = "default";
 	public final static String UNNAMED = "unnamed";
 	
-	public final static String RUPER_HOME = "http://www.apache.org/depot/";
+	public final static String DEPOT_HOME = "http://www.apache.org/depot/";
 
 	public final static String MD5 = "md5";
 	public final static String MD5_EXTN = "." + MD5;
@@ -87,4 +89,4 @@
 			e.printStackTrace(System.err);
 		}
 	}
-}
+}
\ No newline at end of file

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/ResolvedFile.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/ResolvedFile.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/ResolvedFile.java	Wed Jul 14 12:01:17 2004
@@ -13,7 +13,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.depot.update.util.io;
 
 import java.io.File;
@@ -21,7 +20,10 @@
 import org.apache.depot.common.util.SystemUtils;
 
 /**
- * @author ajack
+ * The ResolvedFile adds some attributes to the File class. Basically the resolverContext (most cases
+ * a directory where the fly is) and the originalInput (most cases the file).
+ * 
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
  */
 public class ResolvedFile extends File {
 
@@ -101,30 +103,6 @@
 	 */
 	public Object getResolverContext() {
 		return m_resolverContext;
-	}
-
-	public static void main(String args[]) {
-		String file = "lib/test.jar";
-
-		if (args.length > 0)
-			file = args[0];
-
-		File rf1 = ResolvedFile.resolve(file);
-
-		File rf2 = ResolvedFile.resolve(SystemUtils.getCWD().getAbsolutePath(),
-				file);
-		File rf3 = ResolvedFile.resolve(SystemUtils.getCWD().getAbsolutePath());
-		File rf4 = ResolvedFile.resolve(".");
-
-		System.out.println("RF1:" + rf1.toString());
-		System.out.println("RF1:" + rf1.getAbsolutePath());
-		System.out.println("RF2:" + rf2.toString());
-		System.out.println("RF2:" + rf2.getAbsolutePath());
-		System.out.println("RF3:" + rf3.toString());
-		System.out.println("RF3:" + rf3.getAbsolutePath());
-		System.out.println("RF4:" + rf4.toString());
-		System.out.println("RF4:" + rf4.getAbsolutePath());
-
 	}
 
 	/*

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java	Wed Jul 14 12:01:17 2004
@@ -26,8 +26,6 @@
 import org.apache.depot.update.util.io.ResolvedFile;
 
 /**
- * @author arb_jack
- * 
  * This class exists for two reasons:
  * 
  * 1) So we can separate ourselves from VFS FileObjects (yet still
@@ -38,6 +36,7 @@
  * about this, but we want to be compatible over older JDKs and also
  * this is an L not an I. 
  * 
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
  */
 public class VirtualResourceLocator {
 
@@ -195,6 +194,6 @@
 	}
 
 	public static VirtualResourceLocator getTestVRL() {
-		return new VirtualResourceLocator(UpdateConstants.RUPER_HOME);
+		return new VirtualResourceLocator(UpdateConstants.DEPOT_HOME);
 	}
 }