@Test public void testRetrieveOptions() { List<String> keys = Arrays .asList( KEEP_ALIVE_INTERVAL, MAX_INFLIGHT, CONNECTION_TIMEOUT, CLEAN_SESSION, STORAGE_LEVEL, SERVER_URIS, MQTT_VERSION, AUTOMATIC_RECONNECT ); MQTTConsumerMeta meta = new MQTTConsumerMeta(); meta.setDefault(); List<StepOption> options = meta.retrieveOptions(); assertEquals( 8, options.size() ); for ( StepOption option : options ) { assertEquals( "", option.getValue() ); assertNotNull( option.getText() ); Assert.assertTrue( keys.contains( option.getKey() ) ); } }
public List<StepOption> retrieveOptions() { return Arrays.asList( new StepOption( KEEP_ALIVE_INTERVAL, getString( PKG, "MQTTDialog.Options.KEEP_ALIVE_INTERVAL" ), keepAliveInterval ), new StepOption( MAX_INFLIGHT, getString( PKG, "MQTTDialog.Options.MAX_INFLIGHT" ), maxInflight ), new StepOption( CONNECTION_TIMEOUT, getString( PKG, "MQTTDialog.Options.CONNECTION_TIMEOUT" ), connectionTimeout ), new StepOption( CLEAN_SESSION, getString( PKG, "MQTTDialog.Options.CLEAN_SESSION" ), cleanSession ), new StepOption( STORAGE_LEVEL, getString( PKG, "MQTTDialog.Options.STORAGE_LEVEL" ), storageLevel ), new StepOption( SERVER_URIS, getString( PKG, "MQTTDialog.Options.SERVER_URIS" ), serverUris ), new StepOption( MQTT_VERSION, getString( PKG, "MQTTDialog.Options.MQTT_VERSION" ), mqttVersion ), new StepOption( AUTOMATIC_RECONNECT, getString( PKG, "MQTTDialog.Options.AUTOMATIC_RECONNECT" ), automaticReconnect ) ); }
MQTTConsumerMeta extends BaseStreamStepMeta implements StepMetaInterface { public List<StepOption> retrieveOptions() { return Arrays.asList( new StepOption( KEEP_ALIVE_INTERVAL, getString( PKG, "MQTTDialog.Options.KEEP_ALIVE_INTERVAL" ), keepAliveInterval ), new StepOption( MAX_INFLIGHT, getString( PKG, "MQTTDialog.Options.MAX_INFLIGHT" ), maxInflight ), new StepOption( CONNECTION_TIMEOUT, getString( PKG, "MQTTDialog.Options.CONNECTION_TIMEOUT" ), connectionTimeout ), new StepOption( CLEAN_SESSION, getString( PKG, "MQTTDialog.Options.CLEAN_SESSION" ), cleanSession ), new StepOption( STORAGE_LEVEL, getString( PKG, "MQTTDialog.Options.STORAGE_LEVEL" ), storageLevel ), new StepOption( SERVER_URIS, getString( PKG, "MQTTDialog.Options.SERVER_URIS" ), serverUris ), new StepOption( MQTT_VERSION, getString( PKG, "MQTTDialog.Options.MQTT_VERSION" ), mqttVersion ), new StepOption( AUTOMATIC_RECONNECT, getString( PKG, "MQTTDialog.Options.AUTOMATIC_RECONNECT" ), automaticReconnect ) ); } }
MQTTConsumerMeta extends BaseStreamStepMeta implements StepMetaInterface { public List<StepOption> retrieveOptions() { return Arrays.asList( new StepOption( KEEP_ALIVE_INTERVAL, getString( PKG, "MQTTDialog.Options.KEEP_ALIVE_INTERVAL" ), keepAliveInterval ), new StepOption( MAX_INFLIGHT, getString( PKG, "MQTTDialog.Options.MAX_INFLIGHT" ), maxInflight ), new StepOption( CONNECTION_TIMEOUT, getString( PKG, "MQTTDialog.Options.CONNECTION_TIMEOUT" ), connectionTimeout ), new StepOption( CLEAN_SESSION, getString( PKG, "MQTTDialog.Options.CLEAN_SESSION" ), cleanSession ), new StepOption( STORAGE_LEVEL, getString( PKG, "MQTTDialog.Options.STORAGE_LEVEL" ), storageLevel ), new StepOption( SERVER_URIS, getString( PKG, "MQTTDialog.Options.SERVER_URIS" ), serverUris ), new StepOption( MQTT_VERSION, getString( PKG, "MQTTDialog.Options.MQTT_VERSION" ), mqttVersion ), new StepOption( AUTOMATIC_RECONNECT, getString( PKG, "MQTTDialog.Options.AUTOMATIC_RECONNECT" ), automaticReconnect ) ); } MQTTConsumerMeta(); }
MQTTConsumerMeta extends BaseStreamStepMeta implements StepMetaInterface { public List<StepOption> retrieveOptions() { return Arrays.asList( new StepOption( KEEP_ALIVE_INTERVAL, getString( PKG, "MQTTDialog.Options.KEEP_ALIVE_INTERVAL" ), keepAliveInterval ), new StepOption( MAX_INFLIGHT, getString( PKG, "MQTTDialog.Options.MAX_INFLIGHT" ), maxInflight ), new StepOption( CONNECTION_TIMEOUT, getString( PKG, "MQTTDialog.Options.CONNECTION_TIMEOUT" ), connectionTimeout ), new StepOption( CLEAN_SESSION, getString( PKG, "MQTTDialog.Options.CLEAN_SESSION" ), cleanSession ), new StepOption( STORAGE_LEVEL, getString( PKG, "MQTTDialog.Options.STORAGE_LEVEL" ), storageLevel ), new StepOption( SERVER_URIS, getString( PKG, "MQTTDialog.Options.SERVER_URIS" ), serverUris ), new StepOption( MQTT_VERSION, getString( PKG, "MQTTDialog.Options.MQTT_VERSION" ), mqttVersion ), new StepOption( AUTOMATIC_RECONNECT, getString( PKG, "MQTTDialog.Options.AUTOMATIC_RECONNECT" ), automaticReconnect ) ); } MQTTConsumerMeta(); void setDefault(); @Override String getFileName(); @Override RowMeta getRowMeta( String origin, VariableSpace space ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
                                Trans trans ); StepDataInterface getStepData(); @SuppressWarnings ( { "deprecation" } ) // can be removed once the new @PluginDialog annotation supports OSGi String getDialogClassName(); String getMqttServer(); void setMqttServer( String mqttServer ); List<String> getTopics(); void setTopics( List<String> topics ); String getMsgOutputName(); void setMsgOutputName( String msgOutputName ); String getTopicOutputName(); void setTopicOutputName( String topicOutputName ); String getQos(); void setQos( String qos ); String getUsername(); void setUsername( String username ); String getPassword(); void setPassword( String password ); Map<String, String> getSslConfig(); void setSslConfig( Map<String, String> sslConfig ); boolean isUseSsl(); void setUseSsl( boolean useSsl ); String getKeepAliveInterval(); void setKeepAliveInterval( String keepAliveInterval ); String getMaxInflight(); void setMaxInflight( String maxInflight ); String getConnectionTimeout(); void setConnectionTimeout( String connectionTimeout ); String getCleanSession(); void setCleanSession( String cleanSession ); String getStorageLevel(); void setStorageLevel( String storageLevel ); String getServerUris(); void setServerUris( String serverUris ); String getMqttVersion(); void setMqttVersion( String mqttVersion ); String getAutomaticReconnect(); void setAutomaticReconnect( String automaticReconnect ); List<StepOption> retrieveOptions(); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta,
                     StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output,
                     RowMetaInterface info, VariableSpace space, Repository repository,
                     IMetaStore metaStore ); @Override boolean equals( Object o ); @Override int hashCode(); }
