summaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/metadata-store-file/src
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-file/src
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-file/src')
-rw-r--r--archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java35
-rw-r--r--archiva-modules/plugins/metadata-store-file/src/test/java/org/apache/archiva/metadata/repository/file/FileMetadataRepositoryTest.java97
2 files changed, 132 insertions, 0 deletions
diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
index e04c7d3bf..cca21bcd4 100644
--- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java
@@ -778,6 +778,27 @@ public class FileMetadataRepository
}
}
+ @Override
+ public List<ArtifactMetadata> getArtifactsByProjectVersionMetadata( String key, String value, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "not yet implemented in File backend" );
+ }
+
+ @Override
+ public List<ArtifactMetadata> getArtifactsByMetadata( String key, String value, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "not yet implemented in File backend" );
+ }
+
+ @Override
+ public List<ArtifactMetadata> getArtifactsByProperty( String key, String value, String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "getArtifactsByProperty not yet implemented in File backend" );
+ }
+
private File getMetadataDirectory( String repoId, String facetId )
{
return new File( getBaseDirectory( repoId ), "facets/" + facetId );
@@ -1296,4 +1317,18 @@ public class FileMetadataRepository
}
}
}
+
+ @Override
+ public List<ArtifactMetadata> searchArtifacts( String text, String repositoryId, boolean exact )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "searchArtifacts not yet implemented in File backend" );
+ }
+
+ @Override
+ public List<ArtifactMetadata> searchArtifacts( String key, String text, String repositoryId, boolean exact )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException( "searchArtifacts not yet implemented in File backend" );
+ }
}
diff --git a/archiva-modules/plugins/metadata-store-file/src/test/java/org/apache/archiva/metadata/repository/file/FileMetadataRepositoryTest.java b/archiva-modules/plugins/metadata-store-file/src/test/java/org/apache/archiva/metadata/repository/file/FileMetadataRepositoryTest.java
index df97f2e8c..aa589f3f2 100644
--- a/archiva-modules/plugins/metadata-store-file/src/test/java/org/apache/archiva/metadata/repository/file/FileMetadataRepositoryTest.java
+++ b/archiva-modules/plugins/metadata-store-file/src/test/java/org/apache/archiva/metadata/repository/file/FileMetadataRepositoryTest.java
@@ -26,6 +26,7 @@ import org.apache.archiva.configuration.ArchivaConfiguration;
import org.apache.archiva.configuration.Configuration;
import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
import org.junit.Before;
+import org.junit.Ignore;
import java.io.File;
import java.util.Map;
@@ -55,6 +56,102 @@ public class FileMetadataRepositoryTest
this.repository = new FileMetadataRepository( factories, config );
}
+ @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
+ }
+
protected static ArchivaConfiguration createTestConfiguration( File directory )
{
ArchivaConfiguration config = mock( ArchivaConfiguration.class );