protected void recordLicenses( String projectVersionMetadataKey, List<License> licenses )
{
if ( licenses == null || licenses.isEmpty() )
{
return;
}
Mutator<String> licenseMutator = this.licenseTemplate.createMutator();
for ( License license : licenses )
{
String keyLicense = UUID.randomUUID().toString();
String cfLicense = cassandraArchivaManager.getLicenseFamilyName();
addInsertion( licenseMutator, keyLicense, cfLicense, "projectVersionMetadataModel.key",
projectVersionMetadataKey );
addInsertion( licenseMutator, keyLicense, cfLicense, NAME.toString(), license.getName() );
addInsertion( licenseMutator, keyLicense, cfLicense, URL.toString(), license.getUrl() );
}
licenseMutator.execute();
}