Codota Logo
StreamAppDefinition$Builder.setProperties
Code IndexAdd Codota to your IDE (free)

How to use
setProperties
method
in
org.springframework.cloud.dataflow.core.StreamAppDefinition$Builder

Best Java code snippets using org.springframework.cloud.dataflow.core.StreamAppDefinition$Builder.setProperties (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.springframework.cloud/spring-cloud-dataflow-rest-resource

/**
 * Redacts sensitive property values in a stream.
 *
 * @param streamDefinition the stream definition to sanitize
 * @return Stream definition text that has sensitive data redacted.
 */
public String sanitizeStream(StreamDefinition streamDefinition) {
  List<StreamAppDefinition> sanitizedAppDefinitions = streamDefinition.getAppDefinitions().stream()
      .map(app -> StreamAppDefinition.Builder
          .from(app)
          .setProperties(this.sanitizeProperties(app.getProperties()))
          .build(streamDefinition.getName())
      ).collect(Collectors.toList());
  return this.streamDslConverter.toDsl(sanitizedAppDefinitions);
}
origin: spring-cloud/spring-cloud-dataflow

/**
 * Redacts sensitive property values in a stream.
 *
 * @param streamDefinition the stream definition to sanitize
 * @return Stream definition text that has sensitive data redacted.
 */
public String sanitizeStream(StreamDefinition streamDefinition) {
  List<StreamAppDefinition> sanitizedAppDefinitions = streamDefinition.getAppDefinitions().stream()
      .map(app -> StreamAppDefinition.Builder
          .from(app)
          .setProperties(this.sanitizeProperties(app.getProperties()))
          .build(streamDefinition.getName())
      ).collect(Collectors.toList());
  return this.streamDslConverter.toDsl(sanitizedAppDefinitions);
}
origin: spring-cloud/spring-cloud-dataflow

private void updateStreamDefinitionFromReleaseManifest(String streamName, String releaseManifest) {
  List<SpringCloudDeployerApplicationManifest> appManifests = new SpringCloudDeployerApplicationManifestReader()
      .read(releaseManifest);
  Map<String, SpringCloudDeployerApplicationManifest> appManifestMap = new HashMap<>();
  for (SpringCloudDeployerApplicationManifest am : appManifests) {
    String name = am.getSpec().getApplicationProperties().get(DataFlowPropertyKeys.STREAM_APP_LABEL);
    appManifestMap.put(name, am);
  }
  StreamDefinition streamDefinition = this.streamDefinitionRepository.findById(streamName)
      .orElseThrow(() -> new NoSuchStreamDefinitionException(streamName));
  LinkedList<StreamAppDefinition> updatedStreamAppDefinitions = new LinkedList<>();
  for (StreamAppDefinition appDefinition : streamDefinition.getAppDefinitions()) {
    StreamAppDefinition.Builder appDefinitionBuilder = StreamAppDefinition.Builder.from(appDefinition);
    SpringCloudDeployerApplicationManifest applicationManifest = appManifestMap.get(appDefinition.getName());
    // overrides app definition properties with those from the release manifest
    appDefinitionBuilder.setProperties(applicationManifest.getSpec().getApplicationProperties());
    updatedStreamAppDefinitions.addLast(appDefinitionBuilder.build(streamDefinition.getName()));
  }
  String dslText = new StreamDefinitionToDslConverter().toDsl(updatedStreamAppDefinitions);
  StreamDefinition updatedStreamDefinition = new StreamDefinition(streamName, dslText);
  logger.debug("Updated StreamDefinition: " + updatedStreamDefinition);
  // TODO consider adding an explicit UPDATE method to the streamDefRepository
  // Note: Not transactional and can lead to loosing the stream definition
  this.streamDefinitionRepository.delete(updatedStreamDefinition);
  this.streamDefinitionRepository.save(updatedStreamDefinition);
  this.auditRecordService.populateAndSaveAuditRecord(
      AuditOperationType.STREAM, AuditActionType.UPDATE, streamName, this.auditServiceUtils.convertStreamDefinitionToAuditData(streamDefinition));
}
origin: org.springframework.cloud/spring-cloud-dataflow-server-core

private void updateStreamDefinitionFromReleaseManifest(String streamName, String releaseManifest) {
  List<SpringCloudDeployerApplicationManifest> appManifests = new SpringCloudDeployerApplicationManifestReader()
      .read(releaseManifest);
  Map<String, SpringCloudDeployerApplicationManifest> appManifestMap = new HashMap<>();
  for (SpringCloudDeployerApplicationManifest am : appManifests) {
    String name = am.getSpec().getApplicationProperties().get(DataFlowPropertyKeys.STREAM_APP_LABEL);
    appManifestMap.put(name, am);
  }
  StreamDefinition streamDefinition = this.streamDefinitionRepository.findOne(streamName);
  LinkedList<StreamAppDefinition> updatedStreamAppDefinitions = new LinkedList<>();
  for (StreamAppDefinition appDefinition : streamDefinition.getAppDefinitions()) {
    StreamAppDefinition.Builder appDefinitionBuilder = StreamAppDefinition.Builder.from(appDefinition);
    SpringCloudDeployerApplicationManifest applicationManifest = appManifestMap.get(appDefinition.getName());
    // overrides app definition properties with those from the release manifest
    appDefinitionBuilder.setProperties(applicationManifest.getSpec().getApplicationProperties());
    updatedStreamAppDefinitions.addLast(appDefinitionBuilder.build(streamDefinition.getName()));
  }
  String dslText = new StreamDefinitionToDslConverter().toDsl(updatedStreamAppDefinitions);
  StreamDefinition updatedStreamDefinition = new StreamDefinition(streamName, dslText);
  logger.debug("Updated StreamDefinition: " + updatedStreamDefinition);
  // TODO consider adding an explicit UPDATE method to the streamDefRepository
  // Note: Not transactional and can lead to loosing the stream definition
  this.streamDefinitionRepository.delete(updatedStreamDefinition);
  this.streamDefinitionRepository.save(updatedStreamDefinition);
  this.auditRecordService.populateAndSaveAuditRecord(
      AuditOperationType.STREAM, AuditActionType.UPDATE, streamName, this.auditServiceUtils.convertStreamDefinitionToAuditData(streamDefinition));
}
org.springframework.cloud.dataflow.coreStreamAppDefinition$BuildersetProperties

Javadoc

Sets app properties.

Popular methods of StreamAppDefinition$Builder

  • build
  • from
  • <init>
  • addProperties
    Add the contents of the provided map to the map of app properties.
  • setApplicationType
    Set the ApplicationType for this application.
  • setLabel
    Set the app label.
  • setProperty
    Set an app property.
  • setRegisteredAppName
    Set the name of the app in the registry.
  • setStreamName
    Set the stream name this app belongs to.

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Reference (javax.naming)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now