当前位置: 首页>>代码示例>>Java>>正文


Java Props.isInitialized方法代码示例

本文整理汇总了Java中org.pentaho.di.core.Props.isInitialized方法的典型用法代码示例。如果您正苦于以下问题:Java Props.isInitialized方法的具体用法?Java Props.isInitialized怎么用?Java Props.isInitialized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.Props的用法示例。


在下文中一共展示了Props.isInitialized方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:17,代码来源:SQLModelGenerator.java

示例2: getStringProperty

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
public static String getStringProperty(String name, String defaultValue ) {

		String value = Props.isInitialized() ? Props.getInstance().getProperty(name) : null;
		if( value == null ) {
			value = defaultValue;
		}
		return value;
		
	}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:10,代码来源:TableAgileMartMeta.java

示例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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:SafeStopTest.java

示例4: getLongProperty

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
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;
	}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:12,代码来源:MonetDBAgileMartMeta.java

示例5: 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() );
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:28,代码来源:SQLModelGeneratorIT.java

示例6: 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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:TransMetaConverterTest.java

示例7: getStringProperty

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
public static String getStringProperty( String name, String defaultValue ) {

    String value = Props.isInitialized() ? Props.getInstance().getProperty( name ) : null;
    if ( value == null ) {
      value = defaultValue;
    }
    return value;

  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:TableAgileMartMeta.java

示例8: getLongProperty

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
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;
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:12,代码来源:TableAgileMartMeta.java

示例9: getUsedArguments

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
/**
 * Gets the arguments (and their values) used by this transformation. If argument values are supplied by parameter,
 * the values will used for the arguments. If the values are null or empty, the method will attempt to use argument
 * values from a previous execution.
 *
 * @param arguments
 *          the values for the arguments
 * @return A row with the used arguments (and their values) in it.
 */
public Map<String, String> getUsedArguments( String[] arguments ) {
  Map<String, String> transArgs = new HashMap<>();

  for ( int i = 0; i < nrSteps(); i++ ) {
    StepMetaInterface smi = getStep( i ).getStepMetaInterface();
    Map<String, String> stepArgs = smi.getUsedArguments(); // Get the command line arguments that this step uses.
    if ( stepArgs != null ) {
      transArgs.putAll( stepArgs );
    }
  }

  // OK, so perhaps, we can use the arguments from a previous execution?
  String[] saved = Props.isInitialized() ? Props.getInstance().getLastArguments() : null;

  // Set the default values on it...
  // Also change the name to "Argument 1" .. "Argument 10"
  //
  for ( String argument : transArgs.keySet() ) {
    String value = "";
    int argNr = Const.toInt( argument, -1 );
    if ( arguments != null && argNr > 0 && argNr <= arguments.length ) {
      value = Const.NVL( arguments[argNr - 1], "" );
    }
    if ( value.length() == 0 ) { // try the saved option...

      if ( argNr > 0 && argNr < saved.length && saved[argNr] != null ) {
        value = saved[argNr - 1];
      }
    }
    transArgs.put( argument, value );
  }

  return transArgs;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:44,代码来源:TransMeta.java

示例10: getUsedArguments

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
/**
 * Get the arguments used by this transformation.
 *
 * @param arguments
 * @return A row with the used arguments in it.
 */
public Map<String, String> getUsedArguments(String[] arguments)
{
	Map<String, String> transArgs = new HashMap<String, String>();
	
    for (int i = 0; i < nrSteps(); i++)
    {
        StepMetaInterface smi = getStep(i).getStepMetaInterface();
        Map<String, String> stepArgs = smi.getUsedArguments(); // Get the command line arguments that this step uses.
        if (stepArgs != null)
        {
        	transArgs.putAll(stepArgs);
        }
    }

    // OK, so perhaps, we can use the arguments from a previous execution?
    String[] saved = Props.isInitialized() ? Props.getInstance().getLastArguments() : null;

    // Set the default values on it...
    // Also change the name to "Argument 1" .. "Argument 10"
    //
    for (String argument : transArgs.keySet()) 
    {
    	String value = "";
    	int argNr = Const.toInt(argument, -1);
        if (arguments!=null && argNr > 0 && argNr <= arguments.length)
        {
        	value = Const.NVL(arguments[argNr-1], "");
        }
        if (value.length()==0) // try the saved option...
        {
            if (argNr > 0 && argNr < saved.length && saved[argNr] != null)
            {
                value = saved[argNr-1];
            }
        }
        transArgs.put(argument, value);
    }
    
    return transArgs;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:47,代码来源:TransMeta.java

示例11: getUsedArguments

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
/**
 * Gets the arguments (and their values) used by this transformation. If argument values are
 * supplied by parameter, the values will used for the arguments. If the values are null or empty,
 * the method will attempt to use argument values from a previous execution.
 *
 * @param arguments the values for the arguments
 * @return A row with the used arguments (and their values) in it.
 */
public Map<String, String> getUsedArguments(String[] arguments)
{
	Map<String, String> transArgs = new HashMap<String, String>();
	
    for (int i = 0; i < nrSteps(); i++)
    {
        StepMetaInterface smi = getStep(i).getStepMetaInterface();
        Map<String, String> stepArgs = smi.getUsedArguments(); // Get the command line arguments that this step uses.
        if (stepArgs != null)
        {
        	transArgs.putAll(stepArgs);
        }
    }

    // OK, so perhaps, we can use the arguments from a previous execution?
    String[] saved = Props.isInitialized() ? Props.getInstance().getLastArguments() : null;

    // Set the default values on it...
    // Also change the name to "Argument 1" .. "Argument 10"
    //
    for (String argument : transArgs.keySet()) 
    {
    	String value = "";
    	int argNr = Const.toInt(argument, -1);
        if (arguments!=null && argNr > 0 && argNr <= arguments.length)
        {
        	value = Const.NVL(arguments[argNr-1], "");
        }
        if (value.length()==0) // try the saved option...
        {
            if (argNr > 0 && argNr < saved.length && saved[argNr] != null)
            {
                value = saved[argNr-1];
            }
        }
        transArgs.put(argument, value);
    }
    
    return transArgs;
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:49,代码来源:TransMeta.java

示例12: InlineEtlModelGenerator

import org.pentaho.di.core.Props; //导入方法依赖的package包/类
public InlineEtlModelGenerator() {
  if ( !Props.isInitialized() ) {
    Props.init( Props.TYPE_PROPERTIES_EMPTY );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:6,代码来源:InlineEtlModelGenerator.java


注:本文中的org.pentaho.di.core.Props.isInitialized方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。