From be6db50a31100c791a756886fe887e8d544603a2 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Mon, 20 Oct 2008 02:27:14 +0000 Subject: [PATCH] added deleteArtifact in sample client git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-124@706107 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/xmlrpc/client/SampleClient.java | 12 ++++++++++-- .../security/ServiceMethodsPermissionsMapping.java | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java index e9dce7a9c..7f94734a1 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java @@ -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 ) { diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java index 9a61db2f3..333b4218e 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java @@ -43,6 +43,7 @@ public class ServiceMethodsPermissionsMapping add( "AdministrationService.getAllRemoteRepositories" ); add( "AdministrationService.getAllDatabaseConsumers" ); add( "AdministrationService.getAllRepositoryConsumers" ); + add( "AdministrationService.deleteArtifact" ); } }; -- 2.39.5