org.springframework.cloud.dataflow.core

## Class StreamAppDefinition.Builder

- java.lang.Object
- - org.springframework.cloud.dataflow.core.StreamAppDefinition.Builder

- Enclosing class:
    StreamAppDefinition

      public static class StreamAppDefinition.Builder
      extends Object

  Builder object for `StreamAppDefinition`. This object is mutable to allow for flexibility in specifying application fields/properties during parsing.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StreamAppDefinition.Builder` | `addProperties(Map<String,String> properties)` Add the contents of the provided map to the map of app properties.
    `StreamAppDefinition` | `build(String streamName)` Return a new instance of `StreamAppDefinition`.
    `static StreamAppDefinition.Builder` | `from(StreamAppDefinition definition)` Create a new builder that is initialized with properties of the given definition.
    `ApplicationType` | `getApplicationType()`
    `String` | `getStreamName()` Return name of stream this app instance belongs to.
    `StreamAppDefinition.Builder` | `setApplicationType(ApplicationType applicationType)` Set the `ApplicationType` for this application.
    `StreamAppDefinition.Builder` | `setLabel(String label)` Set the app label.
    `StreamAppDefinition.Builder` | `setProperties(Map<String,String> properties)` Sets app properties.
    `StreamAppDefinition.Builder` | `setProperty(String name, String value)` Set an app property.
    `StreamAppDefinition.Builder` | `setRegisteredAppName(String registeredAppName)` Set the name of the app in the registry.
    `StreamAppDefinition.Builder` | `setStreamName(String streamName)` Set the stream name this app belongs to.

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### from

          public static StreamAppDefinition.Builder from(StreamAppDefinition definition)

      Create a new builder that is initialized with properties of the given definition. Useful for "mutating" a definition by building a slightly different copy.
      Parameters:
        `definition` - the StreamAppDefinition to create a new Builder instance with stream name, registeredAppName, label, and properties populated
      Returns:
        a StreamAppDefinition builder

    - #### getStreamName

          public String getStreamName()

      Return name of stream this app instance belongs to.
      Returns:
        stream name

    - #### setStreamName

          public StreamAppDefinition.Builder setStreamName(String streamName)

      Set the stream name this app belongs to.
      Parameters:
        `streamName` - name
      Returns:
        this builder object
      See Also:
        `StreamAppDefinition.streamName`

    - #### getApplicationType

          public ApplicationType getApplicationType()

      Returns:
        the `ApplicationType` of this application

    - #### setApplicationType

          public StreamAppDefinition.Builder setApplicationType(ApplicationType applicationType)

      Set the `ApplicationType` for this application.
      Parameters:
        `applicationType` - the `ApplicationType`
      Returns:
        this builder object

    - #### setRegisteredAppName

          public StreamAppDefinition.Builder setRegisteredAppName(String registeredAppName)

      Set the name of the app in the registry.
      Parameters:
        `registeredAppName` - name of app in registry
      Returns:
        this builder object
      See Also:
        `DataFlowAppDefinition.registeredAppName`

    - #### setLabel

          public StreamAppDefinition.Builder setLabel(String label)

      Set the app label.
      Parameters:
        `label` - name of app label
      Returns:
        this builder object

    - #### setProperty

          public StreamAppDefinition.Builder setProperty(String name,
                                                         String value)

      Set an app property.
      Parameters:
        `name` - property name
        `value` - property value
      Returns:
        this builder object
      See Also:
        `AppDefinition.getProperties()`

    - #### setProperties

          public StreamAppDefinition.Builder setProperties(Map<String,String> properties)

      Sets app properties.
      Parameters:
        `properties` - app properties
      Returns:
        this builder object
      See Also:
        `AppDefinition.getProperties()`

    - #### addProperties

          public StreamAppDefinition.Builder addProperties(Map<String,String> properties)

      Add the contents of the provided map to the map of app properties.
      Parameters:
        `properties` - app properties
      Returns:
        this builder object
      See Also:
        `AppDefinition.getProperties()`

    - #### build

          public StreamAppDefinition build(String streamName)

      Return a new instance of `StreamAppDefinition`.
      Parameters:
        `streamName` - the name of the stream
      Returns:
        new instance of `StreamAppDefinition`

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