From: Edwin L. Punzalan Date: Thu, 9 Feb 2006 03:38:15 +0000 (+0000) Subject: PR: MRM-43 X-Git-Tag: archiva-0.9-alpha-1~940 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=19a7ecb869d09d34638d114be7f36c5accfab4bc;p=archiva.git PR: MRM-43 Added javadoc annotations git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@376174 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java b/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java index bda66cfdd..638899ee1 100644 --- a/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java +++ b/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/DefaultProxyManager.java @@ -420,6 +420,11 @@ public class DefaultProxyManager 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 @@ public class DefaultProxyManager } } + /** + * 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 @@ public class DefaultProxyManager 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 { diff --git a/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java b/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java index 5710500ff..84f0173a7 100644 --- a/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java +++ b/maven-repository-proxy/src/main/java/org/apache/maven/repository/proxy/ProxyManagerFactory.java @@ -25,6 +25,9 @@ import org.codehaus.plexus.context.ContextException; 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 @@ public class ProxyManagerFactory 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 @@ public class ProxyManagerFactory return proxy; } + /** + * @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable#contextualize(org.codehaus.plexus.context.Context) + */ public void contextualize( Context context ) throws ContextException {