protected Props() { init(); }
protected Props( String filename ) { properties = new Properties(); this.type = TYPE_PROPERTIES_EMPTY; this.filename = filename; init(); }
protected Props( int t ) { type = t; filename = getFilename(); init(); }
@Test public void testShouldOverwrite() { assertTrue( meta.shouldOverwrite( null, null, null, null ) ); Props.init( Props.TYPE_PROPERTIES_EMPTY ); assertTrue( meta.shouldOverwrite( null, Props.getInstance(), "message", "remember" ) ); Props.getInstance().setProperty( Props.STRING_ASK_ABOUT_REPLACING_DATABASES, "Y" ); OverwritePrompter prompter = mock( OverwritePrompter.class ); when( prompter.overwritePrompt( "message", "remember", Props.STRING_ASK_ABOUT_REPLACING_DATABASES ) ) .thenReturn( false ); assertFalse( meta.shouldOverwrite( prompter, Props.getInstance(), "message", "remember" ) ); }
public static void main( String[] a ) throws KettleException { BufferedReader reader = new BufferedReader( new InputStreamReader( System.in ) ); KettleEnvironment.init(); Props.init( Props.TYPE_PROPERTIES_SPOON );
@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 ); } }
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$ } }