org.octopusden.octopus.escrow.config.JiraComponentVersionRangeFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of component-resolver-api Show documentation
Show all versions of component-resolver-api Show documentation
Octopus module: component-resolver-api
The newest version!
package org.octopusden.octopus.escrow.config;
import org.octopusden.octopus.escrow.model.Distribution;
import org.octopusden.octopus.escrow.model.VCSSettings;
import org.octopusden.octopus.releng.JiraComponentVersionFormatter;
import org.octopusden.octopus.releng.dto.ComponentVersion;
import org.octopusden.octopus.releng.dto.JiraComponent;
import org.octopusden.octopus.releng.dto.JiraComponentVersion;
import org.octopusden.releng.versions.VersionNames;
public class JiraComponentVersionRangeFactory {
private final VersionNames versionNames;
public JiraComponentVersionRangeFactory(VersionNames versionNames) {
this.versionNames = versionNames;
}
public JiraComponentVersionRange create(
String componentName,
String versionRange,
JiraComponent jiraComponent,
Distribution distribution,
VCSSettings vcsSettings
) {
JiraComponentVersionFormatter jiraComponentVersionFormatter = new JiraComponentVersionFormatter(versionNames);
JiraComponentVersion jiraComponentVersion = new JiraComponentVersion(
ComponentVersion.create(componentName, versionRange),
jiraComponent,
jiraComponentVersionFormatter
);
return new JiraComponentVersionRange(
componentName,
versionRange,
jiraComponent,
distribution,
vcsSettings,
jiraComponentVersion
);
}
}