/**
*
* A discovered resource must have a unique key, that must stay the
* same when the resource is discovered the next time
*/
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
discoveryContext.getResourceType(), // ResourceType
translatorKey, // Resource Key
translatorName, // Resource Name
ApplicationInfo.getInstance().getReleaseNumber(), // Version
description, // Description
discoveryContext.getDefaultPluginConfiguration(), // Plugin config
null // Process info from a process scan
);
// Get plugin config map for models
Configuration configuration = detail.getPluginConfiguration();
configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
detail.setPluginConfiguration(configuration);
// Add to return values
// First get translator specific properties
ManagedProperty translatorProps = translator.getProperty("property");//$NON-NLS-1$
PropertyList list = new PropertyList("translatorList");//$NON-NLS-1$
PropertyMap propMap = null;
getTranslatorValues(translatorProps.getValue(), propMap, list);
// Now get common properties
configuration.put(new PropertySimple("name", translatorName));//$NON-NLS-1$
configuration.put(new PropertySimple("type",ProfileServiceUtil.getSimpleValue(translator,"type", String.class)));//$NON-NLS-1$ //$NON-NLS-2$
detail.setPluginConfiguration(configuration);
// Add to return values
discoveredResources.add(detail);
log.debug("Discovered Teiid Translator: " + translatorName);
}