/** * Creates a new repository with the specified properties and the default policies. * * @param id The identifier of the repository, may be {@code null}. * @param type The type of the repository, may be {@code null}. * @param url The (base) URL of the repository, may be {@code null}. */ public RemoteRepository( String id, String type, String url ) { setId( id ); setContentType( type ); setUrl( url ); setPolicy( true, null ); setPolicy( false, null ); }
/** * Creates a new repository with the specified properties and the default policies. * * @param id The identifier of the repository, may be {@code null}. * @param type The type of the repository, may be {@code null}. * @param url The (base) URL of the repository, may be {@code null}. */ public RemoteRepository( String id, String type, String url ) { setId( id ); setContentType( type ); setUrl( url ); setPolicy( true, null ); setPolicy( false, null ); }
/** * Creates a new repository with the specified properties and the default policies. * * @param id The identifier of the repository, may be {@code null}. * @param type The type of the repository, may be {@code null}. * @param url The (base) URL of the repository, may be {@code null}. */ public RemoteRepository( String id, String type, String url ) { setId( id ); setContentType( type ); setUrl( url ); setPolicy( true, null ); setPolicy( false, null ); }
public RemoteRepository getMirror( RemoteRepository repository ) { MirrorDef mirror = findMirror( repository ); if ( mirror == null ) { return null; } RemoteRepository repo = new RemoteRepository(); repo.setRepositoryManager( mirror.repositoryManager ); repo.setId( mirror.id ); repo.setUrl( mirror.url ); if ( mirror.type != null && mirror.type.length() > 0 ) { repo.setContentType( mirror.type ); } else { repo.setContentType( repository.getContentType() ); } repo.setPolicy( true, repository.getPolicy( true ) ); repo.setPolicy( false, repository.getPolicy( false ) ); repo.setMirroredRepositories( Collections.singletonList( repository ) ); return repo; }
/** * Get remote repository. * @return Remote repository. */ public RemoteRepository remote() { final RemoteRepository remote = new RemoteRepository(); remote.setId(this.identifier); remote.setContentType(this.type); remote.setUrl(this.url); remote.setPolicy(false, this.release); remote.setPolicy(true, this.snapshot); if (this.authentication != null) { remote.setAuthentication(this.authentication.getAuthentication()); } if (this.repoproxy != null) { remote.setProxy(this.repoproxy.getProxy()); } remote.setRepositoryManager(this.manager); final List<RemoteRepository> remotes = new LinkedList<RemoteRepository>(); remote.setMirroredRepositories(remotes); for (final SimpleRepository repo : this.mirrored) { remotes.add(repo.remote()); } return remote; } }
/** * Get remote repository. * @return Remote repository. */ public RemoteRepository remote() { final RemoteRepository remote = new RemoteRepository(); remote.setId(this.identifier); remote.setContentType(this.type); remote.setUrl(this.url); remote.setPolicy(false, this.release); remote.setPolicy(true, this.snapshot); if (this.authentication != null) { remote.setAuthentication(this.authentication.getAuthentication()); } if (this.repoproxy != null) { remote.setProxy(this.repoproxy.getProxy()); } remote.setRepositoryManager(this.manager); final List<RemoteRepository> remotes = new LinkedList<RemoteRepository>(); remote.setMirroredRepositories(remotes); return remote; } }
merged.setId( dominant.getId() ); merged.setContentType( dominant.getContentType() ); merged.setUrl( dominant.getUrl() );
/** * 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() ); }
for (Repository repository : getRepositories()) { RemoteRepository remote = new RemoteRepository(); remote.setId(repository.getId()); remote.setUrl(repository.getUrl()); remote.setContentType("default");
/** * 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() ); }
merged.setId( dominant.getId() ); merged.setContentType( dominant.getContentType() ); merged.setUrl( dominant.getUrl() );
/** * 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() ); }
for (Repository repository : getRepositories()) { RemoteRepository remote = new RemoteRepository(); remote.setId(repository.getId()); remote.setUrl(repository.getUrl()); remote.setContentType("default");