/** * Changes the content of a hop on a certain position. This is accomplished by setting the hop's metadata at the * specified index to the specified meta-data object. * * @param i * The index into the hops list * @param hi * The hop meta-data to set */ public void setTransHop( int i, TransHopMeta hi ) { hops.set( i, hi ); clearCaches(); }
/** * Removes a hop from the transformation. Also marks that the * transformation's hops have changed. * * @param hop * The hop to remove from the list of hops */ public void removeTransHop( TransHopMeta hop ) { hops.remove( hop ); changed_hops = true; clearCaches(); }
/** * Add a new hop to the transformation. The hop information (source and target steps, e.g.) should be configured in * the TransHopMeta object before calling addTransHop(). Also marks that the transformation's hops have changed. * * @param hi * The hop meta-data to be added. */ public void addTransHop( TransHopMeta hi ) { hops.add( hi ); changed_hops = true; clearCaches(); }
/** * Removes a hop from the transformation on a certain location (i.e. the specified index). Also marks that the * transformation's hops have changed. * * @param i * The index into the hops list */ public void removeTransHop( int i ) { if ( i < 0 || i >= hops.size() ) { return; } hops.remove( i ); changed_hops = true; clearCaches(); }
/** * Add a new hop to the transformation on a certain location (i.e. the specified index). Also marks that the * transformation's hops have changed. * * @param p * the index into the hop list * @param hi * The hop to be added. */ public void addTransHop( int p, TransHopMeta hi ) { try { hops.add( p, hi ); } catch ( IndexOutOfBoundsException e ) { hops.add( hi ); } changed_hops = true; clearCaches(); }
private void setHopEnabled( TransHopMeta hop, boolean enabled ) { hop.setEnabled( enabled ); transMeta.clearCaches(); }
/** * Add a new step to the transformation. Also marks that the transformation's steps have changed. * * @param stepMeta * The meta-data for the step to be added. */ public void addStep( StepMeta stepMeta ) { steps.add( stepMeta ); stepMeta.setParentTransMeta( this ); StepMetaInterface iface = stepMeta.getStepMetaInterface(); if ( iface instanceof StepMetaChangeListenerInterface ) { addStepChangeListener( (StepMetaChangeListenerInterface) iface ); } changed_steps = true; clearCaches(); }
/** * Removes a step from the transformation on a certain location (i.e. the specified index). Also marks that the * transformation's steps have changed. * * @param i * The index */ public void removeStep( int i ) { if ( i < 0 || i >= steps.size() ) { return; } StepMeta removeStep = steps.get( i ); StepMetaInterface iface = removeStep.getStepMetaInterface(); if ( iface instanceof StepMetaChangeListenerInterface ) { removeStepChangeListener( (StepMetaChangeListenerInterface) iface ); } steps.remove( i ); if ( removeStep.getStepMetaInterface() instanceof MissingTrans ) { removeMissingTrans( (MissingTrans) removeStep.getStepMetaInterface() ); } changed_steps = true; clearCaches(); }
/** * Changes the content of a step on a certain position. This is accomplished by setting the step's metadata at the * specified index to the specified meta-data object. The new step's parent transformation is updated to be this * transformation. * * @param i * The index into the steps list * @param stepMeta * The step meta-data to set */ public void setStep( int i, StepMeta stepMeta ) { StepMetaInterface iface = stepMeta.getStepMetaInterface(); if ( iface instanceof StepMetaChangeListenerInterface ) { addStepChangeListener( i, (StepMetaChangeListenerInterface) stepMeta.getStepMetaInterface() ); } steps.set( i, stepMeta ); stepMeta.setParentTransMeta( this ); clearCaches(); }
/** * Add a new step to the transformation at the specified index. This method sets the step's parent transformation to * the this transformation, and marks that the transformations' steps have changed. * * @param p * The index into the step list * @param stepMeta * The step to be added. */ public void addStep( int p, StepMeta stepMeta ) { steps.add( p, stepMeta ); stepMeta.setParentTransMeta( this ); changed_steps = true; StepMetaInterface iface = stepMeta.getStepMetaInterface(); if ( iface instanceof StepMetaChangeListenerInterface ) { addStepChangeListener( p, (StepMetaChangeListenerInterface) stepMeta.getStepMetaInterface() ); } clearCaches(); }
transMeta.clearCaches();
trans.getTransMeta().clearCaches();
/** * Add a new step to the transformation if that step didn't exist yet. Otherwise, replace the step. This method also * marks that the transformation's steps have changed. * * @param stepMeta * The meta-data for the step to be added. */ public void addOrReplaceStep( StepMeta stepMeta ) { int index = steps.indexOf( stepMeta ); if ( index < 0 ) { index = steps.add( stepMeta ) ? 0 : index; } else { StepMeta previous = getStep( index ); previous.replaceMeta( stepMeta ); } stepMeta.setParentTransMeta( this ); StepMetaInterface iface = stepMeta.getStepMetaInterface(); if ( index != -1 && iface instanceof StepMetaChangeListenerInterface ) { addStepChangeListener( index, (StepMetaChangeListenerInterface) iface ); } changed_steps = true; clearCaches(); }
transMeta.clearCaches(); transMeta.notifyAllListeners( stepMeta, newStepMeta ); stepMeta.setName( stepname );
private void ok() { StepMeta fromBackup = input.getFromStep(); StepMeta toBackup = input.getToStep(); input.setFromStep( transMeta.findStep( wFrom.getText() ) ); input.setToStep( transMeta.findStep( wTo.getText() ) ); transMeta.clearCaches(); if ( input.getFromStep() == null || input.getToStep() == null ) { MessageBox mb = new MessageBox( shell, SWT.YES | SWT.ICON_WARNING ); mb.setMessage( BaseMessages.getString( PKG, "TransHopDialog.StepDoesNotExist.DialogMessage", input.getFromStep() == null ? wFrom .getText() : wTo.getText() ) ); mb.setText( BaseMessages.getString( PKG, "TransHopDialog.StepDoesNotExist.DialogTitle" ) ); mb.open(); } else if ( input.getFromStep().equals( input.getToStep() ) ) { MessageBox mb = new MessageBox( shell, SWT.YES | SWT.ICON_WARNING ); mb.setMessage( BaseMessages.getString( PKG, "TransHopDialog.CannotGoToSameStep.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "TransHopDialog.CannotGoToSameStep.DialogTitle" ) ); mb.open(); } else if ( transMeta.hasLoop( input.getToStep() ) ) { input.setFromStep( fromBackup ); input.setToStep( toBackup ); MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "TransHopDialog.LoopsNotAllowed.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "TransHopDialog.LoopsNotAllowed.DialogTitle" ) ); mb.open(); } else { dispose(); } }