[teiid-commits] teiid SVN: r2267 - in branches/7.0.x: client/src/main/java/org/teiid/adminapi and 2 other directories.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Mon Jun 21 16:02:44 EDT 2010
Author: shawkins
Date: 2010-06-21 16:02:43 -0400 (Mon, 21 Jun 2010)
New Revision: 2267
Modified:
branches/7.0.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
branches/7.0.x/client/src/main/java/org/teiid/adminapi/Admin.java
branches/7.0.x/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
branches/7.0.x/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java
Log:
TEIID-1130 removing export vdb
Modified: branches/7.0.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
===================================================================
--- branches/7.0.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java 2010-06-19 11:33:35 UTC (rev 2266)
+++ branches/7.0.x/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java 2010-06-21 20:02:43 UTC (rev 2267)
@@ -310,15 +310,6 @@
ObjectConverterUtil.write(contents, fileName);
}
- @Doc(text = "Export a VDB to file")
- public static void exportVDB(
- @Doc(text = "vdb name") String vdbName,
- @Doc(text = "vdb version") int vdbVersion,
- @Doc(text = "file name") String fileName) throws AdminException, IOException{
- InputStream contents = getAdmin().exportVDB(vdbName, vdbVersion);
- writeFile(vdbName, fileName, contents);
- }
-
@Doc(text = "Deploy a VDB from file")
public static void deployVDB(
@Doc(text = "file name") String vdbFile) throws AdminException, FileNotFoundException {
Modified: branches/7.0.x/client/src/main/java/org/teiid/adminapi/Admin.java
===================================================================
--- branches/7.0.x/client/src/main/java/org/teiid/adminapi/Admin.java 2010-06-19 11:33:35 UTC (rev 2266)
+++ branches/7.0.x/client/src/main/java/org/teiid/adminapi/Admin.java 2010-06-21 20:02:43 UTC (rev 2267)
@@ -64,16 +64,6 @@
void deleteVDB(String vdbName, int vdbVersion) throws AdminException;
/**
- * Export VDB to byte array
- *
- * @param vdbName identifier of the {@link VDB}
- * @param vdbVersion {@link VDB} version
- * @return InputStream of the VDB
- * @throws AdminException
- */
- InputStream exportVDB(String vdbName, int vdbVersion) throws AdminException;
-
- /**
* Set a process level property.
* @param propertyName - name of the property
* @param propertyValue - value of the property
Modified: branches/7.0.x/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
===================================================================
--- branches/7.0.x/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-06-19 11:33:35 UTC (rev 2266)
+++ branches/7.0.x/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-06-21 20:02:43 UTC (rev 2267)
@@ -22,10 +22,7 @@
package org.teiid.adminapi.jboss;
-import java.io.IOException;
import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -172,17 +169,6 @@
}
}
- private InputStream exportDeployment(String url) throws AdminComponentException {
- try {
- URL contentURL = new URL(url);
- return contentURL.openStream();
- } catch (MalformedURLException e) {
- throw new AdminComponentException(e);
- } catch (IOException e) {
- throw new AdminComponentException(e);
- }
- }
-
boolean matches(String regEx, String value) {
regEx = regEx.replaceAll(AdminObject.ESCAPED_WILDCARD, ".*"); //$NON-NLS-1$
regEx = regEx.replaceAll(AdminObject.ESCAPED_DELIMITER, ""); //$NON-NLS-1$
@@ -207,15 +193,6 @@
}
@Override
- public InputStream exportVDB(String vdbName, int vdbVersion) throws AdminException{
- ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
- if (mc != null) {
- return exportDeployment(mc.getDeployment().getName());
- }
- return null;
- }
-
- @Override
public VDB getVDB(String vdbName, int vdbVersion) throws AdminException{
ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
if (mc != null) {
Modified: branches/7.0.x/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java
===================================================================
--- branches/7.0.x/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java 2010-06-19 11:33:35 UTC (rev 2266)
+++ branches/7.0.x/test-integration/db/src/test/java/org/teiid/adminapi/jboss/TestConnectorBindings.java 2010-06-21 20:02:43 UTC (rev 2267)
@@ -1,18 +1,12 @@
package org.teiid.adminapi.jboss;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.Assert.fail;
+import static junit.framework.Assert.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.InputStream;
import java.sql.Connection;
import java.util.Collection;
import java.util.List;
@@ -34,7 +28,6 @@
import org.teiid.adminapi.Transaction;
import org.teiid.adminapi.Translator;
import org.teiid.adminapi.VDB;
-import org.teiid.core.util.ObjectConverterUtil;
import org.teiid.core.util.UnitTestUtil;
@Ignore
@@ -292,21 +285,6 @@
assertEquals(false, translator.getPropertyValue("XaCapable"));
}
- @Test
- public void testExportVDB() throws Exception{
- File f = new File(UnitTestUtil.getTestScratchPath()+"/TransactionsRevisited.vdb"); //$NON-NLS-1$
-
- assertTrue(!f.exists());
-
- InputStream contents = admin.exportVDB("TransactionsRevisited", 1); //$NON-NLS-1$
- if (contents != null) {
- ObjectConverterUtil.write(contents, f.getCanonicalPath());
- }
-
- assertTrue(f.exists());
- f.delete();
- }
-
@Test public void testAssignConnectorBinding() throws Exception {
admin.assignToModel("TransactionsRevisited", 1, "pm1", "mysql", "mysql", "jndi:FOO"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
More information about the teiid-commits
mailing list