R
- the concrete ProjectRequest
typepublic class ProjectGenerationInvoker<R extends ProjectRequest> extends Object
ProjectRequest
and trigger project generation based on the request.ProjectAssetGenerator
Modifier | Constructor and Description |
---|---|
protected |
ProjectGenerationInvoker(org.springframework.context.ApplicationContext parentApplicationContext,
org.springframework.context.ApplicationEventPublisher eventPublisher,
ProjectRequestToDescriptionConverter<R> requestConverter) |
|
ProjectGenerationInvoker(org.springframework.context.ApplicationContext parentApplicationContext,
ProjectRequestToDescriptionConverter<R> requestConverter) |
Modifier and Type | Method and Description |
---|---|
void |
cleanTempFiles(Path dir)
Clean all the temporary files that are related to this root directory.
|
Path |
createDistributionFile(Path dir,
String extension)
Create a file in the same directory as the given directory using the directory name
and extension.
|
protected ProjectAssetGenerator<Path> |
getProjectAssetGenerator(ProjectDescription description)
Return the
ProjectAssetGenerator to use to generate the project structure
for the specified ProjectDescription . |
byte[] |
invokeBuildGeneration(R request)
Invokes the project generation API that knows how to just write the build file.
|
ProjectGenerationResult |
invokeProjectStructureGeneration(R request)
Invokes the project generation API that generates the entire project structure for
the specified
ProjectRequest . |
public ProjectGenerationInvoker(org.springframework.context.ApplicationContext parentApplicationContext, ProjectRequestToDescriptionConverter<R> requestConverter)
protected ProjectGenerationInvoker(org.springframework.context.ApplicationContext parentApplicationContext, org.springframework.context.ApplicationEventPublisher eventPublisher, ProjectRequestToDescriptionConverter<R> requestConverter)
public ProjectGenerationResult invokeProjectStructureGeneration(R request)
ProjectRequest
.request
- the project requestProjectGenerationResult
protected ProjectAssetGenerator<Path> getProjectAssetGenerator(ProjectDescription description)
ProjectAssetGenerator
to use to generate the project structure
for the specified ProjectDescription
.description
- the project descriptionpublic byte[] invokeBuildGeneration(R request)
ProjectRequest
.request
- the project requestpublic Path createDistributionFile(Path dir, String extension)
dir
- the directory used to determine the path and name of the new fileextension
- the extension to use for the new filepublic void cleanTempFiles(Path dir)
dir
- the directory to cleancreateDistributionFile(java.nio.file.Path, java.lang.String)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.