org.pentaho.di.trans.step.BaseStepMeta Java Examples

The following examples show how to use org.pentaho.di.trans.step.BaseStepMeta. 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: IngresVectorwiseLoaderDialog.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
/**
 * @param parent
 * @param in
 * @param tr
 * @param sname
 */
public IngresVectorwiseLoaderDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (IngresVectorwiseLoaderMeta) in;

  lsMod = new ModifyListener() {
    public void modifyText( ModifyEvent e ) {
      input.setChanged();
    }
  };

  lsSelMod = new SelectionAdapter() {
    public void widgetSelected( SelectionEvent arg0 ) {
      input.setChanged();
    }
  };
}
 
Example #2
Source File: LoadSaveBase.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
public T createMeta() {
  try {
    T meta = clazz.newInstance();
    if ( meta instanceof BaseStepMeta ) {
      StepMeta mockParentStepMeta = mock( StepMeta.class );
      ( (BaseStepMeta) meta ).setParentStepMeta( mockParentStepMeta );
      TransMeta mockTransMeta = mock( TransMeta.class );
      NamedClusterEmbedManager embedManager = mock( NamedClusterEmbedManager.class );
      when( mockParentStepMeta.getParentTransMeta() ).thenReturn( mockTransMeta );
      when( mockTransMeta.getNamedClusterEmbedManager() ).thenReturn( embedManager );
    }
    return meta;
  } catch ( Exception e ) {
    throw new RuntimeException( "Unable to create meta of class " + clazz.getCanonicalName(), e );
  }
}
 
Example #3
Source File: XMLOutputStepAnalyzerTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetSupportedSteps() {
  XMLOutputStepAnalyzer analyzer = new XMLOutputStepAnalyzer();
  Set<Class<? extends BaseStepMeta>> types = analyzer.getSupportedSteps();
  assertNotNull( types );
  assertEquals( types.size(), 1 );
  assertTrue( types.contains( XMLOutputMeta.class ) );
}
 
Example #4
Source File: CypherDialog.java    From knowbi-pentaho-pdi-neo4j-output with Apache License 2.0 5 votes vote down vote up
public CypherDialog( Shell parent, Object inputMetadata, TransMeta transMeta, String stepname ) {
  super( parent, (BaseStepMeta) inputMetadata, transMeta, stepname );
  input = (CypherMeta) inputMetadata;

  // Hack the metastore...
  //
  metaStore = Spoon.getInstance().getMetaStore();
}
 
Example #5
Source File: GetXMLDataStepAnalyzerTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetSupportedSteps() {
  GetXMLDataStepAnalyzer analyzer = new GetXMLDataStepAnalyzer();
  Set<Class<? extends BaseStepMeta>> types = analyzer.getSupportedSteps();
  assertNotNull( types );
  assertEquals( types.size(), 1 );
  assertTrue( types.contains( GetXMLDataMeta.class ) );
}
 
Example #6
Source File: GenerateCsvDialog.java    From knowbi-pentaho-pdi-neo4j-output with Apache License 2.0 5 votes vote down vote up
public GenerateCsvDialog( Shell parent, Object inputMetadata, TransMeta transMeta, String stepname ) {
  super( parent, (BaseStepMeta) inputMetadata, transMeta, stepname );
  input = (GenerateCsvMeta) inputMetadata;

  // Hack the metastore...
  //
  metaStore = Spoon.getInstance().getMetaStore();
}
 
Example #7
Source File: GraphOutputDialog.java    From knowbi-pentaho-pdi-neo4j-output with Apache License 2.0 5 votes vote down vote up
public GraphOutputDialog( Shell parent, Object inputMetadata, TransMeta transMeta, String stepname ) {
  super( parent, (BaseStepMeta) inputMetadata, transMeta, stepname );
  input = (GraphOutputMeta) inputMetadata;

  // Hack the metastore...
  //
  metaStore = Spoon.getInstance().getMetaStore();
}
 
Example #8
Source File: CassandraOutputDialog.java    From learning-hadoop with Apache License 2.0 5 votes vote down vote up
public CassandraOutputDialog(Shell parent, Object in, TransMeta tr,
    String name) {

  super(parent, (BaseStepMeta) in, tr, name);

  m_currentMeta = (CassandraOutputMeta) in;
  m_originalMeta = (CassandraOutputMeta) m_currentMeta.clone();
}
 
Example #9
Source File: XMLOutputStepAnalyzer.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Override
public Set<Class<? extends BaseStepMeta>> getSupportedSteps() {
  return new HashSet<Class<? extends BaseStepMeta>>() {
    {
      add( XMLOutputMeta.class );
    }
  };
}
 
Example #10
Source File: JsonInputAnalyzerTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetSupportedSteps() {
  JsonInputAnalyzer analyzer = new JsonInputAnalyzer();
  Set<Class<? extends BaseStepMeta>> types = analyzer.getSupportedSteps();
  assertNotNull( types );
  assertEquals( types.size(), 1 );
  assertTrue( types.contains( JsonInputMeta.class ) );
}
 
Example #11
Source File: MultiMergeJoinDialog.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public MultiMergeJoinDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  joinMeta = (MultiMergeJoinMeta) in;

  String[] inputStepNames = getInputStepNames();
  wInputStepArray = new CCombo[inputStepNames.length];
  keyValTextBox = new Text[inputStepNames.length];
}
 
Example #12
Source File: UnivariateStatsDialog.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public UnivariateStatsDialog( Shell parent, Object in, TransMeta tr, String sname ) {

    super( parent, (BaseStepMeta) in, tr, sname );

    // The order here is important...
    // m_currentMeta is looked at for changes
    m_currentMeta = (UnivariateStatsMeta) in;
    m_originalMeta = (UnivariateStatsMeta) m_currentMeta.clone();
    m_inputFields = new HashMap<String, Integer>();
  }
 
