diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-02 08:18:38 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-02 08:18:38 +0000 |
commit | 75f7fab6d40a5afb86620f567f585694a87a7100 (patch) | |
tree | eb57f6d4739e31e6155d6c59d0a6e877864bde99 /archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api | |
parent | 56587c1e6dba06f0c29646440db87077a5155ce5 (diff) | |
download | archiva-75f7fab6d40a5afb86620f567f585694a87a7100.tar.gz archiva-75f7fab6d40a5afb86620f567f585694a87a7100.zip |
[MRM-1509] change xmlrpc to use new repository administration management api
use new api for ManagedRepository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1164392 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api')
2 files changed, 39 insertions, 28 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml index b1bcf198d..8dce1e56d 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml @@ -36,6 +36,10 @@ <artifactId>stage-repository-merge</artifactId> </dependency> <dependency> + <groupId>org.apache.archiva</groupId> + <artifactId>archiva-repository-admin</artifactId> + </dependency> + <dependency> <groupId>com.atlassian.xmlrpc</groupId> <artifactId>atlassian-xmlrpc-binder-annotations</artifactId> </dependency> diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java index 78e90b24c..f7640c29e 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java @@ -19,75 +19,78 @@ package org.apache.archiva.web.xmlrpc.api; * under the License. */ -import java.util.List; - import com.atlassian.xmlrpc.ServiceObject; +import org.apache.archiva.admin.repository.RepositoryAdminException; import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository; import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository; +import java.util.List; + @ServiceObject( "AdministrationService" ) public interface AdministrationService { /** * Executes repository scanner on the given repository. - * + * * @param repoId id of the repository to be scanned * @return * @throws Exception */ - public Boolean executeRepositoryScanner( String repoId ) + Boolean executeRepositoryScanner( String repoId ) throws Exception; /** * Gets all available repository consumers. - * + * * @return */ - public List<String> getAllRepositoryConsumers(); + List<String> getAllRepositoryConsumers(); // TODO should we already implement config of consumers per repository? + /** * Configures (enable or disable) repository consumer. - * + * * @param repoId * @param consumerId * @param enable * @return * @throws Exception */ - public Boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) + Boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) throws Exception; /** * Gets all managed repositories. - * + * * @return */ - public List<ManagedRepository> getAllManagedRepositories(); + List<ManagedRepository> getAllManagedRepositories() + throws RepositoryAdminException; /** * Gets all remote repositories. - * + * * @return */ - public List<RemoteRepository> getAllRemoteRepositories(); + List<RemoteRepository> getAllRemoteRepositories(); /** * Deletes given artifact from the specified repository. - * - * @param repoId id of the repository where the artifact to be deleted resides - * @param groupId groupId of the artifact to be deleted + * + * @param repoId id of the repository where the artifact to be deleted resides + * @param groupId groupId of the artifact to be deleted * @param artifactId artifactId of the artifact to be deleted - * @param version version of the artifact to be deleted + * @param version version of the artifact to be deleted * @return * @throws Exception */ - public Boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ) + Boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ) throws Exception; /** * Create a new managed repository with the given parameters. - * + * * @param repoId * @param layout * @param name @@ -99,37 +102,39 @@ public interface AdministrationService * @return * @throws Exception */ - public Boolean addManagedRepository( String repoId, String layout, String name, String location, - boolean blockRedeployments, boolean releasesIncluded, - boolean snapshotsIncluded, boolean stageRepoNeeded, String cronExpression ) + Boolean addManagedRepository( String repoId, String layout, String name, String location, + boolean blockRedeployments, boolean releasesIncluded, boolean snapshotsIncluded, + boolean stageRepoNeeded, String cronExpression ) throws Exception; /** * Deletes a managed repository with the given repository id. - * + * * @param repoId * @return */ - public Boolean deleteManagedRepository( String repoId ) + Boolean deleteManagedRepository( String repoId ) throws Exception; /** * Deletes a managed repository content with the given repository id - * + * * @param repoId * @return * @throws Exception */ - public Boolean deleteManagedRepositoryContent( String repoId ) + Boolean deleteManagedRepositoryContent( String repoId ) throws Exception; /** * Get a managed repository with the given repository id. + * * @param repoId * @return * @throws Exception */ - public ManagedRepository getManagedRepository(String repoId) throws Exception; + ManagedRepository getManagedRepository( String repoId ) + throws Exception; // TODO // consider the following as additional services: // - getAllConfiguredRepositoryConsumers( String repoId ) - list all enabled consumers for the repo @@ -137,11 +142,13 @@ public interface AdministrationService /** * Merge staging repository with the managed repository and skips if there are conflicts + * * @param repoId * @param skipConflicts * @return * @throws Exception */ - public boolean merge( String repoId, boolean skipConflicts ) throws Exception; - + boolean merge( String repoId, boolean skipConflicts ) + throws Exception; + } |