From 33aa0e641679bff163ffac8047f66a75d11c41a0 Mon Sep 17 00:00:00 2001 From: Paul Richardson Date: Thu, 14 Feb 2013 15:01:56 +0000 Subject: [PATCH] Restrict the preview import vdb functionality to teiid 8+ servers * Restores the merge method to Teiid 7 ExecutionAdmin, only allowing the import vdb functionality to 8+ servers. * Merge should remain deprecated since it is only for backward compatibility --- .../org/teiid/designer/runtime/TeiidServer.java | 8 ++++++++ .../designer/runtime/spi/IExecutionAdmin.java | 15 +++++++++++++++ plugins/teiid/org.teiid.7.7.x | 2 +- plugins/teiid/org.teiid.8.2.x | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/TeiidServer.java b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/TeiidServer.java index d1ffe7e940..d07158a985 100644 --- a/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/TeiidServer.java +++ b/plugins/org.teiid.designer.dqp/src/org/teiid/designer/runtime/TeiidServer.java @@ -645,4 +645,12 @@ public void update(ITeiidServer otherServer) { getTeiidAdminInfo().setAll(otherServer.getTeiidAdminInfo()); getTeiidJdbcInfo().setAll(otherServer.getTeiidJdbcInfo()); } + + @Deprecated + @Override + public void mergeVdbs( String sourceVdbName, int sourceVdbVersion, + String targetVdbName, int targetVdbVersion ) throws Exception { + connect(); + admin.mergeVdbs(sourceVdbName, sourceVdbVersion, targetVdbName, targetVdbVersion); + } } diff --git a/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/IExecutionAdmin.java b/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/IExecutionAdmin.java index aa82ad9e53..35f7a25cf9 100644 --- a/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/IExecutionAdmin.java +++ b/plugins/org.teiid.designer.spi/src/org/teiid/designer/runtime/spi/IExecutionAdmin.java @@ -224,4 +224,19 @@ ITeiidDataSource getOrCreateDataSource(String displayName, * @throws Exception */ Driver getTeiidDriver(String driverClass) throws Exception; + + /** + * @param sourceVdbName (excluding .vdb extension) the name of the VDB being merged into the target VDB + * @param sourceVdbVersion the version of the source VDB + * @param targetVdbName (excluding .vdb extension) the name of the VDB being merged into + * @param targetVdbVersion the version of the target VDB + * + * @throws Exception if there is a problem with the merge + * + * @deprecated This is only provided for backward compatibility with teiid 7.7.1 and should not + * be used for new code. + */ + @Deprecated + void mergeVdbs( String sourceVdbName, int sourceVdbVersion, + String targetVdbName, int targetVdbVersion ) throws Exception; } diff --git a/plugins/teiid/org.teiid.7.7.x b/plugins/teiid/org.teiid.7.7.x index c7a7ddde09..cab1bf19d0 160000 --- a/plugins/teiid/org.teiid.7.7.x +++ b/plugins/teiid/org.teiid.7.7.x @@ -1 +1 @@ -Subproject commit c7a7ddde0958683a2c45ac61b0ee89a18c83c00e +Subproject commit cab1bf19d01deb497ac64cd3a4d1b25c38b7cad6 diff --git a/plugins/teiid/org.teiid.8.2.x b/plugins/teiid/org.teiid.8.2.x index 94f555b249..36161fd2bd 160000 --- a/plugins/teiid/org.teiid.8.2.x +++ b/plugins/teiid/org.teiid.8.2.x @@ -1 +1 @@ -Subproject commit 94f555b24919152e04869f9bde19581275f81396 +Subproject commit 36161fd2bdfadb7bce5bc13225263ddfe5c3acd7