org.springframework.cloud.dataflow.server.service.impl

## Class DefaultTaskExecutionInfoService

- java.lang.Object
- - org.springframework.cloud.dataflow.server.service.impl.DefaultTaskExecutionInfoService

- All Implemented Interfaces:
    TaskExecutionInfoService

      public class DefaultTaskExecutionInfoService
      extends Object
      implements TaskExecutionInfoService

  Default implementation of the `DefaultTaskExecutionInfoService` interface. Provide service methods for `DefaultTaskExecutionService` about task definitions and execution related information.
  Author:
    Michael Minella, Marius Bogoevici, Glenn Renfro, Mark Fisher, Janne Valkealahti, Gunnar Hillert, Thomas Risberg, Ilayaperumal Gopinathan, Michael Wirth, David Turanski, Daniel Serleg

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultTaskExecutionInfoService(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties, AppRegistryService appRegistryService, org.springframework.cloud.task.repository.TaskExplorer taskExplorer, TaskDefinitionRepository taskDefinitionRepository, TaskConfigurationProperties taskConfigurationProperties, LauncherRepository launcherRepository, List<TaskPlatform> taskPlatforms)` Deprecated.
    `DefaultTaskExecutionInfoService(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties, AppRegistryService appRegistryService, org.springframework.cloud.task.repository.TaskExplorer taskExplorer, TaskDefinitionRepository taskDefinitionRepository, TaskConfigurationProperties taskConfigurationProperties, LauncherRepository launcherRepository, List<TaskPlatform> taskPlatforms, ComposedTaskRunnerConfigurationProperties composedTaskRunnerConfigurationProperties)` Initializes the `DefaultTaskExecutionInfoService`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<org.springframework.cloud.deployer.spi.core.AppDeploymentRequest>` | `createTaskDeploymentRequests(String taskName, String dslText)` Creates requests for a composed task
    `AllPlatformsTaskExecutionInformation` | `findAllPlatformTaskExecutionInformation()`
    `TaskExecutionInformation` | `findTaskExecutionInformation(String taskName, Map<String,String> taskDeploymentProperties, boolean addDatabaseCredentials, Map<String,String> previousTaskDeploymentProperties)` Create a the `TaskExecutionInformation` instance for the information provided.

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

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

- - ### Constructor Detail

    - #### DefaultTaskExecutionInfoService

          @Deprecated
          public DefaultTaskExecutionInfoService(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties,
                                                             AppRegistryService appRegistryService,
                                                             org.springframework.cloud.task.repository.TaskExplorer taskExplorer,
                                                             TaskDefinitionRepository taskDefinitionRepository,
                                                             TaskConfigurationProperties taskConfigurationProperties,
                                                             LauncherRepository launcherRepository,
                                                             List<TaskPlatform> taskPlatforms)

      Deprecated.
      Initializes the `DefaultTaskExecutionInfoService`.
      Parameters:
        `dataSourceProperties` - the data source properties.
        `appRegistryService` - URI registry this service will use to look up app URIs.
        `taskExplorer` - the explorer this service will use to lookup task executions
        `taskDefinitionRepository` - the `TaskDefinitionRepository` this service will use for task CRUD operations.
        `taskConfigurationProperties` - the properties used to define the behavior of tasks
        `launcherRepository` - the launcher repository
        `taskPlatforms` - the task platforms

    - #### DefaultTaskExecutionInfoService

          public DefaultTaskExecutionInfoService(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties,
                                                 AppRegistryService appRegistryService,
                                                 org.springframework.cloud.task.repository.TaskExplorer taskExplorer,
                                                 TaskDefinitionRepository taskDefinitionRepository,
                                                 TaskConfigurationProperties taskConfigurationProperties,
                                                 LauncherRepository launcherRepository,
                                                 List<TaskPlatform> taskPlatforms,
                                                 ComposedTaskRunnerConfigurationProperties composedTaskRunnerConfigurationProperties)

      Initializes the `DefaultTaskExecutionInfoService`.
      Parameters:
        `dataSourceProperties` - the data source properties.
        `appRegistryService` - URI registry this service will use to look up app URIs.
        `taskExplorer` - the explorer this service will use to lookup task executions
        `taskDefinitionRepository` - the `TaskDefinitionRepository` this service will use for task CRUD operations.
        `taskConfigurationProperties` - the properties used to define the behavior of tasks
        `launcherRepository` - the launcher repository
        `taskPlatforms` - the task platforms
        `composedTaskRunnerConfigurationProperties` - the properties used to define the behavior of CTR

  - ### Method Detail

    - #### findTaskExecutionInformation

          public TaskExecutionInformation findTaskExecutionInformation(String taskName,
                                                                       Map<String,String> taskDeploymentProperties,
                                                                       boolean addDatabaseCredentials,
                                                                       Map<String,String> previousTaskDeploymentProperties)

      Description copied from interface: `TaskExecutionInfoService`
      Create a the `TaskExecutionInformation` instance for the information provided.
      Specified by:
        `findTaskExecutionInformation` in interface `TaskExecutionInfoService`
      Parameters:
        `taskName` - the name of the task definition
        `taskDeploymentProperties` - the deployment properties to use for the `TaskExecutionInformation`
        `addDatabaseCredentials` - true if database credentials should be added to the `TaskExecutionInformation`
        `previousTaskDeploymentProperties` - the previous deployment properties to use for the `TaskExecutionInformation`
      Returns:
        instance of `TaskExecutionInformation`

    - #### createTaskDeploymentRequests

          public List<org.springframework.cloud.deployer.spi.core.AppDeploymentRequest> createTaskDeploymentRequests(String taskName,
                                                                                                                     String dslText)

      Description copied from interface: `TaskExecutionInfoService`
      Creates requests for a composed task
      Specified by:
        `createTaskDeploymentRequests` in interface `TaskExecutionInfoService`
      Parameters:
        `taskName` - name of the task
        `dslText` - String of the dsl text
      Returns:
        a list of `AppDeploymentRequest` based on the dsl provided

    - #### findAllPlatformTaskExecutionInformation

          public AllPlatformsTaskExecutionInformation findAllPlatformTaskExecutionInformation()

      Specified by:
        `findAllPlatformTaskExecutionInformation` in interface `TaskExecutionInfoService`

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