* @param configuration
* @throws Exception
*/
private void getModels(ManagedComponent mcVdb, Configuration configuration) {
// Get models from VDB
ManagedProperty property = mcVdb.getProperty("models");
CollectionValueSupport valueSupport = (CollectionValueSupport) property
.getValue();
MetaValue[] metaValues = valueSupport.getElements();
PropertyList sourceModelsList = new PropertyList("singleSourceModels");
configuration.put(sourceModelsList);
PropertyList multiSourceModelsList = new PropertyList(
"multiSourceModels");
configuration.put(multiSourceModelsList);
PropertyList logicalModelsList = new PropertyList("logicalModels");
configuration.put(logicalModelsList);
PropertyList errorList = new PropertyList("errorList");
configuration.put(errorList);
for (MetaValue value : metaValues) {
GenericValueSupport genValueSupport = (GenericValueSupport) value;
ManagedObjectImpl managedObject = (ManagedObjectImpl) genValueSupport
.getValue();
Boolean isSource = Boolean.TRUE;
try {
isSource = ProfileServiceUtil.booleanValue(managedObject
.getProperty("source").getValue());
} catch (Exception e) {
LOG.error(e.getMessage());
}
Boolean supportMultiSource = Boolean.TRUE;
try {
supportMultiSource = ProfileServiceUtil
.booleanValue(managedObject.getProperty(
"supportsMultiSourceBindings").getValue());
} catch (Exception e) {
LOG.error(e.getMessage());
}
String modelName = managedObject.getName();
ManagedProperty connectorBinding = managedObject
.getProperty("sourceMappings");
Collection<Map<String, String>> sourceList = new ArrayList<Map<String, String>>();
getSourceMappingValue(connectorBinding.getValue(), sourceList);
String visibility = ((SimpleValueSupport) managedObject
.getProperty("visible").getValue()).getValue().toString();
String type = ((EnumValueSupport) managedObject.getProperty(
"modelType").getValue()).getValue().toString();