You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ep...@apache.org on 2006/02/09 04:38:17 UTC

svn commit: r376174 - in /maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy: DefaultProxyManager.java ProxyManagerFactory.java

Author: epunzalan
Date: Wed Feb  8 19:38:15 2006
New Revision: 376174

URL: http://svn.apache.org/viewcvs?rev=376174&view=rev
Log:
PR: MRM-43

Added javadoc annotations

Modified:
    maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java
    maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java?rev=376174&r1=376173&r2=376174&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java Wed Feb  8 19:38:15 2006
@@ -420,6 +420,11 @@
         return true;
     }
 
+    /**
+     * Used to ensure that this proxy instance is running with a valid configuration instance.
+     *
+     * @throws ProxyException
+     */
     private void checkConfiguration()
         throws ProxyException
     {
@@ -429,6 +434,13 @@
         }
     }
 
+    /**
+     * Used to read text file contents for use with the checksum validation
+     *
+     * @param file The file to be read
+     * @return The String content of the file parameter
+     * @throws IOException when an error occurred while reading the file contents
+     */
     private String readTextFile( File file )
         throws IOException
     {
@@ -457,6 +469,14 @@
         return text;
     }
 
+    /**
+     * Used to move the temporary file to its real destination.  This is patterned from the way WagonManager handles
+     * its downloaded files.
+     *
+     * @param temp   The completed download file
+     * @param target The final location of the downloaded file
+     * @throws ProxyException when the temp file cannot replace the target file
+     */
     private void copyTempToTarget( File temp, File target )
         throws ProxyException
     {

Modified: maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java?rev=376174&r1=376173&r2=376174&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java (original)
+++ maven/repository-manager/trunk/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java Wed Feb  8 19:38:15 2006
@@ -25,6 +25,9 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 
 /**
+ * Factory class for creating ProxyManager instances.  The usage of a factory ensures that the created instance will
+ * have the necessary configuration
+ *
  * @author Edwin Punzalan
  * @plexus.component role="org.apache.maven.repository.proxy.ProxyManagerFactory"
  */
@@ -35,6 +38,14 @@
 
     private PlexusContainer container;
 
+    /**
+     * Used to create a ProxyManager instance of a certain type with a configuration to base its behavior
+     *
+     * @param proxy_type The ProxyManager repository type
+     * @param config     The ProxyConfiguration to describe the behavior of the proxy instance
+     * @return The ProxyManager instance of type proxy_type with ProxyConfiguration config
+     * @throws ComponentLookupException when the factory fails to create the ProxyManager instance
+     */
     public ProxyManager getProxyManager( String proxy_type, ProxyConfiguration config )
         throws ComponentLookupException
     {
@@ -43,6 +54,9 @@
         return proxy;
     }
 
+    /**
+     * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable#contextualize(org.codehaus.plexus.context.Context)
+     */
     public void contextualize( Context context )
         throws ContextException
     {