sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [38/52] [abbrv] SQOOP-1498: Sqoop2: Repository Object refactoring (objects prefixed with M)
Date Fri, 10 Oct 2014 02:52:07 GMT
http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java
index 47350ea..595b1c8 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestJobHandling.java
@@ -17,9 +17,14 @@
  */
 package org.apache.sqoop.repository.derby;
 
+import java.sql.Connection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.sqoop.common.Direction;
 import org.apache.sqoop.common.SqoopException;
-import org.apache.sqoop.model.MForm;
+import org.apache.sqoop.model.MConfig;
 import org.apache.sqoop.model.MJob;
 import org.apache.sqoop.model.MMapInput;
 import org.apache.sqoop.model.MStringInput;
@@ -38,18 +43,19 @@ import static org.junit.Assert.*;
 public class TestJobHandling extends DerbyTestCase {
 
   DerbyRepositoryHandler handler;
+  Connection derbyConnection;
 
   @Before
   public void setUp() throws Exception {
     super.setUp();
 
+    derbyConnection = getDerbyDatabaseConnection();
     handler = new DerbyRepositoryHandler();
 
     // We always needs schema for this test case
     createSchema();
 
-    // We always needs connector and framework structures in place
-    loadConnectorAndDriverConfig();
+    loadConnectorLinkConfig();
 
     // We always needs connection metadata in place
     loadLinks();
@@ -59,58 +65,53 @@ public class TestJobHandling extends DerbyTestCase {
   public void testFindJob() throws Exception {
     // Let's try to find non existing job
     try {
-      handler.findJob(1, getDerbyDatabaseConnection());
+      handler.findJob(1, derbyConnection);
       fail();
     } catch(SqoopException ex) {
       assertEquals(DerbyRepoError.DERBYREPO_0030, ex.getErrorCode());
     }
 
-    // Load prepared connections into database
     loadJobs();
 
-    MJob jobImport = handler.findJob(1, getDerbyDatabaseConnection());
-    assertNotNull(jobImport);
-    assertEquals(1, jobImport.getPersistenceId());
-    assertEquals("JA", jobImport.getName());
-
-    List<MForm> forms;
-
-    // Check connector parts
-    forms = jobImport.getConnectorPart(Direction.FROM).getForms();
-    assertEquals(2, forms.size());
-    assertEquals("Value5", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value5", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
-
-    forms = jobImport.getConnectorPart(Direction.TO).getForms();
-    assertEquals(2, forms.size());
-    assertEquals("Value9", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value9", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
-
-    // Check framework part
-    forms = jobImport.getFrameworkPart().getForms();
-    assertEquals(2, forms.size());
-    assertEquals("Value17", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value19", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
+    MJob firstJob = handler.findJob(1, derbyConnection);
+    assertNotNull(firstJob);
+    assertEquals(1, firstJob.getPersistenceId());
+    assertEquals("JA", firstJob.getName());
+
+    List<MConfig> configs;
+
+    configs = firstJob.getJobConfig(Direction.FROM).getConfigs();
+    assertEquals(2, configs.size());
+    assertEquals("Value5", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Value5", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
+
+    configs = firstJob.getJobConfig(Direction.TO).getConfigs();
+    assertEquals(2, configs.size());
+    assertEquals("Value9", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Value9", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
+
+    configs = firstJob.getDriverConfig().getConfigs();
+    assertEquals(2, configs.size());
+    assertEquals("Value13", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Value15", configs.get(1).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
   }
 
   @Test
   public void testFindJobs() throws Exception {
     List<MJob> list;
-
     // Load empty list on empty repository
-    list = handler.findJobs(getDerbyDatabaseConnection());
+    list = handler.findJobs(derbyConnection);
     assertEquals(0, list.size());
-
     loadJobs();
 
     // Load all two connections on loaded repository
-    list = handler.findJobs(getDerbyDatabaseConnection());
+    list = handler.findJobs(derbyConnection);
     assertEquals(4, list.size());
 
     assertEquals("JA", list.get(0).getName());
@@ -125,19 +126,19 @@ public class TestJobHandling extends DerbyTestCase {
   @Test
   public void testExistsJob() throws Exception {
     // There shouldn't be anything on empty repository
-    assertFalse(handler.existsJob(1, getDerbyDatabaseConnection()));
-    assertFalse(handler.existsJob(2, getDerbyDatabaseConnection()));
-    assertFalse(handler.existsJob(3, getDerbyDatabaseConnection()));
-    assertFalse(handler.existsJob(4, getDerbyDatabaseConnection()));
-    assertFalse(handler.existsJob(5, getDerbyDatabaseConnection()));
+    assertFalse(handler.existsJob(1, derbyConnection));
+    assertFalse(handler.existsJob(2, derbyConnection));
+    assertFalse(handler.existsJob(3, derbyConnection));
+    assertFalse(handler.existsJob(4, derbyConnection));
+    assertFalse(handler.existsJob(5, derbyConnection));
 
     loadJobs();
 
-    assertTrue(handler.existsJob(1, getDerbyDatabaseConnection()));
-    assertTrue(handler.existsJob(2, getDerbyDatabaseConnection()));
-    assertTrue(handler.existsJob(3, getDerbyDatabaseConnection()));
-    assertTrue(handler.existsJob(4, getDerbyDatabaseConnection()));
-    assertFalse(handler.existsJob(5, getDerbyDatabaseConnection()));
+    assertTrue(handler.existsJob(1, derbyConnection));
+    assertTrue(handler.existsJob(2, derbyConnection));
+    assertTrue(handler.existsJob(3, derbyConnection));
+    assertTrue(handler.existsJob(4, derbyConnection));
+    assertFalse(handler.existsJob(5, derbyConnection));
   }
 
   @Test
@@ -145,10 +146,10 @@ public class TestJobHandling extends DerbyTestCase {
     loadJobs();
     loadSubmissions();
 
-    assertTrue(handler.inUseJob(1, getDerbyDatabaseConnection()));
-    assertFalse(handler.inUseJob(2, getDerbyDatabaseConnection()));
-    assertFalse(handler.inUseJob(3, getDerbyDatabaseConnection()));
-    assertFalse(handler.inUseJob(4, getDerbyDatabaseConnection()));
+    assertTrue(handler.inUseJob(1, derbyConnection));
+    assertFalse(handler.inUseJob(2, derbyConnection));
+    assertFalse(handler.inUseJob(3, derbyConnection));
+    assertFalse(handler.inUseJob(4, derbyConnection));
   }
 
   @Test
@@ -158,34 +159,34 @@ public class TestJobHandling extends DerbyTestCase {
     // Load some data
     fillJob(job);
 
-    handler.createJob(job, getDerbyDatabaseConnection());
+    handler.createJob(job, derbyConnection);
 
     assertEquals(1, job.getPersistenceId());
     assertCountForTable("SQOOP.SQ_JOB", 1);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 6);
 
-    MJob retrieved = handler.findJob(1, getDerbyDatabaseConnection());
+    MJob retrieved = handler.findJob(1, derbyConnection);
     assertEquals(1, retrieved.getPersistenceId());
 
-    List<MForm> forms;
-    forms = job.getConnectorPart(Direction.FROM).getForms();
-    assertEquals("Value1", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    forms = job.getConnectorPart(Direction.TO).getForms();
-    assertEquals("Value1", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
+    List<MConfig> configs;
+    configs = job.getJobConfig(Direction.FROM).getConfigs();
+    assertEquals("Value1", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    configs = job.getJobConfig(Direction.TO).getConfigs();
+    assertEquals("Value1", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
 
-    forms = job.getFrameworkPart().getForms();
-    assertEquals("Value13", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value15", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
+    configs = job.getDriverConfig().getConfigs();
+    assertEquals("Value13", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Value15", configs.get(1).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
 
     // Let's create second job
     job = getJob();
     fillJob(job);
 
-    handler.createJob(job, getDerbyDatabaseConnection());
+    handler.createJob(job, derbyConnection);
 
     assertEquals(2, job.getPersistenceId());
     assertCountForTable("SQOOP.SQ_JOB", 2);
@@ -199,48 +200,49 @@ public class TestJobHandling extends DerbyTestCase {
     assertCountForTable("SQOOP.SQ_JOB", 4);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 24);
 
-    MJob job = handler.findJob(1, getDerbyDatabaseConnection());
+    MJob job = handler.findJob(1, derbyConnection);
+
+    List<MConfig> configs;
 
-    List<MForm> forms;
+    configs = job.getJobConfig(Direction.FROM).getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Updated");
+    ((MMapInput)configs.get(0).getInputs().get(1)).setValue(null);
 
-    forms = job.getConnectorPart(Direction.FROM).getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(0).getInputs().get(1)).setValue(null);
-    forms = job.getConnectorPart(Direction.TO).getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(0).getInputs().get(1)).setValue(null);
+    configs = job.getJobConfig(Direction.TO).getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Updated");
+    ((MMapInput)configs.get(0).getInputs().get(1)).setValue(null);
 
-    forms = job.getFrameworkPart().getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(0).getInputs().get(1)).setValue(new HashMap<String, String>()); // inject new map value
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(1).getInputs().get(1)).setValue(new HashMap<String, String>()); // inject new map value
+    configs = job.getDriverConfig().getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Updated");
+    ((MMapInput)configs.get(0).getInputs().get(1)).setValue(new HashMap<String, String>()); // inject new map value
+    ((MStringInput)configs.get(1).getInputs().get(0)).setValue("Updated");
+    ((MMapInput)configs.get(1).getInputs().get(1)).setValue(new HashMap<String, String>()); // inject new map value
 
     job.setName("name");
 
-    handler.updateJob(job, getDerbyDatabaseConnection());
+    handler.updateJob(job, derbyConnection);
 
     assertEquals(1, job.getPersistenceId());
     assertCountForTable("SQOOP.SQ_JOB", 4);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 26);
 
-    MJob retrieved = handler.findJob(1, getDerbyDatabaseConnection());
+    MJob retrieved = handler.findJob(1, derbyConnection);
     assertEquals("name", retrieved.getName());
 
-    forms = job.getConnectorPart(Direction.FROM).getForms();
-    assertEquals(2, forms.size());
-    assertEquals("Updated", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    forms = job.getConnectorPart(Direction.TO).getForms();
-    assertEquals(2, forms.size());
-    assertEquals("Updated", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-
-    forms = retrieved.getFrameworkPart().getForms();
-    assertEquals(2, forms.size());
-    assertEquals("Updated", forms.get(0).getInputs().get(0).getValue());
-    assertNotNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals(((Map)forms.get(0).getInputs().get(1).getValue()).size(), 0);
+    configs = job.getJobConfig(Direction.FROM).getConfigs();
+    assertEquals(2, configs.size());
+    assertEquals("Updated", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    configs = job.getJobConfig(Direction.TO).getConfigs();
+    assertEquals(2, configs.size());
+    assertEquals("Updated", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+
+    configs = retrieved.getDriverConfig().getConfigs();
+    assertEquals(2, configs.size());
+    assertEquals("Updated", configs.get(0).getInputs().get(0).getValue());
+    assertNotNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals(((Map)configs.get(0).getInputs().get(1).getValue()).size(), 0);
   }
 
   @Test
@@ -248,16 +250,16 @@ public class TestJobHandling extends DerbyTestCase {
     loadJobs();
 
     // disable job 1
-    handler.enableJob(1, false, getDerbyDatabaseConnection());
+    handler.enableJob(1, false, derbyConnection);
 
-    MJob retrieved = handler.findJob(1, getDerbyDatabaseConnection());
+    MJob retrieved = handler.findJob(1, derbyConnection);
     assertNotNull(retrieved);
     assertEquals(false, retrieved.getEnabled());
 
     // enable job 1
-    handler.enableJob(1, true, getDerbyDatabaseConnection());
+    handler.enableJob(1, true, derbyConnection);
 
-    retrieved = handler.findJob(1, getDerbyDatabaseConnection());
+    retrieved = handler.findJob(1, derbyConnection);
     assertNotNull(retrieved);
     assertEquals(true, retrieved.getEnabled());
   }
@@ -266,28 +268,28 @@ public class TestJobHandling extends DerbyTestCase {
   public void testDeleteJob() throws Exception {
     loadJobs();
 
-    handler.deleteJob(1, getDerbyDatabaseConnection());
+    handler.deleteJob(1, derbyConnection);
     assertCountForTable("SQOOP.SQ_JOB", 3);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 18);
 
-    handler.deleteJob(2, getDerbyDatabaseConnection());
+    handler.deleteJob(2, derbyConnection);
     assertCountForTable("SQOOP.SQ_JOB", 2);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 12);
 
-    handler.deleteJob(3, getDerbyDatabaseConnection());
+    handler.deleteJob(3, derbyConnection);
     assertCountForTable("SQOOP.SQ_JOB", 1);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 6);
 
-    handler.deleteJob(4, getDerbyDatabaseConnection());
+    handler.deleteJob(4, derbyConnection);
     assertCountForTable("SQOOP.SQ_JOB", 0);
     assertCountForTable("SQOOP.SQ_JOB_INPUT", 0);
   }
 
   public MJob getJob() {
     return new MJob(1, 1, 1, 1,
-      handler.findConnector("A", getDerbyDatabaseConnection()).getJobForms(Direction.FROM),
-      handler.findConnector("A", getDerbyDatabaseConnection()).getJobForms(Direction.TO),
-      handler.findDriverConfig(getDerbyDatabaseConnection()).getJobForms()
+      handler.findConnector("A", derbyConnection).getFromConfig(),
+      handler.findConnector("A", derbyConnection).getToConfig(),
+      handler.findDriver(derbyConnection).getDriverConfig()
     );
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestLinkHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestLinkHandling.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestLinkHandling.java
index 8dd1ce2..38e632a 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestLinkHandling.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestLinkHandling.java
@@ -17,9 +17,11 @@
  */
 package org.apache.sqoop.repository.derby;
 
+import java.util.List;
+
 import org.apache.sqoop.common.SqoopException;
+import org.apache.sqoop.model.MConfig;
 import org.apache.sqoop.model.MLink;
-import org.apache.sqoop.model.MForm;
 import org.apache.sqoop.model.MMapInput;
 import org.apache.sqoop.model.MStringInput;
 import org.junit.Before;
@@ -48,7 +50,7 @@ public class TestLinkHandling extends DerbyTestCase {
     createSchema();
 
     // We always needs connector and framework structures in place
-    loadConnectorAndDriverConfig();
+    loadConnectorLinkConfig();
   }
 
   @Test
@@ -64,26 +66,19 @@ public class TestLinkHandling extends DerbyTestCase {
     // Load prepared connections into database
     loadLinks();
 
-    MLink connA = handler.findLink(1, getDerbyDatabaseConnection());
-    assertNotNull(connA);
-    assertEquals(1, connA.getPersistenceId());
-    assertEquals("CA", connA.getName());
-
-    List<MForm> forms;
-
-    // Check connector part
-    forms = connA.getConnectorPart().getForms();
-    assertEquals("Value1", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value3", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
-
-    // Check framework part
-    forms = connA.getFrameworkPart().getForms();
-    assertEquals("Value13", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value15", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
+    MLink linkA = handler.findLink(1, getDerbyDatabaseConnection());
+    assertNotNull(linkA);
+    assertEquals(1, linkA.getPersistenceId());
+    assertEquals("CA", linkA.getName());
+
+    List<MConfig> configs;
+
+    // Check connector link config
+    configs = linkA.getConnectorLinkConfig().getConfigs();
+    assertEquals("Value1", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Value3", configs.get(1).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
   }
 
   @Test
@@ -128,24 +123,18 @@ public class TestLinkHandling extends DerbyTestCase {
     handler.createLink(link, getDerbyDatabaseConnection());
 
     assertEquals(1, link.getPersistenceId());
-    assertCountForTable("SQOOP.SQ_CONNECTION", 1);
-    assertCountForTable("SQOOP.SQ_CONNECTION_INPUT", 4);
+    assertCountForTable("SQOOP.SQ_LINK", 1);
+    assertCountForTable("SQOOP.SQ_LINK_INPUT", 2);
 
     MLink retrieved = handler.findLink(1, getDerbyDatabaseConnection());
     assertEquals(1, retrieved.getPersistenceId());
 
-    List<MForm> forms;
-    forms = link.getConnectorPart().getForms();
-    assertEquals("Value1", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value2", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
-
-    forms = link.getFrameworkPart().getForms();
-    assertEquals("Value13", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Value15", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
+    List<MConfig> configs;
+    configs = link.getConnectorLinkConfig().getConfigs();
+    assertEquals("Value1", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Value2", configs.get(1).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
 
     // Let's create second link
     link = getLink();
@@ -154,8 +143,8 @@ public class TestLinkHandling extends DerbyTestCase {
     handler.createLink(link, getDerbyDatabaseConnection());
 
     assertEquals(2, link.getPersistenceId());
-    assertCountForTable("SQOOP.SQ_CONNECTION", 2);
-    assertCountForTable("SQOOP.SQ_CONNECTION_INPUT", 8);
+    assertCountForTable("SQOOP.SQ_LINK", 2);
+    assertCountForTable("SQOOP.SQ_LINK_INPUT", 4);
   }
 
   @Test
@@ -175,44 +164,30 @@ public class TestLinkHandling extends DerbyTestCase {
 
     MLink link = handler.findLink(1, getDerbyDatabaseConnection());
 
-    List<MForm> forms;
-
-    forms = link.getConnectorPart().getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(0).getInputs().get(1)).setValue(null);
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(1).getInputs().get(1)).setValue(null);
+    List<MConfig> configs;
 
-    forms = link.getFrameworkPart().getForms();
-    ((MStringInput)forms.get(0).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(0).getInputs().get(1)).setValue(new HashMap<String, String>()); // inject new map value
-    ((MStringInput)forms.get(1).getInputs().get(0)).setValue("Updated");
-    ((MMapInput)forms.get(1).getInputs().get(1)).setValue(new HashMap<String, String>()); // inject new map value
+    configs = link.getConnectorLinkConfig().getConfigs();
+    ((MStringInput)configs.get(0).getInputs().get(0)).setValue("Updated");
+    ((MMapInput)configs.get(0).getInputs().get(1)).setValue(null);
+    ((MStringInput)configs.get(1).getInputs().get(0)).setValue("Updated");
+    ((MMapInput)configs.get(1).getInputs().get(1)).setValue(null);
 
     link.setName("name");
 
     handler.updateLink(link, getDerbyDatabaseConnection());
 
     assertEquals(1, link.getPersistenceId());
-    assertCountForTable("SQOOP.SQ_CONNECTION", 2);
-    assertCountForTable("SQOOP.SQ_CONNECTION_INPUT", 10);
+    assertCountForTable("SQOOP.SQ_LINK", 2);
+    assertCountForTable("SQOOP.SQ_LINK_INPUT", 6);
 
     MLink retrieved = handler.findLink(1, getDerbyDatabaseConnection());
     assertEquals("name", link.getName());
 
-    forms = retrieved.getConnectorPart().getForms();
-    assertEquals("Updated", forms.get(0).getInputs().get(0).getValue());
-    assertNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals("Updated", forms.get(1).getInputs().get(0).getValue());
-    assertNull(forms.get(1).getInputs().get(1).getValue());
-
-    forms = retrieved.getFrameworkPart().getForms();
-    assertEquals("Updated", forms.get(0).getInputs().get(0).getValue());
-    assertNotNull(forms.get(0).getInputs().get(1).getValue());
-    assertEquals(((Map)forms.get(0).getInputs().get(1).getValue()).size(), 0);
-    assertEquals("Updated", forms.get(1).getInputs().get(0).getValue());
-    assertNotNull(forms.get(1).getInputs().get(1).getValue());
-    assertEquals(((Map)forms.get(1).getInputs().get(1).getValue()).size(), 0);
+    configs = retrieved.getConnectorLinkConfig().getConfigs();
+    assertEquals("Updated", configs.get(0).getInputs().get(0).getValue());
+    assertNull(configs.get(0).getInputs().get(1).getValue());
+    assertEquals("Updated", configs.get(1).getInputs().get(0).getValue());
+    assertNull(configs.get(1).getInputs().get(1).getValue());
   }
 
   @Test
@@ -239,18 +214,15 @@ public class TestLinkHandling extends DerbyTestCase {
     loadLinks();
 
     handler.deleteLink(1, getDerbyDatabaseConnection());
-    assertCountForTable("SQOOP.SQ_CONNECTION", 1);
-    assertCountForTable("SQOOP.SQ_CONNECTION_INPUT", 4);
+    assertCountForTable("SQOOP.SQ_LINK", 1);
+    assertCountForTable("SQOOP.SQ_LINK_INPUT", 4);
 
     handler.deleteLink(2, getDerbyDatabaseConnection());
-    assertCountForTable("SQOOP.SQ_CONNECTION", 0);
-    assertCountForTable("SQOOP.SQ_CONNECTION_INPUT", 0);
+    assertCountForTable("SQOOP.SQ_LINK", 0);
+    assertCountForTable("SQOOP.SQ_LINK_INPUT", 0);
   }
 
   public MLink getLink() {
-    return new MLink(1,
-      handler.findConnector("A", getDerbyDatabaseConnection()).getConnectionForms(),
-      handler.findDriverConfig(getDerbyDatabaseConnection()).getConnectionForms()
-    );
+    return new MLink(1, handler.findConnector("A", getDerbyDatabaseConnection()).getLinkConfig());
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
index cf0944d..8402d8c 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/TestSubmissionHandling.java
@@ -48,7 +48,7 @@ public class TestSubmissionHandling extends DerbyTestCase {
     createSchema();
 
     // We always needs connector and framework structures in place
-    loadConnectorAndDriverConfig();
+    loadConnectorLinkConfig();
 
     // We also always needs connection metadata in place
     loadLinks();

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java b/server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java
index d1b6b9a..7109ae5 100644
--- a/server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/ConnectorRequestHandler.java
@@ -87,7 +87,7 @@ public class ConnectorRequestHandler implements RequestHandler {
       connectors = new LinkedList<MConnector>();
       bundles = new HashMap<Long, ResourceBundle>();
 
-      connectors.add(ConnectorManager.getInstance().getConnectorMetadata(id));
+      connectors.add(ConnectorManager.getInstance().getConnectorConfig(id));
       bundles.put(id, ConnectorManager.getInstance().getResourceBundle(id, locale));
 
       AuditLoggerManager.getInstance()

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/server/src/main/java/org/apache/sqoop/handler/DriverConfigRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/DriverConfigRequestHandler.java b/server/src/main/java/org/apache/sqoop/handler/DriverConfigRequestHandler.java
index c0d363e..aa773a9 100644
--- a/server/src/main/java/org/apache/sqoop/handler/DriverConfigRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/DriverConfigRequestHandler.java
@@ -20,7 +20,7 @@ package org.apache.sqoop.handler;
 import org.apache.log4j.Logger;
 import org.apache.sqoop.audit.AuditLoggerManager;
 import org.apache.sqoop.driver.Driver;
-import org.apache.sqoop.json.DriverConfigBean;
+import org.apache.sqoop.json.DriverBean;
 import org.apache.sqoop.json.JsonBean;
 import org.apache.sqoop.server.RequestContext;
 import org.apache.sqoop.server.RequestHandler;
@@ -40,11 +40,10 @@ public class DriverConfigRequestHandler  implements RequestHandler {
 
   @Override
   public JsonBean handleEvent(RequestContext ctx) {
-    AuditLoggerManager.getInstance()
-        .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
-        "get", "framework", "");
+    AuditLoggerManager.getInstance().logAuditEvent(ctx.getUserName(),
+        ctx.getRequest().getRemoteAddr(), "get", "driverConfig", "");
 
-    return new DriverConfigBean(Driver.getInstance().getDriverConfig(),
-      Driver.getInstance().getBundle(ctx.getAcceptLanguageHeader()));
+    return new DriverBean(Driver.getInstance().getDriver(), Driver.getInstance()
+        .getBundle(ctx.getAcceptLanguageHeader()));
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
index b61d3f5..462579c 100644
--- a/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/JobRequestHandler.java
@@ -17,6 +17,10 @@
  */
 package org.apache.sqoop.handler;
 
+import java.io.IOException;
+import java.util.List;
+import java.util.Locale;
+
 import org.apache.log4j.Logger;
 import org.apache.sqoop.audit.AuditLoggerManager;
 import org.apache.sqoop.common.Direction;
@@ -27,25 +31,24 @@ import org.apache.sqoop.driver.Driver;
 import org.apache.sqoop.json.JobBean;
 import org.apache.sqoop.json.JsonBean;
 import org.apache.sqoop.json.ValidationResultBean;
-import org.apache.sqoop.model.FormUtils;
+import org.apache.sqoop.json.util.ConfigSerialization;
+import org.apache.sqoop.model.ConfigUtils;
+import org.apache.sqoop.model.MDriverConfig;
+import org.apache.sqoop.model.MFromConfig;
 import org.apache.sqoop.model.MJob;
-import org.apache.sqoop.model.MJobForms;
+import org.apache.sqoop.model.MToConfig;
 import org.apache.sqoop.repository.Repository;
 import org.apache.sqoop.repository.RepositoryManager;
 import org.apache.sqoop.server.RequestContext;
 import org.apache.sqoop.server.RequestHandler;
 import org.apache.sqoop.server.common.ServerError;
 import org.apache.sqoop.utils.ClassUtils;
+import org.apache.sqoop.validation.ConfigValidationResult;
+import org.apache.sqoop.validation.ConfigValidationRunner;
 import org.apache.sqoop.validation.Status;
-import org.apache.sqoop.validation.ValidationResult;
-import org.apache.sqoop.validation.ValidationRunner;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.Locale;
-
 /**
  * Job request handler is supporting following resources:
  *
@@ -109,7 +112,7 @@ public class JobRequestHandler implements RequestHandler {
   }
 
   /**
-   * Delete job from metadata repository.
+   * Delete job from  repository.
    *
    * @param ctx Context object
    * @return Empty bean
@@ -129,18 +132,14 @@ public class JobRequestHandler implements RequestHandler {
   }
 
   /**
-   * Update or create job metadata in repository.
+   * Update or create job in repository.
    *
    * @param ctx Context object
    * @return Validation bean object
    */
   private JsonBean createUpdateJob(RequestContext ctx, boolean update) {
-//    Check that given ID equals with sent ID, otherwise report an error UPDATE
-//    String sxid = ctx.getLastURLElement();
-//    long xid = Long.valueOf(sxid);
 
     String username = ctx.getUserName();
-
     JobBean bean = new JobBean();
 
     try {
@@ -157,30 +156,29 @@ public class JobRequestHandler implements RequestHandler {
 
     if(jobs.size() != 1) {
       throw new SqoopException(ServerError.SERVER_0003,
-        "Expected one job metadata but got " + jobs.size());
+        "Expected one job but got " + jobs.size());
     }
 
     // Job object
     MJob job = jobs.get(0);
 
     // Verify that user is not trying to spoof us
-    MJobForms fromConnectorForms = ConnectorManager.getInstance()
-        .getConnectorMetadata(job.getConnectorId(Direction.FROM))
-        .getJobForms(Direction.FROM);
-    MJobForms toConnectorForms = ConnectorManager.getInstance()
-        .getConnectorMetadata(job.getConnectorId(Direction.TO))
-        .getJobForms(Direction.TO);
-    MJobForms frameworkForms = Driver.getInstance().getDriverConfig()
-      .getJobForms();
-
-    if(!fromConnectorForms.equals(job.getConnectorPart(Direction.FROM))
-      || !frameworkForms.equals(job.getFrameworkPart())
-      || !toConnectorForms.equals(job.getConnectorPart(Direction.TO))) {
+    MFromConfig fromConfig = ConnectorManager.getInstance()
+        .getConnectorConfig(job.getConnectorId(Direction.FROM))
+        .getFromConfig();
+    MToConfig toConfig = ConnectorManager.getInstance()
+        .getConnectorConfig(job.getConnectorId(Direction.TO))
+        .getToConfig();
+    MDriverConfig driverConfig = Driver.getInstance().getDriver().getDriverConfig();
+
+    if(!fromConfig.equals(job.getJobConfig(Direction.FROM))
+      || !driverConfig.equals(job.getDriverConfig())
+      || !toConfig.equals(job.getJobConfig(Direction.TO))) {
       throw new SqoopException(ServerError.SERVER_0003,
-        "Detected incorrect form structure");
+        "Detected incorrect config structure");
     }
 
-    // Responsible connector for this session
+    // Corresponding connectors for this
     SqoopConnector fromConnector = ConnectorManager.getInstance().getConnector(job.getConnectorId(Direction.FROM));
     SqoopConnector toConnector = ConnectorManager.getInstance().getConnector(job.getConnectorId(Direction.TO));
 
@@ -194,25 +192,27 @@ public class JobRequestHandler implements RequestHandler {
           + " does not support TO direction.");
     }
 
-    // We need translate forms to configuration objects
-    Object fromConnectorConfig = ClassUtils.instantiate(fromConnector.getJobConfigurationClass(Direction.FROM));
-    Object frameworkConfig = ClassUtils.instantiate(Driver.getInstance().getJobConfigurationClass());
-    Object toConnectorConfig = ClassUtils.instantiate(toConnector.getJobConfigurationClass(Direction.TO));
+    // We need translate configs
+    Object fromConfigObject = ClassUtils.instantiate(fromConnector.getJobConfigurationClass(Direction.FROM));
+    Object toConfigObject = ClassUtils.instantiate(toConnector.getJobConfigurationClass(Direction.TO));
+
+    Object driverConfigObject = ClassUtils.instantiate(Driver.getInstance().getDriverConfigurationGroupClass());
+
+    ConfigUtils.fromConfigs(job.getJobConfig(Direction.FROM).getConfigs(), fromConfigObject);
+    ConfigUtils.fromConfigs(job.getJobConfig(Direction.TO).getConfigs(), toConfigObject);
+    ConfigUtils.fromConfigs(job.getDriverConfig().getConfigs(), driverConfigObject);
 
-    FormUtils.fromForms(job.getConnectorPart(Direction.FROM).getForms(), fromConnectorConfig);
-    FormUtils.fromForms(job.getFrameworkPart().getForms(), frameworkConfig);
-    FormUtils.fromForms(job.getConnectorPart(Direction.TO).getForms(), toConnectorConfig);
+    // Validate all configs
+    ConfigValidationRunner validationRunner = new ConfigValidationRunner();
+    ConfigValidationResult fromConfigvalidator = validationRunner.validate(fromConfigObject);
+    ConfigValidationResult toConfigValidator = validationRunner.validate(toConfigObject);
+    ConfigValidationResult driverConfigValidator = validationRunner.validate(driverConfigObject);
 
-    // Validate all parts
-    ValidationRunner validationRunner = new ValidationRunner();
-    ValidationResult fromConnectorValidation = validationRunner.validate(fromConnectorConfig);
-    ValidationResult frameworkValidation = validationRunner.validate(frameworkConfig);
-    ValidationResult toConnectorValidation = validationRunner.validate(toConnectorConfig);
 
-    Status finalStatus = Status.getWorstStatus(fromConnectorValidation.getStatus(), frameworkValidation.getStatus(), toConnectorValidation.getStatus());
+    Status finalStatus = Status.getWorstStatus(fromConfigvalidator.getStatus(), toConfigValidator.getStatus(), driverConfigValidator.getStatus());
 
     // Return back validations in all cases
-    ValidationResultBean outputBean = new ValidationResultBean(fromConnectorValidation, frameworkValidation, toConnectorValidation);
+    ValidationResultBean validationResultBean = new ValidationResultBean(fromConfigvalidator, toConfigValidator);
 
     // If we're good enough let's perform the action
     if(finalStatus.canProceed()) {
@@ -227,7 +227,7 @@ public class JobRequestHandler implements RequestHandler {
         job.setCreationUser(username);
         job.setLastUpdateUser(username);
         RepositoryManager.getInstance().getRepository().createJob(job);
-        outputBean.setId(job.getPersistenceId());
+        validationResultBean.setId(job.getPersistenceId());
 
         AuditLoggerManager.getInstance()
             .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
@@ -236,7 +236,7 @@ public class JobRequestHandler implements RequestHandler {
 
     }
 
-    return outputBean;
+    return validationResultBean;
   }
 
   private JsonBean getJobs(RequestContext ctx) {
@@ -250,7 +250,7 @@ public class JobRequestHandler implements RequestHandler {
     Locale locale = ctx.getAcceptLanguageHeader();
     Repository repository = RepositoryManager.getInstance().getRepository();
 
-    if (sjid.equals("all")) {
+    if (sjid.equals(ConfigSerialization.ALL)) {
 
       List<MJob> jobs = repository.findJobs();
       bean = new JobBean(jobs);
@@ -269,11 +269,8 @@ public class JobRequestHandler implements RequestHandler {
 
       MJob job = repository.findJob(jid);
       // @TODO(Abe): From/To
-
       long connectorId = job.getConnectorId(Direction.FROM);
-
       bean = new JobBean(job);
-
       bean.addConnectorConfigBundle(connectorId,
         ConnectorManager.getInstance().getResourceBundle(connectorId, locale));
     }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java b/server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java
index 23fc9f1..80e65b8 100644
--- a/server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java
@@ -17,18 +17,21 @@
  */
 package org.apache.sqoop.handler;
 
+import java.io.IOException;
+import java.util.List;
+import java.util.Locale;
+
 import org.apache.log4j.Logger;
 import org.apache.sqoop.audit.AuditLoggerManager;
 import org.apache.sqoop.common.SqoopException;
 import org.apache.sqoop.connector.ConnectorManager;
 import org.apache.sqoop.connector.spi.SqoopConnector;
-import org.apache.sqoop.driver.Driver;
-import org.apache.sqoop.json.LinkBean;
 import org.apache.sqoop.json.JsonBean;
+import org.apache.sqoop.json.LinkBean;
 import org.apache.sqoop.json.ValidationResultBean;
-import org.apache.sqoop.model.FormUtils;
+import org.apache.sqoop.model.ConfigUtils;
 import org.apache.sqoop.model.MLink;
-import org.apache.sqoop.model.MConnectionForms;
+import org.apache.sqoop.model.MLinkConfig;
 import org.apache.sqoop.repository.Repository;
 import org.apache.sqoop.repository.RepositoryManager;
 import org.apache.sqoop.server.RequestContext;
@@ -36,41 +39,37 @@ import org.apache.sqoop.server.RequestHandler;
 import org.apache.sqoop.server.common.ServerError;
 import org.apache.sqoop.utils.ClassUtils;
 import org.apache.sqoop.validation.Status;
-import org.apache.sqoop.validation.ValidationResult;
-import org.apache.sqoop.validation.ValidationRunner;
+import org.apache.sqoop.validation.ConfigValidationResult;
+import org.apache.sqoop.validation.ConfigValidationRunner;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.Locale;
-
 /**
  * Connection request handler is supporting following resources:
  *
- * GET /v1/connection/:xid
- * Return details about one particular connection with id :xid or about all of
+ * GET /v1/link/:xid
+ * Return details about one particular link with id :xid or about all of
  * them if :xid equals to "all".
  *
- * POST /v1/connection
- * Create new connection
+ * POST /v1/link
+ * Create new link
  *
- * PUT /v1/connection/:xid
- * Update connection with id :xid.
+ * PUT /v1/link/:xid
+ * Update link with id :xid.
  *
- * PUT /v1/connection/:xid/enable
- * Enable connection with id :xid
+ * PUT /v1/link/:xid/enable
+ * Enable link with id :xid
  *
- * PUT /v1/connection/:xid/disable
- * Disable connection with id :xid
+ * PUT /v1/link/:xid/disable
+ * Disable link with id :xid
  *
- * DELETE /v1/connection/:xid
- * Remove connection with id :xid
+ * DELETE /v1/link/:xid
+ * Remove link with id :xid
  *
  * Planned resources:
  *
- * GET /v1/connection
- * Get brief list of all connections present in the system.
+ * GET /v1/link
+ * Get brief list of all links present in the system.
  *
  */
 public class LinkRequestHandler implements RequestHandler {
@@ -89,37 +88,37 @@ public class LinkRequestHandler implements RequestHandler {
   public JsonBean handleEvent(RequestContext ctx) {
     switch (ctx.getMethod()) {
       case GET:
-        return getConnections(ctx);
+        return getLink(ctx);
       case POST:
-          return createUpdateConnection(ctx, false);
+          return createUpdateLink(ctx, false);
       case PUT:
         if (ctx.getLastURLElement().equals(ENABLE)) {
-          return enableConnection(ctx, true);
+          return enableLink(ctx, true);
         } else if (ctx.getLastURLElement().equals(DISABLE)) {
-          return enableConnection(ctx, false);
+          return enableLink(ctx, false);
         } else {
-          return createUpdateConnection(ctx, true);
+          return createUpdateLink(ctx, true);
         }
       case DELETE:
-        return deleteConnection(ctx);
+        return deleteLink(ctx);
     }
 
     return null;
   }
 
   /**
-   * Delete connection from metadata repository.
+   * Delete link from thes repository.
    *
    * @param ctx Context object
    * @return Empty bean
    */
-  private JsonBean deleteConnection(RequestContext ctx) {
+  private JsonBean deleteLink(RequestContext ctx) {
     String sxid = ctx.getLastURLElement();
     long xid = Long.valueOf(sxid);
 
     AuditLoggerManager.getInstance()
         .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
-        "delete", "connection", sxid);
+        "delete", "link", sxid);
 
     Repository repository = RepositoryManager.getInstance().getRepository();
     repository.deleteLink(xid);
@@ -128,20 +127,15 @@ public class LinkRequestHandler implements RequestHandler {
   }
 
   /**
-   * Update or create connection metadata in repository.
+   * Update or create link in repository.
    *
    * @param ctx Context object
    * @return Validation bean object
    */
-  private JsonBean createUpdateConnection(RequestContext ctx, boolean update) {
-//    Check that given ID equals with sent ID, otherwise report an error UPDATE
-//    String sxid = ctx.getLastURLElement();
-//    long xid = Long.valueOf(sxid);
+  private JsonBean createUpdateLink(RequestContext ctx, boolean update) {
 
     String username = ctx.getUserName();
-
     LinkBean bean = new LinkBean();
-
     try {
       JSONObject json =
         (JSONObject) JSONValue.parse(ctx.getRequest().getReader());
@@ -152,93 +146,86 @@ public class LinkRequestHandler implements RequestHandler {
         "Can't read request content", e);
     }
 
-    // Get connection object
-    List<MLink> connections = bean.getLinks();
+    // Get link object
+    List<MLink> links = bean.getLinks();
 
-    if(connections.size() != 1) {
+    if(links.size() != 1) {
       throw new SqoopException(ServerError.SERVER_0003,
-        "Expected one connection metadata but got " + connections.size());
+        "Expected one link but got " + links.size());
     }
 
-    MLink connection = connections.get(0);
+    MLink link = links.get(0);
 
     // Verify that user is not trying to spoof us
-    MConnectionForms connectorForms =
-      ConnectorManager.getInstance().getConnectorMetadata(connection.getConnectorId())
-      .getConnectionForms();
-    MConnectionForms frameworkForms = Driver.getInstance().getDriverConfig()
-      .getConnectionForms();
-
-    if(!connectorForms.equals(connection.getConnectorPart())
-      || !frameworkForms.equals(connection.getFrameworkPart())) {
+    MLinkConfig linkConfig =
+      ConnectorManager.getInstance().getConnectorConfig(link.getConnectorId())
+      .getLinkConfig();
+    if(!linkConfig.equals(link.getConnectorLinkConfig())) {
       throw new SqoopException(ServerError.SERVER_0003,
-        "Detected incorrect form structure");
+        "Detected incorrect config structure");
     }
 
     // Responsible connector for this session
-    SqoopConnector connector = ConnectorManager.getInstance().getConnector(connection.getConnectorId());
+    SqoopConnector connector = ConnectorManager.getInstance().getConnector(link.getConnectorId());
 
-    // We need translate forms to configuration objects
-    Object connectorConfig = ClassUtils.instantiate(connector.getLinkConfigurationClass());
-    Object frameworkConfig = ClassUtils.instantiate(Driver.getInstance().getLinkConfigurationClass());
+    // We need translate configs
+    Object connectorLinkConfig = ClassUtils.instantiate(connector.getLinkConfigurationClass());
 
-    FormUtils.fromForms(connection.getConnectorPart().getForms(), connectorConfig);
-    FormUtils.fromForms(connection.getFrameworkPart().getForms(), frameworkConfig);
+    ConfigUtils.fromConfigs(link.getConnectorLinkConfig().getConfigs(), connectorLinkConfig);
 
     // Validate both parts
-    ValidationRunner validationRunner = new ValidationRunner();
-    ValidationResult connectorValidation = validationRunner.validate(connectorConfig);
-    ValidationResult frameworkValidation = validationRunner.validate(frameworkConfig);
+    ConfigValidationRunner validationRunner = new ConfigValidationRunner();
+    ConfigValidationResult connectorLinkValidation = validationRunner.validate(connectorLinkConfig);
 
-    Status finalStatus = Status.getWorstStatus(connectorValidation.getStatus(), frameworkValidation.getStatus());
+    Status finalStatus = Status.getWorstStatus(connectorLinkValidation.getStatus());
 
     // Return back validations in all cases
-    ValidationResultBean outputBean = new ValidationResultBean(connectorValidation, frameworkValidation);
+    ValidationResultBean outputBean = new ValidationResultBean(connectorLinkValidation);
 
     // If we're good enough let's perform the action
     if(finalStatus.canProceed()) {
       if(update) {
         AuditLoggerManager.getInstance()
             .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
-            "update", "connection", String.valueOf(connection.getPersistenceId()));
+            "update", "link", String.valueOf(link.getPersistenceId()));
 
-        connection.setLastUpdateUser(username);
-        RepositoryManager.getInstance().getRepository().updateLink(connection);
+        link.setLastUpdateUser(username);
+        RepositoryManager.getInstance().getRepository().updateLink(link);
       } else {
-        connection.setCreationUser(username);
-        connection.setLastUpdateUser(username);
-        RepositoryManager.getInstance().getRepository().createLink(connection);
-        outputBean.setId(connection.getPersistenceId());
+        link.setCreationUser(username);
+        link.setLastUpdateUser(username);
+        RepositoryManager.getInstance().getRepository().createLink(link);
+        outputBean.setId(link.getPersistenceId());
 
         AuditLoggerManager.getInstance()
             .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
-            "create", "connection", String.valueOf(connection.getPersistenceId()));
+            "create", "link", String.valueOf(link.getPersistenceId()));
       }
     }
 
     return outputBean;
   }
 
-  private JsonBean getConnections(RequestContext ctx) {
+  private JsonBean getLink(RequestContext ctx) {
     String sxid = ctx.getLastURLElement();
     LinkBean bean;
 
     AuditLoggerManager.getInstance()
         .logAuditEvent(ctx.getUserName(), ctx.getRequest().getRemoteAddr(),
-        "get", "connection", sxid);
+        "get", "link", sxid);
 
     Locale locale = ctx.getAcceptLanguageHeader();
     Repository repository = RepositoryManager.getInstance().getRepository();
 
     if (sxid.equals("all")) {
 
-      List<MLink> connections = repository.findLinks();
-      bean = new LinkBean(connections);
+      List<MLink> links = repository.findLinks();
+      bean = new LinkBean(links);
 
       // Add associated resources into the bean
-      for( MLink connection : connections) {
-        long connectorId = connection.getConnectorId();
-        if(!bean.hasConnectorBundle(connectorId)) {
+      for( MLink link : links) {
+        long connectorId = link.getConnectorId();
+        if(!bean.hasConnectorConfigBundle(connectorId)) {
           bean.addConnectorConfigBundle(connectorId,
             ConnectorManager.getInstance().getResourceBundle(connectorId, locale));
         }
@@ -246,21 +233,18 @@ public class LinkRequestHandler implements RequestHandler {
     } else {
       long xid = Long.valueOf(sxid);
 
-      MLink connection = repository.findLink(xid);
-      long connectorId = connection.getConnectorId();
+      MLink link = repository.findLink(xid);
+      long connectorId = link.getConnectorId();
 
-      bean = new LinkBean(connection);
+      bean = new LinkBean(link);
 
       bean.addConnectorConfigBundle(connectorId,
         ConnectorManager.getInstance().getResourceBundle(connectorId, locale));
     }
-
-    // Sent framework resource bundle in all cases
-    bean.setDriverConfigBundle(Driver.getInstance().getBundle(locale));
     return bean;
   }
 
-  private JsonBean enableConnection(RequestContext ctx, boolean enabled) {
+  private JsonBean enableLink(RequestContext ctx, boolean enabled) {
     String[] elements = ctx.getUrlElements();
     String sLinkId = elements[elements.length - 2];
     long linkId = Long.valueOf(sLinkId);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/CloneJobFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/CloneJobFunction.java b/shell/src/main/java/org/apache/sqoop/shell/CloneJobFunction.java
index 97d8e6f..8188831 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/CloneJobFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/CloneJobFunction.java
@@ -24,8 +24,8 @@ import org.apache.sqoop.common.Direction;
 import org.apache.sqoop.model.MJob;
 import org.apache.sqoop.model.MPersistableEntity;
 import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.shell.utils.FormOptions;
-import org.apache.sqoop.shell.utils.JobDynamicFormOptions;
+import org.apache.sqoop.shell.utils.ConfigOptions;
+import org.apache.sqoop.shell.utils.JobDynamicConfigOptions;
 import org.apache.sqoop.validation.Status;
 
 import java.io.IOException;
@@ -33,7 +33,7 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormFiller.*;
+import static org.apache.sqoop.shell.utils.ConfigFiller.*;
 
 /**
  *
@@ -63,11 +63,11 @@ public class CloneJobFunction extends SqoopFunction {
     MJob job = client.getJob(jobId);
     job.setPersistenceId(MPersistableEntity.PERSISTANCE_ID_DEFAULT);
 
-    ResourceBundle fromConnectorBundle = client.getConnectorConfigResourceBundle(
+    ResourceBundle fromConnectorBundle = client.getConnectorConfigBundle(
         job.getConnectorId(Direction.FROM));
-    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
-    ResourceBundle toConnectorBundle = client.getConnectorConfigResourceBundle(
+    ResourceBundle toConnectorBundle = client.getConnectorConfigBundle(
         job.getConnectorId(Direction.TO));
+    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
 
     Status status = Status.FINE;
 
@@ -84,7 +84,7 @@ public class CloneJobFunction extends SqoopFunction {
         }
 
         // Fill in data from user
-        if(!fillJob(reader, job, fromConnectorBundle, driverConfigBundle, toConnectorBundle)) {
+        if(!fillJobWithBundle(reader, job, fromConnectorBundle, toConnectorBundle, driverConfigBundle)) {
           return null;
         }
 
@@ -92,9 +92,9 @@ public class CloneJobFunction extends SqoopFunction {
         status = client.saveJob(job);
       } while(!status.canProceed());
     } else {
-      JobDynamicFormOptions options = new JobDynamicFormOptions();
+      JobDynamicConfigOptions options = new JobDynamicConfigOptions();
       options.prepareOptions(job);
-      CommandLine line = FormOptions.parseOptions(options, 0, args, false);
+      CommandLine line = ConfigOptions.parseOptions(options, 0, args, false);
       if (fillJob(line, job)) {
         status = client.saveJob(job);
         if (!status.canProceed()) {

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/CloneLinkFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/CloneLinkFunction.java b/shell/src/main/java/org/apache/sqoop/shell/CloneLinkFunction.java
index d9babe0..c1a4f55 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/CloneLinkFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/CloneLinkFunction.java
@@ -23,8 +23,8 @@ import org.apache.commons.cli.OptionBuilder;
 import org.apache.sqoop.model.MLink;
 import org.apache.sqoop.model.MPersistableEntity;
 import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.shell.utils.LinkDynamicFormOptions;
-import org.apache.sqoop.shell.utils.FormOptions;
+import org.apache.sqoop.shell.utils.LinkDynamicConfigOptions;
+import org.apache.sqoop.shell.utils.ConfigOptions;
 import org.apache.sqoop.validation.Status;
 
 import java.io.IOException;
@@ -32,7 +32,7 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormFiller.*;
+import static org.apache.sqoop.shell.utils.ConfigFiller.*;
 
 /**
  *
@@ -67,8 +67,7 @@ public class CloneLinkFunction extends SqoopFunction {
 
     Status status = Status.FINE;
 
-    ResourceBundle connectorConfigBundle = client.getConnectorConfigResourceBundle(connection.getConnectorId());
-    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
+    ResourceBundle linkConfigBundle = client.getConnectorConfigBundle(connection.getConnectorId());
 
     if (isInteractive) {
       printlnResource(Constants.RES_PROMPT_UPDATE_LINK_CONFIG);
@@ -80,17 +79,17 @@ public class CloneLinkFunction extends SqoopFunction {
         }
 
         // Fill in data from user
-        if(!fillLink(reader, connection, connectorConfigBundle, driverConfigBundle)) {
+        if(!fillLinkWithBundle(reader, connection, linkConfigBundle)) {
           return null;
         }
 
         status = client.saveLink(connection);
       } while(!status.canProceed());
     } else {
-      LinkDynamicFormOptions options = new LinkDynamicFormOptions();
+      LinkDynamicConfigOptions options = new LinkDynamicConfigOptions();
       options.prepareOptions(connection);
-      CommandLine line = FormOptions.parseOptions(options, 0, args, false);
-      if (fillConnection(line, connection)) {
+      CommandLine line = ConfigOptions.parseOptions(options, 0, args, false);
+      if (fillLink(line, connection)) {
         status = client.saveLink(connection);
         if (!status.canProceed()) {
           printLinkValidationMessages(connection);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/CreateJobFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/CreateJobFunction.java b/shell/src/main/java/org/apache/sqoop/shell/CreateJobFunction.java
index ccfed31..0d3d2b5 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/CreateJobFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/CreateJobFunction.java
@@ -23,9 +23,9 @@ import org.apache.commons.cli.OptionBuilder;
 import org.apache.sqoop.common.Direction;
 import org.apache.sqoop.model.MJob;
 import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.shell.utils.FormDisplayer;
-import org.apache.sqoop.shell.utils.FormOptions;
-import org.apache.sqoop.shell.utils.JobDynamicFormOptions;
+import org.apache.sqoop.shell.utils.ConfigDisplayer;
+import org.apache.sqoop.shell.utils.ConfigOptions;
+import org.apache.sqoop.shell.utils.JobDynamicConfigOptions;
 import org.apache.sqoop.validation.Status;
 
 import java.io.IOException;
@@ -33,7 +33,7 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormFiller.*;
+import static org.apache.sqoop.shell.utils.ConfigFiller.*;
 
 /**
  * Handles creation of new job objects.
@@ -67,16 +67,16 @@ public class CreateJobFunction extends  SqoopFunction {
                      isInteractive);
   }
 
-  private Status createJob(Long fromConnectionId, Long toConnectionId, List<String> args, boolean isInteractive) throws IOException {
-    printlnResource(Constants.RES_CREATE_CREATING_JOB, fromConnectionId, toConnectionId);
+  private Status createJob(Long fromLinkId, Long toLinkId, List<String> args, boolean isInteractive) throws IOException {
+    printlnResource(Constants.RES_CREATE_CREATING_JOB, fromLinkId, toLinkId);
 
     ConsoleReader reader = new ConsoleReader();
-    MJob job = client.createJob(fromConnectionId, toConnectionId);
+    MJob job = client.createJob(fromLinkId, toLinkId);
 
     // @TODO(Abe): From/To.
-    ResourceBundle fromConnectorBundle = client.getConnectorConfigResourceBundle(
+    ResourceBundle fromConfigBundle = client.getConnectorConfigBundle(
         job.getConnectorId(Direction.FROM));
-    ResourceBundle toConnectorBundle = client.getConnectorConfigResourceBundle(
+    ResourceBundle toConfigBundle = client.getConnectorConfigBundle(
         job.getConnectorId(Direction.TO));
     ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
 
@@ -92,7 +92,7 @@ public class CreateJobFunction extends  SqoopFunction {
         }
 
         // Fill in data from user
-        if(!fillJob(reader, job, fromConnectorBundle, driverConfigBundle, toConnectorBundle)) {
+        if(!fillJobWithBundle(reader, job, fromConfigBundle, toConfigBundle, driverConfigBundle)) {
           return null;
         }
 
@@ -100,9 +100,9 @@ public class CreateJobFunction extends  SqoopFunction {
         status = client.saveJob(job);
       } while(!status.canProceed());
     } else {
-      JobDynamicFormOptions options = new JobDynamicFormOptions();
+      JobDynamicConfigOptions options = new JobDynamicConfigOptions();
       options.prepareOptions(job);
-      CommandLine line = FormOptions.parseOptions(options, 0, args, false);
+      CommandLine line = ConfigOptions.parseOptions(options, 0, args, false);
       if (fillJob(line, job)) {
         status = client.saveJob(job);
         if (!status.canProceed()) {
@@ -115,7 +115,7 @@ public class CreateJobFunction extends  SqoopFunction {
       }
     }
 
-    FormDisplayer.displayFormWarning(job);
+    ConfigDisplayer.displayConfigWarning(job);
     printlnResource(Constants.RES_CREATE_JOB_SUCCESSFUL, status.name(), job.getPersistenceId());
 
     return status;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/CreateLinkFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/CreateLinkFunction.java b/shell/src/main/java/org/apache/sqoop/shell/CreateLinkFunction.java
index 33d60c8..ce9988f 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/CreateLinkFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/CreateLinkFunction.java
@@ -22,9 +22,9 @@ import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.OptionBuilder;
 import org.apache.sqoop.model.MLink;
 import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.shell.utils.LinkDynamicFormOptions;
-import org.apache.sqoop.shell.utils.FormDisplayer;
-import org.apache.sqoop.shell.utils.FormOptions;
+import org.apache.sqoop.shell.utils.LinkDynamicConfigOptions;
+import org.apache.sqoop.shell.utils.ConfigDisplayer;
+import org.apache.sqoop.shell.utils.ConfigOptions;
 import org.apache.sqoop.validation.Status;
 
 import java.io.IOException;
@@ -32,7 +32,7 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormFiller.*;
+import static org.apache.sqoop.shell.utils.ConfigFiller.*;
 
 /**
  *
@@ -62,11 +62,9 @@ public class CreateLinkFunction extends SqoopFunction {
 
     MLink link = client.createLink(connectorId);
 
-    ResourceBundle connectorConfigBundle = client.getConnectorConfigResourceBundle(connectorId);
-    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
+    ResourceBundle connectorConfigBundle = client.getConnectorConfigBundle(connectorId);
 
     Status status = Status.FINE;
-
     if (isInteractive) {
       printlnResource(Constants.RES_PROMPT_FILL_LINK_CONFIG);
 
@@ -77,7 +75,7 @@ public class CreateLinkFunction extends SqoopFunction {
         }
 
         // Fill in data from user
-        if(!fillLink(reader, link, connectorConfigBundle, driverConfigBundle)) {
+        if(!fillLinkWithBundle(reader, link, connectorConfigBundle)) {
           return null;
         }
 
@@ -85,10 +83,10 @@ public class CreateLinkFunction extends SqoopFunction {
         status = client.saveLink(link);
       } while(!status.canProceed());
     } else {
-      LinkDynamicFormOptions options = new LinkDynamicFormOptions();
+      LinkDynamicConfigOptions options = new LinkDynamicConfigOptions();
       options.prepareOptions(link);
-      CommandLine line = FormOptions.parseOptions(options, 0, args, false);
-      if (fillConnection(line, link)) {
+      CommandLine line = ConfigOptions.parseOptions(options, 0, args, false);
+      if (fillLink(line, link)) {
         status = client.saveLink(link);
         if (!status.canProceed()) {
           printLinkValidationMessages(link);
@@ -100,7 +98,7 @@ public class CreateLinkFunction extends SqoopFunction {
       }
     }
 
-    FormDisplayer.displayFormWarning(link);
+    ConfigDisplayer.displayConfigWarning(link);
     printlnResource(Constants.RES_CREATE_LINK_SUCCESSFUL, status.name(), link.getPersistenceId());
 
     return status;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/ShowCommand.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/ShowCommand.java b/shell/src/main/java/org/apache/sqoop/shell/ShowCommand.java
index 28bc752..329b4d6 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/ShowCommand.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/ShowCommand.java
@@ -31,7 +31,7 @@ public class ShowCommand extends SqoopCommand {
         .put(Constants.FN_SERVER, ShowServerFunction.class)
         .put(Constants.FN_VERSION, ShowVersionFunction.class)
         .put(Constants.FN_CONNECTOR, ShowConnectorFunction.class)
-        .put(Constants.FN_DRIVER_CONFIG, ShowDriverConfigFunction.class)
+        .put(Constants.FN_DRIVER_CONFIG, ShowDriverFunction.class)
         .put(Constants.FN_LINK, ShowLinkFunction.class)
         .put(Constants.FN_JOB, ShowJobFunction.class)
         .put(Constants.FN_SUBMISSION, ShowSubmissionFunction.class)

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java b/shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java
index 2ba75b4..09fb195 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java
@@ -31,7 +31,7 @@ import org.apache.sqoop.shell.utils.TableDisplayer;
 import org.apache.sqoop.validation.Status;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormDisplayer.*;
+import static org.apache.sqoop.shell.utils.ConfigDisplayer.*;
 
 @SuppressWarnings("serial")
 public class ShowConnectorFunction extends SqoopFunction {
@@ -115,7 +115,7 @@ public class ShowConnectorFunction extends SqoopFunction {
       connector.getVersion(),
       getSupportedDirections(connector)
     );
-    displayFormMetadataDetails(connector, client.getConnectorConfigResourceBundle(connector.getPersistenceId()));
+    displayConnectorConfigDetails(connector, client.getConnectorConfigBundle(connector.getPersistenceId()));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/ShowDriverConfigFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/ShowDriverConfigFunction.java b/shell/src/main/java/org/apache/sqoop/shell/ShowDriverConfigFunction.java
deleted file mode 100644
index e6e1004..0000000
--- a/shell/src/main/java/org/apache/sqoop/shell/ShowDriverConfigFunction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sqoop.shell;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.sqoop.model.MDriverConfig;
-import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.validation.Status;
-
-import java.util.ResourceBundle;
-
-import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormDisplayer.*;
-
-/**
- *
- */
-@SuppressWarnings("serial")
-public class ShowDriverConfigFunction extends SqoopFunction {
-  public ShowDriverConfigFunction() {
-  }
-
-  @Override
-  public boolean validateArgs(CommandLine line) {
-    if (line.getArgs().length != 0) {
-      printlnResource(Constants.RES_SHOW_DRIVER_CONFIG_USAGE);
-      return false;
-    }
-    return true;
-  }
-
-  @Override
-  public Object executeFunction(CommandLine line, boolean isInteractive) {
-    showFramework();
-    return Status.FINE;
-  }
-
-  private void showFramework() {
-    MDriverConfig framework = client.getDriverConfig();
-    ResourceBundle bundle = client.getDriverConfigBundle();
-
-    printlnResource(Constants.RES_SHOW_PROMPT_DRIVER_CONFIG_OPTS, framework.getPersistenceId());
-    displayFormMetadataDetails(framework, bundle);
-  }
-}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/ShowDriverFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/ShowDriverFunction.java b/shell/src/main/java/org/apache/sqoop/shell/ShowDriverFunction.java
new file mode 100644
index 0000000..080792b
--- /dev/null
+++ b/shell/src/main/java/org/apache/sqoop/shell/ShowDriverFunction.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sqoop.shell;
+
+import static org.apache.sqoop.shell.ShellEnvironment.client;
+import static org.apache.sqoop.shell.ShellEnvironment.printlnResource;
+import static org.apache.sqoop.shell.utils.ConfigDisplayer.displayDriverConfigDetails;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.sqoop.shell.core.Constants;
+import org.apache.sqoop.validation.Status;
+
+/**
+ *
+ */
+@SuppressWarnings("serial")
+public class ShowDriverFunction extends SqoopFunction {
+  public ShowDriverFunction() {
+  }
+
+  @Override
+  public boolean validateArgs(CommandLine line) {
+    if (line.getArgs().length != 0) {
+      printlnResource(Constants.RES_SHOW_DRIVER_CONFIG_USAGE);
+      return false;
+    }
+    return true;
+  }
+
+  @Override
+  public Object executeFunction(CommandLine line, boolean isInteractive) {
+    showDriver();
+    return Status.FINE;
+  }
+
+  private void showDriver() {
+    printlnResource(Constants.RES_SHOW_PROMPT_DRIVER_CONFIG_OPTS, client.getDriver().getPersistenceId());
+    displayDriverConfigDetails(client.getDriverConfig(), client.getDriverConfigBundle());
+  }
+}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java b/shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java
index e3f1f47..0640283 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java
@@ -30,7 +30,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormDisplayer.*;
+import static org.apache.sqoop.shell.utils.ConfigDisplayer.*;
 
 /**
  *
@@ -124,12 +124,11 @@ public class ShowJobFunction extends SqoopFunction {
         job.getLinkId(Direction.FROM),
         job.getConnectorId(Direction.FROM));
 
-    // Display connector part
-    displayForms(job.getConnectorPart(Direction.FROM).getForms(),
-                 client.getConnectorConfigResourceBundle(job.getConnectorId(Direction.FROM)));
-    displayForms(job.getFrameworkPart().getForms(),
+    displayConfig(job.getJobConfig(Direction.FROM).getConfigs(),
+                 client.getConnectorConfigBundle(job.getConnectorId(Direction.FROM)));
+    displayConfig(job.getDriverConfig().getConfigs(),
                  client.getDriverConfigBundle());
-    displayForms(job.getConnectorPart(Direction.TO).getForms(),
-                 client.getConnectorConfigResourceBundle(job.getConnectorId(Direction.TO)));
+    displayConfig(job.getJobConfig(Direction.TO).getConfigs(),
+                 client.getConnectorConfigBundle(job.getConnectorId(Direction.TO)));
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java b/shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java
index f500b9e..f4eae33 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java
@@ -29,7 +29,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormDisplayer.*;
+import static org.apache.sqoop.shell.utils.ConfigDisplayer.*;
 
 /**
  *
@@ -103,26 +103,24 @@ public class ShowLinkFunction extends SqoopFunction {
     displayLink(link);
   }
 
-  private void displayLink(MLink connection) {
+  private void displayLink(MLink link) {
     DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
 
     printlnResource(Constants.RES_SHOW_PROMPT_LINK_INFO,
-      connection.getPersistenceId(),
-      connection.getName(),
-      connection.getEnabled(),
-      connection.getCreationUser(),
-      formatter.format(connection.getCreationDate()),
-      connection.getLastUpdateUser(),
-      formatter.format(connection.getLastUpdateDate())
+      link.getPersistenceId(),
+      link.getName(),
+      link.getEnabled(),
+      link.getCreationUser(),
+      formatter.format(link.getCreationDate()),
+      link.getLastUpdateUser(),
+      formatter.format(link.getLastUpdateDate())
     );
 
-    long connectorId = connection.getConnectorId();
+    long connectorId = link.getConnectorId();
     printlnResource(Constants.RES_SHOW_PROMPT_LINK_CID_INFO, connectorId);
 
-    // Display connector part
-    displayForms(connection.getConnectorPart().getForms(),
-                 client.getConnectorConfigResourceBundle(connectorId));
-    displayForms(connection.getFrameworkPart().getForms(),
-                 client.getDriverConfigBundle());
+    // Display link config
+    displayConfig(link.getConnectorLinkConfig().getConfigs(),
+                 client.getConnectorConfigBundle(connectorId));
   }
 }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/SqoopFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/SqoopFunction.java b/shell/src/main/java/org/apache/sqoop/shell/SqoopFunction.java
index 5d69c2a..0845d8e 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/SqoopFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/SqoopFunction.java
@@ -25,7 +25,7 @@ import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Options;
 import org.apache.sqoop.common.SqoopException;
 import org.apache.sqoop.shell.core.ShellError;
-import org.apache.sqoop.shell.utils.FormOptions;
+import org.apache.sqoop.shell.utils.ConfigOptions;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
 
@@ -44,7 +44,7 @@ abstract public class SqoopFunction extends Options {
   }
 
   public Object execute(List<String> args) {
-    CommandLine line = FormOptions.parseOptions(this, 1, args, true);
+    CommandLine line = ConfigOptions.parseOptions(this, 1, args, true);
 
     try {
       if (validateArgs(line)) {

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/UpdateJobFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/UpdateJobFunction.java b/shell/src/main/java/org/apache/sqoop/shell/UpdateJobFunction.java
index 96d1fd8..dd075d7 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/UpdateJobFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/UpdateJobFunction.java
@@ -23,9 +23,9 @@ import org.apache.commons.cli.OptionBuilder;
 import org.apache.sqoop.common.Direction;
 import org.apache.sqoop.model.MJob;
 import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.shell.utils.FormDisplayer;
-import org.apache.sqoop.shell.utils.FormOptions;
-import org.apache.sqoop.shell.utils.JobDynamicFormOptions;
+import org.apache.sqoop.shell.utils.ConfigDisplayer;
+import org.apache.sqoop.shell.utils.ConfigOptions;
+import org.apache.sqoop.shell.utils.JobDynamicConfigOptions;
 import org.apache.sqoop.validation.Status;
 
 import java.io.IOException;
@@ -33,7 +33,7 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormFiller.*;
+import static org.apache.sqoop.shell.utils.ConfigFiller.*;
 
 /**
  *
@@ -57,18 +57,19 @@ public class UpdateJobFunction extends SqoopFunction {
   }
 
   private Status updateJob(Long jobId, List<String> args, boolean isInteractive) throws IOException {
-    printlnResource(Constants.RES_UPDATE_UPDATING_JOB, jobId);
+    printlnResource(Constants.RES_SQOOP_UPDATING_JOB, jobId);
 
     ConsoleReader reader = new ConsoleReader();
 
     MJob job = client.getJob(jobId);
 
-    ResourceBundle fromConnectorBundle = client.getConnectorConfigResourceBundle(
+    ResourceBundle fromConnectorBundle = client.getConnectorConfigBundle(
         job.getConnectorId(Direction.FROM));
-    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
-    ResourceBundle toConnectorBundle = client.getConnectorConfigResourceBundle(
+    ResourceBundle toConnectorBundle = client.getConnectorConfigBundle(
         job.getConnectorId(Direction.TO));
 
+    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
+
     Status status = Status.FINE;
 
     if (isInteractive) {
@@ -81,7 +82,7 @@ public class UpdateJobFunction extends SqoopFunction {
         }
 
         // Fill in data from user
-        if(!fillJob(reader, job, fromConnectorBundle, driverConfigBundle, toConnectorBundle)) {
+        if(!fillJobWithBundle(reader, job, fromConnectorBundle, toConnectorBundle, driverConfigBundle)) {
           return status;
         }
 
@@ -89,9 +90,9 @@ public class UpdateJobFunction extends SqoopFunction {
         status = client.updateJob(job);
       } while(!status.canProceed());
     } else {
-      JobDynamicFormOptions options = new JobDynamicFormOptions();
+      JobDynamicConfigOptions options = new JobDynamicConfigOptions();
       options.prepareOptions(job);
-      CommandLine line = FormOptions.parseOptions(options, 0, args, false);
+      CommandLine line = ConfigOptions.parseOptions(options, 0, args, false);
       if (fillJob(line, job)) {
         status = client.updateJob(job);
         if (!status.canProceed()) {
@@ -104,7 +105,7 @@ public class UpdateJobFunction extends SqoopFunction {
       }
     }
 
-    FormDisplayer.displayFormWarning(job);
+    ConfigDisplayer.displayConfigWarning(job);
     printlnResource(Constants.RES_UPDATE_JOB_SUCCESSFUL, status.name());
 
     return status;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/UpdateLinkFunction.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/UpdateLinkFunction.java b/shell/src/main/java/org/apache/sqoop/shell/UpdateLinkFunction.java
index 30bb63e..d5ead38 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/UpdateLinkFunction.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/UpdateLinkFunction.java
@@ -22,9 +22,9 @@ import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.OptionBuilder;
 import org.apache.sqoop.model.MLink;
 import org.apache.sqoop.shell.core.Constants;
-import org.apache.sqoop.shell.utils.LinkDynamicFormOptions;
-import org.apache.sqoop.shell.utils.FormDisplayer;
-import org.apache.sqoop.shell.utils.FormOptions;
+import org.apache.sqoop.shell.utils.LinkDynamicConfigOptions;
+import org.apache.sqoop.shell.utils.ConfigDisplayer;
+import org.apache.sqoop.shell.utils.ConfigOptions;
 import org.apache.sqoop.validation.Status;
 
 import java.io.IOException;
@@ -32,7 +32,7 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import static org.apache.sqoop.shell.ShellEnvironment.*;
-import static org.apache.sqoop.shell.utils.FormFiller.*;
+import static org.apache.sqoop.shell.utils.ConfigFiller.*;
 
 /**
  *
@@ -56,14 +56,13 @@ public class UpdateLinkFunction extends SqoopFunction {
   }
 
   private Status updateLink(Long linkId, List<String> args, boolean isInteractive) throws IOException {
-    printlnResource(Constants.RES_UPDATE_UPDATING_LINK, linkId);
+    printlnResource(Constants.RES_SQOOP_UPDATING_LINK, linkId);
 
     ConsoleReader reader = new ConsoleReader();
 
     MLink link = client.getLink(linkId);
 
-    ResourceBundle connectorConfigBundle = client.getConnectorConfigResourceBundle(link.getConnectorId());
-    ResourceBundle driverConfigBundle = client.getDriverConfigBundle();
+    ResourceBundle connectorLinkConfigBundle = client.getConnectorConfigBundle(link.getConnectorId());
 
     Status status = Status.FINE;
 
@@ -77,7 +76,7 @@ public class UpdateLinkFunction extends SqoopFunction {
         }
 
         // Fill in data from user
-        if(!fillLink(reader, link, connectorConfigBundle, driverConfigBundle)) {
+        if(!fillLinkWithBundle(reader, link, connectorLinkConfigBundle)) {
           return null;
         }
 
@@ -85,10 +84,10 @@ public class UpdateLinkFunction extends SqoopFunction {
         status = client.updateLink(link);
       } while(!status.canProceed());
     } else {
-      LinkDynamicFormOptions options = new LinkDynamicFormOptions();
+      LinkDynamicConfigOptions options = new LinkDynamicConfigOptions();
       options.prepareOptions(link);
-      CommandLine line = FormOptions.parseOptions(options, 0, args, false);
-      if (fillConnection(line, link)) {
+      CommandLine line = ConfigOptions.parseOptions(options, 0, args, false);
+      if (fillLink(line, link)) {
         status = client.updateLink(link);
         if (!status.canProceed()) {
           printLinkValidationMessages(link);
@@ -99,7 +98,7 @@ public class UpdateLinkFunction extends SqoopFunction {
         return null;
       }
     }
-    FormDisplayer.displayFormWarning(link);
+    ConfigDisplayer.displayConfigWarning(link);
     printlnResource(Constants.RES_UPDATE_LINK_SUCCESSFUL, status.name());
 
     return status;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/8362c73c/shell/src/main/java/org/apache/sqoop/shell/core/Constants.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/sqoop/shell/core/Constants.java b/shell/src/main/java/org/apache/sqoop/shell/core/Constants.java
index 4d3838c..a1bc5d5 100644
--- a/shell/src/main/java/org/apache/sqoop/shell/core/Constants.java
+++ b/shell/src/main/java/org/apache/sqoop/shell/core/Constants.java
@@ -1,7 +1,7 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
+ * distributed with this work for additional inconfigation
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
@@ -316,11 +316,11 @@ public class Constants {
   public static final String RES_SQOOP_PROMPT_SHELL_LOADEDRC =
       "sqoop.prompt_shell_loadedrc";
 
-  public static final String RES_UPDATE_UPDATING_LINK =
+  public static final String RES_SQOOP_UPDATING_LINK =
       "update.link";
   public static final String RES_UPDATE_LINK_SUCCESSFUL =
       "update.link_successful";
-  public static final String RES_UPDATE_UPDATING_JOB =
+  public static final String RES_SQOOP_UPDATING_JOB =
       "update.job";
   public static final String RES_UPDATE_JOB_SUCCESSFUL =
       "update.job_successful";
@@ -352,35 +352,35 @@ public class Constants {
   public static final String RES_TABLE_HEADER_ENABLED =
       "table.header.enabled";
 
-  public static final String RES_FORMDISPLAYER_CONNECTION =
-      "formdisplayer.link";
-  public static final String RES_FORMDISPLAYER_JOB =
-      "formdisplayer.job";
-  public static final String RES_FORMDISPLAYER_FORM =
-      "formdisplayer.form";
-  public static final String RES_FORMDISPLAYER_NAME =
-      "formdisplayer.name";
-  public static final String RES_FORMDISPLAYER_LABEL =
-      "formdisplayer.label";
-  public static final String RES_FORMDISPLAYER_HELP =
-      "formdisplayer.help";
-  public static final String RES_FORMDISPLAYER_INPUT =
-      "formdisplayer.input";
-  public static final String RES_FORMDISPLAYER_TYPE =
-      "formdisplayer.type";
-  public static final String RES_FORMDISPLAYER_SENSITIVE =
-      "formdisplayer.sensitive";
-  public static final String RES_FORMDISPLAYER_SIZE =
-      "formdisplayer.size";
-  public static final String RES_FORMDISPLAYER_POSSIBLE_VALUES =
-      "formdisplayer.possible_values";
-  public static final String RES_FORMDISPLAYER_UNSUPPORTED_DATATYPE =
-      "formdisplayer.unsupported_datatype";
-  public static final String RES_FORMDISPLAYER_INPUT_SENSITIVE =
-      "formdisplayer.input_sensitive";
-
-  public static final String RES_FORMDISPLAYER_FORM_WARNING =
-      "formdisplayer.warning_message";
+  public static final String RES_CONFIG_DISPLAYER_LINK =
+      "config.displayer.link";
+  public static final String RES_CONFIG_DISPLAYER_JOB =
+      "config.displayer.job";
+  public static final String RES_CONFIG_DISPLAYER_CONFIG =
+      "config.displayer.config";
+  public static final String RES_CONFIG_DISPLAYER_NAME =
+      "config.displayer.name";
+  public static final String RES_CONFIG_DISPLAYER_LABEL =
+      "config.displayer.label";
+  public static final String RES_CONFIG_DISPLAYER_HELP =
+      "config.displayer.help";
+  public static final String RES_CONFIG_DISPLAYER_INPUT =
+      "config.displayer.input";
+  public static final String RES_CONFIG_DISPLAYER_TYPE =
+      "config.displayer.type";
+  public static final String RES_CONFIG_DISPLAYER_SENSITIVE =
+      "config.displayer.sensitive";
+  public static final String RES_CONFIG_DISPLAYER_SIZE =
+      "config.displayer.size";
+  public static final String RES_CONFIG_DISPLAYER_POSSIBLE_VALUES =
+      "config.displayer.possible_values";
+  public static final String RES_CONFIG_DISPLAYER_UNSUPPORTED_DATATYPE =
+      "config.displayer.unsupported_datatype";
+  public static final String RES_CONFIG_DISPLAYER_INPUT_SENSITIVE =
+      "config.displayer.input_sensitive";
+
+  public static final String RES_CONFIG_DISPLAYER_FORM_WARNING =
+      "config.displayer.warning_message";
 
   public static final String RES_SUBMISSION_SUBMISSION_DETAIL =
       "submission.submission_detail";


Mime
View raw message