本文整理汇总了Java中org.pentaho.di.job.JobHopMeta类的典型用法代码示例。如果您正苦于以下问题:Java JobHopMeta类的具体用法?Java JobHopMeta怎么用?Java JobHopMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobHopMeta类属于org.pentaho.di.job包,在下文中一共展示了JobHopMeta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setNew
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void setNew(Object prev[], int position[])
{
if (prev.length==0) return;
current=prev;
current_index=position;
previous = null;
if ( prev[0] instanceof StepMeta) type=TYPE_ACTION_NEW_STEP;
if ( prev[0] instanceof DatabaseMeta) type=TYPE_ACTION_NEW_CONNECTION;
if ( prev[0] instanceof TransHopMeta) type=TYPE_ACTION_NEW_HOP;
if ( prev[0] instanceof NotePadMeta) type=TYPE_ACTION_NEW_NOTE;
if ( prev[0] instanceof JobEntryCopy) type=TYPE_ACTION_NEW_JOB_ENTRY;
if ( prev[0] instanceof JobHopMeta) type=TYPE_ACTION_NEW_JOB_HOP;
if ( prev[0] instanceof String[]) type=TYPE_ACTION_NEW_TABLEITEM;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:TransAction.java
示例2: verifyRule
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
@Override
public List<ImportValidationFeedback> verifyRule(Object subject) {
List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>();
if (!isEnabled()) return feedback;
if (!(subject instanceof JobMeta)) return feedback;
JobMeta jobMeta = (JobMeta)subject;
for (int i=0;i<jobMeta.nrJobHops();i++) {
JobHopMeta hop = jobMeta.getJobHop(i);
if (!hop.isEnabled()) {
feedback.add( new ImportValidationFeedback(this, ImportValidationResultType.ERROR, "There is a disabled hop in the job.") );
}
}
if (feedback.isEmpty()) {
feedback.add( new ImportValidationFeedback(this, ImportValidationResultType.APPROVAL, "All hops are enabled in this job.") );
}
return feedback;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:JobHasNoDisabledHopsImportRule.java
示例3: saveJobHopMeta
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void saveJobHopMeta(JobHopMeta hop, ObjectId id_job) throws KettleException
{
try
{
ObjectId id_jobentry_from=null;
ObjectId id_jobentry_to=null;
id_jobentry_from = hop.getFromEntry()==null ? null : hop.getFromEntry().getObjectId();
id_jobentry_to = hop.getToEntry()==null ? null : hop.getToEntry().getObjectId();
// Insert new job hop in repository
//
hop.setObjectId( insertJobHop(id_job, id_jobentry_from, id_jobentry_to, hop.isEnabled(), hop.getEvaluation(), hop.isUnconditional()) );
}
catch(KettleDatabaseException dbe)
{
throw new KettleException(BaseMessages.getString(PKG, "JobHopMeta.Exception.UnableToSaveHopInfoRep",""+id_job), dbe);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:KettleDatabaseRepositoryJobDelegate.java
示例4: findHop
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
/**
* See if location (x,y) is on a line between two steps: the hop!
* @param x
* @param y
* @param exclude the step to exclude from the hops (from or to location). Specify null if no step is to be excluded.
* @return the transformation hop on the specified location, otherwise: null
*/
private JobHopMeta findHop(int x, int y, JobEntryCopy exclude) {
int i;
JobHopMeta online = null;
for (i = 0; i < jobMeta.nrJobHops(); i++) {
JobHopMeta hi = jobMeta.getJobHop(i);
JobEntryCopy fs = hi.getFromEntry();
JobEntryCopy ts = hi.getToEntry();
if (fs == null || ts == null)
return null;
// If either the "from" or "to" step is excluded, skip this hop.
//
if (exclude != null && (exclude.equals(fs) || exclude.equals(ts)))
continue;
int line[] = getLine(fs, ts);
if (pointOnLine(x, y, line))
online = hi;
}
return online;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:JobGraph.java
示例5: enableHopsBetweenSelectedEntries
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
/**
* This method enables or disables all the hops between the selected Entries.
*
**/
public void enableHopsBetweenSelectedEntries(boolean enabled) {
List<JobEntryCopy> list = jobMeta.getSelectedEntries();
for (int i=0;i<jobMeta.nrJobHops();i++) {
JobHopMeta hop = jobMeta.getJobHop(i);
if (list.contains(hop.getFromEntry()) && list.contains(hop.getToEntry())) {
JobHopMeta before = (JobHopMeta) hop.clone();
hop.setEnabled(enabled);
JobHopMeta after = (JobHopMeta) hop.clone();
spoon.addUndoChange(jobMeta, new JobHopMeta[] { before }, new JobHopMeta[] { after }, new int[] { jobMeta.indexOfJobHop(hop) });
}
}
spoon.refreshGraph();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:JobGraph.java
示例6: enableDisableNextHops
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
private void enableDisableNextHops(JobEntryCopy from, boolean enabled, int level) {
if (level>100) return; // prevent endless running with loops in jobs
for (JobEntryCopy to : jobMeta.getJobCopies()) {
JobHopMeta hop = jobMeta.findJobHop(from, to, true);
if (hop!=null) {
JobHopMeta before = (JobHopMeta) hop.clone();
hop.setEnabled(enabled);
JobHopMeta after = (JobHopMeta) hop.clone();
spoon.addUndoChange(jobMeta, new JobHopMeta[] { before }, new JobHopMeta[] { after }, new int[] { jobMeta.indexOfJobHop(hop) });
enableDisableNextHops(to, enabled, level++);
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:JobGraph.java
示例7: saveJobHopMeta
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void saveJobHopMeta( JobHopMeta hop, ObjectId id_job ) throws KettleException {
try {
ObjectId id_jobentry_from = null;
ObjectId id_jobentry_to = null;
id_jobentry_from = hop.getFromEntry() == null ? null : hop.getFromEntry().getObjectId();
id_jobentry_to = hop.getToEntry() == null ? null : hop.getToEntry().getObjectId();
// Insert new job hop in repository
//
hop.setObjectId( insertJobHop( id_job, id_jobentry_from, id_jobentry_to, hop.isEnabled(), hop
.getEvaluation(), hop.isUnconditional() ) );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString( PKG, "JobHopMeta.Exception.UnableToSaveHopInfoRep", ""
+ id_job ), dbe );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:KettleDatabaseRepositoryJobDelegate.java
示例8: setDelete
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void setDelete( Object[] prev, int[] idx ) {
current = prev;
current_index = idx;
if ( prev[0] instanceof StepMeta ) {
type = TYPE_ACTION_DELETE_STEP;
}
if ( prev[0] instanceof DatabaseMeta ) {
type = TYPE_ACTION_DELETE_CONNECTION;
}
if ( prev[0] instanceof TransHopMeta ) {
type = TYPE_ACTION_DELETE_HOP;
}
if ( prev[0] instanceof NotePadMeta ) {
type = TYPE_ACTION_DELETE_NOTE;
}
if ( prev[0] instanceof JobEntryCopy ) {
type = TYPE_ACTION_DELETE_JOB_ENTRY;
}
if ( prev[0] instanceof JobHopMeta ) {
type = TYPE_ACTION_DELETE_JOB_HOP;
}
if ( prev[0] instanceof String[] ) {
type = TYPE_ACTION_DELETE_TABLEITEM;
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:TransAction.java
示例9: enableDisableHopsDownstream
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void enableDisableHopsDownstream( boolean enabled ) {
if ( currentHop == null ) {
return;
}
JobHopMeta before = (JobHopMeta) currentHop.clone();
currentHop.setEnabled( enabled );
JobHopMeta after = (JobHopMeta) currentHop.clone();
spoon.addUndoChange( jobMeta, new JobHopMeta[] { before }, new JobHopMeta[] { after }, new int[] { jobMeta
.indexOfJobHop( currentHop ) } );
Set<JobEntryCopy> checkedEntries = enableDisableNextHops( currentHop.getToEntry(), enabled, new HashSet<>() );
if ( checkedEntries.stream().anyMatch( entry -> jobMeta.hasLoop( entry ) ) ) {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_WARNING );
mb.setMessage( BaseMessages.getString( PKG, "JobGraph.Dialog.LoopAfterHopEnabled.Message" ) );
mb.setText( BaseMessages.getString( PKG, "JobGraph.Dialog.LoopAfterHopEnabled.Title" ) );
mb.open();
}
spoon.refreshGraph();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:JobGraph.java
示例10: enableDisableNextHops
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
private Set<JobEntryCopy> enableDisableNextHops( JobEntryCopy from, boolean enabled, Set<JobEntryCopy> checkedEntries ) {
checkedEntries.add( from );
jobMeta.getJobhops().stream()
.filter( hop -> from.equals( hop.getFromEntry() ) )
.forEach( hop -> {
if ( hop.isEnabled() != enabled ) {
JobHopMeta before = (JobHopMeta) hop.clone();
hop.setEnabled( enabled );
JobHopMeta after = (JobHopMeta) hop.clone();
spoon.addUndoChange( jobMeta, new JobHopMeta[]{ before }, new JobHopMeta[]{ after }, new int[]{ jobMeta
.indexOfJobHop( hop ) } );
}
if ( !checkedEntries.contains( hop.getToEntry() ) ) {
enableDisableNextHops( hop.getToEntry(), enabled, checkedEntries );
}
} );
return checkedEntries;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:JobGraph.java
示例11: deleteJobEntryCopies
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void deleteJobEntryCopies( JobMeta jobMeta, JobEntryCopy jobEntry ) {
for ( int i = jobMeta.nrJobHops() - 1; i >= 0; i-- ) {
JobHopMeta hi = jobMeta.getJobHop( i );
if ( hi.getFromEntry().equals( jobEntry ) || hi.getToEntry().equals( jobEntry ) ) {
int idx = jobMeta.indexOfJobHop( hi );
spoon.addUndoDelete( jobMeta, new JobHopMeta[] { (JobHopMeta) hi.clone() }, new int[] { idx } );
jobMeta.removeJobHop( idx );
spoon.refreshTree();
}
}
int pos = jobMeta.indexOfJobEntry( jobEntry );
jobMeta.removeJobEntry( pos );
spoon.addUndoDelete( jobMeta, new JobEntryCopy[] { jobEntry }, new int[] { pos } );
spoon.refreshTree();
spoon.refreshGraph();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:SpoonJobDelegate.java
示例12: repairHop
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
/**
* 修复JOB的连接线,克隆的job连接线不能显示 <br/>
* @author jingma
* @param jm job元数据
*/
public static void repairHop(JobMeta jm) {
for(JobHopMeta hop:jm.getJobhops()){
hop.setFromEntry(jm.findJobEntry(hop.getFromEntry().getName()));
hop.setToEntry(jm.findJobEntry(hop.getToEntry().getName()));
}
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:12,代码来源:KettleUtils.java
示例13: setDelete
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void setDelete(Object prev [], int idx[])
{
current=prev;
current_index=idx;
if ( prev[0] instanceof StepMeta) type=TYPE_ACTION_DELETE_STEP;
if ( prev[0] instanceof DatabaseMeta) type=TYPE_ACTION_DELETE_CONNECTION;
if ( prev[0] instanceof TransHopMeta) type=TYPE_ACTION_DELETE_HOP;
if ( prev[0] instanceof NotePadMeta) type=TYPE_ACTION_DELETE_NOTE;
if ( prev[0] instanceof JobEntryCopy) type=TYPE_ACTION_DELETE_JOB_ENTRY;
if ( prev[0] instanceof JobHopMeta) type=TYPE_ACTION_DELETE_JOB_HOP;
if ( prev[0] instanceof String[]) type=TYPE_ACTION_DELETE_TABLEITEM;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:14,代码来源:TransAction.java
示例14: setChanged
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void setChanged(Object prev[], Object curr[], int idx[])
{
previous=prev;
current=curr;
current_index=idx;
previous_index=idx;
if ( prev[0] instanceof StepMeta) type=TYPE_ACTION_CHANGE_STEP;
if ( prev[0] instanceof DatabaseMeta) type=TYPE_ACTION_CHANGE_CONNECTION;
if ( prev[0] instanceof TransHopMeta) type=TYPE_ACTION_CHANGE_HOP;
if ( prev[0] instanceof NotePadMeta) type=TYPE_ACTION_CHANGE_NOTE;
if ( prev[0] instanceof JobEntryCopy) type=TYPE_ACTION_CHANGE_JOB_ENTRY;
if ( prev[0] instanceof JobHopMeta) type=TYPE_ACTION_CHANGE_JOB_HOP;
if ( prev[0] instanceof String[]) type=TYPE_ACTION_CHANGE_TABLEITEM;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:16,代码来源:TransAction.java
示例15: findJobHop
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
protected JobHopMeta findJobHop(int x, int y) {
int i;
JobHopMeta online = null;
for (i = 0; i < jobMeta.nrJobHops(); i++) {
JobHopMeta hi = jobMeta.getJobHop(i);
int line[] = getLine(hi.from_entry, hi.to_entry);
if (line != null && pointOnLine(x, y, line))
online = hi;
}
return online;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:14,代码来源:JobGraph.java
示例16: setToolTip
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
protected void setToolTip(int x, int y, int screenX, int screenY) {
if (!spoon.getProperties().showToolTips())
return;
canvas.setToolTipText("-"); // Some stupid bug in GTK+ causes a phantom tool tip to pop up, even if the tip is null
canvas.setToolTipText(null);
String newTip = null;
final JobEntryCopy je = jobMeta.getJobEntryCopy(x, y, iconsize);
if (je != null && je.isDrawn()) // We hover above a Step!
{
// Set the tooltip!
String desc = je.getDescription();
if (desc != null) {
int le = desc.length() >= 200 ? 200 : desc.length();
newTip = desc.substring(0, le);
} else {
newTip = je.toString();
}
} else {
offset = getOffset();
JobHopMeta hi = findJobHop(x + offset.x, y + offset.x);
if (hi != null) {
newTip = hi.toString();
} else {
newTip = null;
}
}
if (newTip == null || !newTip.equalsIgnoreCase(getToolTipText())) {
canvas.setToolTipText(newTip);
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:35,代码来源:JobGraph.java
示例17: drawJobHop
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
protected void drawJobHop(GC gc, JobHopMeta hop, boolean candidate) {
if (hop == null || hop.from_entry == null || hop.to_entry == null)
return;
if (!hop.from_entry.isDrawn() || !hop.to_entry.isDrawn())
return;
drawLine(gc, hop, candidate);
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:9,代码来源:JobGraph.java
示例18: detach
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
protected void detach(JobEntryCopy je) {
JobHopMeta hfrom = jobMeta.findJobHopTo(je);
JobHopMeta hto = jobMeta.findJobHopFrom(je);
if (hfrom != null && hto != null) {
if (jobMeta.findJobHop(hfrom.from_entry, hto.to_entry) == null) {
JobHopMeta hnew = new JobHopMeta(hfrom.from_entry, hto.to_entry);
jobMeta.addJobHop(hnew);
spoon.addUndoNew(jobMeta, new JobHopMeta[] { (JobHopMeta) hnew.clone() }, new int[] { jobMeta
.indexOfJobHop(hnew) });
}
}
if (hfrom != null) {
int fromidx = jobMeta.indexOfJobHop(hfrom);
if (fromidx >= 0) {
jobMeta.removeJobHop(fromidx);
spoon.addUndoDelete(jobMeta, new JobHopMeta[] { hfrom }, new int[] { fromidx });
}
}
if (hto != null) {
int toidx = jobMeta.indexOfJobHop(hto);
if (toidx >= 0) {
jobMeta.removeJobHop(toidx);
spoon.addUndoDelete(jobMeta, new JobHopMeta[] { hto }, new int[] { toidx });
}
}
spoon.refreshTree();
redraw();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:30,代码来源:JobGraph.java
示例19: deleteJobEntryCopies
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void deleteJobEntryCopies(JobMeta jobMeta, JobEntryCopy jobEntry)
{
String name = jobEntry.getName();
// TODO Show warning "Are you sure? This operation can't be undone." +
// clear undo buffer.
// First delete all the hops using entry with name:
JobHopMeta hi[] = jobMeta.getAllJobHopsUsing(name);
if (hi.length > 0)
{
int hix[] = new int[hi.length];
for (int i = 0; i < hi.length; i++)
hix[i] = jobMeta.indexOfJobHop(hi[i]);
spoon.addUndoDelete(jobMeta, hi, hix);
for (int i = hix.length - 1; i >= 0; i--)
jobMeta.removeJobHop(hix[i]);
}
// Then delete all the entries with name:
JobEntryCopy je[] = jobMeta.getAllJobGraphEntries(name);
int jex[] = new int[je.length];
for (int i = 0; i < je.length; i++)
jex[i] = jobMeta.indexOfJobEntry(je[i]);
if (je.length > 0)
spoon.addUndoDelete(jobMeta, je, jex);
for (int i = jex.length - 1; i >= 0; i--)
jobMeta.removeJobEntry(jex[i]);
jobMeta.clearUndo();
spoon.setUndoMenu(jobMeta);
spoon.refreshGraph();
spoon.refreshTree();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:36,代码来源:SpoonJobDelegate.java
示例20: newJobHop
import org.pentaho.di.job.JobHopMeta; //导入依赖的package包/类
public void newJobHop(JobMeta jobMeta, JobEntryCopy fr, JobEntryCopy to)
{
JobHopMeta hi = new JobHopMeta(fr, to);
jobMeta.addJobHop(hi);
spoon.addUndoNew(jobMeta, new JobHopMeta[] { hi }, new int[] { jobMeta.indexOfJobHop(hi) });
spoon.refreshGraph();
spoon.refreshTree();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:9,代码来源:SpoonJobDelegate.java
注:本文中的org.pentaho.di.job.JobHopMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论