use of org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate in project pentaho-kettle by pentaho.
the class SharedObjectSyncUtilTest method setUp.
@Before
public void setUp() {
spoon = mock(Spoon.class);
// when( spoon.getRepository() ).thenReturn( spoon.rep );
spoonDelegates = mock(SpoonDelegates.class);
spoonDelegates.jobs = new SpoonJobDelegate(spoon);
spoonDelegates.trans = new SpoonTransformationDelegate(spoon);
spoonDelegates.db = new SpoonDBDelegate(spoon);
spoonDelegates.slaves = new SpoonSlaveDelegate(spoon);
spoonDelegates.partitions = new SpoonPartitionsDelegate(spoon);
spoonDelegates.clusters = new SpoonClustersDelegate(spoon);
spoon.delegates = spoonDelegates;
sharedUtil = new SharedObjectSyncUtil(spoon);
repository = mock(Repository.class);
}
use of org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate in project pentaho-kettle by pentaho.
the class EnterSelectionDialog method addDataSource.
protected void addDataSource() {
Spoon theSpoon = Spoon.getInstance();
SpoonDBDelegate theDelegate = new SpoonDBDelegate(theSpoon);
theDelegate.newConnection(this.databasesInterface);
ArrayList<DatabaseMeta> theDatabases = new ArrayList<DatabaseMeta>();
theDatabases.addAll(this.databasesInterface.getDatabases());
String[] theNames = new String[theDatabases.size()];
for (int i = 0; i < theDatabases.size(); i++) {
theNames[i] = theDatabases.get(i).getName();
}
this.choices = theNames;
refresh();
}
Aggregations