Class DefaultTaskDefinitionAssembler<R extends TaskDefinitionResource>
java.lang.Object
org.springframework.hateoas.server.mvc.RepresentationModelAssemblerSupport<TaskExecutionAwareTaskDefinition,R>
org.springframework.cloud.dataflow.server.controller.assembler.DefaultTaskDefinitionAssembler<R>
- All Implemented Interfaces:
org.springframework.hateoas.server.RepresentationModelAssembler<TaskExecutionAwareTaskDefinition,
R>
public class DefaultTaskDefinitionAssembler<R extends TaskDefinitionResource>
extends org.springframework.hateoas.server.mvc.RepresentationModelAssemblerSupport<TaskExecutionAwareTaskDefinition,R>
RepresentationModelAssembler
implementation that converts
TaskDefinition
s to TaskDefinitionResource
s.- Author:
- Ilayaperumal Gopinathan, Evgeniy Bezdomnikov, Glenn Renfro, Chris Bono
-
Constructor Summary
ConstructorDescriptionDefaultTaskDefinitionAssembler
(TaskExecutionService taskExecutionService, boolean enableManifest, Class<R> classType, TaskJobService taskJobService, DataflowTaskExplorer taskExplorer) -
Method Summary
Modifier and TypeMethodDescriptioninstantiateModel
(TaskExecutionAwareTaskDefinition taskExecutionAwareTaskDefinition) boolean
Returns if the TaskExecution needs to be updated with the task manifest.void
setEnableManifest
(boolean enableManifest) Set the flag to indicate whether the task manifest needs to be updated for the TaskExecution.toModel
(TaskExecutionAwareTaskDefinition taskExecutionAwareTaskDefinition) Methods inherited from class org.springframework.hateoas.server.mvc.RepresentationModelAssemblerSupport
createModelWithId, createModelWithId, getControllerClass, getResourceType, map, toCollectionModel
-
Constructor Details
-
DefaultTaskDefinitionAssembler
public DefaultTaskDefinitionAssembler(TaskExecutionService taskExecutionService, boolean enableManifest, Class<R> classType, TaskJobService taskJobService, DataflowTaskExplorer taskExplorer)
-
-
Method Details
-
toModel
-
instantiateModel
- Overrides:
instantiateModel
in classorg.springframework.hateoas.server.mvc.RepresentationModelAssemblerSupport<TaskExecutionAwareTaskDefinition,
R extends TaskDefinitionResource>
-
isEnableManifest
public boolean isEnableManifest()Returns if the TaskExecution needs to be updated with the task manifest.- Returns:
- the boolean value of to enable setting the manifest
-
setEnableManifest
public void setEnableManifest(boolean enableManifest) Set the flag to indicate whether the task manifest needs to be updated for the TaskExecution.- Parameters:
enableManifest
- the boolean value of to enable setting the manifest
-