@Override public JobMeta loadJob( String jobname, RepositoryDirectoryInterface repdir, ProgressMonitorListener monitor, String versionName ) throws KettleException { // This is a standard load of a transformation serialized in XML... // String filename = calcDirectoryName( repdir ) + jobname + EXT_JOB; JobMeta jobMeta = new JobMeta( filename, this ); jobMeta.setFilename( null ); jobMeta.setName( jobname ); jobMeta.setObjectId( new StringObjectId( calcObjectId( repdir, jobname, EXT_JOB ) ) ); jobMeta.setRepository( this ); jobMeta.setMetaStore( getMetaStore() ); readDatabases( jobMeta, true ); jobMeta.clearChanged(); return jobMeta; }
if ( jobMeta.getObjectId() != null ) { ObjectId newId = rep.renameJob( jobMeta.getObjectId(), newDirectory, jobMeta.getName() ); jobMeta.setObjectId( newId );
private JobMeta buildJobMeta( final RepositoryFile file, final RepositoryDirectoryInterface parentDir, final NodeRepositoryFileData data, final ObjectRevision revision ) throws KettleException { JobMeta jobMeta = new JobMeta(); jobMeta.setName( file.getTitle() ); jobMeta.setFilename( file.getName() ); jobMeta.setDescription( file.getDescription() ); jobMeta.setObjectId( new StringObjectId( file.getId().toString() ) ); jobMeta.setObjectRevision( revision ); jobMeta.setRepository( this ); jobMeta.setRepositoryDirectory( parentDir ); jobMeta.setMetaStore( getMetaStore() ); readJobMetaSharedObjects( jobMeta ); // This should read from the local cache jobDelegate.dataNodeToElement( data.getNode(), jobMeta ); jobMeta.clearChanged(); return jobMeta; }
replaceSharedObjects( jobMeta ); jobMeta.setRepositoryDirectory( targetDirectory ); jobMeta.setObjectId( existintId ); patchJobEntries( jobMeta ); try {
jobMeta.setObjectId( null );
monitor.subTask( BaseMessages.getString( PKG, "JobMeta.Monitor.HandlingPreviousVersionOfJob" ) ); jobMeta.setObjectId( getJobID( jobMeta.getName(), jobMeta.getRepositoryDirectory().getObjectId() ) ); jobMeta.setObjectId( repository.connectionDelegate.getNextJobID() ); } else {
jobMeta.setObjectId( getJobID( jobname, repdir.getObjectId() ) );