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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]