public static class StreamAppDefinition.Builder extends Object
StreamAppDefinition
. This object is mutable to allow for
flexibility in specifying application fields/properties during parsing.Constructor and Description |
---|
Builder() |
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.
|
public static StreamAppDefinition.Builder from(StreamAppDefinition definition)
definition
- the StreamAppDefinition to create a new Builder instance with
stream name, registeredAppName, label, and properties populatedpublic String getStreamName()
public StreamAppDefinition.Builder setStreamName(String streamName)
streamName
- nameStreamAppDefinition.streamName
public ApplicationType getApplicationType()
ApplicationType
of this applicationpublic StreamAppDefinition.Builder setApplicationType(ApplicationType applicationType)
ApplicationType
for this application.applicationType
- the ApplicationType
public StreamAppDefinition.Builder setRegisteredAppName(String registeredAppName)
registeredAppName
- name of app in registryDataFlowAppDefinition.registeredAppName
public StreamAppDefinition.Builder setLabel(String label)
label
- name of app labelpublic StreamAppDefinition.Builder setProperty(String name, String value)
name
- property namevalue
- property valueAppDefinition.getProperties()
public StreamAppDefinition.Builder setProperties(Map<String,String> properties)
properties
- app propertiesAppDefinition.getProperties()
public StreamAppDefinition.Builder addProperties(Map<String,String> properties)
properties
- app propertiesAppDefinition.getProperties()
public StreamAppDefinition build(String streamName)
StreamAppDefinition
.streamName
- the name of the streamStreamAppDefinition
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.