Example #13
Source File: BaseStepDialog.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
/**
 * Instantiates a new base step dialog.
 *
 * @param parent       the parent shell
 * @param baseStepMeta the associated base step metadata
 * @param transMeta    the associated transformation metadata
 * @param stepname     the step name
 */
public BaseStepDialog( Shell parent, BaseStepMeta baseStepMeta, TransMeta transMeta, String stepname ) {
  super( parent, SWT.NONE );

  this.log = new LogChannel( baseStepMeta );
  this.transMeta = transMeta;
  this.stepname = stepname;
  this.stepMeta = transMeta.findStep( stepname );
  this.baseStepMeta = (StepMetaInterface) baseStepMeta;
  this.backupChanged = baseStepMeta.hasChanged();
  this.props = PropsUI.getInstance();
}
 
Example #14
Source File: WidgetUtils.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
/**
 * creates a ComboVar populated with fields from the previous step.
 * @param parentComposite - the composite in which the widget will be placed
 * @param props - PropsUI props for L&F
 * @param stepMeta - stepMeta of the current step
 * @param formData - FormData to use for placement
 */
public static ComboVar createFieldDropDown(
  Composite parentComposite, PropsUI props, BaseStepMeta stepMeta, FormData formData ) {
  TransMeta transMeta = stepMeta.getParentStepMeta().getParentTransMeta();
  ComboVar fieldDropDownCombo = new ComboVar( transMeta, parentComposite, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  props.setLook( fieldDropDownCombo );
  fieldDropDownCombo.addModifyListener( e -> stepMeta.setChanged() );

  fieldDropDownCombo.setLayoutData( formData );
  Listener focusListener = e -> {
    String current = fieldDropDownCombo.getText();
    fieldDropDownCombo.getCComboWidget().removeAll();
    fieldDropDownCombo.setText( current );

    try {
      RowMetaInterface rmi = transMeta.getPrevStepFields( stepMeta.getParentStepMeta().getName() );
      List ls = rmi.getValueMetaList();
      for ( Object l : ls ) {
        ValueMetaBase vmb = (ValueMetaBase) l;
        fieldDropDownCombo.add( vmb.getName() );
      }
    } catch ( KettleStepException ex ) {
      // can be ignored, since previous step may not be set yet.
      stepMeta.logDebug( ex.getMessage(), ex );
    }
  };
  fieldDropDownCombo.getCComboWidget().addListener( SWT.FocusIn, focusListener );
  return fieldDropDownCombo;
}
 
Example #15
Source File: JaninoDialog.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public JaninoDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );

  // The order here is important... currentMeta is looked at for changes
  currentMeta = (JaninoMeta) in;
  originalMeta = (JaninoMeta) currentMeta.clone();
  inputFields = new HashMap<String, Integer>();
}
 
Example #16
Source File: GetXMLDataStepAnalyzer.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Override
public Set<Class<? extends BaseStepMeta>> getSupportedSteps() {
  return new HashSet<Class<? extends BaseStepMeta>>() {
    {
      add( GetXMLDataMeta.class );
    }
  };
}
 
Example #17
Source File: ModPartitionerDialog.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public ModPartitionerDialog( Shell parent, StepMeta stepMeta, StepPartitioningMeta partitioningMeta,
                             TransMeta transMeta ) {
  super( parent, (BaseStepMeta) stepMeta.getStepMetaInterface(), transMeta, partitioningMeta
    .getPartitioner().getDescription() );
  this.stepMeta = stepMeta;
  this.partitioningMeta = partitioningMeta;
  partitioner = (ModPartitioner) partitioningMeta.getPartitioner();
  fieldName = partitioner.getFieldName();
}
 
Example #18
Source File: GetXMLDataDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public GetXMLDataDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (GetXMLDataMeta) in;
}
 
Example #19
Source File: MappingOutputDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public MappingOutputDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (MappingOutputMeta) in;
}
 
Example #20
Source File: ShapeFileReaderDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public ShapeFileReaderDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (ShapeFileReaderMeta) in;
}
 
Example #21
Source File: RegexEvalDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public RegexEvalDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (RegexEvalMeta) in;
}
 
Example #22
Source File: MailInputDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public MailInputDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (MailInputMeta) in;
}
 
Example #23
Source File: TopicSelection.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public Builder setStepMeta( BaseStepMeta stepMeta ) {
  this.stepMeta = stepMeta;
  return this;
}
 
Example #24
Source File: RowGeneratorDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public RowGeneratorDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (RowGeneratorMeta) in;
}
 
Example #25
Source File: OpenERPObjectInputDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public OpenERPObjectInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  this.meta = (OpenERPObjectInputMeta) in;
}
 
Example #26
Source File: MappingInputDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public MappingInputDialog( Shell parent, Object in, TransMeta tr, String sname ) {
  super( parent, (BaseStepMeta) in, tr, sname );
  input = (MappingInputMeta) in;
}
 
Example #27
Source File: SystemDataDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public SystemDataDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (SystemDataMeta) in;
}
 
Example #28
Source File: TextFileInputDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public TextFileInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (TextFileInputMeta) in;
  firstClickOnDateLocale = true;
}
 
Example #29
Source File: MonetDBBulkLoaderDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public MonetDBBulkLoaderDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  input = (MonetDBBulkLoaderMeta) in;
  inputFields = new HashMap<String, Integer>();
}
 
Example #30
Source File: OpenERPObjectOutputDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
public OpenERPObjectOutputDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, (BaseStepMeta) in, transMeta, sname );
  this.meta = (OpenERPObjectOutputMeta) in;
}