@Override protected void decorateIdentity(final List<Object> identifiers) { super.decorateIdentity(identifiers); identifiers.add(_hostname); identifiers.add(getPort()); identifiers.add(_username); identifiers.add(_password); identifiers.add(_sslEnabled); identifiers.add(_tableDefs); }
/** * Externalizes a {@link CouchDbDatastore} to a XML element * * @param datastore * @return */ public Element toElement(final CouchDbDatastore datastore) { final Element ds = getDocument().createElement("couchdb-datastore"); ds.setAttribute("name", datastore.getName()); if (!Strings.isNullOrEmpty(datastore.getDescription())) { ds.setAttribute("description", datastore.getDescription()); } appendElement(ds, "hostname", datastore.getHostname()); appendElement(ds, "port", datastore.getPort()); appendElement(ds, "username", datastore.getUsername()); appendElement(ds, "password", encodePassword(datastore.getPassword())); appendElement(ds, "ssl", datastore.isSslEnabled()); return ds; }
final CouchDbDatastore couchDbDatastore = (CouchDbDatastore) datastore; return (couchDbDatastore.isSslEnabled() ? "https://" : "http://") + couchDbDatastore.getHostname() + ":" + couchDbDatastore.getPort(); } else if (datastore instanceof PojoDatastore) { return "In-memory collection of records.";
_datastoreNameTextField.setEnabled(false); _hostnameTextField.setText(originalDatastore.getHostname()); _portTextField.setText(originalDatastore.getPort() + ""); _sslCheckBox.setSelected(originalDatastore.isSslEnabled()); _usernameTextField.setText(originalDatastore.getUsername());