MQTTConsumerMeta extends BaseStreamStepMeta implements StepMetaInterface { public List<StepOption> retrieveOptions() { return Arrays.asList( new StepOption( KEEP_ALIVE_INTERVAL, getString( PKG, "MQTTDialog.Options.KEEP_ALIVE_INTERVAL" ), keepAliveInterval ), new StepOption( MAX_INFLIGHT, getString( PKG, "MQTTDialog.Options.MAX_INFLIGHT" ), maxInflight ), new StepOption( CONNECTION_TIMEOUT, getString( PKG, "MQTTDialog.Options.CONNECTION_TIMEOUT" ), connectionTimeout ), new StepOption( CLEAN_SESSION, getString( PKG, "MQTTDialog.Options.CLEAN_SESSION" ), cleanSession ), new StepOption( STORAGE_LEVEL, getString( PKG, "MQTTDialog.Options.STORAGE_LEVEL" ), storageLevel ), new StepOption( SERVER_URIS, getString( PKG, "MQTTDialog.Options.SERVER_URIS" ), serverUris ), new StepOption( MQTT_VERSION, getString( PKG, "MQTTDialog.Options.MQTT_VERSION" ), mqttVersion ), new StepOption( AUTOMATIC_RECONNECT, getString( PKG, "MQTTDialog.Options.AUTOMATIC_RECONNECT" ), automaticReconnect ) ); } MQTTConsumerMeta(); void setDefault(); @Override String getFileName(); @Override RowMeta getRowMeta( String origin, VariableSpace space ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
                                Trans trans ); StepDataInterface getStepData(); @SuppressWarnings ( { "deprecation" } ) // can be removed once the new @PluginDialog annotation supports OSGi String getDialogClassName(); String getMqttServer(); void setMqttServer( String mqttServer ); List<String> getTopics(); void setTopics( List<String> topics ); String getMsgOutputName(); void setMsgOutputName( String msgOutputName ); String getTopicOutputName(); void setTopicOutputName( String topicOutputName ); String getQos(); void setQos( String qos ); String getUsername(); void setUsername( String username ); String getPassword(); void setPassword( String password ); Map<String, String> getSslConfig(); void setSslConfig( Map<String, String> sslConfig ); boolean isUseSsl(); void setUseSsl( boolean useSsl ); String getKeepAliveInterval(); void setKeepAliveInterval( String keepAliveInterval ); String getMaxInflight(); void setMaxInflight( String maxInflight ); String getConnectionTimeout(); void setConnectionTimeout( String connectionTimeout ); String getCleanSession(); void setCleanSession( String cleanSession ); String getStorageLevel(); void setStorageLevel( String storageLevel ); String getServerUris(); void setServerUris( String serverUris ); String getMqttVersion(); void setMqttVersion( String mqttVersion ); String getAutomaticReconnect(); void setAutomaticReconnect( String automaticReconnect ); List<StepOption> retrieveOptions(); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta,
                     StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output,
                     RowMetaInterface info, VariableSpace space, Repository repository,
                     IMetaStore metaStore ); @Override boolean equals( Object o ); @Override int hashCode(); @Injection ( name = SSL_KEYS, group = SSL_GROUP )
  public List<String> sslKeys; @Sensitive
  @Injection ( name = SSL_VALUES, group = SSL_GROUP )
  public List<String> sslValues; }