fix facet creation

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1582198 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2014-03-27 06:01:50 +00:00
parent 5719fa8827
commit bb79c82aab
1 changed files with 2 additions and 3 deletions

View File

@ -1061,7 +1061,7 @@ public class CassandraMetadataRepository
MetadataFacetFactory metadataFacetFactory = metadataFacetFactories.get( entry.getKey() ); MetadataFacetFactory metadataFacetFactory = metadataFacetFactories.get( entry.getKey() );
if ( metadataFacetFactory != null ) if ( metadataFacetFactory != null )
{ {
MetadataFacet metadataFacet = metadataFacetFactory.createMetadataFacet( repoId, entry.getKey() ); MetadataFacet metadataFacet = metadataFacetFactory.createMetadataFacet( );
metadataFacet.fromProperties( entry.getValue() ); metadataFacet.fromProperties( entry.getValue() );
projectVersionMetadata.addFacet( metadataFacet ); projectVersionMetadata.addFacet( metadataFacet );
} }
@ -2113,8 +2113,7 @@ public class CassandraMetadataRepository
List<MetadataFacetModel> facetModels = entry.getValue(); List<MetadataFacetModel> facetModels = entry.getValue();
if ( !facetModels.isEmpty() ) if ( !facetModels.isEmpty() )
{ {
MetadataFacet metadataFacet = MetadataFacet metadataFacet = metadataFacetFactory.createMetadataFacet();
metadataFacetFactory.createMetadataFacet( repoId, facetModels.get( 0 ).getName() );
Map<String, String> props = new HashMap<String, String>( facetModels.size() ); Map<String, String> props = new HashMap<String, String>( facetModels.size() );
for ( MetadataFacetModel metadataFacetModel : facetModels ) for ( MetadataFacetModel metadataFacetModel : facetModels )
{ {