aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/metadata-store-cassandra
diff options
context:
space:
mode:
authorCarlos Sanchez <csanchez@maestrodev.com>2014-11-05 20:11:08 +0100
committerCarlos Sanchez <carlos@apache.org>2014-12-01 16:48:13 +0100
commite4da1fa6f5a56bbf63bae1de7d1b7dd0ae0375aa (patch)
tree6477dd5905f983cc3f4cd83580795ab8a7be9ef8 /archiva-modules/plugins/metadata-store-cassandra
parentd9473241c956359325aa10bdbff4e39be284c559 (diff)
downloadarchiva-e4da1fa6f5a56bbf63bae1de7d1b7dd0ae0375aa.tar.gz
archiva-e4da1fa6f5a56bbf63bae1de7d1b7dd0ae0375aa.zip
[MRM-1390] Add REST methods to search JCR store for generic metadata and properties
Added REST methods: artifactsByProjectVersionMetadata/{key}/{value} artifactsByMetadata/{key}/{value} artifactsByProperty/{key}/{value} searchArtifacts/{text} searchArtifacts/{key}/{text} In JCR implementation When searching into any property (key = nil) we can't do exact searchs
Diffstat (limited to 'archiva-modules/plugins/metadata-store-cassandra')
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/pom.xml5
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java37
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java105
3 files changed, 141 insertions, 6 deletions
diff --git a/archiva-modules/plugins/metadata-store-cassandra/pom.xml b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
index 6a8072c87..83a6b1710 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/pom.xml
+++ b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
@@ -131,6 +131,11 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>generic-metadata-support</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
index f58b429b9..779c19f1c 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java
@@ -21,6 +21,7 @@ package org.apache.archiva.metadata.repository.cassandra;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
+
import me.prettyprint.cassandra.serializers.LongSerializer;
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.template.ColumnFamilyResult;
@@ -37,6 +38,7 @@ import me.prettyprint.hector.api.mutation.MutationResult;
import me.prettyprint.hector.api.mutation.Mutator;
import me.prettyprint.hector.api.query.QueryResult;
import me.prettyprint.hector.api.query.RangeSlicesQuery;
+
import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.metadata.model.ArtifactMetadata;
import org.apache.archiva.metadata.model.CiManagement;
@@ -67,6 +69,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.persistence.PersistenceException;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -1823,6 +1826,26 @@ public class CassandraMetadataRepository
return artifactMetadataMap.values();
}
+ @Override
+ public List<ArtifactMetadata> getArtifactsByProjectVersionMetadata( String key, String value, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "not yet implemented in Cassandra backend" );
+ }
+
+ @Override
+ public List<ArtifactMetadata> getArtifactsByMetadata( String key, String value, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "not yet implemented in Cassandra backend" );
+ }
+
+ @Override
+ public List<ArtifactMetadata> getArtifactsByProperty( String key, String value, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "getArtifactsByProperty not yet implemented in Cassandra backend" );
+ }
@Override
public void removeArtifact( final String repositoryId, final String namespace, final String project,
@@ -2174,4 +2197,18 @@ public class CassandraMetadataRepository
{
return ModelMapperHolder.MODEL_MAPPER;
}
+
+ @Override
+ public List<ArtifactMetadata> searchArtifacts( String text, String repositoryId, boolean exact )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "searchArtifacts not yet implemented in Cassandra backend" );
+ }
+
+ @Override
+ public List<ArtifactMetadata> searchArtifacts( String key, String text, String repositoryId, boolean exact )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "searchArtifacts not yet implemented in Cassandra backend" );
+ }
}
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
index c26a660e8..97b3718f7 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
@@ -19,21 +19,19 @@ package org.apache.archiva.metadata.repository.cassandra;
* under the License.
*/
-import org.apache.archiva.metadata.model.MailingList;
import org.apache.archiva.metadata.model.MetadataFacetFactory;
import org.apache.archiva.metadata.repository.AbstractMetadataRepositoryTest;
import org.apache.archiva.metadata.repository.cassandra.model.ProjectVersionMetadataModel;
import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Named;
+
import java.io.File;
-import java.util.List;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
@@ -44,8 +42,6 @@ import static org.assertj.core.api.Assertions.assertThat;
public class CassandraMetadataRepositoryTest
extends AbstractMetadataRepositoryTest
{
- private Logger logger = LoggerFactory.getLogger( getClass() );
-
@Inject
@Named(value = "archivaEntityManagerFactory#cassandra")
CassandraArchivaManager cassandraArchivaManager;
@@ -73,6 +69,103 @@ public class CassandraMetadataRepositoryTest
clearReposAndNamespace( cassandraArchivaManager );
}
+ @Override
+ @Ignore
+ public void testGetArtifactsByProjectVersionMetadata()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testGetArtifactsByProjectVersionMetadataNoRepository()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testGetArtifactsByProjectVersionMetadataAllRepositories()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testGetArtifactsByMetadataAllRepositories()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testGetArtifactsByPropertySingleResult()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsByKey()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsByKeyExact()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsFullText()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsFullTextExact()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsByFacetKeyAllRepos()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsByFacetKey()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+ @Override
+ @Ignore
+ public void testSearchArtifactsFullTextByFacet()
+ throws Exception
+ {
+ // TODO not implemented
+ }
+
+
/**
* ensure all dependant tables are cleaned up (mailinglist, license, dependencies)
*
'backport/48508/stable30'>backport/48508/stable30 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/apps/files/l10n/lb.json
blob: 875e22ab1f1c66f85486b16c04020948f52c0529 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116