Java Code Examples for org.pentaho.di.core.CheckResultInterface#TYPE_RESULT_WARNING

The following examples show how to use org.pentaho.di.core.CheckResultInterface#TYPE_RESULT_WARNING . 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: MultiMergeJoinMeta.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Override
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
    String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
    IMetaStore metaStore ) {
  /*
   * @todo Need to check for the following: 1) Join type must be one of INNER / LEFT OUTER / RIGHT OUTER / FULL OUTER
   * 2) Number of input streams must be two (for now at least) 3) The field names of input streams must be unique
   */
  CheckResult cr =
      new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString( PKG,
          "MultiMergeJoinMeta.CheckResult.StepNotVerified" ), stepMeta );
  remarks.add( cr );
}
 
Example 2
Source File: MergeJoinMeta.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
                   RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
                   Repository repository, IMetaStore metaStore ) {
  /*
   * @todo Need to check for the following: 1) Join type must be one of INNER / LEFT OUTER / RIGHT OUTER / FULL OUTER
   * 2) Number of input streams must be two (for now at least) 3) The field names of input streams must be unique
   */
  CheckResult cr =
    new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(
      PKG, "MergeJoinMeta.CheckResult.StepNotVerified" ), stepMeta );
  remarks.add( cr );
}
 
Example 3
Source File: AbortMeta.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo,
  RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
  Repository repository, IMetaStore metaStore ) {
  // See if we have input streams leading to this step!
  if ( input.length == 0 ) {
    CheckResult cr =
      new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(
        PKG, "AbortMeta.CheckResult.NoInputReceivedError" ), stepinfo );
    remarks.add( cr );
  }
}
 
Example 4
Source File: CheckResultDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
  wFields.table.removeAll();

  for ( int i = 0; i < remarks.size(); i++ ) {
    CheckResultInterface cr = remarks.get( i );
    if ( show_successful_results || cr.getType() != CheckResultInterface.TYPE_RESULT_OK ) {
      TableItem ti = new TableItem( wFields.table, SWT.NONE );
      // MB - Support both JobEntry and Step Checking
      // 6/25/07
      CheckResultSourceInterface sourceMeta = cr.getSourceInfo();
      if ( sourceMeta != null ) {
        ti.setText( 1, sourceMeta.getName() );
      } else {
        ti.setText( 1, "<global>" );
      }
      ti.setText( 2, cr.getType() + " - " + cr.getTypeDesc() );
      ti.setText( 3, cr.getText() );

      Color col = ti.getBackground();
      switch ( cr.getType() ) {
        case CheckResultInterface.TYPE_RESULT_OK:
          col = green;
          break;
        case CheckResultInterface.TYPE_RESULT_ERROR:
          col = red;
          break;
        case CheckResultInterface.TYPE_RESULT_WARNING:
          col = yellow;
          break;
        case CheckResultInterface.TYPE_RESULT_COMMENT:
        default:
          break;
      }
      ti.setBackground( col );
    }
  }

  if ( wFields.table.getItemCount() == 0 ) {
    wFields.clearAll( false );
  }

  wFields.setRowNums();
  wFields.optWidth( true );

  if ( show_successful_results ) {
    wlFields.setText( STRING_HIDE_REMARKS );
    wNoOK.setText( STRING_HIDE_SUCESSFUL );
  } else {
    wlFields.setText( STRING_SHOW_REMARKS );
    wNoOK.setText( STRING_SHOW_SUCESSFUL );
  }

  shell.layout();
}