org.springframework.cloud.dataflow.server.controller.assembler

## 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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultTaskDefinitionAssembler(TaskExecutionService taskExecutionService, boolean enableManifest, Class<R> classType, TaskJobService taskJobService, org.springframework.cloud.task.repository.TaskExplorer taskExplorer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `R` | `instantiateModel(TaskExecutionAwareTaskDefinition taskExecutionAwareTaskDefinition)`
    `boolean` | `isEnableManifest()` 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.
    `R` | `toModel(TaskExecutionAwareTaskDefinition taskExecutionAwareTaskDefinition)`

    - ### Methods inherited from class org.springframework.hateoas.server.mvc.RepresentationModelAssemblerSupport

      `createModelWithId, createModelWithId, getControllerClass, getResourceType, map, toCollectionModel`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultTaskDefinitionAssembler

          public DefaultTaskDefinitionAssembler(TaskExecutionService taskExecutionService,
                                                boolean enableManifest,
                                                Class<R> classType,
                                                TaskJobService taskJobService,
                                                org.springframework.cloud.task.repository.TaskExplorer taskExplorer)

  - ### Method Detail

    - #### toModel

          public R toModel(TaskExecutionAwareTaskDefinition taskExecutionAwareTaskDefinition)

    - #### instantiateModel

          public R instantiateModel(TaskExecutionAwareTaskDefinition taskExecutionAwareTaskDefinition)

      Overrides:
        `instantiateModel` in class `org.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

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.