public class DefaultProjectRequestToDescriptionConverter extends Object implements ProjectRequestToDescriptionConverter<ProjectRequest>
ProjectRequestToDescriptionConverter implementation that uses the
metadata to set default values for missing attributes if
necessary. Transparently transform the platform version if necessary using a
ProjectRequestPlatformVersionTransformer.| Constructor and Description |
|---|
DefaultProjectRequestToDescriptionConverter() |
DefaultProjectRequestToDescriptionConverter(ProjectRequestPlatformVersionTransformer platformVersionTransformer) |
| Modifier and Type | Method and Description |
|---|---|
ProjectDescription |
convert(ProjectRequest request,
InitializrMetadata metadata)
Validate and convert the specified
ProjectRequest to a
ProjectDescription used as the source of project generation. |
void |
convert(ProjectRequest request,
MutableProjectDescription description,
InitializrMetadata metadata)
Validate the specified
request and initialize the specified
description. |
public DefaultProjectRequestToDescriptionConverter()
public DefaultProjectRequestToDescriptionConverter(ProjectRequestPlatformVersionTransformer platformVersionTransformer)
public ProjectDescription convert(ProjectRequest request, InitializrMetadata metadata)
ProjectRequestToDescriptionConverterProjectRequest to a
ProjectDescription used as the source of project generation.convert in interface ProjectRequestToDescriptionConverter<ProjectRequest>request - the request to convertmetadata - the metadata instance to useProjectDescription to use to generate a project that
matches the specified requestpublic void convert(ProjectRequest request, MutableProjectDescription description, InitializrMetadata metadata)
request and initialize the specified
description. Override any attribute of the description
that are managed by this instance.request - the request to validatedescription - the description to initializemetadata - the metadata instance to use to apply defaults if necessaryCopyright © 2022 Pivotal Software, Inc.. All rights reserved.