salesforce-lib/src/main/java/com/streamsets/pipeline/stage/destination/waveanalytics/WaveAnalyticsTarget.java
@Override
  protected List<ConfigIssue> init() {
    // Validate configuration values and open any required resources.
    List<ConfigIssue> issues = super.init();
    Optional
        .ofNullable(conf.init(getContext(), CONF_PREFIX ))
        .ifPresent(issues::addAll);

    try {
      ConnectorConfig partnerConfig = ForceUtils.getPartnerConfig(conf, new WaveSessionRenewer());
      connection = Connector.newConnection(partnerConfig);
      LOG.info("Successfully authenticated as {}", conf.username);
      if (conf.mutualAuth.useMutualAuth) {
        ForceUtils.setupMutualAuth(partnerConfig, conf.mutualAuth);
      }

      String soapEndpoint = connection.getConfig().getServiceEndpoint();
      restEndpoint = soapEndpoint.substring(0, soapEndpoint.indexOf("services/Soap/"));

      httpClient = new HttpClient(ForceUtils.makeSslContextFactory(conf));
      if (conf.useProxy) {
        ForceUtils.setProxy(httpClient, conf);
      }
      httpClient.start();
    } catch (Exception e) {
      LOG.error("Exception during init()", e);
      issues.add(getContext().createConfigIssue(Groups.FORCE.name(),
          ForceConfigBean.CONF_PREFIX + "authEndpoint",
          Errors.WAVE_00,
          ForceUtils.getExceptionCode(e) + ", " + ForceUtils.getExceptionMessage(e)
      ));
    }

    // If issues is not empty, the UI will inform the user of each configuration issue in the list.
    return issues;
  }
@Override
  protected List<ConfigIssue> init() {
    // Validate configuration values and open any required resources.
    List<ConfigIssue> issues = super.init();
    Optional
        .ofNullable(conf.init(getContext(), CONF_PREFIX ))
        .ifPresent(issues::addAll);

    try {
      ConnectorConfig partnerConfig = ForceUtils.getPartnerConfig(conf, new WaveSessionRenewer());
      connection = Connector.newConnection(partnerConfig);
      LOG.info("Successfully authenticated as {}", conf.username);
      if (conf.mutualAuth.useMutualAuth) {
        ForceUtils.setupMutualAuth(partnerConfig, conf.mutualAuth);
      }

      String soapEndpoint = connection.getConfig().getServiceEndpoint();
      restEndpoint = soapEndpoint.substring(0, soapEndpoint.indexOf("services/Soap/"));

      httpClient = new HttpClient(ForceUtils.makeSslContextFactory(conf));
      if (conf.useProxy) {
        ForceUtils.setProxy(httpClient, conf);
      }
      httpClient.start();
    } catch (Exception e) {
      LOG.error("Exception during init()", e);
      issues.add(getContext().createConfigIssue(Groups.FORCE.name(),
          ForceConfigBean.CONF_PREFIX + "authEndpoint",
          Errors.WAVE_00,
          ForceUtils.getExceptionCode(e) + ", " + ForceUtils.getExceptionMessage(e)
      ));
    }

    // If issues is not empty, the UI will inform the user of each configuration issue in the list.
    return issues;
  }
@ Override protected List < ConfigIssue > init ( ) { // Validate configuration values and open any required resources. List < ConfigIssue > issues = super . init ( ) ; Optional . ofNullable ( conf . init ( getContext ( ) , CONF_PREFIX ) ) . ifPresent ( issues :: addAll ) ; try { ConnectorConfig partnerConfig = ForceUtils . getPartnerConfig ( conf , new WaveSessionRenewer ( ) ) ; connection = Connector . newConnection ( partnerConfig ) ; LOG . info ( "Successfully authenticated as {}" , conf . username ) ; if ( conf . mutualAuth . useMutualAuth ) { ForceUtils . setupMutualAuth ( partnerConfig , conf . mutualAuth ) ; } String soapEndpoint = connection . getConfig ( ) . getServiceEndpoint ( ) ; restEndpoint = soapEndpoint . substring ( 0 , soapEndpoint . indexOf ( "services/Soap/" ) ) ; httpClient = new HttpClient ( ForceUtils . makeSslContextFactory ( conf ) ) ; if ( conf . useProxy ) { ForceUtils . setProxy ( httpClient , conf ) ; } httpClient . start ( ) ; } catch ( Exception e ) { LOG . error ( "Exception during init()" , e ) ; issues . add ( getContext ( ) . createConfigIssue ( Groups . FORCE . name ( ) , ForceConfigBean . CONF_PREFIX + "authEndpoint" , Errors . WAVE_00 , ForceUtils . getExceptionCode ( e ) + ", " + ForceUtils . getExceptionMessage ( e ) ) ) ; } // If issues is not empty, the UI will inform the user of each configuration issue in the list. return issues ; }
{@inheritDoc}
{