From: Maria Odea B. Ching Date: Mon, 20 Oct 2008 02:27:14 +0000 (+0000) Subject: added deleteArtifact in sample client X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3aabdbf674371701ecba53dbe5bed3a698846b02;p=archiva.git added deleteArtifact in sample client git-svn-id: https://svn.apache.org/repos/asf/archiva/branches@706107 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java b/MRM-124/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/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java +++ b/MRM-124/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/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java b/MRM-124/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/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/archiva/web/xmlrpc/security/ServiceMethodsPermissionsMapping.java +++ b/MRM-124/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" ); } };