From 19b3f66de31e410decd923fa6afb35769a23f191 Mon Sep 17 00:00:00 2001
From: Paul Richardson
Date: Tue, 26 Feb 2013 13:47:57 +0000
Subject: [PATCH] Refactor deployed name
* The property value 'deployed-name' is specific to the 8.2 runtime and
not available in 7.7. Thus extract it to the SPI.
---
.../org/teiid/designer/runtime/preview/PreviewManager.java | 3 ++-
.../src/org/teiid/designer/runtime/spi/ITeiidVdb.java | 5 +++++
plugins/teiid/org.teiid.7.7.x | 2 +-
plugins/teiid/org.teiid.8.2.x | 2 +-
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/preview/PreviewManager.java b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/preview/PreviewManager.java
index a4183756d6..89d516b502 100644
--- a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/preview/PreviewManager.java
+++ b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/preview/PreviewManager.java
@@ -638,7 +638,8 @@ private IFile getFile( IPath path ) {
}
private String getFullDeployedVdbName(ITeiidVdb deployedVdb) {
- String fullVdbName = deployedVdb.getPropertyValue("deployment-name"); //$NON-NLS-1$
+ String fullVdbName = deployedVdb.getDeployedName();
+
if (!fullVdbName.endsWith(Vdb.FILE_EXTENSION)) {
fullVdbName = fullVdbName + Vdb.FILE_EXTENSION;
}
diff --git a/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/ITeiidVdb.java b/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/ITeiidVdb.java
index 32bc8789f2..1ab98297b0 100644
--- a/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/ITeiidVdb.java
+++ b/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/ITeiidVdb.java
@@ -30,6 +30,11 @@ public interface ITeiidVdb {
*/
String getName();
+ /**
+ * @return deployed name
+ */
+ String getDeployedName();
+
/**
* @return the version
*/
diff --git a/plugins/teiid/org.teiid.7.7.x b/plugins/teiid/org.teiid.7.7.x
index 0c9230862c..0785eb6202 160000
--- a/plugins/teiid/org.teiid.7.7.x
+++ b/plugins/teiid/org.teiid.7.7.x
@@ -1 +1 @@
-Subproject commit 0c9230862cb22c7e549b2b4a27180de140a8fde7
+Subproject commit 0785eb62026a460d11fd2228c4c1661717ea6b94
diff --git a/plugins/teiid/org.teiid.8.2.x b/plugins/teiid/org.teiid.8.2.x
index c1ea0e86cd..6a7b2f8c16 160000
--- a/plugins/teiid/org.teiid.8.2.x
+++ b/plugins/teiid/org.teiid.8.2.x
@@ -1 +1 @@
-Subproject commit c1ea0e86cdfa94408abe6918bd988d2eda94aeef
+Subproject commit 6a7b2f8c167262683fa643cc1a2da3cbdb9b13a1