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


Java TransHopMeta.isEnabled方法代码示例

本文整理汇总了Java中org.pentaho.di.trans.TransHopMeta.isEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java TransHopMeta.isEnabled方法的具体用法?Java TransHopMeta.isEnabled怎么用?Java TransHopMeta.isEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.trans.TransHopMeta的用法示例。


在下文中一共展示了TransHopMeta.isEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: verifyRule

import org.pentaho.di.trans.TransHopMeta; //导入方法依赖的package包/类
@Override
public List<ImportValidationFeedback> verifyRule(Object subject) {
  
  List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>();
  
  if (!isEnabled()) return feedback;
  if (!(subject instanceof TransMeta)) return feedback;
  
  TransMeta transMeta = (TransMeta)subject;

  for (int i=0;i<transMeta.nrTransHops();i++) {
    TransHopMeta hop = transMeta.getTransHop(i);
    if (!hop.isEnabled()) {
      feedback.add( new ImportValidationFeedback(this, ImportValidationResultType.ERROR, "There is a disabled hop in the transformation.") );
    }
  }

  if (feedback.isEmpty()) {
    feedback.add( new ImportValidationFeedback(this, ImportValidationResultType.APPROVAL, "All hops are enabled in this transformation.") );
  }
  
  return feedback;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:TransformationHasNoDisabledHopsImportRule.java

示例2: enableHop

import org.pentaho.di.trans.TransHopMeta; //导入方法依赖的package包/类
public void enableHop() {
  selectionRegion = null;
  TransHopMeta hi = getCurrentHop();
  TransHopMeta before = (TransHopMeta) hi.clone();
  hi.setEnabled( !hi.isEnabled() );
  if ( hi.isEnabled() && transMeta.hasLoop( hi.getToStep() ) ) {
    hi.setEnabled( false );
    MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
    mb.setMessage( BaseMessages.getString( PKG, "TransGraph.Dialog.LoopAfterHopEnabled.Message" ) );
    mb.setText( BaseMessages.getString( PKG, "TransGraph.Dialog.LoopAfterHopEnabled.Title" ) );
    mb.open();
  } else {
    TransHopMeta after = (TransHopMeta) hi.clone();
    spoon.addUndoChange( transMeta, new TransHopMeta[] { before }, new TransHopMeta[] { after },
      new int[] { transMeta.indexOfTransHop( hi ) } );
    spoon.refreshGraph();
    spoon.refreshTree();
  }
  updateErrorMetaForHop( hi );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:TransGraph.java

示例3: verifyRule

import org.pentaho.di.trans.TransHopMeta; //导入方法依赖的package包/类
@Override
public List<ImportValidationFeedback> verifyRule( Object subject ) {

  List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>();

  if ( !isEnabled() ) {
    return feedback;
  }
  if ( !( subject instanceof TransMeta ) ) {
    return feedback;
  }

  TransMeta transMeta = (TransMeta) subject;

  for ( int i = 0; i < transMeta.nrTransHops(); i++ ) {
    TransHopMeta hop = transMeta.getTransHop( i );
    if ( !hop.isEnabled() ) {
      feedback.add( new ImportValidationFeedback(
        this, ImportValidationResultType.ERROR, "There is a disabled hop in the transformation." ) );
    }
  }

  if ( feedback.isEmpty() ) {
    feedback.add( new ImportValidationFeedback(
      this, ImportValidationResultType.APPROVAL, "All hops are enabled in this transformation." ) );
  }

  return feedback;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:30,代码来源:TransformationHasNoDisabledHopsImportRule.java

示例4: refreshHopsSubtree

import org.pentaho.di.trans.TransHopMeta; //导入方法依赖的package包/类
@VisibleForTesting void refreshHopsSubtree( TreeItem tiTransName, TransMeta transMeta, GUIResource guiResource ) {
  TreeItem tiHopTitle = createTreeItem( tiTransName, STRING_HOPS, guiResource.getImageFolder() );

  // Put the steps below it.
  for ( int i = 0; i < transMeta.nrTransHops(); i++ ) {
    TransHopMeta hopMeta = transMeta.getTransHop( i );

    if ( !filterMatch( hopMeta.toString() ) ) {
      continue;
    }

    Image icon = hopMeta.isEnabled() ? guiResource.getImageHopTree() : guiResource.getImageDisabledHopTree();
    createTreeItem( tiHopTitle, hopMeta.toString(), icon );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:Spoon.java


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