Java Code Examples for org.pentaho.di.trans.TransMeta#clearChanged()

The following examples show how to use org.pentaho.di.trans.TransMeta#clearChanged() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KettleFileRepository.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
@Override
public TransMeta loadTransformation( String transname, RepositoryDirectoryInterface repdir,
  ProgressMonitorListener monitor, boolean setInternalVariables, String versionName ) throws KettleException {

  // This is a standard load of a transformation serialized in XML...
  //
  String filename = calcDirectoryName( repdir ) + transname + ".ktr";
  TransMeta transMeta = new TransMeta( filename, this, setInternalVariables );
  transMeta.setRepository( this );
  transMeta.setMetaStore( getMetaStore() );
  transMeta.setFilename( null );
  transMeta.setName( transname );
  transMeta.setObjectId( new StringObjectId( calcObjectId( repdir, transname, EXT_TRANSFORMATION ) ) );

  readDatabases( transMeta, true );
  transMeta.clearChanged();

  return transMeta;
}
 
Example 2
Source File: PurRepository.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private TransMeta buildTransMeta( final RepositoryFile file, final RepositoryDirectoryInterface parentDir,
                                  final NodeRepositoryFileData data, final ObjectRevision revision )
  throws KettleException {
  TransMeta transMeta = new TransMeta();
  transMeta.setName( file.getTitle() );
  transMeta.setFilename( file.getName() );
  transMeta.setDescription( file.getDescription() );
  transMeta.setObjectId( new StringObjectId( file.getId().toString() ) );
  transMeta.setObjectRevision( revision );
  transMeta.setRepository( this );
  transMeta.setRepositoryDirectory( parentDir );
  transMeta.setMetaStore( getMetaStore() );
  readTransSharedObjects( transMeta ); // This should read from the local cache
  transDelegate.dataNodeToElement( data.getNode(), transMeta );
  transMeta.clearChanged();
  return transMeta;
}
 
Example 3
Source File: MappingDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void loadFileTrans( String fname ) throws KettleException {
  mappingTransMeta = new TransMeta( transMeta.environmentSubstitute( fname ) );
  mappingTransMeta.clearChanged();
}
 
Example 4
Source File: TransExecutorDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void loadFileTrans( String fname ) throws KettleException {
  executorTransMeta = new TransMeta( transMeta.environmentSubstitute( fname ), repository );
  executorTransMeta.clearChanged();
}
 
Example 5
Source File: SingleThreaderDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void loadFileTrans( String fname ) throws KettleException {
  mappingTransMeta = new TransMeta( transMeta.environmentSubstitute( fname ) );
  mappingTransMeta.clearChanged();
}
 
Example 6
Source File: SimpleMappingDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void loadFileTrans( String fname ) throws KettleException {
  mappingTransMeta = new TransMeta( transMeta.environmentSubstitute( fname ) );
  mappingTransMeta.clearChanged();
}
 
Example 7
Source File: TransGraph.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
/**
 * Open the transformation mentioned in the mapping...
 */
public void openMapping( StepMeta stepMeta, int index ) {
  try {
    Object referencedMeta = null;
    Trans subTrans = getActiveSubtransformation( this, stepMeta );
    if ( subTrans != null
      && ( stepMeta.getStepMetaInterface().getActiveReferencedObjectDescription() == null || index < 0 ) ) {
      TransMeta subTransMeta = subTrans.getTransMeta();
      referencedMeta = subTransMeta;
      Object[] objectArray = new Object[ 4 ];
      objectArray[ 0 ] = stepMeta;
      objectArray[ 1 ] = subTransMeta;
      ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.OpenMapping.id, objectArray );
    } else {
      StepMetaInterface meta = stepMeta.getStepMetaInterface();
      if ( !Utils.isEmpty( meta.getReferencedObjectDescriptions() ) ) {
        referencedMeta = meta.loadReferencedObject( index, spoon.rep, spoon.metaStore, transMeta );
      }
    }
    if ( referencedMeta == null ) {
      return;
    }

    if ( referencedMeta instanceof TransMeta ) {
      TransMeta mappingMeta = (TransMeta) referencedMeta;
      mappingMeta.clearChanged();
      spoon.addTransGraph( mappingMeta );
      TransGraph subTransGraph = spoon.getActiveTransGraph();
      attachActiveTrans( subTransGraph, this.currentStep );
    }

    if ( referencedMeta instanceof JobMeta ) {
      JobMeta jobMeta = (JobMeta) referencedMeta;
      jobMeta.clearChanged();
      spoon.addJobGraph( jobMeta );
      JobGraph jobGraph = spoon.getActiveJobGraph();
      attachActiveJob( jobGraph, this.currentStep );
    }

  } catch ( Exception e ) {
    new ErrorDialog( shell, BaseMessages.getString( PKG, "TransGraph.Exception.UnableToLoadMapping.Title" ),
      BaseMessages.getString( PKG, "TransGraph.Exception.UnableToLoadMapping.Message" ), e );
  }
}
 
Example 8
Source File: MetaInjectDialog.java    From pentaho-kettle with Apache License 2.0 4 votes vote down vote up
private void loadFileTrans( String fname ) throws KettleException {
  injectTransMeta = new TransMeta( transMeta.environmentSubstitute( fname ) );
  injectTransMeta.clearChanged();
}