]> source.dussan.org Git - archiva.git/commitdiff
use a better name for those methods
authorOlivier Lamy <olamy@apache.org>
Wed, 7 Mar 2012 22:02:22 +0000 (22:02 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 7 Mar 2012 22:02:22 +0000 (22:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1298150 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/ArchivaAdministrationServiceTest.java

index a8f7f11658569d4f2abf02ac13ec263e314ebdcf..01e867fbf66acce47008170aead9ab7f99613c02 100644 (file)
@@ -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<String> knownContentConsumers )
+    void enabledKnownContentConsumers( List<String> 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<String> invalidContentConsumers )
+    void enabledInvalidContentConsumers( List<String> 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" )
index 74393943178b080a4d5669c64cd1ef2058f127e6..42105afe07d91b02046411ff34275ed4145b9e57 100644 (file)
@@ -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<String> knownContentConsumers )
+    public void enabledKnownContentConsumers( List<String> 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<String> invalidContentConsumers )
+    public void enabledInvalidContentConsumers( List<String> invalidContentConsumers )
         throws ArchivaRestServiceException
     {
         try
@@ -258,7 +258,7 @@ public class DefaultArchivaAdministrationService
         }
     }
 
-    public Boolean removeInvalidContentConsumer( String invalidContentConsumer )
+    public Boolean disabledInvalidContentConsumer( String invalidContentConsumer )
         throws ArchivaRestServiceException
     {
         try
index b36e9ee68af17b254b93709d075bca758342a84f..d2304c508f74bb7cd254a232595236752674ecbc 100644 (file)
@@ -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" );
 
     }
 
index f3dea9ecffd6ff8c1338d2f12a3a0b8cdf3d6ed1..22702b7dba6f90366bcd65538850182202fb53c1 100644 (file)
@@ -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();