本文整理汇总了Java中org.pentaho.di.core.Props.init方法的典型用法代码示例。如果您正苦于以下问题:Java Props.init方法的具体用法?Java Props.init怎么用?Java Props.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.Props
的用法示例。
在下文中一共展示了Props.init方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SQLModelGenerator
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
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;
}
示例2: testToLegacy
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
@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() );
}
示例3: init
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
@BeforeClass
public static void init() throws Exception {
KettleClientEnvironment.init();
PluginRegistry.addPluginType( StepPluginType.getInstance() );
PluginRegistry.init();
if ( !Props.isInitialized() ) {
Props.init( 0 );
}
}
示例4: testShouldOverwrite
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
@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" ) );
}
示例5: init
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
@BeforeClass
public static void init() throws Exception {
if ( !KettleClientEnvironment.isInitialized() ) {
KettleClientEnvironment.init();
}
PluginRegistry.addPluginType( StepPluginType.getInstance() );
PluginRegistry.init();
if ( !Props.isInitialized() ) {
Props.init( 0 );
}
}
示例6: InlineEtlModelGenerator
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
public InlineEtlModelGenerator() {
if ( !Props.isInitialized() ) {
Props.init( Props.TYPE_PROPERTIES_EMPTY );
}
}
示例7: environmentInit
import org.pentaho.di.core.Props; //导入方法依赖的package包/类
public static void environmentInit( final IPentahoSession session ) throws KettleException {
// init kettle without simplejndi
KettleEnvironment.init( false );
Props.init( null );
}