Skip to content

Commit

Permalink
TEIIDDES-1998 writing and reading DefaultBinding and SecurityType con…
Browse files Browse the repository at this point in the history
…nection info from model.

 * Setting default security type to None in new CP wizard
  • Loading branch information
blafond committed Jan 3, 2014
1 parent 51e9e91 commit c0376be
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public void setVisible(boolean visible) {

profileText.setText(wizard.getProfileName());
descriptionText.setText(wizard.getProfileDescription());
setProperty(ICredentialsCommon.SECURITY_TYPE_ID, SecurityType.None.name());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ public void setConnectionInfo( ModelResource modelResource,
if (endPointURI != null) {
connectionProps.put(CONNECTION_NAMESPACE + END_POINT_URI_PROP_ID, endPointURI);
}

String securityType = props.getProperty(SECURITY_TYPE_ID);
if (null != securityType) {
connectionProps.setProperty(CONNECTION_NAMESPACE + SECURITY_TYPE_ID, securityType);
}

if (props.getProperty(CONNECTION_CLASS_KEY) != null) {
connectionProps.put(CONNECTION_NAMESPACE + CONNECTION_CLASS_KEY, props.getProperty(CONNECTION_CLASS_KEY));
Expand Down Expand Up @@ -141,6 +146,17 @@ public Properties getConnectionProperties( ModelResource modelResource ) throws
connectionProps.put(END_POINT_URI_PROP_ID, rawConnectionProps.get(END_POINT_URI_PROP_ID));
}


if (rawConnectionProps.get(SECURITY_TYPE_ID) != null) {
connectionProps.put(SECURITY_TYPE_ID, rawConnectionProps.get(SECURITY_TYPE_ID));
}

Properties rawTranslatorConnectionProps = removeNamespaces(getHelper().getProperties(modelResource, TRANSLATOR_NAMESPACE));

if( rawTranslatorConnectionProps.getProperty(SOAP_BINDING) != null) {
connectionProps.put(SOAP_BINDING, rawTranslatorConnectionProps.getProperty(SOAP_BINDING));
}

// Security
addSecurityProperties(rawConnectionProps, connectionProps, false);

Expand Down

0 comments on commit c0376be

Please sign in to comment.