}
List<ConnBundleTO> connectorBundleTOs = new ArrayList<ConnBundleTO>();
for (Map.Entry<String, List<ConnectorInfo>> entry : ConnIdBundleManager.getConnectorInfos().entrySet()) {
for (ConnectorInfo bundle : entry.getValue()) {
ConnBundleTO connBundleTO = new ConnBundleTO();
connBundleTO.setDisplayName(bundle.getConnectorDisplayName());
connBundleTO.setLocation(entry.getKey());
ConnectorKey key = bundle.getConnectorKey();
connBundleTO.setBundleName(key.getBundleName());
connBundleTO.setConnectorName(key.getConnectorName());
connBundleTO.setVersion(key.getBundleVersion());
ConfigurationProperties properties = ConnIdBundleManager.getConfigurationProperties(bundle);
for (String propName : properties.getPropertyNames()) {
ConnConfPropSchema connConfPropSchema = new ConnConfPropSchema();
ConfigurationPropertyImpl configurationProperty =
(ConfigurationPropertyImpl) properties.getProperty(propName);
connConfPropSchema.setName(configurationProperty.getName());
connConfPropSchema.setDisplayName(configurationProperty.getDisplayName(propName));
connConfPropSchema.setHelpMessage(configurationProperty.getHelpMessage(propName));
connConfPropSchema.setRequired(configurationProperty.isRequired());
connConfPropSchema.setType(configurationProperty.getType().getName());
connConfPropSchema.setOrder(configurationProperty.getOrder());
connConfPropSchema.setConfidential(configurationProperty.isConfidential());
connBundleTO.addProperty(connConfPropSchema);
}
LOG.debug("Connector bundle: {}", connBundleTO);
connectorBundleTOs.add(connBundleTO);