org.pentaho.di.core.variables.Variables.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.pentaho.di.core.variables.Variables.<init>()方法的一些代码示例,展示了Variables.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Variables.<init>()方法的具体详情如下:
包路径:org.pentaho.di.core.variables.Variables
类名称:Variables
方法名:<init>

Variables.<init>介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Please supply real namespace as it is required for proper VFS operation
 */
@Deprecated
public FTPSConnection( int connectionType, String hostname, int port, String username, String password ) {
 this( connectionType, hostname, port, username, password, new Variables() );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Get a default variable space as a placeholder. Everytime you will get a new instance.
 *
 * @return a default variable space.
 */
public static VariableSpace getADefaultVariableSpace() {
 VariableSpace space = new Variables();
 space.initializeVariablesFrom( null );
 return space;
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void main( String[] args ) {
  List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>();
  new JobEntrySFTP().check( remarks, null, new Variables(), null, null );
  System.out.printf( "Remarks: %s\n", remarks );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void main( String[] args ) {
 List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>();
 new JobEntrySFTP().check( remarks, null, new Variables(), null, null );
 System.out.printf( "Remarks: %s\n", remarks );
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void main( String[] args ) {
 List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>();
 new JobEntryCreateFile().check( remarks, null, new Variables(), null, null );
 System.out.printf( "Remarks: %s\n", remarks );
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void main( String[] args ) {
 List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>();
 new JobEntryDeleteFile().check( remarks, null, new Variables(), null, null );
 System.out.printf( "Remarks: %s\n", remarks );
}

代码示例来源:origin: pentaho/pentaho-kettle

public static void main( String[] args ) {
 List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>();
 new JobEntryJob().check( remarks, null, new Variables(), null, null );
 System.out.printf( "Remarks: %s\n", remarks );
}

代码示例来源:origin: pentaho/pentaho-kettle

private String reapplyCurrentDir( String oldCurrentDir, String newCurrentDir, String path ) {
 Variables vars = new Variables();
 vars.setVariable( Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY, oldCurrentDir );
 String newPath = vars.environmentSubstitute( path );
 return getPath( newCurrentDir, newPath );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Deprecated
public static final String[] guessStringsFromLine( LogChannelInterface log, String line, TextFileInputMeta inf,
  String delimiter ) throws KettleException {
 return guessStringsFromLine( new Variables(), log, line, inf, delimiter, StringUtil.substituteHex( inf
   .getEnclosure() ), StringUtil.substituteHex( inf.getEscapeCharacter() ) );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void reset() {
 defaultVariableSpace = new Variables();
 defaultVariableSpace.initializeVariablesFrom( null );
 fsm.close();
 try {
  fsm.setFilesCache( new WeakRefFilesCache() );
  fsm.init();
 } catch ( FileSystemException ignored ) {
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Before
public void setUp() throws Exception {
 rowMeta = new RowMeta();
 data = TreeBasedTable.create();
 variables = new Variables();
 aggregates = Maps.newHashMap( default_aggregates );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
  * Declare fields for test.
  * 
  * TODO: move to BaseParsingTest after CSV moving to BaseFileInput
  */
 protected void setFields( BaseFileField... fields ) throws Exception {
  meta.inputFields = fields;
  meta.getFields( data.outputRowMeta, meta.getName(), null, null, new Variables(), null, null );
  data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Declare fields for test.
 */
protected void setFields( ExcelInputField... fields ) throws Exception {
 meta.setField( fields );
 meta.getFields( data.outputRowMeta, meta.getName(), null, null, new Variables(), null, null );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Test
public void testCheckInputRowsBothNonEmpty() throws KettleStepException {
 when( transMeta.getPrevStepFields( REFERENCE_STEP_NAME ) ).thenReturn( generateRowMeta10Strings() );
 when( transMeta.getPrevStepFields( COMPARISON_STEP_NAME ) ).thenReturn( generateRowMeta10Strings() );
 meta.check( remarks, transMeta, stepMeta, (RowMeta) null, new String[0], new String[0],
  (RowMeta) null, new Variables(), (Repository) null, (IMetaStore) null );
 assertNotNull( remarks );
 assertTrue( remarks.size() >= 2 );
 assertEquals( remarks.get( 1 ).getType(), CheckResultInterface.TYPE_RESULT_OK );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Test
public void testCheckErrorsOnZeroSizeAndDuration() {
 meta.setBatchDuration( "0" );
 meta.setBatchSize( "0" );
 ArrayList<CheckResultInterface> remarks = new ArrayList<>();
 meta.check( remarks, null, null, null, null, null, null, new Variables(), null, null );
 assertEquals( 1, remarks.size() );
 assertEquals(
  "The \"Number of records\" and \"Duration\" fields can’t both be set to 0. Please set a value of 1 or higher "
   + "for one of the fields.",
  remarks.get( 0 ).getText() );
}

代码示例来源:origin: pentaho/pentaho-kettle

private VariableSpace getVariableSpace() {
  if ( Spoon.getInstance().getActiveTransformation() != null ) {
   return Spoon.getInstance().getActiveTransformation();
  } else if ( Spoon.getInstance().getActiveJob() != null ) {
   return Spoon.getInstance().getActiveJob();
  } else {
   return new Variables();
  }
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Declare fields for test.
 */
protected void setFields( PropertyInputField... fields ) throws Exception {
 meta.setInputFields( fields );
 meta.getFields( data.outputRowMeta, meta.getName(), null, null, new Variables(), null, null );
 data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Declare fields for test.
 */
protected void setFields( TextFileInputField... fields ) throws Exception {
 meta.setInputFields( fields );
 meta.getFields( data.outputRowMeta, meta.getName(), null, null, new Variables(), null, null );
 data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Declare fields for test.
 */
protected void setFields( FixedFileInputField... fields ) throws Exception {
 meta.setFieldDefinition( fields );
 meta.getFields( data.outputRowMeta, meta.getName(), null, null, new Variables(), null, null );
 data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );
}

代码示例来源:origin: pentaho/pentaho-kettle

@Test
public void testGetFields() throws KettleStepException {
 DetectLastRowMeta meta = new DetectLastRowMeta();
 meta.setDefault();
 meta.setResultFieldName( "The Result" );
 RowMeta rowMeta = new RowMeta();
 meta.getFields( rowMeta, "this step", null, null, new Variables(), null, null );
 assertEquals( 1, rowMeta.size() );
 assertEquals( "The Result", rowMeta.getValueMeta( 0 ).getName() );
 assertEquals( ValueMetaInterface.TYPE_BOOLEAN, rowMeta.getValueMeta( 0 ).getType() );
}

相关文章