diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-30 14:21:44 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-30 14:21:44 +0000 |
commit | 3e0caade83f9627e72b749844d6eec7baecd0990 (patch) | |
tree | 57589ce78af856ea8760a58574ed91e6badbe285 /archiva-modules | |
parent | 05191844ba0e0311e29c70c777e59ba16e7a607b (diff) | |
download | archiva-3e0caade83f9627e72b749844d6eec7baecd0990.tar.gz archiva-3e0caade83f9627e72b749844d6eec7baecd0990.zip |
[MRM-1526] configure http connection pool values for wagon http : add REST services
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177675 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
2 files changed, 43 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java index e10f67fb0..e1210dfcf 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java @@ -20,6 +20,7 @@ package org.apache.archiva.rest.api.services; import org.apache.archiva.admin.model.beans.FileType; import org.apache.archiva.admin.model.beans.LegacyArtifactPath; +import org.apache.archiva.admin.model.beans.NetworkConfiguration; import org.apache.archiva.admin.model.beans.OrganisationInformation; import org.apache.archiva.admin.model.beans.UiConfiguration; import org.apache.archiva.security.common.ArchivaRoleConstants; @@ -190,5 +191,20 @@ public interface ArchivaAdministrationService @RedbackAuthorization( permission = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) void setUiConfiguration( UiConfiguration uiConfiguration ) throws ArchivaRestServiceException; + + + @Path( "getNetworkConfiguration" ) + @GET + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) + @RedbackAuthorization( permission = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) + NetworkConfiguration getNetworkConfiguration() + throws ArchivaRestServiceException; + + @Path( "setNetworkConfiguration" ) + @POST + @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) + @RedbackAuthorization( permission = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) + void setNetworkConfiguration( NetworkConfiguration networkConfiguration ) + throws ArchivaRestServiceException; } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java index f90c4a362..82db3f003 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java @@ -22,6 +22,7 @@ import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.admin.ArchivaAdministration; import org.apache.archiva.admin.model.beans.FileType; import org.apache.archiva.admin.model.beans.LegacyArtifactPath; +import org.apache.archiva.admin.model.beans.NetworkConfiguration; import org.apache.archiva.admin.model.beans.OrganisationInformation; import org.apache.archiva.admin.model.beans.UiConfiguration; import org.apache.archiva.rest.api.services.ArchivaAdministrationService; @@ -332,4 +333,30 @@ public class DefaultArchivaAdministrationService throw new ArchivaRestServiceException( e.getMessage() ); } } + + public NetworkConfiguration getNetworkConfiguration() + throws ArchivaRestServiceException + { + try + { + return archivaAdministration.getNetworkConfiguration(); + } + catch ( RepositoryAdminException e ) + { + throw new ArchivaRestServiceException( e.getMessage() ); + } + } + + public void setNetworkConfiguration( NetworkConfiguration networkConfiguration ) + throws ArchivaRestServiceException + { + try + { + archivaAdministration.setNetworkConfiguration( networkConfiguration ); + } + catch ( RepositoryAdminException e ) + { + throw new ArchivaRestServiceException( e.getMessage() ); + } + } } |