congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JobMeta.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
org.pentaho.di.job.JobMeta

Best Java code snippets using org.pentaho.di.job.JobMeta.getName (Showing top 20 results out of 315)

origin: pentaho/pentaho-kettle

public String getJobname() {
 if ( jobMeta == null ) {
  return null;
 }
 return jobMeta.getName();
}
origin: pentaho/pentaho-kettle

public String toString() {
 if ( jobMeta == null ) {
  return Spoon.APP_NAME;
 } else {
  return jobMeta.getName();
 }
}
origin: pentaho/pentaho-kettle

/**
 * Gets the name property of the JobMeta property.
 *
 * @return String name for the JobMeta
 */
@Override
public String toString() {
 if ( jobMeta == null || Utils.isEmpty( jobMeta.getName() ) ) {
  return getName();
 } else {
  return jobMeta.getName();
 }
}
origin: pentaho/pentaho-kettle

@Override
public int showChangedWarning() throws KettleException {
 return showChangedWarning( jobMeta.getName() );
}
origin: pentaho/pentaho-kettle

/**
 * @param jobMeta
 *          The job metadata to track
 * @param maxChildren
 *          The maximum number of children to keep track of (1000 is the default)
 */
public JobTracker( JobMeta jobMeta, int maxChildren ) {
 if ( jobMeta != null ) {
  this.jobName = jobMeta.getName();
  this.jobFilename = jobMeta.getFilename();
 }
 this.jobTrackers = new LinkedList<JobTracker>();
 this.maxChildren = maxChildren;
 this.lock = new ReentrantReadWriteLock();
}
origin: pentaho/pentaho-kettle

public synchronized void registerJob( Job job, JobConfiguration jobConfiguration ) {
 job.setContainerObjectId( UUID.randomUUID().toString() );
 CarteObjectEntry entry = new CarteObjectEntry( job.getJobMeta().getName(), job.getContainerObjectId() );
 jobMap.put( entry, job );
 configurationMap.put( entry, jobConfiguration );
}
origin: pentaho/pentaho-kettle

/**
 * Checks if is rep reference.
 *
 * @return true, if is rep reference
 */
public boolean isRepReference() {
 return isRepReference( getFilename(), this.getName() );
}
origin: pentaho/pentaho-kettle

/**
 * Checks if is file reference.
 *
 * @return true, if is file reference
 */
public boolean isFileReference() {
 return !isRepReference( getFilename(), this.getName() );
}
origin: pentaho/pentaho-kettle

private static JobMeta mockJobMeta( String name ) {
 JobMeta meta = mock( JobMeta.class );
 when( meta.getName() ).thenReturn( name );
 return meta;
}
origin: pentaho/pentaho-kettle

public JobMeta getJob( String name ) {
 TabMapEntry entry = spoon.delegates.tabs.findTabMapEntry( name, ObjectType.JOB_GRAPH );
 if ( entry != null ) {
  return (JobMeta) entry.getObject().getManagedObject();
 }
 // TODO: remove part below
 //
 for ( JobMeta jobMeta : jobMap ) {
  if ( name != null && name.equals( jobMeta.getName() ) ) {
   return jobMeta;
  }
 }
 return null;
}
origin: pentaho/pentaho-kettle

 @Override
 public JobMeta answer( InvocationOnMock invocation ) throws Throwable {
  String jobName = String.class.cast( invocation.getArguments()[ 0 ] );
  JobMeta jobMeta = Mockito.mock( JobMeta.class );
  Mockito.when( jobMeta.getXML() ).thenReturn( "<" + jobName + ">" + "found" + "</" + jobName + ">" );
  Mockito.when( jobMeta.getName() ).thenReturn( jobName );
  return jobMeta;
 }
};
origin: pentaho/pentaho-kettle

