@Deprecated public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info ) { check( remarks, transMeta, stepMeta, prev, input, output, info, transMeta, repository, repository != null ? repository.getMetaStore() : null ); }
@Override public IMetaStore getMetaStore() { return getDelegate().getMetaStore(); }
/** * @deprecated use {@link #getJobMeta(Repository, IMetaStore, VariableSpace)} * @param rep * @param space * @return * @throws KettleException */ @Deprecated public JobMeta getJobMeta( Repository rep, VariableSpace space ) throws KettleException { if ( rep != null ) { return getJobMeta( rep, rep.getMetaStore(), space ); } else { return getJobMeta( rep, getMetaStore(), space ); } }
@Override @SuppressWarnings( "deprecation" ) public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { // Compatibility with previous release... // String resources = stepMetaInterface.exportResources( space, definitions, resourceNamingInterface, repository ); if ( resources != null ) { return resources; } // The step calls out to the StepMetaInterface... // These can in turn add anything to the map in terms of resources, etc. // Even reference files, etc. For now it's just XML probably... // return stepMetaInterface.exportResources( space, definitions, resourceNamingInterface, repository, metaStore ); }
private void openRepository( String repositoryId ) throws KettleException { try { RepositoriesMeta repositoriesMeta = new RepositoriesMeta(); repositoriesMeta.readData(); repositoryMeta = repositoriesMeta.findRepository( repositoryId ); if ( repositoryMeta == null ) { throw new KettleException( "Unable to find repository: " + repositoryId ); } PluginRegistry registry = PluginRegistry.getInstance(); repository = registry.loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class ); repository.init( repositoryMeta ); repository.connect( repositoryUsername, repositoryPassword ); // Add the repository MetaStore to the delegation as well. // Set this one as active with the highest priority // if ( repository.getMetaStore() != null ) { metaStore.addMetaStore( 0, repository.getMetaStore() ); metaStore.setActiveMetaStoreName( repository.getMetaStore().getName() ); } LogChannel.GENERAL.logBasic( "Connected to repository '" + repository.getName() + "'" ); } catch ( Exception e ) { throw new KettleException( "Unable to open repository connection", e ); } }
metaStore.setActiveMetaStoreName( localMetaStore.getName() ); if ( rep != null ) { metaStore.addMetaStore( 0, rep.getMetaStore() ); metaStore.setActiveMetaStoreName( rep.getMetaStore().getName() );
if ( repository.getMetaStore() != null && getMetaStore() != null ) { getMetaStore().addMetaStore( repository.getMetaStore() );
if ( repository.getMetaStore() != null && getMetaStore() != null ) { getMetaStore().addMetaStore( repository.getMetaStore() );
IMetaStore repositoryMetaStore = rep.getMetaStore(); if ( repositoryMetaStore != null ) { metaStore.addMetaStore( 0, repositoryMetaStore ); // first priority for explicitly connected repositories.
cloneJei.setRepository( rep ); if ( rep != null ) { cloneJei.setMetaStore( rep.getMetaStore() );
if ( trans.getSpecificationMethod() == ObjectLocationSpecificationMethod.FILENAME ) { try { TransMeta meta = trans.getTransMeta( repository, repository.getMetaStore(), jobMeta ); FileObject fileObject = KettleVFS.getFileObject( meta.getFilename() ); trans.setSpecificationMethod( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME ); if ( jobEntryJob.getSpecificationMethod() == ObjectLocationSpecificationMethod.FILENAME ) { try { JobMeta meta = jobEntryJob.getJobMeta( repository, repository.getMetaStore(), jobMeta ); FileObject fileObject = KettleVFS.getFileObject( meta.getFilename() ); jobEntryJob.setSpecificationMethod( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME );
Repository proxy = new RepositoryProxy( stepCustomNode ); compatibleSaveRep( stepMetaInterface, proxy, null, null ); stepMetaInterface.saveRep( proxy, proxy.getMetaStore(), null, null ); stepNode.addNode( stepCustomNode );
@Override public String getXML() { try { applyInjection( new Variables() ); } catch ( KettleException e ) { log.logError( "Error occurred while injecting metadata. Transformation meta could be incorrect!", e ); } StringBuilder retval = new StringBuilder(); if ( !Const.isEmpty( m_incomingKeyField ) ) { retval.append( "\n " ).append( XMLHandler.addTagValue( "incoming_key_field", m_incomingKeyField ) ); } if ( !Const.isEmpty( m_incomingResultField ) ) { retval.append( "\n " ).append( XMLHandler.addTagValue( "incoming_result_field", m_incomingResultField ) ); } namedClusterLoadSaveUtil.getXml( retval, namedClusterService, namedCluster, repository == null ? null : repository .getMetaStore(), log ); if ( m_mapping != null ) { retval.append( m_mapping.getXML() ); } return retval.toString(); }
public void run() { try { for ( NamedCluster namedCluster : NamedClusterManager.getInstance().list( diRepository.getMetaStore() ) ) { try { tmpList.add( UINamedClusterObjectRegistry.getInstance().constructUINamedCluster( namedCluster, diRepository ) ); } catch ( UIObjectCreationException uoe ) { tmpList.add( new UINamedCluster( namedCluster, diRepository ) ); } } } catch ( Exception e ) { if ( mainController == null || !mainController.handleLostRepository( e ) ) { // convert to runtime exception so it bubbles up through the UI throw new RuntimeException( e ); } } } };
.getXml( retval, namedClusterService, namedCluster, repository == null ? null : repository.getMetaStore(), getLog() );
.getXml( retval, namedClusterService, namedCluster, repository == null ? null : repository.getMetaStore(), getLog() );
if ( NamedClusterManager.getInstance().read( namedCluster.getName(), diRepository.getMetaStore() ) == null ) { MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK ); mb mb.open(); } else { NamedClusterManager.getInstance().delete( namedCluster.getName(), diRepository.getMetaStore() );