Examples of ConnectionDescription


Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

  public ConnectionDescription connectionDescription() throws UnsupportedOperationException {
    String driver = tryToGet(DB_DRIVER);
    String url = tryToGet(DB_URL);
    String user = tryToGet(DB_USERNAME);
    String passwd = tryToGet(DB_PASSWORD);
    return new ConnectionDescription(driver, url, user, passwd);
  }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

  public ConnectionDescription connectionDescription(String systemName) throws UnsupportedOperationException {
    String driver = tryToGet(systemName + "_" + DB_DRIVER);
    String url = tryToGet(systemName + "_" + DB_URL);
    String user = tryToGet(systemName + "_" + DB_USERNAME);
    String passwd = tryToGet(systemName + "_" + DB_PASSWORD);
    return new ConnectionDescription(driver, url, user, passwd);
  }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

        props.load(stream);
        String driver = props.getProperty("driver");
        String username = props.getProperty("username");
        String password = props.getProperty("password");
        String url = props.getProperty("url");
        description = new ConnectionDescription(driver, url, username, password);
        documentQueueServiceDAO = new DocumentQueueServiceDAO(description);
        resetDbs();
    }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

        fail("throws some other exceptions than IllegalArgumentException");
      }
    }
   
    public void test_reading_connection_description() throws Exception {
      ConnectionDescription d = r.connectionDescription();
      assertEquals("url", d.url());
    }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

   
    @Override
    protected void setUp() throws Exception {}
   
    public void test_good_parameters() {
      descr = new ConnectionDescription("driver", "url", "username", "password");
      assertEquals("driver", descr.driver());
      assertEquals("url", descr.url());
      assertEquals("username", descr.username());
      assertEquals("password", descr.password());
    }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

      assertEquals("password", descr.password());
    }
   
    public void test_illegal_url() {
      try {
        descr = new ConnectionDescription("d", null, "u", "p");
        fail("Should fail to null url");
      } catch (IllegalArgumentException e) {
      }
      try {
        descr = new ConnectionDescription("d", "", "u", "p");
        fail("Should fail to empty url");
      } catch (IllegalArgumentException e) {
      }
    }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

      }
    }
   
    public void test_illegal_username() {
      try {
        descr = new ConnectionDescription("d", "u", null, "p");
        fail("Should fail to null username");
      } catch (IllegalArgumentException e) {
      }
      try {
        descr = new ConnectionDescription("d", "u", "", "p");
        fail("Should fail to empty username");
      } catch (IllegalArgumentException e) {
      }
    }
View Full Code Here

Examples of fi.luomus.commons.db.connectivity.ConnectionDescription

      }
    }
   
    public void test_illegal_password() {
      try {
        descr = new ConnectionDescription("d", "u", "u", null);
        fail("Should fail to null password");
      } catch (IllegalArgumentException e) {
      }
      try {
        descr = new ConnectionDescription("d", "u", "u", "");
        fail("Should fail to empty password");
      } catch (IllegalArgumentException e) {
      }
    }
View Full Code Here

Examples of net.sourceforge.fullsync.ConnectionDescription

    super.createGUI(parent);
  }

  @Override
  public ConnectionDescription getConnectionDescription() throws URISyntaxException {
    ConnectionDescription loc = super.getConnectionDescription();
    loc.setUri(new URI(m_scheme, null, textHost.getText(), spinnerPort.getSelection(), loc.getUri().getPath(), null, null));
    loc.setParameter("username", textUsername.getText());
    loc.setSecretParameter("password", textPassword.getText());
    loc.setParameter("publicKeyAuth", buttonKeybased.getSelection() ? "enabled" : "disabled");
    loc.setSecretParameter("keyPassphrase", textKeyPassphrase.getText());
    return loc;
  }
View Full Code Here

Examples of net.sourceforge.fullsync.ConnectionDescription

  };

  @Override
  public ConnectionDescription getConnectionDescription() throws URISyntaxException {
    File f = new File(textPath.getText());
    return new ConnectionDescription(f.toURI());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.