/** * Sets app properties. * * @param properties app properties * @return this builder object * @see AppDefinition#getProperties() */ public Builder setProperties(Map<String, String> properties) { this.properties.clear(); this.addProperties(properties); return this; }
/** * Create a new builder that is initialized with properties of the given * definition. Useful for "mutating" a definition by building a slightly different * copy. * * @param definition the StreamAppDefinition to create a new Builder instance with * stream name, registeredAppName, label, and properties populated * @return a StreamAppDefinition builder */ public static Builder from(StreamAppDefinition definition) { Builder builder = new Builder(); builder.setStreamName(definition.getStreamName()).setRegisteredAppName(definition.getRegisteredAppName()) .setApplicationType(definition.getApplicationType()) .setLabel(definition.getName()).addProperties(definition.getProperties()); return builder; }