Assertions.assertThat( versions ).isNotNull().isNotEmpty().hasSize( 1 ).contains( "2.0" );
- assertTrue(
- repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION ).isEmpty() );
+ Assertions.assertThat( repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT,
+ TEST_PROJECT_VERSION )).isNotNull().isEmpty();
Assertions.assertThat( repository.getArtifacts( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT,
TEST_PROJECT_VERSION_2_0 ) ).isNotEmpty().hasSize( 1 );
final String version, final String id )
throws MetadataRepositoryException
{
-/* logger.debug( "removeArtifact repositoryId: '{}', namespace: '{}', project: '{}', version: '{}', id: '{}'",
+ logger.debug( "removeArtifact repositoryId: '{}', namespace: '{}', project: '{}', version: '{}', id: '{}'",
repositoryId, namespace, project, version, id );
String key =
new ArtifactMetadataModel.KeyBuilder().withRepositoryId( repositoryId ).withNamespace( namespace ).withId(
id ).withProjectVersion( version ).withProject( project ).build();
- ArtifactMetadataModel artifactMetadataModel = new ArtifactMetadataModel();
- artifactMetadataModel.setArtifactMetadataModelId( key );
- getArtifactMetadataModelEntityManager().remove( artifactMetadataModel );
+ Keyspace keyspace = cassandraArchivaManager.getKeyspace();
+
+ this.artifactMetadataTemplate.deleteRow( key );
key =
new ProjectVersionMetadataModel.KeyBuilder().withId( version ).withRepository( repositoryId ).withNamespace(
namespace ).withProjectId( project ).build();
- ProjectVersionMetadataModel projectVersionMetadataModel = new ProjectVersionMetadataModel();
- projectVersionMetadataModel.setRowId( key );
+ this.projectVersionMetadataModelTemplate.deleteRow( key );
- getProjectVersionMetadataModelEntityManager().remove( projectVersionMetadataModel );*/
}
@Override
Keyspace keyspace = cassandraArchivaManager.getKeyspace();
StringSerializer ss = StringSerializer.get();
- // cql cannot run or in queries so running twice the query
-
-
RangeSlicesQuery<String, String, String> query = HFactory //
.createRangeSlicesQuery( keyspace, ss, ss, ss ) //
.setColumnFamily( cassandraArchivaManager.getArtifactMetadataModelFamilyName() ) //