@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; }
public void clearSettings() { selectedEntry = null; selectedNote = null; selectedEntries = null; selectedNotes = null; selectionRegion = null; hop_candidate = null; last_hop_split = null; lastButton = 0; startHopEntry = null; endHopEntry = null; iconoffset = null; for ( int i = 0; i < jobMeta.nrJobHops(); i++ ) { jobMeta.getJobHop( i ).setSplit( false ); } stopEntryMouseOverDelayTimers(); }
int hopIndex = 0; for ( int i = job.nrJobHops() - 1; i >= 0; i-- ) { JobHopMeta hi = job.getJobHop( i ); for ( int j = 0; j < jobEntries.length && hopIndex < hopIndexes.length; j++ ) { if ( hi.getFromEntry().equals( jobEntries[j] ) || hi.getToEntry().equals( jobEntries[j] ) ) {
JobHopMeta online = null; for ( i = 0; i < jobMeta.nrJobHops(); i++ ) { JobHopMeta hi = jobMeta.getJobHop( i ); JobEntryCopy fs = hi.getFromEntry(); JobEntryCopy ts = hi.getToEntry();
/** * This method enables or disables all the hops between the selected Entries. * **/ public void enableHopsBetweenSelectedEntries( boolean enabled ) { List<JobEntryCopy> list = jobMeta.getSelectedEntries(); boolean hasLoop = false; 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 ) } ); if ( jobMeta.hasLoop( hop.getToEntry() ) ) { hasLoop = true; } } } if ( hasLoop && enabled ) { 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(); }
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(); }
JobHopMeta hi = jobMeta.getJobHop( i ); drawJobHop( hi, false );
hopsNode.setProperty( PROP_NR_HOPS, jobMeta.nrJobHops() ); for ( int i = 0; i < jobMeta.nrJobHops(); i++ ) { JobHopMeta hop = jobMeta.getJobHop( i ); DataNode hopNode = hopsNode.addNode( JOB_HOP_PREFIX + i );
monitor.subTask( "Saving job hop #" + ( i + 1 ) + "/" + jobMeta.nrJobHops() ); JobHopMeta hi = jobMeta.getJobHop( i ); saveJobHopMeta( hi, jobMeta.getObjectId() ); if ( monitor != null ) {