summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalina Jasinska <kalina.jasinska@gmail.com>2013-10-04 08:50:47 (GMT)
committer Kalina Jasinska <kalina.jasinska@gmail.com>2013-10-04 08:50:47 (GMT)
commit8a16c18394f3a2fb8276d9acd832c9c67548f005 (patch)
treee96d95917f48765edfc644c86891a97bbd3f1efb
parentc15f9becf71424bf73ea84ce46a4f1263955c858 (diff)
downloadQCG-Data-8a16c18394f3a2fb8276d9acd832c9c67548f005.zip
QCG-Data-8a16c18394f3a2fb8276d9acd832c9c67548f005.tar.gz
QCG-Data-8a16c18394f3a2fb8276d9acd832c9c67548f005.tar.bz2
Default values of host, port, zone and public link
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java17
2 files changed, 12 insertions, 7 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
index 85b5010..d284634 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
@@ -95,7 +95,7 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
// default value of publicLinkService url
String publicLinkDef = "http://elder10.man.poznan.pl:8080/gdrop-web/register";
String publicLinkAddress = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.IDROP_PUBLIC_LINK_SERVICE);
- if(publicLinkAddress == null){
+ if(publicLinkAddress == null || publicLinkAddress.isEmpty()){
publicLinkAddress = publicLinkDef;
}
txtPublicLinks.setText(publicLinkAddress);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
index f3eca1d..7ebf8c3 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
@@ -152,15 +152,18 @@ public class LoginDialog extends JDialog {
// predispose based on preferences
String host = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_HOST);
- if (host != null) {
- txtHost.setText(host);
+ if (host == null || host.isEmpty()) {
+ host = "elder10.man.poznan.pl";
}
+ txtHost.setText(host);
+
String port = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_PORT);
if (port == null || port.isEmpty()) {
port = "1247";
}
-
+ txtPort.setText(port);
+
String mode = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_LOGIN_MODE);
if (mode == null || mode.isEmpty()) {
@@ -170,13 +173,11 @@ public class LoginDialog extends JDialog {
}
String proxy = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_PROXY_LOCATION);
-
if (proxy != null) {
txtProxy.setText(proxy);
}
String certificates = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_CERTIFICATES_LOCATION);
-
if (certificates != null) {
txtCerts.setText(certificates);
} else if (CAfilesConfigured) {
@@ -200,10 +201,14 @@ public class LoginDialog extends JDialog {
txtKeyLocation.setText(keyLoc);
}
- txtPort.setText(port);
+
String zone = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_ZONE);
+ if (zone == null || zone.isEmpty()) {
+ zone = "testZone";
+ }
txtZone.setText(zone);
+
String resource = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_RESOURCE);
txtResource.setText(resource);