Package util

Examples of util.DBTools$DataSourceInfo


            destTestDB = utils.getFullURL(destTestDB + "testDB.dbf");
           
            log.println("copy '"+sourceTestDB + "' -> '" + destTestDB + "'");
            utils.copyFile(xMSF, sourceTestDB, destTestDB);
           
            m_dbTools = new DBTools( xMSF, log );
            String tmpDir = utils.getOfficeTemp((xMSF));
       
            m_srcInf = m_dbTools.newDataSourceInfo();
            m_srcInf.URL = "sdbc:dbase:" + DBTools.dirToUrl(tmpDir);
            log.println("data source: " + m_srcInf.URL);
View Full Code Here


        //xTextDoc = WriterTools.createTextDoc(t((XMultiServiceFactory) Param.getMSF));
        tmpDir = utils.getOfficeTemp(((XMultiServiceFactory) tParam.getMSF()));

        origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf");

        dbTools = new DBTools( (XMultiServiceFactory)tParam.getMSF(), log );

        // creating DataSource and registering it in DatabaseContext
        String dbURL = (String) tParam.get("test.db.url");
        String dbUser = (String) tParam.get("test.db.user");
        String dbPassword = (String) tParam.get("test.db.password");
View Full Code Here

            XPropertySet xSrcProp = (XPropertySet)
                UnoRuntime.queryInterface(XPropertySet.class, newSource);

            xSrcProp.setPropertyValue("URL", tmpDatabaseUrl) ;
           
            DBTools dbt = new DBTools( (XMultiServiceFactory)Param.getMSF(), log );
            // registering source in DatabaseContext
            log.println("register database '"+tmpDatabaseUrl+"' as '"+databaseName+"'" );
            dbt.reRegisterDB(databaseName, newSource) ;
           
            uniqueSuffix++;
            Param.put("uniqueSuffix", new Integer(uniqueSuffix));
           
            return dbt.connectToSource(newSource);
        }
        catch( Exception e ) {
            uniqueSuffix++;
            Param.put("uniqueSuffix", new Integer(uniqueSuffix));
            log.println("could not register new database" );
View Full Code Here

    }
   
    protected void cleanup(TestParameters Param, PrintWriter log) {
        log.println("closing connections...");
        XMultiServiceFactory xMsf = (XMultiServiceFactory) Param.getMSF();
        DBTools dbt = new DBTools( xMsf, log );
       
        if (Param.containsKey("uniqueSuffix")){
            int uniqueSuffix = Param.getInt("uniqueSuffix");
            uniqueSuffix--;
            String databaseName =  "";
            while (uniqueSuffix >= 0){
               
                databaseName = "NewDatabaseSource" + uniqueSuffix ;
               
                log.println("revoke '"+databaseName+"'");
               
                try{
                    dbt.revokeDB(databaseName);
                } catch (com.sun.star.uno.Exception e){
                }
               
                uniqueSuffix--;
            }
View Full Code Here

            XPropertySet xSrcProp = (XPropertySet)
                UnoRuntime.queryInterface(XPropertySet.class, newSource);

            xSrcProp.setPropertyValue("URL", tmpDatabaseUrl) ;
           
            DBTools dbt = new DBTools(((XMultiServiceFactory) Param.getMSF()));
            // registering source in DatabaseContext
            log.println("register database '"+tmpDatabaseUrl+"' as '"+databaseName+"'" );
            dbt.reRegisterDB(databaseName, newSource) ;
           
            uniqueSuffix++;
            Param.put("uniqueSuffix", new Integer(uniqueSuffix));
           
            return dbt.connectToSource(newSource);
        }
        catch( Exception e ) {
            uniqueSuffix++;
            Param.put("uniqueSuffix", new Integer(uniqueSuffix));
            log.println("could not register new database" );
View Full Code Here

    }
   
    protected void cleanup(TestParameters Param, PrintWriter log) {
        log.println("closing connections...");
        XMultiServiceFactory xMsf = (XMultiServiceFactory) Param.getMSF();
        DBTools dbt = new DBTools(xMsf);
       
        if (Param.containsKey("uniqueSuffix")){
            int uniqueSuffix = Param.getInt("uniqueSuffix");
            uniqueSuffix--;
            String databaseName =  "";
            while (uniqueSuffix >= 0){
               
                databaseName = "NewDatabaseSource" + uniqueSuffix ;
               
                log.println("revoke '"+databaseName+"'");
               
                try{
                    dbt.revokeDB(databaseName);
                } catch (com.sun.star.uno.Exception e){
                }
               
                uniqueSuffix--;
            }
View Full Code Here

        //xTextDoc = WriterTools.createTextDoc(t((XMultiServiceFactory) Param.getMSF));
        tmpDir = utils.getOfficeTemp(((XMultiServiceFactory) tParam.getMSF()));

        origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf");

        dbTools = new DBTools(((XMultiServiceFactory) tParam.getMSF()));

        // creating DataSource and registering it in DatabaseContext
        String dbURL = (String) tParam.get("test.db.url");
        String dbUser = (String) tParam.get("test.db.user");
        String dbPassword = (String) tParam.get("test.db.password");
View Full Code Here

            destTestDB = utils.getFullURL(destTestDB + "testDB.dbf");
           
            log.println("copy '"+sourceTestDB + "' -> '" + destTestDB + "'");
            utils.copyFile(xMSF, sourceTestDB, destTestDB);
           
            m_dbTools = new DBTools((xMSF));
            String tmpDir = utils.getOfficeTemp((xMSF));
       
            m_srcInf = m_dbTools.newDataSourceInfo();
            m_srcInf.URL = "sdbc:dbase:" + DBTools.dirToUrl(tmpDir);
            log.println("data source: " + m_srcInf.URL);
View Full Code Here

        tmpDir = (String) Param.get("TMPURL") ;
            tmpDir = utils.getOfficeTemp((XMultiServiceFactory)Param.getMSF());

        origDB = util.utils.getFullTestDocName("TestDB/testDB.dbf");

        dbTools = new DBTools((XMultiServiceFactory)Param.getMSF()) ;

        // creating DataSource and registering it in DatabaseContext
        String dbURL = (String) Param.get("test.db.url");
        String dbUser = (String) Param.get("test.db.user");
        String dbPassword = (String) Param.get("test.db.password");
View Full Code Here

            destTestDB = utils.getFullURL(destTestDB + "testDB.dbf");
           
            log.println("copy '"+sourceTestDB + "' -> '" + destTestDB + "'");
            utils.copyFile(xMSF, sourceTestDB, destTestDB);
           
            m_dbTools = new DBTools( xMSF, log );
            String tmpDir = utils.getOfficeTemp((xMSF));
       
            m_srcInf = m_dbTools.newDataSourceInfo();
            m_srcInf.URL = "sdbc:dbase:" + DBTools.dirToUrl(tmpDir);
            log.println("data source: " + m_srcInf.URL);
View Full Code Here

TOP

Related Classes of util.DBTools$DataSourceInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.