/** * Sets the contents of the provided map as the map of app properties. * * @param properties app properties * @return this builder object * @see AppDefinition#getProperties() */ public TaskDefinitionBuilder setProperties(Map<String, String> properties) { Assert.notNull(properties, "properties must not be null"); 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 DataFlowAppDefinition to use when creating the builder * @return a task definition builder */ public static TaskDefinitionBuilder from(DataFlowAppDefinition definition) { TaskDefinitionBuilder builder = new TaskDefinitionBuilder(); builder.setRegisteredAppName(definition.getRegisteredAppName()).setLabel(definition.getName()) .addProperties(definition.getProperties()); return builder; }