]> source.dussan.org Git - archiva.git/commitdiff
implement removeNamespace for FileMetadataRepository
authorOlivier Lamy <olamy@apache.org>
Thu, 6 Sep 2012 12:37:57 +0000 (12:37 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 6 Sep 2012 12:37:57 +0000 (12:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1381578 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java

index 6d9c9bea81320c3a7cbf8b0d90a2a86ace136fb3..3294ab895adc51ecad36a0d3430e45ca44ef8b2b 100644 (file)
@@ -597,6 +597,24 @@ public class FileMetadataRepository
         return artifacts;
     }
 
+    public void removeNamespace( String repositoryId, String project )
+        throws MetadataRepositoryException
+    {
+        try
+        {
+            File namespaceDirectory = new File( getDirectory( repositoryId ), project );
+            FileUtils.deleteDirectory( namespaceDirectory );
+            //Properties properties = new Properties();
+            //properties.setProperty( "namespace", namespace );
+            //writeProperties( properties, namespaceDirectory, NAMESPACE_METADATA_KEY );
+
+        }
+        catch ( IOException e )
+        {
+            throw new MetadataRepositoryException( e.getMessage(), e );
+        }
+    }
+
     public void removeArtifact( ArtifactMetadata artifactMetadata, String baseVersion )
         throws MetadataRepositoryException
     {