You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/06/08 05:37:31 UTC

svn commit: r189513 - /maven/components/trunk/maven-settings/settings.mdo

Author: brett
Date: Tue Jun  7 20:37:31 2005
New Revision: 189513

URL: http://svn.apache.org/viewcvs?rev=189513&view=rev
Log:
ability to lookup mirror by repository id that it is a mirror of

Modified:
    maven/components/trunk/maven-settings/settings.mdo

Modified: maven/components/trunk/maven-settings/settings.mdo
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-settings/settings.mdo?rev=189513&r1=189512&r2=189513&view=diff
==============================================================================
--- maven/components/trunk/maven-settings/settings.mdo (original)
+++ maven/components/trunk/maven-settings/settings.mdo Tue Jun  7 20:37:31 2005
@@ -125,7 +125,7 @@
           <version>1.0.0</version>
           <code><![CDATA[
     private Proxy activeProxy;
-    
+
     public synchronized Proxy getActiveProxy()
     {
         if(activeProxy == null)
@@ -155,7 +155,7 @@
 
         return activeProxy;
     }
-    
+
     public Server getServer( String serverId )
     {
         Server match = null;
@@ -169,6 +169,27 @@
                 if ( serverId.equals( server.getId() ) )
                 {
                     match = server;
+                    break;
+                }
+            }
+        }
+
+        return match;
+    }
+    
+    public Mirror getMirrorOf( String repositoryId )
+    {
+        Mirror match = null;
+
+        List mirrors = getMirrors();
+        if ( mirrors != null && repositoryId != null )
+        {
+            for ( Iterator it = mirrors.iterator(); it.hasNext(); )
+            {
+                Mirror mirror = (Mirror) it.next();
+                if ( repositoryId.equals( mirror.getMirrorOf() ) )
+                {
+                    match = mirror;
                     break;
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org