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 a8f7f1165..01e867fbf 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 @@ -101,47 +101,47 @@ public interface ArchivaAdministrationService Boolean removeFileType( @QueryParam( "fileTypeId" ) String fileTypeId ) throws ArchivaRestServiceException; - @Path( "addKnownContentConsumer" ) + @Path( "enabledKnownContentConsumer" ) @GET @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) - Boolean addKnownContentConsumer( @QueryParam( "knownContentConsumer" ) String knownContentConsumer ) + Boolean enabledKnownContentConsumer( @QueryParam( "knownContentConsumer" ) String knownContentConsumer ) throws ArchivaRestServiceException; - @Path( "setKnownContentConsumers" ) + @Path( "enabledKnownContentConsumers" ) @POST @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) - void setKnownContentConsumers( List knownContentConsumers ) + void enabledKnownContentConsumers( List knownContentConsumers ) throws ArchivaRestServiceException; - @Path( "removeKnownContentConsumer" ) + @Path( "disabledKnownContentConsumer" ) @GET @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) - Boolean removeKnownContentConsumer( @QueryParam( "knownContentConsumer" ) String knownContentConsumer ) + Boolean disabledKnownContentConsumer( @QueryParam( "knownContentConsumer" ) String knownContentConsumer ) throws ArchivaRestServiceException; - @Path( "addInvalidContentConsumer" ) + @Path( "enabledInvalidContentConsumer" ) @GET @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) - Boolean addInvalidContentConsumer( @QueryParam( "invalidContentConsumer" ) String invalidContentConsumer ) + Boolean enabledInvalidContentConsumer( @QueryParam( "invalidContentConsumer" ) String invalidContentConsumer ) throws ArchivaRestServiceException; - @Path( "setInvalidContentConsumers" ) + @Path( "enabledInvalidContentConsumers" ) @POST @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) - void setInvalidContentConsumers( List invalidContentConsumers ) + void enabledInvalidContentConsumers( List invalidContentConsumers ) throws ArchivaRestServiceException; - @Path( "removeInvalidContentConsumer" ) + @Path( "disabledInvalidContentConsumer" ) @GET @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) - Boolean removeInvalidContentConsumer( @QueryParam( "invalidContentConsumer" ) String invalidContentConsumer ) + Boolean disabledInvalidContentConsumer( @QueryParam( "invalidContentConsumer" ) String invalidContentConsumer ) throws ArchivaRestServiceException; @Path( "getFileTypes" ) 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 743939431..42105afe0 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 @@ -190,7 +190,7 @@ public class DefaultArchivaAdministrationService } } - public Boolean addKnownContentConsumer( String knownContentConsumer ) + public Boolean enabledKnownContentConsumer( String knownContentConsumer ) throws ArchivaRestServiceException { try @@ -204,7 +204,7 @@ public class DefaultArchivaAdministrationService } } - public void setKnownContentConsumers( List knownContentConsumers ) + public void enabledKnownContentConsumers( List knownContentConsumers ) throws ArchivaRestServiceException { try @@ -217,7 +217,7 @@ public class DefaultArchivaAdministrationService } } - public Boolean removeKnownContentConsumer( String knownContentConsumer ) + public Boolean disabledKnownContentConsumer( String knownContentConsumer ) throws ArchivaRestServiceException { try @@ -231,7 +231,7 @@ public class DefaultArchivaAdministrationService } } - public Boolean addInvalidContentConsumer( String invalidContentConsumer ) + public Boolean enabledInvalidContentConsumer( String invalidContentConsumer ) throws ArchivaRestServiceException { try @@ -245,7 +245,7 @@ public class DefaultArchivaAdministrationService } } - public void setInvalidContentConsumers( List invalidContentConsumers ) + public void enabledInvalidContentConsumers( List invalidContentConsumers ) throws ArchivaRestServiceException { try @@ -258,7 +258,7 @@ public class DefaultArchivaAdministrationService } } - public Boolean removeInvalidContentConsumer( String invalidContentConsumer ) + public Boolean disabledInvalidContentConsumer( String invalidContentConsumer ) throws ArchivaRestServiceException { try diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java index b36e9ee68..d2304c508 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java @@ -305,8 +305,8 @@ public abstract class AbstractArchivaRestTest getManagedRepositoriesService( authorizationHeader ).addManagedRepository( managedRepository ); assertNotNull( getManagedRepositoriesService( authorizationHeader ).getManagedRepository( SOURCE_REPO_ID ) ); - getArchivaAdministrationService().addKnownContentConsumer( "create-missing-checksums" ); - getArchivaAdministrationService().addKnownContentConsumer( "metadata-updater" ); + getArchivaAdministrationService().enabledKnownContentConsumer( "create-missing-checksums" ); + getArchivaAdministrationService().enabledKnownContentConsumer( "metadata-updater" ); } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ArchivaAdministrationServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ArchivaAdministrationServiceTest.java index f3dea9ecf..22702b7db 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ArchivaAdministrationServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ArchivaAdministrationServiceTest.java @@ -151,14 +151,14 @@ public class ArchivaAdministrationServiceTest assertFalse( consumers.isEmpty() ); assertAllDisabled( consumers ); - getArchivaAdministrationService().addInvalidContentConsumer( "foo" ); + getArchivaAdministrationService().enabledInvalidContentConsumer( "foo" ); consumers = getArchivaAdministrationService().getInvalidContentAdminRepositoryConsumers(); assertFalse( consumers.isEmpty() ); assertAllEnabled( consumers ); - getArchivaAdministrationService().removeInvalidContentConsumer( "foo" ); + getArchivaAdministrationService().disabledInvalidContentConsumer( "foo" ); consumers = getArchivaAdministrationService().getInvalidContentAdminRepositoryConsumers();