public RemoteRepository delRepo(String id) { synchronized (repos) { Iterator<RemoteRepository> it = repos.iterator(); while (it.hasNext()) { RemoteRepository repo = it.next(); if (repo.getId().equals(id)) { it.remove(); return repo; } } } return null; }
@Override public String getId() { return remoteRepository.getId(); }
private String getKey( RemoteRepository repository ) { return repository.getId(); }
private String getKey( RemoteRepository repository ) { return repository.getId(); }
public Authentication getAuthentication( RemoteRepository repository ) { return repos.get( repository.getId() ); }
static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } }
static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } }
static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } }
static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } }
static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } }
static String getString( String prefix, RemoteRepository repository ) { if ( repository == null ) { return ""; } else { return prefix + repository.getId() + " (" + repository.getUrl() + ")"; } }
private static String toMessage( RemoteRepository repository ) { if ( repository != null ) { return "No connector available to access repository " + repository.getId() + " (" + repository.getUrl() + ") of type " + repository.getContentType(); } else { return "No connector available to access repository"; } }
private static String toMessage( RemoteRepository repository ) { if ( repository != null ) { return "No connector available to access repository " + repository.getId() + " (" + repository.getUrl() + ") of type " + repository.getContentType(); } else { return "No connector available to access repository"; } }
private static String toMessage( RemoteRepository repository ) { if ( repository != null ) { return "No connector available to access repository " + repository.getId() + " (" + repository.getUrl() + ") of type " + repository.getContentType(); } else { return "No connector available to access repository"; } }
private ArtifactTransferException newException( String error, Artifact artifact, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new ArtifactNotFoundException( artifact, repository, "Failure to find " + artifact + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced" ); } else { return new ArtifactTransferException( artifact, repository, "Failure to transfer " + artifact + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error ); } }
private MetadataTransferException newException( String error, Metadata metadata, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new MetadataNotFoundException( metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced" ); } else { return new MetadataTransferException( metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error ); } }
private MetadataTransferException newException( String error, Metadata metadata, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new MetadataNotFoundException( metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced" ); } else { return new MetadataTransferException( metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error ); } }
private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 ) { if ( r1 == r2 ) { return true; } return eq( r1.getId(), r2.getId() ) && eq( r1.getUrl(), r2.getUrl() ) && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) ) && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) ); }
private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 ) { if ( r1 == r2 ) { return true; } return eq( r1.getId(), r2.getId() ) && eq( r1.getUrl(), r2.getUrl() ) && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) ) && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) ); }
/** * Creates a shallow copy of the specified repository. * * @param repository The repository to copy, must not be {@code null}. */ public RemoteRepository( RemoteRepository repository ) { setId( repository.getId() ); setContentType( repository.getContentType() ); setUrl( repository.getUrl() ); setPolicy( true, repository.getPolicy( true ) ); setPolicy( false, repository.getPolicy( false ) ); setAuthentication( repository.getAuthentication() ); setProxy( repository.getProxy() ); setMirroredRepositories( repository.getMirroredRepositories() ); setRepositoryManager( repository.isRepositoryManager() ); }