Package weave.config.ConnectionConfig

Examples of weave.config.ConnectionConfig.DatabaseConfigInfo


  public boolean checkDatabaseConfigExists() throws RemoteException
  {
    if (initializationError != null)
      throw initializationError;
   
    DatabaseConfigInfo dbInfo = getConnectionConfig().getDatabaseConfigInfo();
    return dbInfo != null;
   
    //TODO: if getConnectionConfig().getAdminConnection() fails, ask user to set up databaseConfig (other GUI should be hidden)
  }
View Full Code Here


     
      if (!config.getConnectionInfoNames().contains(userToRemove))
        throw new RemoteException("Connection \"" + userToRemove + "\" does not exist.");
     
      // disallow removing databaseConfig connection
      DatabaseConfigInfo dbInfo = config.getDatabaseConfigInfo();
      if (dbInfo != null && dbInfo.connection.equals(userToRemove))
        throw new RemoteException(String.format("Cannot remove connection \"%s\" which is used to store configuration information.", userToRemove));

      // check for number of superusers
      Collection<String> connectionNames = config.getConnectionInfoNames();
View Full Code Here

  // DatabaseConfigInfo management
 
  public DatabaseConfigInfo getDatabaseConfigInfo(String user, String password)
    throws RemoteException
  {
    DatabaseConfigInfo dbInfo = getConnectionConfig().getDatabaseConfigInfo();
    if (dbInfo != null)
      authenticate(user, password);
    return dbInfo;
  }
View Full Code Here

      throw new RemoteException("Unable to store configuration information without superuser privileges.");
   
    //TODO: option to migrate all data from old db to new db?
   
    // create info object
    DatabaseConfigInfo info = new DatabaseConfigInfo();
    info.schema = schema;
    info.connection = user;
    getConnectionConfig().setDatabaseConfigInfo(info);

    return String.format(
View Full Code Here

      stmt = conn.createStatement();
     
      /////////////////////////////
     
      // check for problems
      DatabaseConfigInfo dbInfo = connConfig.getDatabaseConfigInfo();
      if (dbInfo == null)
        throw new InvalidParameterException("databaseConfig missing");
      if (dbInfo.schema == null || dbInfo.schema.length() == 0)
        throw new InvalidParameterException("DatabaseConfig: Schema not specified.");
      if (dbInfo.geometryConfigTable == null || dbInfo.geometryConfigTable.length() == 0)
View Full Code Here

      {
        // test the connection now so it will throw an exception if there is a problem.
        Connection conn = connectionConfig.getAdminConnection();
       
        // attempt to create the schema and tables to store the configuration.
        DatabaseConfigInfo dbInfo = connectionConfig.getDatabaseConfigInfo();
        try
        {
          SQLUtils.createSchema(conn, dbInfo.schema);
        }
        catch (SQLException e)
View Full Code Here

TOP

Related Classes of weave.config.ConnectionConfig.DatabaseConfigInfo

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.