Java Code Examples for org.pentaho.di.core.Props#init()
The following examples show how to use
org.pentaho.di.core.Props#init() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SQLModelGenerator.java From pentaho-metadata with GNU Lesser General Public License v2.1 | 6 votes |
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; }
Example 2
Source File: PropertyOutputIT.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@Before public void setUp() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 3
Source File: MQTTConsumerTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void setupClass() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } StepPluginType.getInstance().handlePluginAnnotation( MQTTConsumerMeta.class, MQTTConsumerMeta.class.getAnnotation( org.pentaho.di.core.annotations.Step.class ), Collections.emptyList(), false, null ); }
Example 4
Source File: JmsConsumerMetaTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } StepPluginType.getInstance().handlePluginAnnotation( JmsConsumerMeta.class, JmsConsumerMeta.class.getAnnotation( org.pentaho.di.core.annotations.Step.class ), Collections.emptyList(), false, null ); }
Example 5
Source File: SubtransExecutorTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 6
Source File: TransMetaConverterTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 7
Source File: TransWebSocketEngineAdapterTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 8
Source File: AbstractMetaTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@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" ) ); }
Example 9
Source File: SafeStopTest.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 10
Source File: TextFileInputIT.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 11
Source File: AutoModeler.java From pentaho-metadata with GNU Lesser General Public License v2.1 | 5 votes |
/** * @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 ); } }
Example 12
Source File: ConstantIT.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 13
Source File: JobImportIT.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@Before public void setUp() throws KettleException { KettleEnvironment.init(); Props.init( Props.TYPE_PROPERTIES_SPOON ); deleteFolder( new File( REPOSITORY_ROOT_DIR ) ); KettleFileRepositoryMeta repositoryMeta = new KettleFileRepositoryMeta( FILE_REPOSITORY_ID, FILE_REPOSITORY_NAME, FILE_REPOSITORY_DESC, REPOSITORY_ROOT_DIR ); repository = new KettleFileRepository(); repository.init( repositoryMeta ); repository.connect( null, null ); importer = new RepositoryImporter( repository ); }
Example 14
Source File: JobEntryJobIT.java From pentaho-kettle with Apache License 2.0 | 5 votes |
@BeforeClass public static void init() throws Exception { KettleClientEnvironment.init(); PluginRegistry.addPluginType( StepPluginType.getInstance() ); PluginRegistry.init(); if ( !Props.isInitialized() ) { Props.init( 0 ); } }
Example 15
Source File: SQLModelGeneratorIT.java From pentaho-metadata with GNU Lesser General Public License v2.1 | 5 votes |
@Test public void testToLegacy() throws ObjectAlreadyExistsException { if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } SchemaMeta meta = ThinModelConverter.convertToLegacy( domain ); String locale = Locale.getDefault().toString(); // verify conversion worked. BusinessModel model = meta.findModel( "MODEL_1" ); assertNotNull( model ); String local = model.getName( locale ); assertEquals( "newdatasource", model.getName( locale ) ); BusinessCategory cat = model.getRootCategory().findBusinessCategory( Settings.getBusinessCategoryIDPrefix() + "newdatasource" ); assertNotNull( cat ); assertEquals( "newdatasource", cat.getName( locale ) ); assertEquals( 1, cat.getBusinessColumns().size() ); // this tests the inheritance of physical cols made it through BusinessColumn col = cat.getBusinessColumn( 0 ); assertEquals( "CUSTOMERNAME", col.getName( locale ) ); assertNotNull( col.getBusinessTable() ); assertEquals( "LOGICAL_TABLE_1", col.getBusinessTable().getId() ); assertEquals( col.getDataType(), DataTypeSettings.STRING ); assertEquals( "select customername from customers where customernumber < 171", col.getBusinessTable().getTargetTable() ); assertEquals( "select customername from customers where customernumber < 171", col.getPhysicalColumn().getTable().getTargetTable() ); assertEquals( "CUSTOMERNAME", col.getPhysicalColumn().getFormula() ); assertEquals( false, col.getPhysicalColumn().isExact() ); }
Example 16
Source File: SQLModelGenerator.java From pentaho-metadata with GNU Lesser General Public License v2.1 | 4 votes |
public SQLModelGenerator() { super(); if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } }
Example 17
Source File: InlineEtlModelGenerator.java From pentaho-metadata with GNU Lesser General Public License v2.1 | 4 votes |
public InlineEtlModelGenerator() { if ( !Props.isInitialized() ) { Props.init( Props.TYPE_PROPERTIES_EMPTY ); } }