From f2dbfdf0a8f6d5992055629aa0620a6294849c61 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 29 Aug 2011 14:02:39 +0000 Subject: [PATCH] use location rather than url : better naming git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1162819 13f79535-47bb-0310-9956-ffa450edef68 --- .../managed/DefaultManagedRepositoryAdmin.java | 2 +- .../repository/managed/ManagedRepository.java | 16 ++++++++-------- .../managed/ManagedRepositoryAdminTest.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 290a3944f..67ea533c5 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -112,7 +112,7 @@ public class DefaultManagedRepositoryAdmin { return addManagedRepository( managedRepository.getId(), managedRepository.getLayout(), managedRepository.getName(), - managedRepository.getUrl(), managedRepository.isBlockRedeployments(), + managedRepository.getLocation(), managedRepository.isBlockRedeployments(), managedRepository.isReleases(), managedRepository.isSnapshots(), needStageRepo, managedRepository.getCronExpression() ) != null; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/ManagedRepository.java b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/ManagedRepository.java index f8d897cbb..0abefc8c6 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/ManagedRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/managed/ManagedRepository.java @@ -31,7 +31,7 @@ public class ManagedRepository private String name; - private String url; + private String location; private String layout; @@ -55,12 +55,12 @@ public class ManagedRepository // no op } - public ManagedRepository( String id, String name, String url, String layout, boolean snapshots, boolean releases, + public ManagedRepository( String id, String name, String location, String layout, boolean snapshots, boolean releases, boolean blockRedeployments, String cronExpression ) { this.id = id; this.name = name; - this.url = url; + this.location = location; this.layout = layout; this.snapshots = snapshots; this.releases = releases; @@ -82,9 +82,9 @@ public class ManagedRepository return this.name; } - public String getUrl() + public String getLocation() { - return this.url; + return this.location; } @@ -126,9 +126,9 @@ public class ManagedRepository this.snapshots = snapshots; } - public void setUrl( String url ) + public void setLocation( String location ) { - this.url = url; + this.location = location; } public boolean isBlockRedeployments() @@ -194,7 +194,7 @@ public class ManagedRepository sb.append( "ManagedRepository" ); sb.append( "{id='" ).append( id ).append( '\'' ); sb.append( ", name='" ).append( name ).append( '\'' ); - sb.append( ", url='" ).append( url ).append( '\'' ); + sb.append( ", location='" ).append( location ).append( '\'' ); sb.append( ", layout='" ).append( layout ).append( '\'' ); sb.append( ", snapshots=" ).append( snapshots ); sb.append( ", releases=" ).append( releases ); diff --git a/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java index 9e01fc2b9..3d73e3dc6 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java @@ -70,7 +70,7 @@ public class ManagedRepositoryAdminTest ManagedRepository repo = new ManagedRepository(); repo.setId( "test-new-one" ); repo.setName( "test repo" ); - repo.setUrl( APPSERVER_BASE_PATH + repo.getId() ); + repo.setLocation( APPSERVER_BASE_PATH + repo.getId() ); managedRepositoryAdmin.addManagedRepository( repo, false ); repos = managedRepositoryAdmin.getManagedRepositories(); assertNotNull( repos );