當前位置: 首頁>>代碼示例>>Java>>正文


Java CheckResultInterface類代碼示例

本文整理匯總了Java中org.pentaho.di.core.CheckResultInterface的典型用法代碼示例。如果您正苦於以下問題:Java CheckResultInterface類的具體用法?Java CheckResultInterface怎麽用?Java CheckResultInterface使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CheckResultInterface類屬於org.pentaho.di.core包,在下文中一共展示了CheckResultInterface類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta) 
{
  boolean res = andValidator().validate(this, "arguments", remarks, putValidators(notNullValidator())); 

  if (res == false) 
  {
    return;
  }

  ValidatorContext ctx = new ValidatorContext();
  putVariableSpace(ctx, getVariables());
  putValidators(ctx, notNullValidator(), fileExistsValidator());

  for (int i = 0; i < source_filefolder.length; i++) 
  {
    andValidator().validate(this, "arguments[" + i + "]", remarks, ctx);
  } 
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:19,代碼來源:JobEntryPGPDecryptFiles.java

示例2: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
                   RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
                   Repository repository, IMetaStore metaStore ) {

  // see if we have fields from previous steps
  if ( prev == null || prev.size() == 0 ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING,
        BaseMessages.getString( PKG, "BAServerUtils.CheckResult.NotReceivingFieldsFromPreviousSteps" ),
        stepMeta ) );
  } else {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages
        .getString( PKG, "BAServerUtils.CheckResult.ReceivingFieldsFromPreviousSteps", "" + prev.size() ),
        stepMeta ) );
  }

  // see if we have input streams leading to this step
  if ( input.length > 0 ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK,
        BaseMessages.getString( PKG, "BAServerUtils.CheckResult.ReceivingInfoFromOtherSteps" ), stepMeta ) );
  } else {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "BAServerUtils.CheckResult.NotReceivingInfoFromOtherSteps" ),
        stepMeta ) );
  }
}
 
開發者ID:pentaho,項目名稱:pdi-platform-utils-plugin,代碼行數:26,代碼來源:CallEndpointMeta.java

示例3: validate

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public boolean validate(CheckResultSourceInterface source, String propertyName, List<CheckResultInterface> remarks,
    ValidatorContext context) {

  Object result = null;
  String value = null;

  value = getValueAsString(source, propertyName);

  if (GenericValidator.isBlankOrNull(value)) {
    return true;
  }

  result = GenericTypeValidator.formatInt(value);

  if (result == null) {
    addFailureRemark(source, propertyName, VALIDATOR_NAME, remarks, getLevelOnFail(context, VALIDATOR_NAME));
    return false;
  }
  return true;

}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:22,代碼來源:IntegerValidator.java

