/** * Constructs a ColumnFamilyUpdater with the provided {@link ColumnFamilyTemplate} * and {@link ColumnFactory}. A {@link Mutator} is created internally for this updater. * @param template * @param columnFactory */ public ColumnFamilyUpdater(ColumnFamilyTemplate<K, N> template, ColumnFactory columnFactory) { super(template, columnFactory, template.createMutator()); }
/** * Constructs a ColumnFamilyUpdater with the provided {@link ColumnFamilyTemplate} * and {@link ColumnFactory}. A {@link Mutator} is created internally for this updater. * @param template * @param columnFactory */ public ColumnFamilyUpdater(ColumnFamilyTemplate<K, N> template, ColumnFactory columnFactory) { super(template, columnFactory, template.createMutator()); }
/** * Constructs a ColumnFamilyUpdater with the provided {@link ColumnFamilyTemplate} * and {@link ColumnFactory}. A {@link Mutator} is created internally for this updater. * @param template * @param columnFactory */ public ColumnFamilyUpdater(ColumnFamilyTemplate<K, N> template, ColumnFactory columnFactory) { super(template, columnFactory, template.createMutator()); }
protected void recordLicenses( String projectVersionMetadataKey, List<License> licenses ) { if ( licenses == null || licenses.isEmpty() ) { return; } Mutator<String> licenseMutator = this.licenseTemplate.createMutator(); for ( License license : licenses ) { // we don't care about the key as the real used one with the projectVersionMetadata 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(); }
Mutator<String> mailingMutator = this.mailingListTemplate.createMutator(); for ( MailingList mailingList : mailingLists )
protected void recordDependencies( String projectVersionMetadataKey, List<Dependency> dependencies, String repositoryId ) { if ( dependencies == null || dependencies.isEmpty() ) { return; } Mutator<String> dependencyMutator = this.dependencyTemplate.createMutator(); for ( Dependency dependency : dependencies ) { // we don't care about the key as the real used one with the projectVersionMetadata String keyDependency = UUID.randomUUID().toString(); String cfDependency = cassandraArchivaManager.getDependencyFamilyName(); addInsertion( dependencyMutator, keyDependency, cfDependency, "projectVersionMetadataModel.key", projectVersionMetadataKey ); addInsertion( dependencyMutator, keyDependency, cfDependency, REPOSITORY_NAME.toString(), repositoryId ); addInsertion( dependencyMutator, keyDependency, cfDependency, "classifier", dependency.getClassifier() ); addInsertion( dependencyMutator, keyDependency, cfDependency, "optional", Boolean.toString( dependency.isOptional() ) ); addInsertion( dependencyMutator, keyDependency, cfDependency, "scope", dependency.getScope() ); addInsertion( dependencyMutator, keyDependency, cfDependency, "systemPath", dependency.getSystemPath() ); addInsertion( dependencyMutator, keyDependency, cfDependency, "type", dependency.getType() ); addInsertion( dependencyMutator, keyDependency, cfDependency, ARTIFACT_ID.toString(), dependency.getArtifactId() ); addInsertion( dependencyMutator, keyDependency, cfDependency, GROUP_ID.toString(), dependency.getGroupId() ); addInsertion( dependencyMutator, keyDependency, cfDependency, VERSION.toString(), dependency.getVersion() ); } dependencyMutator.execute(); }
this.metadataFacetTemplate.createMutator() // this.metadataFacetTemplate.createMutator() //
Mutator<String> mutator = metadataFacetTemplate.createMutator() //
this.artifactMetadataTemplate.createMutator() // projectVersionMetadataTemplate.createMutator() //
projectTemplate.createMutator()
Mutator<String> mutator = projectVersionMetadataTemplate.createMutator()