private boolean isJobOpened( String id, String path, String name ) {
 List<JobMeta> openedJobFiles = getSpoon().delegates.jobs.getJobList();
 for ( JobMeta j : openedJobFiles ) {
  if ( j.getObjectId() != null && id.equals( j.getObjectId().getId() )
   || ( path.equals( j.getRepositoryDirectory().getPath() ) && name.equals( j.getName() ) ) ) {
   return true;
  }
 }
 return false;
}
origin: pentaho/pentaho-kettle

 public void export( ProgressMonitorListener monitor, List<RepositoryFile> files, OutputStreamWriter writer )
  throws KettleException {
  List<JobMeta> jobs = repository.loadJobs( monitor, log, files, true );
  Iterator<JobMeta> jobsMeta = jobs.iterator();
  Iterator<RepositoryFile> filesIter = files.iterator();
  while ( ( monitor == null || !monitor.isCanceled() ) && jobsMeta.hasNext() ) {
   JobMeta meta = jobsMeta.next();
   setGlobalVariablesOfLogTablesNull( meta.getLogTables() );
   RepositoryFile file = filesIter.next();
   try {
    // Validate against the import rules first!
    if ( toExport( meta ) ) {
     writer.write( meta.getXML() + Const.CR );
    }
   } catch ( Exception ex ) {
    // if exception while writing one item is occurred logging it and continue looping
    log.logError( BaseMessages.getString( PKG, "PurRepositoryExporter.ERROR_SAVE_JOB", meta.getName(), file
      .getPath() ), ex ); //$NON-NLS-1$
   }
  }
 }
}
origin: pentaho/pentaho-kettle

 public void run() {
  if ( Job.this.isFinished() ) {
   log.logBasic( "Shutting down heartbeat signal for " + jobMeta.getName() );
   shutdownHeartbeat( heartbeat );
   return;
  }
  try {
   log.logDebug( "Triggering heartbeat signal for " + jobMeta.getName() + " at every " + intervalInSeconds
     + " seconds" );
   ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.JobHeartbeat.id, Job.this );
  } catch ( KettleException e ) {
   log.logError( e.getMessage(), e );
  }
 }
}, intervalInSeconds /* initial delay */, intervalInSeconds /* interval delay */, TimeUnit.SECONDS );
origin: pentaho/pentaho-kettle

public static String getName( ReportSubjectLocation filename ) throws KettleException {
 if ( filename.isTransformation() ) {
  return TransformationInformation.getInstance().getTransMeta( filename ).getName();
 } else {
  return JobInformation.getInstance().getJobMeta( filename ).getName();
 }
}
origin: pentaho/pentaho-kettle

private void saveJobToRepo( JobMeta jobMeta, RepositoryImportFeedbackInterface feedback ) throws KettleException {
 try {
  jobMeta.lookupRepositoryReferences( rep );
 } catch ( LookupReferencesException e ) {
  // log and continue; might fail from exports performed before PDI-5294
  feedback.addLog( BaseMessages.getString( PKG, "RepositoryImporter.LookupRepoRefsError.Log", jobMeta.getName(),
    RepositoryObjectType.JOB ) );
  feedback.addLog( BaseMessages
    .getString( PKG, "RepositoryImporter.LookupRepoRefsError.Log.Cause", e.objectTypePairsToString() ) );
 }
 rep.save( jobMeta, "import object reference specification", null );
}
origin: pentaho/pentaho-kettle

public void browseVersionHistory() {
 try {
  RepositoryRevisionBrowserDialogInterface dialog =
   RepositoryExplorerDialog.getVersionBrowserDialog( shell, spoon.rep, jobMeta );
  String versionLabel = dialog.open();
  if ( versionLabel != null ) {
   spoon.loadObjectFromRepository( jobMeta.getName(), jobMeta.getRepositoryElementType(), jobMeta
    .getRepositoryDirectory(), versionLabel );
  }
 } catch ( Exception e ) {
  new ErrorDialog(
   shell, BaseMessages.getString( PKG, "JobGraph.VersionBrowserException.Title" ), BaseMessages.getString(
    PKG, "JobGraph.VersionBrowserException.Message" ), e );
 }
}
origin: pentaho/pentaho-kettle

