archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1488510 - in /archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra: ./ model/
Date Sat, 01 Jun 2013 12:26:41 GMT
Author: olamy
Date: Sat Jun  1 12:26:41 2013
New Revision: 1488510

URL: http://svn.apache.org/r1488510
Log:
fix delete artifact

Modified:
    archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
    archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java
    archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Namespace.java
    archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ProjectVersionMetadataModel.java

Modified: archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
URL: http://svn.apache.org/viewvc/archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java?rev=1488510&r1=1488509&r2=1488510&view=diff
==============================================================================
--- archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
(original)
+++ archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
Sat Jun  1 12:26:41 2013
@@ -696,7 +696,7 @@ public class CassandraMetadataRepository
                         namespace, artifactMetadataModel.getNamespace() ) && StringUtils.equals(
projectId,
                                                                                         
        artifactMetadataModel.getProject() ) )
                     {
-                        versions.add( artifactMetadataModel.getVersion() );
+                        versions.add( artifactMetadataModel.getProjectVersion() );
                     }
                 }
                 return Boolean.TRUE;
@@ -1272,6 +1272,9 @@ public class CassandraMetadataRepository
             new ArtifactMetadataModel.KeyBuilder().withRepositoryId( repositoryId ).withNamespace(
namespace ).withId(
                 id ).withProjectVersion( version ).withProject( project ).build();
 
+        //String key = new ArtifactMetadataModel.KeyBuilder().withNamespace( namespace ).withProject(
projectId ).withId(
+        //    artifactMeta.getId() ).withProjectVersion( projectVersion ).build();
+
         artifactMetadataModelEntityManager.visitAll( new Function<ArtifactMetadataModel,
Boolean>()
         {
             @Override

Modified: archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java
URL: http://svn.apache.org/viewvc/archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java?rev=1488510&r1=1488509&r2=1488510&view=diff
==============================================================================
--- archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java
(original)
+++ archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ArtifactMetadataModel.java
Sat Jun  1 12:26:41 2013
@@ -290,7 +290,7 @@ public class ArtifactMetadataModel
 
         public KeyBuilder withNamespace( Namespace namespace )
         {
-            this.namespaceId = namespace.getId();
+            this.namespaceId = namespace.getName();
             this.repositoryId = namespace.getRepository().getId();
             return this;
         }
@@ -323,7 +323,7 @@ public class ArtifactMetadataModel
         {
             //repositoryId + namespaceId + project + projectVersion + id
             // FIXME add some controls
-            return this.repositoryId + "-" + this.namespaceId + "-" + this.project + "-"
+ this.projectVersion
+            return this.repositoryId + "-" + this.namespaceId + "-" + this.project + "-"
+ this.projectVersion + "-"
                 + this.id;
         }
     }

Modified: archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Namespace.java
URL: http://svn.apache.org/viewvc/archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Namespace.java?rev=1488510&r1=1488509&r2=1488510&view=diff
==============================================================================
--- archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Namespace.java
(original)
+++ archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Namespace.java
Sat Jun  1 12:26:41 2013
@@ -164,7 +164,7 @@ public class Namespace
 
         public KeyBuilder withNamespace( Namespace namespace )
         {
-            this.namespace = namespace.getId();
+            this.namespace = namespace.getName();
             this.repositoryId = namespace.getRepository().getId();
             return this;
         }

Modified: archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ProjectVersionMetadataModel.java
URL: http://svn.apache.org/viewvc/archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ProjectVersionMetadataModel.java?rev=1488510&r1=1488509&r2=1488510&view=diff
==============================================================================
--- archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ProjectVersionMetadataModel.java
(original)
+++ archiva/sandbox/trunk/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/ProjectVersionMetadataModel.java
Sat Jun  1 12:26:41 2013
@@ -268,7 +268,7 @@ public class ProjectVersionMetadataModel
 
         public KeyBuilder withNamespace( Namespace namespace )
         {
-            this.namespace = namespace.getId();
+            this.namespace = namespace.getName();
             this.repositoryId = namespace.getRepository().getId();
             return this;
         }



Mime
View raw message