jms-lib/src/main/java/com/streamsets/pipeline/stage/destination/jms/JmsTargetUpgrader.java
private void upgradeV1ToV2(List<Config> configs, Context context) {
    List<Config> dataFormatConfigs = configs.stream()
      .filter(c -> c.getName().startsWith("dataFormat"))
      .collect(Collectors.toList());

    // Remove those configs
    configs.removeAll(dataFormatConfigs);

    // Provide proper prefix
    dataFormatConfigs = dataFormatConfigs.stream()
      .map(c -> new Config(c.getName().replace("dataFormatConfig.", "dataGeneratorFormatConfig."), c.getValue()))
      .collect(Collectors.toList());

    // And finally register new service
    context.registerService(DataFormatGeneratorService.class, dataFormatConfigs);
  }
private void upgradeV1ToV2(List<Config> configs, Context context) {
    List<Config> dataFormatConfigs = configs.stream()
      .filter(c -> c.getName().startsWith("dataFormat"))
      .collect(Collectors.toList());

    // Remove those configs
    configs.removeAll(dataFormatConfigs);

    // Provide proper prefix
    dataFormatConfigs = dataFormatConfigs.stream()
      .map(c -> new Config(c.getName().replace("dataFormatConfig.", "dataGeneratorFormatConfig."), c.getValue()))
      .collect(Collectors.toList());

    // And finally register new service
    context.registerService(DataFormatGeneratorService.class, dataFormatConfigs);
  }
private void upgradeV1ToV2 ( List < Config > configs , Context context ) { List < Config > dataFormatConfigs = configs . stream ( ) . filter ( c -> c . getName ( ) . startsWith ( "dataFormat" ) ) . collect ( Collectors . toList ( ) ) ; // Remove those configs configs . removeAll ( dataFormatConfigs ) ; // Provide proper prefix dataFormatConfigs = dataFormatConfigs . stream ( ) . map ( c -> new Config ( c . getName ( ) . replace ( "dataFormatConfig." , "dataGeneratorFormatConfig." ) , c . getValue ( ) ) ) . collect ( Collectors . toList ( ) ) ; // And finally register new service context . registerService ( DataFormatGeneratorService . class , dataFormatConfigs ) ; }
Migrating to service for data format library.
Migrating to service for data format library .