private void delPartitionSchema( TransMeta transMeta, PartitionSchema partitionSchema ) { delegates.partitions.delPartitionSchema( transMeta, partitionSchema ); }
private void editPartitionSchema( TransMeta transMeta, PartitionSchema partitionSchema ) { delegates.partitions.editPartitionSchema( transMeta, partitionSchema ); }
/** * This creates a new partitioning schema, edits it and adds it to the transformation metadata if its name is not a * duplicate of any of existing */ public void newPartitioningSchema( TransMeta transMeta ) { delegates.partitions.newPartitioningSchema( transMeta ); }
if ( dialog.open() ) { List<PartitionSchema> partitions = transMeta.getPartitionSchemas(); if ( isDuplicate( partitions, partitionSchema ) ) { new ErrorDialog( spoon.getShell(), getMessage( "Spoon.Dialog.ErrorSavingPartition.Title" ), getMessage( "Spoon.Dialog.ErrorSavingPartition.Message", partitionSchema.getName() ), new KettleException( getMessage( "Spoon.Dialog.ErrorSavingPartition.NotUnique" ) ) ); return; showSaveErrorDialog( partitionSchema, e ); refreshTree();
public void editPartitionSchema( TransMeta transMeta, PartitionSchema partitionSchema ) { String originalName = partitionSchema.getName(); PartitionSchemaDialog dialog = new PartitionSchemaDialog( spoon.getShell(), partitionSchema, transMeta.getPartitionSchemas(), transMeta.getDatabases(), transMeta ); if ( dialog.open() ) { if ( spoon.rep != null && partitionSchema.getObjectId() != null ) { try { saveSharedObjectToRepository( partitionSchema, null ); if ( sharedObjectSyncUtil != null ) { sharedObjectSyncUtil.synchronizePartitionSchemas( partitionSchema, originalName ); } } catch ( KettleException e ) { showSaveErrorDialog( partitionSchema, e ); } } refreshTree(); } }
public SharedObjectSyncUtil( Spoon spoon ) { this.spoonDelegates = spoon.delegates; this.spoon = spoon; spoonDelegates.db.setSharedObjectSyncUtil( this ); spoonDelegates.slaves.setSharedObjectSyncUtil( this ); spoonDelegates.clusters.setSharedObjectSyncUtil( this ); spoonDelegates.partitions.setSharedObjectSyncUtil( this ); }
public SpoonDelegates( Spoon spoon ) { tabs = new SpoonTabsDelegate( spoon ); tree = new SpoonTreeDelegate( spoon ); slaves = new SpoonSlaveDelegate( spoon ); steps = new SpoonStepsDelegate( spoon ); db = new SpoonDBDelegate( spoon ); clusters = new SpoonClustersDelegate( spoon ); partitions = new SpoonPartitionsDelegate( spoon ); update( spoon ); }
public void delPartitionSchema( TransMeta transMeta, PartitionSchema partitionSchema ) { try { int idx = transMeta.getPartitionSchemas().indexOf( partitionSchema ); transMeta.getPartitionSchemas().remove( idx ); if ( spoon.rep != null && partitionSchema.getObjectId() != null ) { // remove the partition schema from the repository too... spoon.rep.deletePartitionSchema( partitionSchema.getObjectId() ); if ( sharedObjectSyncUtil != null ) { sharedObjectSyncUtil.deletePartitionSchema( partitionSchema ); } } refreshTree(); } catch ( KettleException e ) { new ErrorDialog( spoon.getShell(), BaseMessages.getString( PKG, "Spoon.Dialog.ErrorDeletingClusterSchema.Title" ), BaseMessages .getString( PKG, "Spoon.Dialog.ErrorDeletingClusterSchema.Message" ), e ); } }