use of org.teiid.deployers.ExtendedPropertyMetadataList in project teiid by teiid.
the class EmbeddedAdminImpl method getTranslatorPropertyDefinitions.
@Override
public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName, TranlatorPropertyType type) throws AdminException {
List<PropertyDefinition> list = new ArrayList<PropertyDefinition>();
VDBTranslatorMetaData translator = this.embeddedServer.getTranslatorRepository().getTranslatorMetaData(translatorName);
TranlatorPropertyType translatorPropertyType = TranlatorPropertyType.valueOf(type.toString().toUpperCase());
if (translator != null) {
ExtendedPropertyMetadataList properties = translator.getAttachment(ExtendedPropertyMetadataList.class);
if (translatorPropertyType.equals(TranlatorPropertyType.ALL)) {
for (ExtendedPropertyMetadata epm : properties) {
list.add(buildNode(epm));
}
} else {
PropertyType propType = PropertyType.valueOf(type.toString().toUpperCase());
for (ExtendedPropertyMetadata epm : properties) {
if (PropertyType.valueOf(epm.category()).equals(propType)) {
list.add(buildNode(epm));
}
}
}
}
return list;
}
Aggregations