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


Java SalesforceInputMeta类代码示例

本文整理汇总了Java中org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta的典型用法代码示例。如果您正苦于以下问题:Java SalesforceInputMeta类的具体用法?Java SalesforceInputMeta怎么用?Java SalesforceInputMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SalesforceInputMeta类属于org.pentaho.di.trans.steps.salesforceinput包,在下文中一共展示了SalesforceInputMeta类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SalesforceInputDialog

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
public SalesforceInputDialog(Shell parent, Object in, TransMeta transMeta,
		String sname) {
	super(parent, (BaseStepMeta) in, transMeta, sname);
	input = (SalesforceInputMeta) in;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:6,代码来源:SalesforceInputDialog.java

示例2: getInfo

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
private void getInfo(SalesforceInputMeta in) throws KettleException {
	stepname = wStepname.getText(); // return value

	// copy info to SalesforceInputMeta class (input)
	in.setTargetURL(Const.NVL(wURL.getText(),in.TargetDefaultURL));
	in.setUserName(Const.NVL(wUserName.getText(),""));
	in.setPassword(Const.NVL(wPassword.getText(),""));
	in.setModule(Const.NVL(wModule.getText(),"Account"));
	in.setCondition(Const.NVL(wCondition.getText(),""));
	
	in.setTimeOut(Const.NVL(wTimeOut.getText(),"0"));
	in.setRowLimit(Const.NVL(wLimit.getText(),"0"));
	in.setTargetURLField(Const.NVL(wInclURLField.getText(),""));
	in.setSQLField(Const.NVL(wInclSQLField.getText(),""));
	in.setTimestampField(Const.NVL(wInclTimestampField.getText(),""));
	in.setModuleField(Const.NVL(wInclModuleField.getText(),""));
	in.setRowNumberField(Const.NVL(wInclRownumField.getText(),""));
	
	in.setIncludeTargetURL(wInclURL.getSelection());
	in.setIncludeSQL(wInclSQL.getSelection());
	in.setIncludeTimestamp(wInclTimestamp.getSelection());
	in.setIncludeModule(wInclModule.getSelection());
	in.setIncludeRowNumber(wInclRownum.getSelection());

	int nrFields = wFields.nrNonEmpty();

	in.allocate(nrFields);

	for (int i = 0; i < nrFields; i++) {
		SalesforceInputField field = new SalesforceInputField();

		TableItem item = wFields.getNonEmpty(i);

		field.setName(item.getText(1));
		field.setField(item.getText(2));
		field.setType(ValueMeta.getType(item.getText(3)));
		field.setFormat(item.getText(4));
		field.setLength(Const.toInt(item.getText(5), -1));
		field.setPrecision(Const.toInt(item.getText(6), -1));
		field.setCurrencySymbol(item.getText(7));
		field.setDecimalSymbol(item.getText(8));
		field.setGroupSymbol(item.getText(9));
		field.setTrimType(SalesforceInputField
				.getTrimTypeByDesc(item.getText(10)));
		field.setRepeated(Messages.getString("System.Combo.Yes")
				.equalsIgnoreCase(item.getText(11)));

		in.getInputFields()[i] = field;
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:51,代码来源:SalesforceInputDialog.java

示例3: preview

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
private void preview() {
	try {
		// Create the LDIF input step
		SalesforceInputMeta oneMeta = new SalesforceInputMeta();
		getInfo(oneMeta);

		// check if the path is given
		if (!checkInput()) return;
		
		 TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
            
		EnterNumberDialog numberDialog = new EnterNumberDialog(
				shell,
				500,
				Messages.getString("SalesforceInputDialog.NumberRows.DialogTitle"),
				Messages.getString("SalesforceInputDialog.NumberRows.DialogMessage"));
		int previewSize = numberDialog.open();
		if (previewSize > 0) {
			TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(
					shell, previewMeta,
					new String[] { wStepname.getText() },
					new int[] { previewSize });
			progressDialog.open();

			if (!progressDialog.isCancelled()) {
				Trans trans = progressDialog.getTrans();
				String loggingText = progressDialog.getLoggingText();

				if (trans.getResult() != null
						&& trans.getResult().getNrErrors() > 0) {
					EnterTextDialog etd = new EnterTextDialog(
							shell,Messages.getString("System.Dialog.PreviewError.Title"),
							Messages.getString("System.Dialog.PreviewError.Message"),loggingText, true);
					etd.setReadOnly();
					etd.open();
				}

                   PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
						progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
								.getPreviewRows(wStepname.getText()), loggingText);
				prd.open();
			}
		}
	} catch (KettleException e) {
		new ErrorDialog(
				shell,
				Messages
						.getString("SalesforceInputDialog.ErrorPreviewingData.DialogTitle"),
				Messages
						.getString("SalesforceInputDialog.ErrorPreviewingData.DialogMessage"),
				e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:54,代码来源:SalesforceInputDialog.java

示例4: getInfo

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
private void getInfo(SalesforceInputMeta in) throws KettleException {
	stepname = wStepname.getText(); // return value

	// copy info to SalesforceInputMeta class (input)
	in.setTargetURL(Const.NVL(wURL.getText(),SalesforceConnectionUtils.TARGET_DEFAULT_URL));
	in.setUserName(Const.NVL(wUserName.getText(),""));
	in.setPassword(Const.NVL(wPassword.getText(),""));
	in.setModule(Const.NVL(wModule.getText(),"Account"));
	in.setCondition(Const.NVL(wCondition.getText(),""));
	
	in.setSpecifyQuery(wspecifyQuery.getSelection());
	in.setQuery(Const.NVL(wQuery.getText(),""));
	in.setUseCompression(wUseCompression.getSelection());
	in.setQueryAll(wQueryAll.getSelection());
	in.setTimeOut(Const.NVL(wTimeOut.getText(),"0"));
	in.setRowLimit(Const.NVL(wLimit.getText(),"0"));
	in.setTargetURLField(Const.NVL(wInclURLField.getText(),""));
	in.setSQLField(Const.NVL(wInclSQLField.getText(),""));
	in.setTimestampField(Const.NVL(wInclTimestampField.getText(),""));
	in.setModuleField(Const.NVL(wInclModuleField.getText(),""));
	in.setRowNumberField(Const.NVL(wInclRownumField.getText(),""));
	in.setRecordsFilter(SalesforceConnectionUtils.getRecordsFilterByDesc(wRecordsFilter.getText()));
	in.setIncludeTargetURL(wInclURL.getSelection());
	in.setIncludeSQL(wInclSQL.getSelection());
	in.setIncludeTimestamp(wInclTimestamp.getSelection());
	in.setIncludeModule(wInclModule.getSelection());
	in.setIncludeRowNumber(wInclRownum.getSelection());
	in.setReadFrom(wReadFrom.getText());
	in.setReadTo(wReadTo.getText());
	in.setDeletionDateField(Const.NVL(wInclDeletionDateField.getText(),""));
	in.setIncludeDeletionDate(wInclDeletionDate.getSelection());
	int nrFields = wFields.nrNonEmpty();

	in.allocate(nrFields);

	for (int i = 0; i < nrFields; i++) {
		SalesforceInputField field = new SalesforceInputField();

		TableItem item = wFields.getNonEmpty(i);

		field.setName(item.getText(1));
		field.setField(item.getText(2));
		field.setIdLookup(BaseMessages.getString(PKG, "System.Combo.Yes").equalsIgnoreCase(item.getText(3)));
		field.setType(ValueMeta.getType(item.getText(4)));
		field.setFormat(item.getText(5));
		field.setLength(Const.toInt(item.getText(6), -1));
		field.setPrecision(Const.toInt(item.getText(7), -1));
		field.setCurrencySymbol(item.getText(8));
		field.setDecimalSymbol(item.getText(9));
		field.setGroupSymbol(item.getText(10));
		field.setTrimType(SalesforceInputField.getTrimTypeByDesc(item.getText(11)));
		field.setRepeated(BaseMessages.getString(PKG, "System.Combo.Yes").equalsIgnoreCase(item.getText(12)));

		in.getInputFields()[i] = field;
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:57,代码来源:SalesforceInputDialog.java

示例5: preview

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
private void preview() {
	try {
		SalesforceInputMeta oneMeta = new SalesforceInputMeta();
		getInfo(oneMeta);

		// check if the path is given
		
		 TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
            
		EnterNumberDialog numberDialog = new EnterNumberDialog(
				shell,
				props.getDefaultPreviewSize(),
				BaseMessages.getString(PKG, "SalesforceInputDialog.NumberRows.DialogTitle"),
				BaseMessages.getString(PKG, "SalesforceInputDialog.NumberRows.DialogMessage"));
		int previewSize = numberDialog.open();
		if (previewSize > 0) {
			TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(
					shell, previewMeta,
					new String[] { wStepname.getText() },
					new int[] { previewSize });
			progressDialog.open();

			if (!progressDialog.isCancelled()) {
				Trans trans = progressDialog.getTrans();
				String loggingText = progressDialog.getLoggingText();

				if (trans.getResult() != null
						&& trans.getResult().getNrErrors() > 0) {
					EnterTextDialog etd = new EnterTextDialog(
							shell,BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
							BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"),loggingText, true);
					etd.setReadOnly();
					etd.open();
				}

                   PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
						progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
								.getPreviewRows(wStepname.getText()), loggingText);
				prd.open();
			}
		}
	} catch (KettleException e) {
		new ErrorDialog(
				shell,
				BaseMessages.getString(PKG, "SalesforceInputDialog.ErrorPreviewingData.DialogTitle"),
				BaseMessages.getString(PKG, "SalesforceInputDialog.ErrorPreviewingData.DialogMessage"),
				e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:50,代码来源:SalesforceInputDialog.java

示例6: SalesforceInputDialog

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
public SalesforceInputDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
  super( parent, in, transMeta, sname );
  input = (SalesforceInputMeta) in;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:SalesforceInputDialog.java

示例7: getInfo

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
@Override
protected void getInfo( SalesforceStepMeta in ) throws KettleException {
  SalesforceInputMeta meta = (SalesforceInputMeta) in;

  stepname = wStepname.getText(); // return value

  // copy info to SalesforceInputMeta class (input)
  meta.setTargetURL( Const.NVL( wURL.getText(), SalesforceConnectionUtils.TARGET_DEFAULT_URL ) );
  meta.setUsername( Const.NVL( wUserName.getText(), "" ) );
  meta.setPassword( Const.NVL( wPassword.getText(), "" ) );
  meta.setModule( Const.NVL( wModule.getText(), "Account" ) );
  meta.setCondition( Const.NVL( wCondition.getText(), "" ) );

  meta.setSpecifyQuery( wspecifyQuery.getSelection() );
  meta.setQuery( Const.NVL( wQuery.getText(), "" ) );
  meta.setCompression( wUseCompression.getSelection() );
  meta.setQueryAll( wQueryAll.getSelection() );
  meta.setTimeout( Const.NVL( wTimeOut.getText(), "0" ) );
  meta.setRowLimit( Const.NVL( wLimit.getText(), "0" ) );
  meta.setTargetURLField( Const.NVL( wInclURLField.getText(), "" ) );
  meta.setSQLField( Const.NVL( wInclSQLField.getText(), "" ) );
  meta.setTimestampField( Const.NVL( wInclTimestampField.getText(), "" ) );
  meta.setModuleField( Const.NVL( wInclModuleField.getText(), "" ) );
  meta.setRowNumberField( Const.NVL( wInclRownumField.getText(), "" ) );
  meta.setRecordsFilter( SalesforceConnectionUtils.getRecordsFilterByDesc( wRecordsFilter.getText() ) );
  meta.setIncludeTargetURL( wInclURL.getSelection() );
  meta.setIncludeSQL( wInclSQL.getSelection() );
  meta.setIncludeTimestamp( wInclTimestamp.getSelection() );
  meta.setIncludeModule( wInclModule.getSelection() );
  meta.setIncludeRowNumber( wInclRownum.getSelection() );
  meta.setReadFrom( wReadFrom.getText() );
  meta.setReadTo( wReadTo.getText() );
  meta.setDeletionDateField( Const.NVL( wInclDeletionDateField.getText(), "" ) );
  meta.setIncludeDeletionDate( wInclDeletionDate.getSelection() );
  int nrFields = wFields.nrNonEmpty();

  meta.allocate( nrFields );

  for ( int i = 0; i < nrFields; i++ ) {
    SalesforceInputField field = new SalesforceInputField();

    TableItem item = wFields.getNonEmpty( i );

    field.setName( item.getText( 1 ) );
    field.setField( item.getText( 2 ) );
    field.setIdLookup( BaseMessages.getString( PKG, "System.Combo.Yes" ).equalsIgnoreCase( item.getText( 3 ) ) );
    field.setType( ValueMetaFactory.getIdForValueMeta( item.getText( 4 ) ) );
    field.setFormat( item.getText( 5 ) );
    field.setLength( Const.toInt( item.getText( 6 ), -1 ) );
    field.setPrecision( Const.toInt( item.getText( 7 ), -1 ) );
    field.setCurrencySymbol( item.getText( 8 ) );
    field.setDecimalSymbol( item.getText( 9 ) );
    field.setGroupSymbol( item.getText( 10 ) );
    field.setTrimType( SalesforceInputField.getTrimTypeByDesc( item.getText( 11 ) ) );
    field.setRepeated( BaseMessages.getString( PKG, "System.Combo.Yes" ).equalsIgnoreCase( item.getText( 12 ) ) );

    //CHECKSTYLE:Indentation:OFF
    meta.getInputFields()[i] = field;
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:61,代码来源:SalesforceInputDialog.java

示例8: preview

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
private void preview() {
  try {
    SalesforceInputMeta oneMeta = new SalesforceInputMeta();
    getInfo( oneMeta );

    // check if the path is given

    TransMeta previewMeta =
      TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, wStepname.getText() );

    EnterNumberDialog numberDialog = new EnterNumberDialog( shell, props.getDefaultPreviewSize(),
      BaseMessages.getString( PKG, "SalesforceInputDialog.NumberRows.DialogTitle" ),
      BaseMessages.getString( PKG, "SalesforceInputDialog.NumberRows.DialogMessage" ) );
    int previewSize = numberDialog.open();
    if ( previewSize > 0 ) {
      TransPreviewProgressDialog progressDialog =
        new TransPreviewProgressDialog(
          shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
      progressDialog.open();

      if ( !progressDialog.isCancelled() ) {
        Trans trans = progressDialog.getTrans();
        String loggingText = progressDialog.getLoggingText();

        if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
          EnterTextDialog etd =
            new EnterTextDialog(
              shell, BaseMessages.getString( PKG, "System.Dialog.PreviewError.Title" ), BaseMessages
                .getString( PKG, "System.Dialog.PreviewError.Message" ), loggingText, true );
          etd.setReadOnly();
          etd.open();
        }

        PreviewRowsDialog prd =
          new PreviewRowsDialog(
            shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
              .getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
        prd.open();
      }
    }
  } catch ( KettleException e ) {
    new ErrorDialog( shell, BaseMessages
      .getString( PKG, "SalesforceInputDialog.ErrorPreviewingData.DialogTitle" ), BaseMessages.getString(
      PKG, "SalesforceInputDialog.ErrorPreviewingData.DialogMessage" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:47,代码来源:SalesforceInputDialog.java

示例9: setUp

import org.pentaho.di.trans.steps.salesforceinput.SalesforceInputMeta; //导入依赖的package包/类
@Before
public void setUp() {
  dialog = spy( new SalesforceInputDialog( mock( Shell.class ), new SalesforceInputMeta(), mock( TransMeta.class ), "SalesforceInputDialogTest" ) );
  doNothing().when( dialog ).addFieldToTable( any(), any(), anyBoolean(), any(), any(), any() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:6,代码来源:SalesforceInputDialogTest.java


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