示例4: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta)
{
  ValidatorContext ctx1 = new ValidatorContext();
  putVariableSpace(ctx1, getVariables());
  putValidators(ctx1, notBlankValidator(), fileDoesNotExistValidator());
 
  andValidator().validate(this, "zipFilename", remarks, ctx1);//$NON-NLS-1$

  if (2 == afterunzip) {
    // setting says to move
    andValidator().validate(this, "moveToDirectory", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
  }

  andValidator().validate(this, "sourceDirectory", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$

}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:18,代碼來源:JobEntryUnZip.java

示例5: addOkRemark

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public static void addOkRemark(CheckResultSourceInterface source, String propertyName,
    List<CheckResultInterface> remarks)
{
  final int SUBSTRING_LENGTH = 20;
  LogWriter log = LogWriter.getInstance();
  log.logBasic(JobEntryValidatorUtils.class.getSimpleName(), "attempting to fetch property named '" + propertyName
      + "'");
  String value = ValidatorUtils.getValueAsString(source, propertyName);
  log.logBasic(JobEntryValidatorUtils.class.getSimpleName(), "fetched value [" + value + "]");
  String substr = null;
  if (value != null)
  {
    substr = value.substring(0, Math.min(SUBSTRING_LENGTH, value.length()));
    if (value.length() > SUBSTRING_LENGTH)
    {
      substr += "..."; //$NON-NLS-1$
    }
  }
  remarks.add(new CheckResult(CheckResultInterface.TYPE_RESULT_OK, ValidatorMessages.getString("messages.passed", //$NON-NLS-1$
      propertyName, substr), source));
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:22,代碼來源:JobEntryValidatorUtils.java

示例6: validate

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public boolean validate(CheckResultSourceInterface source, String propertyName, List<CheckResultInterface> remarks,
    ValidatorContext context)
{
  String value = null;

  value = getValueAsString(source, propertyName);

  if (!GenericValidator.isBlankOrNull(value) && !GenericValidator.isEmail(value))
  {
    JobEntryValidatorUtils.addFailureRemark(source, propertyName, VALIDATOR_NAME, remarks, JobEntryValidatorUtils
        .getLevelOnFail(context, VALIDATOR_NAME));
    return false;
  } else
  {
    return true;
  }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:18,代碼來源:EmailValidator.java

示例7: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta)
{
  if (setLogfile) {
    andValidator().validate(this, "logfile", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
  }

  if (null != directory) {
    // if from repo
    andValidator().validate(this, "directory", remarks, putValidators(notNullValidator())); //$NON-NLS-1$
    andValidator().validate(this, "jobName", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
  } else {
    // else from xml file
    andValidator().validate(this, "filename", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
  }
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:17,代碼來源:JobEntryJob.java

示例8: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta)
{

  andValidator().validate(this, "server", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
  andValidator().validate(this, "replyAddress", remarks, putValidators(notBlankValidator(), emailValidator())); //$NON-NLS-1$

  andValidator().validate(this, "destination", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$

  if (usingAuthentication)
  {
    andValidator().validate(this, "authenticationUser", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
    andValidator().validate(this, "authenticationPassword", remarks, putValidators(notNullValidator())); //$NON-NLS-1$
  }

  andValidator().validate(this, "port", remarks, putValidators(integerValidator())); //$NON-NLS-1$

}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:19,代碼來源:JobEntryMail.java

示例9: getFields

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public void getFields(RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException
{
	List<CheckResultInterface> remarks = new ArrayList<CheckResultInterface>();
	RowMetaAndData rowMetaAndData = RowGenerator.buildRow(this, remarks, origin);
	if (!remarks.isEmpty()) {
		StringBuffer stringRemarks = new StringBuffer();
		for (CheckResultInterface remark : remarks) {
			stringRemarks.append(remark.toString()).append(Const.CR);
		}
		throw new KettleStepException(stringRemarks.toString());
	}
	
	for (ValueMetaInterface valueMeta : rowMetaAndData.getRowMeta().getValueMetaList()) {
		valueMeta.setOrigin(origin);
	}
	
	row.mergeRowMeta(rowMetaAndData.getRowMeta());
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:19,代碼來源:RowGeneratorMeta.java

示例10: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta) 
{
   boolean res = andValidator().validate(this, "arguments", remarks, putValidators(notNullValidator())); 

   if (res == false) 
   {
     return;
   }

   ValidatorContext ctx = new ValidatorContext();
   putVariableSpace(ctx, getVariables());
   putValidators(ctx, notNullValidator(), fileExistsValidator());

   for (int i = 0; i < arguments.length; i++) 
   {
     andValidator().validate(this, "arguments[" + i + "]", remarks, ctx);
   } 
 }
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:19,代碼來源:JobEntryAddResultFilenames.java

示例11: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta)
{
    ValidatorContext ctx1 = new ValidatorContext();
    putVariableSpace(ctx1, getVariables());
    putValidators(ctx1, notBlankValidator(), fileDoesNotExistValidator());
    if (3 == ifzipfileexists) {
      // execute method fails if the file already exists; we should too
      putFailIfExists(ctx1, true);
    }
    andValidator().validate(this, "zipFilename", remarks, ctx1);//$NON-NLS-1$

    if (2 == afterzip) {
      // setting says to move
      andValidator().validate(this, "moveToDirectory", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$
    }

    andValidator().validate(this, "sourceDirectory", remarks, putValidators(notBlankValidator())); //$NON-NLS-1$

}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:21,代碼來源:JobEntryZipFile.java

示例12: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@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 ) {

  if ( broker == null ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidBroker" ), stepMeta ) );
  }
  if ( topic == null ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidTopic" ), stepMeta ) );
  }
  if ( field == null ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidField" ), stepMeta ) );
  }
  if ( clientId == null ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidClientID" ), stepMeta ) );
  }
  if ( timeout == null ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidConnectionTimeout" ), stepMeta ) );
  }
  if ( qos == null ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidQOS" ), stepMeta ) );
  }
  if ( requiresAuth ) {
    if ( username == null ) {
      remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
          BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidUsername" ), stepMeta ) );
    }
    if ( password == null ) {
      remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR,
          BaseMessages.getString( PKG, "MQTTClientMeta.Check.InvalidPassword" ), stepMeta ) );
    }
  }
}
 
開發者ID:pentaho-labs,項目名稱:pentaho-mqtt-plugin,代碼行數:41,代碼來源:MQTTPublisherMeta.java

示例13: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@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 ) {
  super.check( remarks, transMeta, stepMeta, prev, input, output, info, space, repository, metaStore );
  if ( Const.isEmpty( getTicketFieldName() ) ) {
    remarks.add(
      new CheckResult( CheckResult.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorNoTicketField" ),
        stepMeta ) );
  } else if ( prev.indexOfValue( getTicketFieldName() ) >= 0 ) {
    if ( ValueMetaInterface.TYPE_INTEGER == prev.getValueMeta(
        prev.indexOfValue( getTicketFieldName() ) ).getType() ) {
      remarks.add(
        new CheckResult( CheckResult.TYPE_RESULT_OK,
          BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.OkTicketField" ),
          stepMeta ) );
    } else {
      remarks.add(
        new CheckResult( CheckResult.TYPE_RESULT_ERROR,
          BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorTicketFieldWrongType" ),
          stepMeta ) );
    }
  } else {
    remarks.add(
      new CheckResult( CheckResult.TYPE_RESULT_ERROR,
        BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorTicketFieldNotInRow" ),
        stepMeta ) );
  }

  if ( Const.isEmpty( getResultFieldName() ) ) {
    remarks.add(
      new CheckResult( CheckResult.TYPE_RESULT_WARNING,
        BaseMessages.getString( PKG, "ZendeskOutputSuspendedTicketsMeta.CheckResult.ErrorNoResultField" ),
        stepMeta ) );
  }
}
 
開發者ID:matthewtckr,項目名稱:pdi-zendesk-plugin,代碼行數:38,代碼來源:ZendeskOutputSuspendedTicketsMeta.java

示例14: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
                   RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
                   Repository repository, IMetaStore metaStore ) {

  // see if we have all variables specified
  int nrRemarks = remarks.size();
  for ( int i = 0; i < fieldName.length; i++ ) {
    if ( Const.isEmpty( variableName[ i ] ) ) {
      remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString( PKG, "GetSessionVariable.CheckResult.VariableNotSpecified", fieldName[ i ] ), stepMeta ) );
    }
  }
  if ( remarks.size() == nrRemarks ) {
    remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString( PKG, "GetSessionVariable.CheckResult.AllVariablesSpecified" ), stepMeta ) );
  }
}
 
開發者ID:pentaho,項目名稱:pdi-platform-utils-plugin,代碼行數:16,代碼來源:GetSessionVariableMeta.java

示例15: check

import org.pentaho.di.core.CheckResultInterface; //導入依賴的package包/類
@Override
public void check(List<CheckResultInterface> remarks, JobMeta jobMeta)
{
  ValidatorContext ctx = new ValidatorContext();
  putVariableSpace(ctx, getVariables());
  putValidators(ctx, notBlankValidator(), fileExistsValidator());
  andValidator().validate(this, "xsdFilename", remarks, ctx);//$NON-NLS-1$
  andValidator().validate(this, "xmlFilename", remarks, ctx);//$NON-NLS-1$
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:10,代碼來源:JobEntryXSDValidator.java


注:本文中的org.pentaho.di.core.CheckResultInterface類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。