private Set mergeProps(List<Property> props, Set defaultMCFProps, String rarName) { HashSet mergedSet = new HashSet(); Object[] defaultProps = (defaultMCFProps == null) ? new Object[0] : defaultMCFProps.toArray(); for (int i = 0; i < defaultProps.length; i++) { if (rarName.trim().equals(ConnectorRuntime.DEFAULT_JMS_ADAPTER)) { ConnectorConfigProperty ep1 = (ConnectorConfigProperty) defaultProps[i]; if (ep1.getName().equals("AddressList") && ep1.getValue().equals("localhost")) { continue; } } mergedSet.add(defaultProps[i]); } for (Property property : props) { if (property != null) { ConnectorConfigProperty ep = new ConnectorConfigProperty( property.getName(), property.getValue(), null); if (defaultMCFProps.contains(ep)) { mergedSet.remove(ep); } mergedSet.add(ep); } } return mergedSet; }
ConnectorConfigProperty ep = new ConnectorConfigProperty ( property.getName(), property.getValue(), null); if (defaultMCFProps.contains(ep)) {
propList.add(new ConnectorConfigProperty("ClassName", adminPool.getDriverClassname() == null ? "" : adminPool.getDriverClassname(), "The driver class name", "java.lang.String")); } else { propList.add(new ConnectorConfigProperty("ClassName", adminPool.getDatasourceClassname() == null ? "" : adminPool.getDatasourceClassname(), "The datasource class name", "java.lang.String")); propList.add(new ConnectorConfigProperty("ClassName", adminPool.getDriverClassname() == null ? "" : adminPool.getDriverClassname(), "The driver class name", "java.lang.String")); } else if (adminPool.getDatasourceClassname() != null) { propList.add(new ConnectorConfigProperty("ClassName", adminPool.getDatasourceClassname() == null ? "" : adminPool.getDatasourceClassname(), "The datasource class name", "java.lang.String")); propList.add(new ConnectorConfigProperty("ConnectionValidationRequired", adminPool.getIsConnectionValidationRequired() + "", "Is connection validation required", "java.lang.String")); propList.add(new ConnectorConfigProperty("ValidationMethod", adminPool.getConnectionValidationMethod() == null ? "" : adminPool.getConnectionValidationMethod(), propList.add(new ConnectorConfigProperty("ValidationTableName", adminPool.getValidationTableName() == null ? "" : adminPool.getValidationTableName(),
private static ConnectorConfigProperty getConfigProperty(String defaultValue, String description, boolean ignore, boolean supportsDynamicUpdates, boolean confidential, Class type, String propertyName) { ConnectorConfigProperty ep = new ConnectorConfigProperty(); //use description if specified if (!description.equals("")) { ep.setDescription(description); } //use default value if specified if ( defaultValue!= null && !defaultValue.equals("")) { ep.setValue(defaultValue); } ep.setType(type.getName()); ep.setName(propertyName); if (!ep.isSetIgnoreCalled()) { ep.setIgnore(ignore); } if (!ep.isSetConfidentialCalled()) { ep.setConfidential(confidential); } if (!ep.isSupportsDynamicUpdates()) { ep.setSupportsDynamicUpdates(supportsDynamicUpdates); } return ep; }
String userValue = (String) props.remove(name); if (userValue != null) aor.addConfigProperty(new ConnectorConfigProperty ( name, userValue, userValue, envProp.getType())); else String userValue = props.getProperty(name); if (userValue != null) aor.addConfigProperty(new ConnectorConfigProperty ( name, userValue, userValue));