Search in sources :

Example 11 with IDatabaseType

use of org.pentaho.database.model.IDatabaseType in project data-access by pentaho.

the class ConnectionController method createNewDatabaseDialog.

private void createNewDatabaseDialog() {
    if (databaseTypeHelper == null) {
        XulServiceCallback<List<IDatabaseType>> callback = new XulServiceCallback<List<IDatabaseType>>() {

            public void error(String message, Throwable error) {
                Window.alert(message + ":  " + error.getLocalizedMessage());
            // error.printStackTrace();
            }

            public void success(List<IDatabaseType> retVal) {
                databaseTypeHelper = new DatabaseTypeHelper(retVal);
                databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
                connectionSetter);
            }
        };
        dialectService.getDatabaseTypes(callback);
    } else {
        databaseDialog = new GwtDatabaseDialog(databaseTypeHelper, GWT.getModuleBaseURL() + "dataaccess-databasedialog.xul", // $NON-NLS-1$
        connectionSetter);
    }
}
Also used : XulServiceCallback(org.pentaho.ui.xul.XulServiceCallback) IDatabaseType(org.pentaho.database.model.IDatabaseType) DatabaseTypeHelper(org.pentaho.database.util.DatabaseTypeHelper) GwtDatabaseDialog(org.pentaho.ui.database.gwt.GwtDatabaseDialog) ArrayList(java.util.ArrayList) IDatabaseConnectionList(org.pentaho.ui.database.event.IDatabaseConnectionList) List(java.util.List)

Aggregations

IDatabaseType (org.pentaho.database.model.IDatabaseType)11 DatabaseTypeHelper (org.pentaho.database.util.DatabaseTypeHelper)5 List (java.util.List)4 XulServiceCallback (org.pentaho.ui.xul.XulServiceCallback)4 ArrayList (java.util.ArrayList)3 DatabaseType (org.pentaho.database.model.DatabaseType)3 LinkedList (java.util.LinkedList)2 Test (org.junit.Test)2 DatabaseAccessType (org.pentaho.database.model.DatabaseAccessType)2 IDatabaseConnectionList (org.pentaho.ui.database.event.IDatabaseConnectionList)2 Bindable (org.pentaho.ui.xul.stereotype.Bindable)2 Request (com.google.gwt.http.client.Request)1 RequestBuilder (com.google.gwt.http.client.RequestBuilder)1 RequestCallback (com.google.gwt.http.client.RequestCallback)1 RequestException (com.google.gwt.http.client.RequestException)1 Response (com.google.gwt.http.client.Response)1 HashMap (java.util.HashMap)1 BogoPojo (org.pentaho.agilebi.modeler.gwt.BogoPojo)1 GwtModelerServiceImpl (org.pentaho.agilebi.modeler.services.impl.GwtModelerServiceImpl)1 DatabaseConnection (org.pentaho.database.model.DatabaseConnection)1