class SpringCloudProjectVersionResolver {

	private static final Log logger = LogFactory.getLog(SpringCloudProjectVersionResolver.class);

	private final InitializrMetadata metadata;

	private final MavenVersionResolver versionResolver;

	SpringCloudProjectVersionResolver(InitializrMetadata metadata, MavenVersionResolver versionResolver) {
		this.metadata = metadata;
		this.versionResolver = versionResolver;
	}

	/**
	 * Resolve the version of a specified artifact that matches the provided Spring Boot
	 * version.
	 * @param platformVersion the Spring Boot version to check the Spring Cloud Release
	 * train version against
	 * @param dependencyId the dependency id of the Spring Cloud artifact in the form of
	 * {@code groupId:artifactId}
	 * @return the appropriate project version or {@code null} if the resolution failed
	 */
	String resolveVersion(Version platformVersion, String dependencyId) {<FILL_FUNCTION_BODY>}

}

		BillOfMaterials bom = this.metadata.getConfiguration().getEnv().getBoms().get("spring-cloud");
		if (bom == null) {
			return null;
		}
		String releaseTrainVersion = bom.resolve(platformVersion).getVersion();
		logger.info("Retrieving version for artifact: " + dependencyId + " and release train version: "
				+ releaseTrainVersion);
		return this.versionResolver
			.resolveDependencies("org.springframework.cloud", "spring-cloud-dependencies", releaseTrainVersion)
			.get(dependencyId);
	
<no_super_class>