Package org.dbwiki.driver.rdbms

Examples of org.dbwiki.driver.rdbms.DatabaseConnectorFactory


    initHomepageTemplate(properties.getProperty(propertyHomepageTemplate));
   
    _authenticationMode = Integer.parseInt(properties.getProperty(propertyAuthenticationMode));
   
    // Database Connection
    _connector = new DatabaseConnectorFactory().getConnector(properties);
   
    initWikiTitle(properties.getProperty(propertyWikiTitle));
   
   
   
View Full Code Here


   
    try {
      System.out.print("Enter the name of the wiki you want to delete: ");
      // jcheney: got rid of implicit upper-casing
      String name = (new BufferedReader(new InputStreamReader(System.in))).readLine();
      DatabaseConnector connector = new DatabaseConnectorFactory().getConnector(org.dbwiki.lib.IO.loadProperties(new File(args[0])));
      Connection con = connector.getConnection();
      Statement stmt = con.createStatement();
      stmt.execute("DELETE FROM " + RelationDatabase + " WHERE " + RelDatabaseColName + " = '" + name + "'");
      System.out.println("DELETE FROM " + RelationDatabase + " WHERE " + RelDatabaseColName + " = '" + name + "'");
      stmt.close();
View Full Code Here

    // Creates the following tables: _database, _presentation, _user
    try {
      File configFile = new File(args[0]);
      File userFile = new File(args[1]);
      Properties configProperties = org.dbwiki.lib.IO.loadProperties(configFile);
      DatabaseConnector connector = new DatabaseConnectorFactory().getConnector(configProperties);
      List<User> users = User.readUsers(userFile);
      connector.createServer(users);
    } catch (Exception exception) {
      exception.printStackTrace();
      System.exit(0);
View Full Code Here

    String path = args[2];
    String username = args[3];
   
    try {
      Properties properties = org.dbwiki.lib.IO.loadProperties(configFile);
      DatabaseConnector connector = new DatabaseConnectorFactory().getConnector(properties);
      //TODO #server: Use non-web wiki server for this
      WikiServer server = new WikiServerStandalone(properties);
      /*
       * DatabaseWiki wiki = null;
      for (int iWiki = 0; iWiki < server.size(); iWiki++) {
View Full Code Here

      // [wiki] should never be null
      assert(_wiki != null);
     
      // Commit the presentation files.
     
      DatabaseConnector connector = new DatabaseConnectorFactory().getConnector(properties);
      Connection con = connector.getConnection();
      con.setAutoCommit(false);

      loadPresentationFile(args.cssTemplate, PresentationFileType.CSS,user);
      loadPresentationFile(args.htmlTemplate, PresentationFileType.Template,user);
View Full Code Here

      System.out.println("Usage " + commandLine);
      System.exit(0);
    }
   
    try {
      DatabaseConnector connector = new DatabaseConnectorFactory().getConnector(org.dbwiki.lib.IO.loadProperties(new File(args[0])));
      System.out.print("Do you want to drop all wikis (Y, N): ");
      String answer = (new BufferedReader(new InputStreamReader(System.in))).readLine().toUpperCase();
      connector.dropServer(answer.equalsIgnoreCase("Y"));
    } catch (Exception exception) {
      exception.printStackTrace();
View Full Code Here

TOP

Related Classes of org.dbwiki.driver.rdbms.DatabaseConnectorFactory

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.