org.springframework.cloud.dataflow.rest.client.dsl.task

## Class TaskBuilder

- java.lang.Object
- - org.springframework.cloud.dataflow.rest.client.dsl.task.TaskBuilder

-     public class TaskBuilder
      extends Object

  Represents the entry point into the Task DSL to set the name and the definition of the task.
  Author:
    Christian Tzolov

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Task>` | `allTasks()`
    `Task` | `build()` Create new Task instance.
    `TaskBuilder` | `definition(String taskDefinition)` Fluent API method to set the task definition.
    `TaskBuilder` | `description(String taskDescription)`
    `Optional<Task>` | `findByName(String taskName)`
    `TaskBuilder` | `name(String definitionName)` Fluent API method to set the name for the task definition.

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

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

- - ### Method Detail

    - #### name

          public TaskBuilder name(String definitionName)

      Fluent API method to set the name for the task definition.
      Parameters:
        `definitionName` - - definition name of a Task with the server. Note that the actual task name is computed form the definition name, task definition and task description.
      Returns:
        A `TaskBuilder` that provides the next navigation step in the DSL.

    - #### definition

          public TaskBuilder definition(String taskDefinition)

      Fluent API method to set the task definition.
      Parameters:
        `taskDefinition` - - The task definition to use.
      Returns:
        A `TaskBuilder` that provides the next navigation step in the DSL.

    - #### description

          public TaskBuilder description(String taskDescription)

      Parameters:
        `taskDescription` - Task description.
      Returns:
        A `TaskBuilder` that provides the next navigation step in the DSL.

    - #### build

          public Task build()

      Create new Task instance.
      Returns:
        Task instance.

    - #### allTasks

          public List<Task> allTasks()

      Returns:
        All tasks defined currently in Data Flow.

    - #### findByName

          public Optional<Task> findByName(String taskName)

      Parameters:
        `taskName` - existing Task name used to retrieve the task.
      Returns:
        Task instance identified by the taskName.

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