protected boolean shouldOverwrite( OverwritePrompter prompter, Props props, String message, String rememberMessage ) { boolean askOverwrite = Props.isInitialized() ? props.askAboutReplacingDatabaseConnections() : false; boolean overwrite = Props.isInitialized() ? props.replaceExistingDatabaseConnections() : true; if ( askOverwrite ) { if ( prompter != null ) { overwrite = prompter.overwritePrompt( message, rememberMessage, Props.STRING_ASK_ABOUT_REPLACING_DATABASES ); } } return overwrite; }
public static long getLongProperty( String name, long defaultValue ) { String valueStr = Props.isInitialized() ? Props.getInstance().getProperty( name ) : null; try { long value = Long.parseLong( valueStr ); return value; } catch ( NumberFormatException e ) { // the value for this property is not a valid number } return defaultValue; }
public static long getLongProperty( String name, long defaultValue ) { String valueStr = Props.isInitialized() ? Props.getInstance().getProperty( name ) : null; try { long value = Long.parseLong( valueStr ); return value; } catch ( NumberFormatException e ) { // the value for this property is not a valid number } return defaultValue; }
public static String getStringProperty( String name, String defaultValue ) { String value = Props.isInitialized() ? Props.getInstance().getProperty( name ) : null; if ( value == null ) { value = defaultValue; } return value; }
public static String getStringProperty( String name, String defaultValue ) { String value = Props.isInitialized() ? Props.getInstance().getProperty( name ) : null; if ( value == null ) { value = defaultValue; } return value; }
String[] saved = Props.isInitialized() ? Props.getInstance().getLastArguments() : null;
if ( Props.isInitialized() ) { props = Props.getInstance();
if ( Props.isInitialized() ) { props = Props.getInstance();
@BeforeClass public static void initKettle() throws Exception { if ( Props.isInitialized() ) { Props.getInstance().setOnlyUsedConnectionsSavedToXML( false ); } KettleEnvironment.init(); }
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
void cleanUp() { KettleClientEnvironment.reset(); PluginRegistry.getInstance().reset(); MetricsRegistry.getInstance().reset(); ExtensionPointMap.getInstance().reset(); if ( KettleLogStore.isInitialized() ) { KettleLogStore.getInstance().reset(); } KettleLogStore.setLogChannelInterfaceFactory( new LogChannelFactory() ); if ( Props.isInitialized() ) { Props.getInstance().reset(); } KettleVFS.getInstance().reset(); XMLHandlerCache.getInstance().clear(); ValueMetaFactory.pluginRegistry = PluginRegistry.getInstance(); // under no circumstance reset the LoggingRegistry // LoggingRegistry.getInstance().reset(); }
boolean ignoreRepositorySharedObjects, OverwritePrompter prompter ) throws KettleXMLException { Props props = null; if ( Props.isInitialized() ) { props = Props.getInstance();
if ( Props.isInitialized() ) { props = Props.getInstance();
public InlineEtlModelGenerator() { if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } }
public SQLModelGenerator() { super(); if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } }
/** * @param locale * @param modelName * @param databaseMeta * @param tableNames */ public AutoModeler( String locale, String modelName, DatabaseMeta databaseMeta, SchemaTable[] tableNames ) { this.locale = locale; this.modelName = modelName; this.databaseMeta = databaseMeta; this.tableNames = tableNames; if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } }
public SQLModelGenerator( String modelName, String connectionName, int[] columnTypes, String[] columnNames, String query, Boolean securityEnabled, List<String> users, List<String> roles, int defaultAcls, String createdBy ) { if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } this.query = query; this.connectionName = connectionName; this.columnTypes = columnTypes; this.columnNames = columnNames; this.modelName = modelName; this.securityEnabled = securityEnabled; this.users = users; this.roles = roles; this.defaultAcls = defaultAcls; this.createdBy = createdBy; }
protected void initKettle() { try { KettleSystemListener.environmentInit( PentahoSessionHolder.getSession() ); if ( Props.isInitialized() == false ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } } catch ( KettleException e ) { logger.error( e ); throw new IllegalStateException( "Failed to initialize Kettle system" ); //$NON-NLS-1$ } }