summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest/archiva-rest-api
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-12-22 12:25:23 +0000
committerOlivier Lamy <olamy@apache.org>2013-12-22 12:25:23 +0000
commit84bcc48e6b6f96c62c6826807794cd747afa41f6 (patch)
tree57fbc94ab2d4985cee303bbe46c207f4786ee57a /archiva-modules/archiva-web/archiva-rest/archiva-rest-api
parent9f44c1ad12849f6ecda938ca09835d1f29d41660 (diff)
downloadarchiva-84bcc48e6b6f96c62c6826807794cd747afa41f6.tar.gz
archiva-84bcc48e6b6f96c62c6826807794cd747afa41f6.zip
[MRM-1750] Add remote repository health check
Add rest api git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1552981 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-api')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java53
1 files changed, 29 insertions, 24 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java
index fc861402c..19cbf5d69 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/RemoteRepositoriesService.java
@@ -36,47 +36,52 @@ import java.util.List;
* @author Olivier Lamy
* @since 1.4-M1
*/
-@Path( "/remoteRepositoriesService/" )
+@Path("/remoteRepositoriesService/")
public interface RemoteRepositoriesService
{
- @Path( "getRemoteRepositories" )
+ @Path("getRemoteRepositories")
@GET
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
List<RemoteRepository> getRemoteRepositories()
throws ArchivaRestServiceException;
- @Path( "getRemoteRepository/{repositoryId}" )
+ @Path("getRemoteRepository/{repositoryId}")
@GET
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
- RemoteRepository getRemoteRepository( @PathParam( "repositoryId" ) String repositoryId )
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
+ RemoteRepository getRemoteRepository( @PathParam("repositoryId") String repositoryId )
throws ArchivaRestServiceException;
- @Path( "deleteRemoteRepository/{repositoryId}" )
+ @Path("deleteRemoteRepository/{repositoryId}")
@GET
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
- Boolean deleteRemoteRepository( @PathParam( "repositoryId" ) String repositoryId )
- throws Exception;
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
+ @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
+ Boolean deleteRemoteRepository( @PathParam("repositoryId") String repositoryId )
+ throws ArchivaRestServiceException;
- @Path( "addRemoteRepository" )
+ @Path("addRemoteRepository")
@POST
- @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
+ @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
+ @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
Boolean addRemoteRepository( RemoteRepository remoteRepository )
- throws Exception;
+ throws ArchivaRestServiceException;
- @Path( "updateRemoteRepository" )
+ @Path("updateRemoteRepository")
@POST
- @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
+ @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
+ @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
Boolean updateRemoteRepository( RemoteRepository remoteRepository )
- throws Exception;
-
+ throws ArchivaRestServiceException;
+ @Path("checkRemoteConnectivity/{repositoryId}")
+ @GET
+ @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })
+ @RedbackAuthorization(permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION)
+ Boolean checkRemoteConnectivity( @PathParam( "repositoryId" ) String repositoryId )
+ throws ArchivaRestServiceException;
}