Author: rareddy
Date: 2010-09-01 13:26:12 -0400 (Wed, 01 Sep 2010)
New Revision: 2515
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java
branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java
Log:
TEIID-1214: Adding facility to add description field through the XML file. We can add to
the template file too, but we currently do not allow uses to create translators thru admi
api, so this is not needed.
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java
===================================================================
---
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java 2010-09-01
17:02:49 UTC (rev 2514)
+++
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/VDBTranslatorMetaData.java 2010-09-01
17:26:12 UTC (rev 2515)
@@ -93,6 +93,7 @@
return this.description;
}
+ @XmlAttribute(name = "description", required = true)
public void setDescription(String desc) {
this.description = desc;
}
Modified:
branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java
===================================================================
---
branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java 2010-09-01
17:02:49 UTC (rev 2514)
+++
branches/7.1.x/runtime/src/test/java/org/teiid/deployers/TestTranslatorMetadata.java 2010-09-01
17:26:12 UTC (rev 2515)
@@ -48,6 +48,7 @@
tm.setExecutionFactoryClass(ExecutionFactory.class);
tm.setName("Oracle");
+ tm.setDescription("desc");
tm.addProperty("ExtensionTranslationClassName",
"org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
JAXBContext jc = JAXBContext.newInstance(new Class<?>[]
{TranslatorMetaDataGroup.class});
@@ -65,6 +66,7 @@
tm = group.getTranslators().get(0);
assertEquals("Oracle", tm.getName());
+ assertEquals("desc", tm.getDescription());
assertEquals(ExecutionFactory.class.getName(),
tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator",
tm.getPropertyValue("ExtensionTranslationClassName"));
Show replies by date