@Override @Deprecated public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName) throws AdminException{ BuildPropertyDefinitions builder = new BuildPropertyDefinitions(); Collection<? extends Translator> translators = getTranslators(); for (Translator t:translators) { if (t.getName().equalsIgnoreCase(translatorName)) { cliCall("read-translator-properties", new String[] {"subsystem", "teiid"}, new String[] {"translator-name", translatorName, "type", TranlatorPropertyType.OVERRIDE.name()}, builder); return builder.getPropertyDefinitions(); } } throw new AdminProcessingException(AdminPlugin.Event.TEIID70055, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70055, translatorName)); }
@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; }
@Override public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions( String translatorName, TranlatorPropertyType type) throws AdminException { BuildPropertyDefinitions builder = new BuildPropertyDefinitions(); Translator translator = getTranslator(translatorName); if (translator != null) { if (translator.getName().equalsIgnoreCase(translatorName)) { cliCall("read-translator-properties", new String[] {"subsystem", "teiid"}, new String[] {"translator-name", translatorName, "type", type.name()}, builder); return builder.getPropertyDefinitions(); } } throw new AdminProcessingException(AdminPlugin.Event.TEIID70055, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70055, translatorName)); }
@Override public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions( String translatorName, TranlatorPropertyType type) throws AdminException { BuildPropertyDefinitions builder = new BuildPropertyDefinitions(); Translator translator = getTranslator(translatorName); if (translator != null) { if (translator.getName().equalsIgnoreCase(translatorName)) { cliCall("read-translator-properties", new String[] {"subsystem", "teiid"}, new String[] {"translator-name", translatorName, "type", type.name()}, builder); return builder.getPropertyDefinitions(); } } throw new AdminProcessingException(AdminPlugin.Event.TEIID70055, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70055, translatorName)); }
@Override @Deprecated public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName) throws AdminException{ BuildPropertyDefinitions builder = new BuildPropertyDefinitions(); Collection<? extends Translator> translators = getTranslators(); for (Translator t:translators) { if (t.getName().equalsIgnoreCase(translatorName)) { cliCall("read-translator-properties", new String[] {"subsystem", "teiid"}, new String[] {"translator-name", translatorName, "type", TranlatorPropertyType.OVERRIDE.name()}, builder); return builder.getPropertyDefinitions(); } } throw new AdminProcessingException(AdminPlugin.Event.TEIID70055, AdminPlugin.Util.gs(AdminPlugin.Event.TEIID70055, translatorName)); }
@Doc(text = "Get all PropertyDefinitions for the given translator") public static Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions( @Doc(text = "translator name") String translatorName, @Doc(text = "type of property IMPPORT, OVERRIDE, EXTENSION_METADATA")String type) throws AdminException { return getAdmin().getTranslatorPropertyDefinitions(translatorName, TranlatorPropertyType.valueOf(type.toUpperCase())); }