]> source.dussan.org Git - archiva.git/commitdiff
added deleteArtifact in sample client
authorMaria Odea B. Ching <oching@apache.org>
Mon, 20 Oct 2008 02:27:14 +0000 (02:27 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Mon, 20 Oct 2008 02:27:14 +0000 (02:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-124@706107 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java

index e9dce7a9c4a8168e16168ff91df0dfac28e4cfe8..7f94734a1cd73b50731d616f1d1ab9bbce2713de 100644 (file)
@@ -170,8 +170,16 @@ public class SampleClient
             /* execute db scanner */
             Object[] executeDbScanParams = new Object[] {};            
             configured = client.execute( "AdministrationService.executeDatabaseScanner", executeDbScanParams );
-            System.out.println( "\nExecuted database scanner : " + ( ( Boolean ) configured ).booleanValue() );            
-            
+            System.out.println( "\nExecuted database scanner : " + ( ( Boolean ) configured ).booleanValue() );
+            
+            /* delete artifact */
+            /* 
+             * NOTE: before enabling & invoking deleteArtifact, make sure that the repository and artifact exists first!            
+            Object[] deleteArtifactParams = new Object[] { "internal", "javax.activation", "activation", "1.1" };
+            Object artifactDeleted = client.execute( "AdministrationService.deleteArtifact", deleteArtifactParams );
+            System.out.println( "\nDeleted artifact 'javax.activation:activation:1.1' from repository 'internal' : " +
+                ( (Boolean) artifactDeleted ).booleanValue() );    
+            */ 
         }
         catch ( MalformedURLException e )
         {
index 9a61db2f36285dfef2ec1aa0bd2506f553594f58..333b4218ef368a465e15978088ab5663a8b414cf 100644 (file)
@@ -43,6 +43,7 @@ public class ServiceMethodsPermissionsMapping
             add( "AdministrationService.getAllRemoteRepositories" );
             add( "AdministrationService.getAllDatabaseConsumers" );
             add( "AdministrationService.getAllRepositoryConsumers" );
+            add( "AdministrationService.deleteArtifact" );
         }
     };