private void selectRepositoryJob() {
 RepositoryObject repositoryObject = DialogHelper.selectRepositoryObject( "*.kjb", log );
 try {
  if ( repositoryObject != null ) {
   loadRepositoryJob( repositoryObject.getName(), repositoryObject.getRepositoryDirectory() );
   String path = DialogUtils
    .getPath( transMeta.getRepositoryDirectory().getPath(), executorJobMeta.getRepositoryDirectory().getPath() );
   String fullPath = ( path.equals( "/" ) ? "/" : path + "/" ) + executorJobMeta.getName();
   wPath.setText( fullPath );
   specificationMethod = ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME;
  }
 } catch ( KettleException ke ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "SingleThreaderDialog.ErrorSelectingObject.DialogTitle" ),
   BaseMessages.getString( PKG, "SingleThreaderDialog.ErrorSelectingObject.DialogMessage" ), ke );
 }
}
origin: pentaho/pentaho-kettle

protected void updateLoadedJobs( String key, RunConfiguration runConfig ) {
 for ( JobMeta job : spoonSupplier.get().getLoadedJobs() ) {
  for ( int i = 0; i < job.nrJobEntries(); i++ ) {
   JobEntryInterface entry = job.getJobEntry( i ).getEntry();
   if ( entry instanceof JobEntryRunConfigurableInterface ) {
    JobEntryRunConfigurableInterface jet = (JobEntryRunConfigurableInterface) entry;
    if ( jet.getRunConfiguration() != null ) {
     if ( jet.getRunConfiguration().equals( key ) ) {
      try {
       ExtensionPointHandler.callExtensionPoint( job.getLogChannel(), KettleExtensionPoint.JobEntryTransSave.id,
        new Object[] { job, runConfig.getName() } );
      } catch ( KettleException e ) {
       spoonSupplier.get().getLog().logBasic( "Unable to set run configuration in job " + job.getName() );
      }
      jet.setRunConfiguration( runConfig.getName() );
      if ( runConfig instanceof DefaultRunConfiguration ) {
       jet.setRemoteSlaveServerName( ( (DefaultRunConfiguration) runConfig ).getServer() );
       jet.setLoggingRemoteWork( ( (DefaultRunConfiguration) runConfig ).isLogRemoteExecutionLocally() );
      }
      jet.setChanged();
     }
    }
   }
  }
 }
}
origin: pentaho/pentaho-kettle

public boolean jobOverwritePrompt( JobMeta jobMeta ) {
 MessageDialogWithToggle md =
  new MessageDialogWithToggle(
   shell, BaseMessages.getString( PKG, "RepositoryImportDialog.OverwriteJob.Title" ), null, BaseMessages
    .getString( PKG, "RepositoryImportDialog.OverwriteJob.Message", jobMeta.getName() ),
   MessageDialog.QUESTION, new String[] {
    BaseMessages.getString( PKG, "System.Button.Yes" ),
    BaseMessages.getString( PKG, "System.Button.No" ) },
   1,
   BaseMessages.getString( PKG, "RepositoryImportDialog.DontAskAgain.Label" ),
   !askOverwrite );
 MessageDialogWithToggle.setDefaultImage( GUIResource.getInstance().getImageSpoon() );
 int answer = md.open();
 askOverwrite = !md.getToggleState();
 return ( answer & 0xFF ) == 0;
}
org.pentaho.di.jobJobMetagetName

Popular methods of JobMeta

  • environmentSubstitute
  • <init>
    Create a new JobMeta object by loading it from a a DOM node.
  • findDatabase
  • getDatabases
  • getJobCopies
    Gets the job copies.
  • getParameterDefault
  • getXML
  • setName
  • addDatabase
  • addJobEntry
    Adds the job entry.
  • addJobHop
    Adds the job hop.
  • addNote
  • addJobHop,
  • addNote,
  • addParameterDefinition,
  • clearChanged,
  • findJobEntry,
  • getCreatedDate,
  • getCreatedUser,
  • getDatabase,
  • getExtendedDescription

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now