public class DefaultProjectRequestToDescriptionConverter extends Object implements ProjectRequestToDescriptionConverter<ProjectRequest>
ProjectRequestToDescriptionConverter
implementation that uses the
metadata
to set default values for missing attributes if
necessary.Constructor and Description |
---|
DefaultProjectRequestToDescriptionConverter() |
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 ProjectDescription convert(ProjectRequest request, InitializrMetadata metadata)
ProjectRequestToDescriptionConverter
ProjectRequest
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 request
public 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 © 2019 Pivotal Software, Inc.. All rights reserved.