@Service public class ReleaseService extends Object
Constructor and Description |
---|
ReleaseService(PackageMetadataRepository packageMetadataRepository,
PackageService packageService,
ReleaseManager releaseManager) |
Modifier and Type | Method and Description |
---|---|
Properties |
convertYamlToProperties(String yamlString)
Return a Properties object given a String that contains YAML.
|
String |
createManifest(Package packageToInstall,
Properties model)
Iterate overall the template files, replacing placeholders with model values.
|
Release |
install(String id,
InstallProperties installProperties)
Downloads the package metadata and package zip file specified by the given Id and
installs the package on the target platform.
|
Properties |
mergeConfigValues(ConfigValues templateConfigValue,
ConfigValues commandLineConfigValues)
Merge the properties, derived from YAML format, contained in
commandLineConfigValues and templateConfigValue, giving preference to
commandLineConfigValues.
|
@Autowired public ReleaseService(PackageMetadataRepository packageMetadataRepository, PackageService packageService, ReleaseManager releaseManager)
public Release install(String id, InstallProperties installProperties)
id
- of the packageinstallProperties
- contains the name of the release, the platfrom to deploy
to, and configuration values to replace in the package template.public String createManifest(Package packageToInstall, Properties model)
packageToInstall
- The top level package that contains all templates where
placeholders are to be replacedmodel
- The placeholder values.public Properties mergeConfigValues(ConfigValues templateConfigValue, ConfigValues commandLineConfigValues)
templateConfigValue
- YAML data defined in the template.yaml filecommandLineConfigValues
- YAML data passed at the application runtimepublic Properties convertYamlToProperties(String yamlString)
String
for access through the common
Properties.getProperty(java.lang.String)
method. See YamlPropertiesFactoryBean for more
information.yamlString
- String that contains YAMLCopyright © 2017 Pivotal Software, Inc.. All rights reserved.