[
https://issues.jboss.org/browse/TEIIDDES-2369?page=com.atlassian.jira.plu...
]
Barry LaFond commented on TEIIDDES-2369:
----------------------------------------
1) requires the following change to PropertyPage. Basically the *value.getType()* is not a
string and needs to be checked against the *Parameter.Type* types.
{code}
private StringBuilder buildParameterString() {
StringBuilder parameterString = new StringBuilder();
if (this.parameterMap==null) return parameterString;
Map<String, Parameter> parameterMap = this.parameterMap;
for (String key : parameterMap.keySet()) {
Parameter value = parameterMap.get(key);
if (value.getType().equals(Parameter.Type.URI)) {
parameterString.append("/").append(value.getDefaultValue());
//$NON-NLS-1$
}
if (value.getType().equals(Parameter.Type.Query)) {
if (parameterString.length()==0 ||
!parameterString.toString().contains("?")){ //$NON-NLS-1$
parameterString.append("?"); //$NON-NLS-1$
}else{
parameterString.append("&"); //$NON-NLS-1$
}
parameterString.append(key).append("=").append(value.getDefaultValue());
//$NON-NLS-1$
}
}
return parameterString;
}
{code}
To address 2)
03:08:38 PM) blafond: In the bowels of the connection profile management code... trying to
persist/save a REST profile with parameters
(03:10:00 PM) blafond: It's getting the "value" of the parameters map and
treating it as a "string" and it's coming back null. Guessing the generic
definition on exiting Eclipse is to try and persist it with a null also. hence the
parameters are not restored
(03:14:36 PM) tejones: Ah right
(03:16:47 PM) blafond: tejones: so maybe think about how you want to structure those
properties under the hood so you can load/save. Maybe have a key prefix'd to all the
parameters? i.e. "rest_parameter:output", and "rest_parameter:q"
(03:17:01 PM) blafond: your UI can strip the prefix on presentation/edit time
(03:18:07 PM) tejones: blafond: yeah.. that would work
WS Rest Connection Profile property page issues
-----------------------------------------------
Key: TEIIDDES-2369
URL:
https://issues.jboss.org/browse/TEIIDDES-2369
Project: Teiid Designer
Issue Type: Bug
Components: Datatools Integration
Affects Versions: 8.6
Reporter: Barry LaFond
Assignee: Barry LaFond
Fix For: 8.6.1
1) The URL preview isn't getting updated correctly
2) The parameters are getting lost after closing and restarting Eclipse/Designer.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)