summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pokuri2012-02-09 19:36:04 (EST)
committerBrian Payton2012-02-09 19:36:04 (EST)
commitd8351c2428e7afa6ca041784d1fc3d4ae3c8bc56 (patch)
treeb2cf102752b46b4d3ad633f490778f2e31276025
parent4067b64982e8265a31f140c367309e0793ba57a5 (diff)
downloadorg.eclipse.datatools.enablement.ibm-d8351c2428e7afa6ca041784d1fc3d4ae3c8bc56.zip
org.eclipse.datatools.enablement.ibm-d8351c2428e7afa6ca041784d1fc3d4ae3c8bc56.tar.gz
org.eclipse.datatools.enablement.ibm-d8351c2428e7afa6ca041784d1fc3d4ae3c8bc56.tar.bz2
[368412] Updated connection profile ui to allow adding opt URL parms inv201202100836
preference page
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesDriverUIContributor.java37
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesToolboxDriverUIContributor.java41
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/src/org/eclipse/datatools/enablement/ibm/db2/luw/ui/drivers/DB2LUWDriverUIContributorBase.java62
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/drivers/DB2ZSeriesDriverUIContributor.java38
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.informix.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.datatools.enablement.ibm.informix.ui/src/org/eclipse/datatools/enablement/ibm/informix/ui/drivers/InformixDriverUIContributorBase.java53
9 files changed, 223 insertions, 16 deletions
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/META-INF/MANIFEST.MF
index 7f2dd97..56114e5 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.iseries.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %providerName
Export-Package: org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui,
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesDriverUIContributor.java b/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesDriverUIContributor.java
index 01c29a3..f318e92 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesDriverUIContributor.java
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesDriverUIContributor.java
@@ -11,6 +11,7 @@ package org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui.drivers;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileConstants;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
@@ -136,6 +137,8 @@ public class DB2ISeriesDriverUIContributor implements IDriverUIContributor,
private Properties properties;
+ private String urlOptionalParameters=""; //$NON-NLS-1$
+
private boolean isReadOnly = false;
protected OptionalPropertiesPane optionalPropsComposite;
@@ -333,6 +336,7 @@ public class DB2ISeriesDriverUIContributor implements IDriverUIContributor,
+ "/" + databaseText.getText().trim() //$NON-NLS-1$
+ ":retrieveMessagesFromServerOnGetMessage=true;"; //$NON-NLS-1$
url += tracingOptionsComposite.getTracingURLProperties();
+ url += getURLOptionalParameters();
urlText.setText(url);
}
@@ -534,6 +538,7 @@ public class DB2ISeriesDriverUIContributor implements IDriverUIContributor,
private void parseURL(String url) {
try {
+ setURLOptionalParameters(""); //$NON-NLS-1$
String remainingURL = url.substring(url.indexOf(':') + 1);
this.subprotocol = remainingURL.substring(0, remainingURL
.indexOf(':'));
@@ -556,6 +561,23 @@ public class DB2ISeriesDriverUIContributor implements IDriverUIContributor,
} else {
this.databaseName = remainingURL;
}
+ String userOptionalParameters=""; //$NON-NLS-1$
+ String userParameter = ""; //$NON-NLS-1$
+ if(remainingURL!=null && remainingURL.length()>0)
+ {
+ StringTokenizer st = new StringTokenizer(remainingURL, ";"); //$NON-NLS-1$
+ int tokenLength = st.countTokens();
+ for(int i=0; i< tokenLength; i++)
+ {
+ userParameter = st.nextToken();
+ if(userParameter!=null && userParameter.length()>0){
+ if(!(userParameter.startsWith("retrieveMessagesFromServerOnGetMessage")))
+ userOptionalParameters += userParameter+";"; //$NON-NLS-1$
+ }
+ }
+
+ setURLOptionalParameters(userOptionalParameters);
+ }
} catch (Exception e) {
}
}
@@ -574,4 +596,19 @@ public class DB2ISeriesDriverUIContributor implements IDriverUIContributor,
return properties;
}
}
+ /**
+ * Sets the URL optional properties.
+ */
+ public void setURLOptionalParameters(String connProp)
+ {
+ this.urlOptionalParameters = connProp;
+ }
+
+ /**
+ * @return Returns the URL optional properties.
+ */
+ public String getURLOptionalParameters()
+ {
+ return this.urlOptionalParameters;
+ }
}
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesToolboxDriverUIContributor.java b/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesToolboxDriverUIContributor.java
index a1be6cc..06c4a3f 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesToolboxDriverUIContributor.java
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/iseries/internal/ui/drivers/DB2ISeriesToolboxDriverUIContributor.java
@@ -11,6 +11,7 @@ package org.eclipse.datatools.enablement.ibm.db2.iseries.internal.ui.drivers;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileConstants;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
@@ -101,6 +102,8 @@ public class DB2ISeriesToolboxDriverUIContributor implements
private Properties properties;
+ private String urlOptionalParameters=""; //$NON-NLS-1$
+
private boolean isReadOnly = false;
public boolean determineContributorCompletion() {
@@ -323,7 +326,8 @@ public class DB2ISeriesToolboxDriverUIContributor implements
}
public void updateURL() {
- String url = "jdbc:as400:" + hostText.getText().trim() + ";prompt=false"; //$NON-NLS-1$ //$NON-NLS-2$
+ String url = "jdbc:as400:" + hostText.getText().trim() + ";prompt=false;"; //$NON-NLS-1$ //$NON-NLS-2$
+ url += getURLOptionalParameters();
urlText.setText(url);
}
@@ -384,6 +388,7 @@ public class DB2ISeriesToolboxDriverUIContributor implements
private void parseURL(String url) {
try {
+ setURLOptionalParameters(""); //$NON-NLS-1$
String remainingURL = url.substring(url.indexOf(':') + 1);
this.subprotocol = remainingURL.substring(0, remainingURL
.indexOf(':'));
@@ -394,6 +399,23 @@ public class DB2ISeriesToolboxDriverUIContributor implements
remainingURL = remainingURL
.substring(remainingURL.indexOf(';') + 1);
this.properties = remainingURL;
+ String userOptionalParameters=""; //$NON-NLS-1$
+ String userParameter = ""; //$NON-NLS-1$
+ if(remainingURL!=null && remainingURL.length()>0)
+ {
+ StringTokenizer st = new StringTokenizer(remainingURL, ";"); //$NON-NLS-1$
+ int tokenLength = st.countTokens();
+ for(int i=0; i< tokenLength; i++)
+ {
+ userParameter = st.nextToken();
+ if(userParameter!=null && userParameter.length()>0){
+ if(!(userParameter.startsWith("prompt"))) //$NON-NLS-1$
+ userOptionalParameters += userParameter+";"; //$NON-NLS-1$
+ }
+ }
+
+ setURLOptionalParameters(userOptionalParameters);
+ }
} catch (Exception e) {
}
}
@@ -405,4 +427,21 @@ public class DB2ISeriesToolboxDriverUIContributor implements
return properties;
}
}
+
+ /**
+ * Sets the URL optional properties.
+ */
+ public void setURLOptionalParameters(String connProp)
+ {
+ this.urlOptionalParameters = connProp;
+ }
+
+ /**
+ * @return Returns the URL optional properties.
+ */
+ public String getURLOptionalParameters()
+ {
+ return this.urlOptionalParameters;
+ }
+
}
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/META-INF/MANIFEST.MF
index 6ec26ab..c68d41d 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.luw.ui;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.0.3.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.2.0,4.0)",
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/src/org/eclipse/datatools/enablement/ibm/db2/luw/ui/drivers/DB2LUWDriverUIContributorBase.java b/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/src/org/eclipse/datatools/enablement/ibm/db2/luw/ui/drivers/DB2LUWDriverUIContributorBase.java
index 504c4a6..285e859 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/src/org/eclipse/datatools/enablement/ibm/db2/luw/ui/drivers/DB2LUWDriverUIContributorBase.java
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.ui/src/org/eclipse/datatools/enablement/ibm/db2/luw/ui/drivers/DB2LUWDriverUIContributorBase.java
@@ -13,6 +13,7 @@ package org.eclipse.datatools.enablement.ibm.db2.luw.ui.drivers;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileConstants;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
@@ -152,6 +153,7 @@ public class DB2LUWDriverUIContributorBase implements IDriverUIContributor,
private IDriverUIContributorInformation contributorInformation;
private Properties properties;
+ private String urlOptionalParameters=""; //$NON-NLS-1$
protected boolean isReadOnly = false;
@@ -406,7 +408,8 @@ public class DB2LUWDriverUIContributorBase implements IDriverUIContributor,
clientAuthenticationCheckbox.getSelection(),
tracingProperties)
.formatURL();
- urlText.setText(url);
+ url += getURLOptionalParameters();
+ urlText.setText(url);
}
private void removeListeners() {
@@ -717,6 +720,7 @@ public class DB2LUWDriverUIContributorBase implements IDriverUIContributor,
*/
protected void parseURL(String url) {
try {
+ setURLOptionalParameters(""); //$NON-NLS-1$
String remainingURL = url.substring(url.indexOf(':') + 1);
this.subprotocol = remainingURL.substring(0, remainingURL
.indexOf(':'));
@@ -730,18 +734,64 @@ public class DB2LUWDriverUIContributorBase implements IDriverUIContributor,
}
remainingURL = remainingURL
.substring(remainingURL.indexOf('/') + 1);
- if (remainingURL.indexOf(':') > -1) {
- this.databaseName = remainingURL.substring(0, remainingURL
- .indexOf(':'));
- remainingURL = remainingURL.substring(remainingURL
- .indexOf(':') + 1);
+ if (remainingURL.indexOf(';') > -1) {
+
+ String urlString = remainingURL.substring(0, remainingURL
+ .indexOf(';'));
+ if(urlString.contains("retrieveMessagesFromServerOnGetMessage=true")){ //$NON-NLS-1$
+ this.databaseName = remainingURL.substring(0, remainingURL
+ .indexOf(':'));
+ remainingURL = remainingURL.substring(remainingURL
+ .indexOf(':') + 1);
+ }else{
+ this.databaseName = remainingURL.substring(0, remainingURL
+ .indexOf(';'));
+ remainingURL = remainingURL.substring(remainingURL
+ .indexOf(';') + 1);
+ }
+
this.urlProperties = remainingURL;
this.useClientAuthentication = (this.urlProperties.indexOf(CLIENT_AUTHETICATION_TEXT) > -1 );
+ String userOptionalParameters=""; //$NON-NLS-1$
+ String userParameter = ""; //$NON-NLS-1$
+ if(remainingURL!=null && remainingURL.length()>0)
+ {
+ StringTokenizer st = new StringTokenizer(remainingURL, ";"); //$NON-NLS-1$
+ int tokenLength = st.countTokens();
+ for(int i=0; i< tokenLength; i++)
+ {
+ userParameter = st.nextToken();
+ if(userParameter!=null && userParameter.length()>0){
+ if(!(userParameter.startsWith("retrieveMessagesFromServerOnGetMessage=true"))) //$NON-NLS-1$
+ userOptionalParameters += userParameter+";"; //$NON-NLS-1$
+ }
+ }
+
+ setURLOptionalParameters(userOptionalParameters);
+ }
+
} else {
this.databaseName = remainingURL;
}
+
+
} catch (Exception e) {
}
}
}
+ /**
+ * Sets the URL optional properties.
+ */
+ public void setURLOptionalParameters(String connProp)
+ {
+ this.urlOptionalParameters = connProp;
+ }
+
+ /**
+ * @return Returns the URL optional properties.
+ */
+ public String getURLOptionalParameters()
+ {
+ return this.urlOptionalParameters;
+ }
}
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/META-INF/MANIFEST.MF
index 4106233..96158dd 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.db2.zseries.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %providerName
Export-Package: org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui,
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/drivers/DB2ZSeriesDriverUIContributor.java b/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/drivers/DB2ZSeriesDriverUIContributor.java
index a9f3bb2..07c1a87 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/drivers/DB2ZSeriesDriverUIContributor.java
+++ b/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.ui/src/org/eclipse/datatools/enablement/ibm/db2/zseries/internal/ui/drivers/DB2ZSeriesDriverUIContributor.java
@@ -11,6 +11,7 @@ package org.eclipse.datatools.enablement.ibm.db2.zseries.internal.ui.drivers;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileConstants;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
@@ -147,6 +148,7 @@ public class DB2ZSeriesDriverUIContributor implements IDriverUIContributor,
protected String DEFAULT_PORT_TEXT = "446"; //$NON-NLS-1$
private Properties properties;
+ private String urlOptionalParameters=""; //$NON-NLS-1$
private boolean isReadOnly = false;
@@ -490,6 +492,7 @@ public class DB2ZSeriesDriverUIContributor implements IDriverUIContributor,
+ "/" + databaseText.getText().trim() //$NON-NLS-1$
+ ":retrieveMessagesFromServerOnGetMessage=true;emulateParameterMetaDataForZCalls=1;" //$NON-NLS-1$
+ tracingOptionsComposite.getTracingURLProperties();
+ url += getURLOptionalParameters();
urlText.setText(url);
}
@@ -579,6 +582,7 @@ public class DB2ZSeriesDriverUIContributor implements IDriverUIContributor,
private void parseURL(String url) {
try {
+ setURLOptionalParameters(""); //$NON-NLS-1$
String remainingURL = url.substring(url.indexOf(':') + 1);
this.subprotocol = remainingURL.substring(0, remainingURL
.indexOf(':'));
@@ -601,6 +605,25 @@ public class DB2ZSeriesDriverUIContributor implements IDriverUIContributor,
} else {
this.databaseName = remainingURL;
}
+ String userOptionalParameters=""; //$NON-NLS-1$
+ String userParameter = ""; //$NON-NLS-1$
+ if(remainingURL!=null && remainingURL.length()>0)
+ {
+ StringTokenizer st = new StringTokenizer(remainingURL, ";"); //$NON-NLS-1$
+ int tokenLength = st.countTokens();
+ for(int i=0; i< tokenLength; i++)
+ {
+ userParameter = st.nextToken();
+ if(userParameter!=null && userParameter.length()>0){
+ if((!userParameter.startsWith("retrieveMessagesFromServerOnGetMessage"))&&(!userParameter.startsWith("emulateParameterMetaDataForZCalls"))) //$NON-NLS-1$ //$NON-NLS-2$
+ userOptionalParameters += userParameter+";"; //$NON-NLS-1$
+
+ }
+
+ }
+
+ setURLOptionalParameters(userOptionalParameters);
+ }
} catch (Exception e) {
}
}
@@ -619,4 +642,19 @@ public class DB2ZSeriesDriverUIContributor implements IDriverUIContributor,
return properties;
}
}
+ /**
+ * Sets the URL optional properties.
+ */
+ public void setURLOptionalParameters(String connProp)
+ {
+ this.urlOptionalParameters = connProp;
+ }
+
+ /**
+ * @return Returns the URL optional properties.
+ */
+ public String getURLOptionalParameters()
+ {
+ return this.urlOptionalParameters;
+ }
}
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/META-INF/MANIFEST.MF
index 60ce9d0..472a2c7 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.datatools.enablement.ibm.informix.ui;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.0.3.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %providerName
Export-Package: org.eclipse.datatools.enablement.ibm.informix.internal.ui,
diff --git a/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/src/org/eclipse/datatools/enablement/ibm/informix/ui/drivers/InformixDriverUIContributorBase.java b/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/src/org/eclipse/datatools/enablement/ibm/informix/ui/drivers/InformixDriverUIContributorBase.java
index 45fa1f0..9c3102b 100644
--- a/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/src/org/eclipse/datatools/enablement/ibm/informix/ui/drivers/InformixDriverUIContributorBase.java
+++ b/plugins/org.eclipse.datatools.enablement.ibm.informix.ui/src/org/eclipse/datatools/enablement/ibm/informix/ui/drivers/InformixDriverUIContributorBase.java
@@ -13,6 +13,7 @@ package org.eclipse.datatools.enablement.ibm.informix.ui.drivers;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileConstants;
import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
@@ -138,6 +139,7 @@ public class InformixDriverUIContributorBase implements IDriverUIContributor,
protected OptionalPropertiesPane optionalPropsComposite;
private Properties properties;
+ private String urlOptionalParameters=""; //$NON-NLS-1$
protected boolean isReadOnly = false;
@@ -447,7 +449,8 @@ public class InformixDriverUIContributorBase implements IDriverUIContributor,
String url = getURLHandle(hostText.getText().trim(), portText.getText().trim(),
databaseText.getText().trim(), serverText.getText().trim())
.formatURL();
- urlText.setText(url);
+ url += getURLOptionalParameters();
+ urlText.setText(url);
}
private void addListeners() {
@@ -614,6 +617,7 @@ public class InformixDriverUIContributorBase implements IDriverUIContributor,
*/
protected void parseURL(String url) {
try {
+ setURLOptionalParameters(""); //$NON-NLS-1$
String remainingURL = url.substring(url.indexOf(':') + 1);
this.subprotocol = remainingURL.substring(0, remainingURL
.indexOf(':'));
@@ -632,17 +636,56 @@ public class InformixDriverUIContributorBase implements IDriverUIContributor,
.indexOf(':'));
remainingURL = remainingURL.substring(remainingURL
.indexOf(':') + 1);
- if (remainingURL.indexOf("INFORMIXSERVER=") > -1){
+ if (remainingURL.indexOf("INFORMIXSERVER=") > -1){ //$NON-NLS-1$
+
+ if(remainingURL.contains(";")){ //$NON-NLS-1$
this.server = remainingURL.substring(new String(
- "INFORMIXSERVER=").length(), remainingURL //$NON-NLS-1$
- .indexOf(';'));
- }
+ "INFORMIXSERVER=").length(), remainingURL //$NON-NLS-1$
+ .indexOf(';'));
+ }else
+
+ this.server = remainingURL.substring(remainingURL.indexOf('=')+1);
+
+ }
+
this.urlProperties = remainingURL;
} else {
this.databaseName = remainingURL;
}
+ String userOptionalParameters=""; //$NON-NLS-1$
+ String userParameter = ""; //$NON-NLS-1$
+ if(remainingURL!=null && remainingURL.length()>0)
+ {
+ StringTokenizer st = new StringTokenizer(remainingURL, ";"); //$NON-NLS-1$
+ int tokenLength = st.countTokens();
+ for(int i=0; i< tokenLength; i++)
+ {
+ userParameter = st.nextToken();
+ if(userParameter!=null && userParameter.length()>0){
+ if((!userParameter.startsWith("INFORMIXSERVER")) && (!userParameter.startsWith("DELIMIDENT"))) //$NON-NLS-1$ //$NON-NLS-2$
+ userOptionalParameters += userParameter+";"; //$NON-NLS-1$
+ }
+ }
+
+ setURLOptionalParameters(userOptionalParameters);
+ }
} catch (Exception e) {
}
}
}
+ /**
+ * Sets the URL optional properties.
+ */
+ public void setURLOptionalParameters(String connProp)
+ {
+ this.urlOptionalParameters = connProp;
+ }
+
+ /**
+ * @return Returns the URL optional properties.
+ */
+ public String getURLOptionalParameters()
+ {
+ return this.urlOptionalParameters;
+ }
}