summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-01-17 22:35:08 +0000
committerOlivier Lamy <olamy@apache.org>2012-01-17 22:35:08 +0000
commit58c30c851dcb4fd9d9e544986d8466d4756cfa8b (patch)
tree6f548075d809c13c766eadc9adb9dd02738813cb /archiva-modules/archiva-web/archiva-webapp
parent32b26356e9446dfc5c4d0fb857466cd808eec353 (diff)
downloadarchiva-58c30c851dcb4fd9d9e544986d8466d4756cfa8b.tar.gz
archiva-58c30c851dcb4fd9d9e544986d8466d4756cfa8b.zip
add a rest method to validate if managed repository location already exists.
So move RepositoryCommonValidator to admin api and add the interface git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1232615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java3
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java12
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java12
3 files changed, 14 insertions, 13 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java
index f1ba9f62f..c5719c30f 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java
@@ -19,8 +19,9 @@ package org.apache.archiva.web.action.admin.repositories;
* under the License.
*/
+import org.apache.archiva.admin.model.RepositoryCommonValidator;
import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin;
-import org.apache.archiva.admin.repository.RepositoryCommonValidator;
+import org.apache.archiva.admin.repository.DefaultRepositoryCommonValidator;
import org.apache.archiva.audit.Auditable;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.archiva.web.action.AbstractActionSupport;
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java
index 8eeba40bd..89d2cc91b 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java
@@ -21,7 +21,7 @@ package org.apache.archiva.web.action.admin.repositories;
import com.opensymphony.xwork2.Action;
import org.apache.archiva.admin.model.beans.ManagedRepository;
-import org.apache.archiva.admin.repository.RepositoryCommonValidator;
+import org.apache.archiva.admin.repository.DefaultRepositoryCommonValidator;
import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin;
import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.configuration.Configuration;
@@ -99,14 +99,14 @@ public class AddManagedRepositoryActionTest
( (DefaultManagedRepositoryAdmin) getManagedRepositoryAdmin() ).setRepositoryTaskScheduler(
repositoryTaskScheduler );
- RepositoryCommonValidator repositoryCommonValidator = new RepositoryCommonValidator();
- repositoryCommonValidator.setArchivaConfiguration( archivaConfiguration );
- repositoryCommonValidator.setRegistry( registry );
+ DefaultRepositoryCommonValidator defaultRepositoryCommonValidator = new DefaultRepositoryCommonValidator();
+ defaultRepositoryCommonValidator.setArchivaConfiguration( archivaConfiguration );
+ defaultRepositoryCommonValidator.setRegistry( registry );
( (DefaultManagedRepositoryAdmin) getManagedRepositoryAdmin() ).setRepositoryCommonValidator(
- repositoryCommonValidator );
+ defaultRepositoryCommonValidator );
- action.setRepositoryCommonValidator( repositoryCommonValidator );
+ action.setRepositoryCommonValidator( defaultRepositoryCommonValidator );
action.setManagedRepositoryAdmin( getManagedRepositoryAdmin() );
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java
index fe16df9f4..2dcb8f7d8 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java
@@ -22,7 +22,7 @@ package org.apache.archiva.web.action.admin.repositories;
import com.opensymphony.xwork2.Action;
import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.ManagedRepository;
-import org.apache.archiva.admin.repository.RepositoryCommonValidator;
+import org.apache.archiva.admin.repository.DefaultRepositoryCommonValidator;
import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin;
import org.apache.archiva.audit.AuditListener;
import org.apache.archiva.configuration.ArchivaConfiguration;
@@ -121,14 +121,14 @@ public class EditManagedRepositoryActionTest
( (DefaultManagedRepositoryAdmin) getManagedRepositoryAdmin() ).setAuditListeners(
new ArrayList<AuditListener>( 0 ) );
- RepositoryCommonValidator repositoryCommonValidator = new RepositoryCommonValidator();
- repositoryCommonValidator.setArchivaConfiguration( archivaConfiguration );
- repositoryCommonValidator.setRegistry( registry );
+ DefaultRepositoryCommonValidator defaultRepositoryCommonValidator = new DefaultRepositoryCommonValidator();
+ defaultRepositoryCommonValidator.setArchivaConfiguration( archivaConfiguration );
+ defaultRepositoryCommonValidator.setRegistry( registry );
( (DefaultManagedRepositoryAdmin) getManagedRepositoryAdmin() ).setRepositoryCommonValidator(
- repositoryCommonValidator );
+ defaultRepositoryCommonValidator );
- action.setRepositoryCommonValidator( repositoryCommonValidator );
+ action.setRepositoryCommonValidator( defaultRepositoryCommonValidator );
action.setManagedRepositoryAdmin( getManagedRepositoryAdmin() );