From da28f7e2913554eb3fdedd31e6b0ae1128d56a87 Mon Sep 17 00:00:00 2001
From: Jochen Raymaekers <jochen.raymaekers@is4u.be>
Date: Wed, 24 Apr 2013 08:48:53 +0000
Subject: [PATCH] Remove source files of the User Interface

---
 /dev/null |  325 ------------------------------------------------------
 1 files changed, 0 insertions(+), 325 deletions(-)

diff --git a/opendj-sdk/opendj3/opendj-virtual/src/test/java/org/forgerock/opendj/virtual/GUI.java b/opendj-sdk/opendj3/opendj-virtual/src/test/java/org/forgerock/opendj/virtual/GUI.java
deleted file mode 100644
index 210720d..0000000
--- a/opendj-sdk/opendj3/opendj-virtual/src/test/java/org/forgerock/opendj/virtual/GUI.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2010 Sun Microsystems, Inc.
- *      Portions copyright 2011 ForgeRock AS
- */
-
-package org.forgerock.opendj.virtual;
-
-import java.awt.Font;
-import java.awt.event.*;
-import java.sql.SQLException;
-
-import javax.swing.*;
-import javax.swing.UIManager.LookAndFeelInfo;
-import javax.swing.border.Border;
-import javax.swing.border.EtchedBorder;
-
-import org.forgerock.opendj.ldap.Connection;
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.ErrorResultIOException;
-import org.forgerock.opendj.ldap.LDAPConnectionFactory;
-import org.forgerock.opendj.ldap.SearchResultReferenceIOException;
-
-public class GUI implements ActionListener{
-  //Definition of global values and items that are part of the GUI.
-  static JFrame frame = new JFrame("Login Screen");
-  
-  private JPanel totalGUI;
-  private JLabel label, label_1, label_2, label_3, label_4, label_5, label_6, lblBasedn, label_8, label_9, lblDirectory, lblDatabase;
-  private JPanel buttonPane;
-  private JButton btnLogin, btnCancel;
-  private Border loweredetched;
-  
-  //login pane Normal
-  private JPanel loginPane;
-  private JTextField txtHost, txtPort, txtDatabaseName, txtUsername;
-  private JPasswordField txtPassword;
-
-  //login pane Ldap
-  private JPanel loginPaneLdap;
-  private JTextField txtHostLdap, txtPortLdap,txtBaseDN,txtUsernameLdap;
-  private JPasswordField txtPasswordLdap;
-
-  public JPanel createContentPane (){
-    totalGUI = new JPanel();
-    totalGUI.setLayout(null);
-    
-    loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
-    
-    buttonPane = new JPanel();
-    buttonPane.setLayout(null);
-    buttonPane.setBounds(295, 221, 284, 30);
-    totalGUI.add(buttonPane);
-
-    btnLogin = new JButton("Login");
-    btnLogin.setBounds(14, 0, 120, 30);
-    btnLogin.addActionListener(this);
-    buttonPane.add(btnLogin);
-
-    btnCancel = new JButton("Cancel");
-    btnCancel.setBounds(148, 0, 120, 30);
-    btnCancel.addActionListener(this);
-    buttonPane.add(btnCancel);
-
-    loginPane = new JPanel();
-    loginPane.setLayout(null);
-    loginPane.setBounds(6, 6, 285, 203);
-    loginPane.setBorder(loweredetched);
-    totalGUI.add(loginPane);
-
-    label = new JLabel("Host");
-    label.setBounds(11, 43, 99, 30);
-    loginPane.add(label);
-
-    txtHost = new JTextField();
-    txtHost.setColumns(10);
-    txtHost.setBounds(114, 43, 165, 30);
-    loginPane.add(txtHost);
-
-    label_1 = new JLabel("Port");
-    label_1.setBounds(11, 74, 99, 30);
-    loginPane.add(label_1);
-
-    txtPort = new JTextField();
-    txtPort.setColumns(10);
-    txtPort.setBounds(114, 73, 165, 30);
-    loginPane.add(txtPort);
-
-    label_2 = new JLabel("DatabaseName");
-    label_2.setBounds(11, 104, 99, 30);
-    loginPane.add(label_2);
-
-    txtDatabaseName = new JTextField();
-    txtDatabaseName.setColumns(10);
-    txtDatabaseName.setBounds(114, 103, 165, 30);
-    loginPane.add(txtDatabaseName);
-
-    label_3 = new JLabel("Username");
-    label_3.setBounds(11, 135, 99, 30);
-    loginPane.add(label_3);
-
-    txtUsername = new JTextField();
-    txtUsername.setColumns(10);
-    txtUsername.setBounds(114, 133, 165, 30);
-    loginPane.add(txtUsername);
-
-    label_4 = new JLabel("Password");
-    label_4.setBounds(11, 166, 99, 30);
-    loginPane.add(label_4);
-
-    txtPassword = new JPasswordField();
-    txtPassword.setBounds(114, 163, 165, 30);
-    loginPane.add(txtPassword);
-
-    loginPaneLdap = new JPanel();
-    loginPaneLdap.setLayout(null);
-    loginPaneLdap.setBounds(295, 6, 285, 203);
-    loginPaneLdap.setBorder(loweredetched);
-    totalGUI.add(loginPaneLdap);
-
-    label_5 = new JLabel("Host");
-    label_5.setHorizontalAlignment(SwingConstants.LEFT);
-    label_5.setBounds(11, 43, 90, 30);
-    loginPaneLdap.add(label_5);
-
-    txtHostLdap = new JTextField();
-    txtHostLdap.setColumns(10);
-    txtHostLdap.setBounds(114, 43, 165, 30);
-    loginPaneLdap.add(txtHostLdap);
-
-    label_6 = new JLabel("Port");
-    label_6.setHorizontalAlignment(SwingConstants.LEFT);
-    label_6.setBounds(11, 74, 90, 30);
-    loginPaneLdap.add(label_6);
-
-    txtPortLdap = new JTextField();
-    txtPortLdap.setColumns(10);
-    txtPortLdap.setBounds(114, 73, 165, 30);
-    loginPaneLdap.add(txtPortLdap);
-
-    lblBasedn = new JLabel("BaseDN");
-    lblBasedn.setHorizontalAlignment(SwingConstants.LEFT);
-    lblBasedn.setBounds(11, 104, 90, 30);
-    loginPaneLdap.add(lblBasedn);
-
-    txtBaseDN = new JTextField();
-    txtBaseDN.setColumns(10);
-    txtBaseDN.setBounds(114, 103, 165, 30);
-    loginPaneLdap.add(txtBaseDN);
-
-    label_8 = new JLabel("Username");
-    label_8.setHorizontalAlignment(SwingConstants.LEFT);
-    label_8.setBounds(11, 135, 90, 30);
-    loginPaneLdap.add(label_8);
-
-    txtUsernameLdap = new JTextField();
-    txtUsernameLdap.setColumns(10);
-    txtUsernameLdap.setBounds(114, 133, 165, 30);
-    loginPaneLdap.add(txtUsernameLdap);
-
-    label_9 = new JLabel("Password");
-    label_9.setHorizontalAlignment(SwingConstants.LEFT);
-    label_9.setBounds(11, 166, 90, 30);
-    loginPaneLdap.add(label_9);
-
-    txtPasswordLdap = new JPasswordField();
-    txtPasswordLdap.setBounds(114, 163, 165, 30);
-    loginPaneLdap.add(txtPasswordLdap);
-    
-    lblDatabase = new JLabel("Database");
-    lblDatabase.setHorizontalAlignment(SwingConstants.CENTER);
-    lblDatabase.setFont(lblDatabase.getFont().deriveFont(lblDatabase.getFont().getStyle() | Font.BOLD, lblDatabase.getFont().getSize() + 2f));
-    lblDatabase.setBounds(1, 6, 270, 16);
-    loginPane.add(lblDatabase);
-    
-    lblDirectory = new JLabel("Directory");
-    lblDirectory.setHorizontalAlignment(SwingConstants.CENTER);
-    lblDirectory.setFont(lblDirectory.getFont().deriveFont(lblDirectory.getFont().getStyle() | Font.BOLD, lblDirectory.getFont().getSize() + 2f));
-    lblDirectory.setBounds(1, 6, 270, 16);
-    loginPaneLdap.add(lblDirectory);
-
-    txtHost.setText("localhost");
-    txtPort.setText("3306");
-    txtUsername.setText("root");
-    txtDatabaseName.setText("opendj_db");
-    txtHostLdap.setText("localhost");
-    txtPortLdap.setText("389");
-    txtBaseDN.setText("dc=example,dc=com");
-    txtUsernameLdap.setText("cn=Directory Manager");
-    
-    return totalGUI;
-  }
-  
-  public void actionPerformed(ActionEvent e) {
-    Object source = e.getSource();
-    JDBCConnectionFactory JDBC = null;
-    LDAPConnectionFactory LDAP = null;
-    if((source == btnLogin))
-    {
-      String aHost = txtHost.getText(); //read aHost from the screen as a string
-      String lHost = txtHostLdap.getText();
-      String aPort = txtPort.getText();
-      String lPort = txtPortLdap.getText();
-      Integer intaPort = null;
-      Integer intlPort = null;
-      String aDatabase = txtDatabaseName.getText();
-      String lBaseDN = txtBaseDN.getText();
-      String aUsername = txtUsername.getText();
-      String lUsername = txtUsernameLdap.getText();
-      try {
-        // aHost = txtHost.getText();  
-        if  ((aHost.isEmpty()) || (lHost.isEmpty()))
-          //if entry is made then throw error
-          throw new IllegalArgumentException("Enter Host address");
-        else if ((aPort.isEmpty()) || (lPort.isEmpty()))
-        {
-          throw new IllegalArgumentException("Enter port number");
-        }
-        else if ((aDatabase.isEmpty()) || (lBaseDN.isEmpty()))
-        {
-          throw new IllegalArgumentException("Enter database name");
-        }
-        else if ((aUsername.isEmpty()) || lUsername.isEmpty())
-        {
-          throw new IllegalArgumentException("Enter username number");
-        }
-        //otherwise setup connection
-        else
-        {
-          try{
-            intaPort = Integer.parseInt(aPort);
-            intlPort = Integer.parseInt(lPort);
-            
-            JDBC = new JDBCConnectionFactory(aHost, intaPort, aDatabase);
-            final Connection jdbcconnection = JDBC.getConnection(); 
-                    jdbcconnection.bind(aUsername, txtPassword.getPassword());
-                    
-                    LDAP = new LDAPConnectionFactory(lHost, intlPort);
-                final Connection ldapconnection = LDAP.getConnection();
-                ldapconnection.bind(lUsername, txtPasswordLdap.getPassword());
-                
-            //TODO aanpassen connection failed
-            frame.dispose();
-            new GUIMap(JDBC, LDAP);
-          } catch (NumberFormatException ex){
-            JOptionPane.showMessageDialog(frame, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
-          } catch (ErrorResultException e1) {
-                        e1.printStackTrace();
-                } catch (ErrorResultIOException e1) {
-                        e1.printStackTrace();
-                } catch (SearchResultReferenceIOException e1) {
-                        e1.printStackTrace();
-                } catch (SQLException e1) {
-                        e1.printStackTrace();
-                }
-        }
-      }
-      catch (IllegalArgumentException x)   {   // catch the error
-        JOptionPane.showMessageDialog(frame, x.getMessage(), "Warning", JOptionPane.ERROR_MESSAGE);
-      }
-    }
-    else if(source == btnCancel)
-    {
-      System.exit(0);
-    }
-  }
-  private static void createAndShowGUI() {
-
-    // JFrame.setDefaultLookAndFeelDecorated(true); 
-    try {
-      for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
-        //System.out.println(info.getName());
-        if ("Nimbus".equals(info.getName())) {
-          UIManager.setLookAndFeel(info.getClassName());
-          //System.out.println("Used = " + info.getName());
-          break;
-       } else {
-         UIManager.setLookAndFeel(info.getClassName());
-         }
-      }
-    } catch (Exception e) {
-      //System.out.println(e.toString());
-    }
-    //Create and set up the content pane.
-    GUI gui = new GUI();
-    frame.setContentPane(gui.createContentPane());
-    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-    frame.setSize(585, 281);
-    frame.setLocationRelativeTo(null);
-    frame.setVisible(true);
-    frame.setResizable(false);  
-    frame.setEnabled(true);
-  }
-  public static void main(String[] args) {
-    //Schedule a job for the event-dispatching thread:
-    //creating and showing this application's GUI.
-    SwingUtilities.invokeLater(new Runnable() {
-      public void run() {
-        createAndShowGUI();
-      }
-    });
-  }
-}
diff --git a/opendj-sdk/opendj3/opendj-virtual/src/test/java/org/forgerock/opendj/virtual/GUIMap.java b/opendj-sdk/opendj3/opendj-virtual/src/test/java/org/forgerock/opendj/virtual/GUIMap.java
deleted file mode 100644
index c3937f5..0000000
--- a/opendj-sdk/opendj3/opendj-virtual/src/test/java/org/forgerock/opendj/virtual/GUIMap.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- *      Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- *      Copyright 2010 Sun Microsystems, Inc.
- *      Portions copyright 2011 ForgeRock AS
- */
-
-package org.forgerock.opendj.virtual;
-
-import java.awt.event.*;
-import java.awt.*;
-
-import javax.swing.*;
-import javax.swing.border.Border;
-import javax.swing.border.EtchedBorder;
-import javax.swing.table.*;
-
-import org.forgerock.opendj.ldap.ErrorResultException;
-import org.forgerock.opendj.ldap.ErrorResultIOException;
-import org.forgerock.opendj.ldap.LDAPConnectionFactory;
-import org.forgerock.opendj.ldap.SearchResultReferenceIOException;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-@SuppressWarnings("serial")
-class MyTable extends AbstractTableModel {
-
-  public MyTable(){}
-
-  private String[] columnNames = {"Columns",
-    "Attributes"
-  };
-
-  public Object[][] data = {};
-
-  public int getColumnCount() {
-    return columnNames.length;
-  }
-  public int getRowCount() {
-    return data.length;
-  }
-  public String getColumnName(int col) {
-    return columnNames[col];
-  }
-  public Object getValueAt(int row, int col) {
-    return data[row][col];
-  }
-
-  public boolean isCellEditable(int row, int col) {
-    if (col == 1) {
-      return true;
-    } else {
-      return false;
-    }
-  }       
-
-  public void setValueAt(Object value, int row, int col) {
-    data[row][col] = value;
-    fireTableCellUpdated(row, col);
-  }
-}
-
-@SuppressWarnings("serial")
-public class GUIMap extends JPanel implements ActionListener {
-  //Definition of global values and items that are part of the GUI.
-  static JFrame frame = new JFrame("Mapping configuration");
-  private JPanel totalGUI, inputPane, dataPane,btnPane;
-  private JComboBox<Object> tableList, directoryOUList;
-  private JButton btnSetMap, btnResetMap, btnSave, btnQuitConnection;
-  private JLabel lblDatabaseTables, lblSelectOu, lblEditDataSource;
-  private JDBCMapper JDBCM;
-  private JTable table; 
-  private JScrollPane scrollPane;
-  private MappingConfigurationManager mcm;
-  static DefaultTableModel model;
-  static String[] tableNameList;
-  static String[] OUNameList;
-  private Border loweredetched;
-
-  public GUIMap(JDBCConnectionFactory jdbc, LDAPConnectionFactory ldap) throws ErrorResultException, ErrorResultIOException, SearchResultReferenceIOException, SQLException
-  {
-    JDBCM = new JDBCMapper(jdbc.getConnection(), ldap.getConnection());
-    JDBCM.fillMaps();
-    List<String> tableStringList = JDBCM.getTables();
-    List<String> OUStringList = JDBCM.getOrganizationalUnits();
-    tableNameList = new String[tableStringList.size()];
-    OUNameList = new String[OUStringList.size()];
-    mcm = new MappingConfigurationManager(JDBCM);
-    JDBCM.loadMappingConfig(mcm.loadMapping());
-
-    for (int i = 0; i < tableStringList.size(); i++){
-      tableNameList[i] = tableStringList.get(i);
-    }
-
-    for (int i = 0; i < OUStringList.size(); i++){
-      OUNameList[i] = OUStringList.get(i);
-    }
-
-    frame.setResizable(false);
-    frame.setContentPane(createContentPane());    
-    frame.setEnabled(true);
-    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-    frame.setSize(524, 505);
-    frame.setLocationRelativeTo(null);
-    frame.setVisible(true); 
-  }
-
-  /**
-   * @return
-   * @throws SQLException 
-   */
-   public JPanel createContentPane () throws SQLException{
-     totalGUI = new JPanel();
-     totalGUI.setLayout(null);
-     loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
-
-     lblEditDataSource = new JLabel("Edit data source");
-     lblEditDataSource.setFont(lblEditDataSource.getFont().deriveFont(lblEditDataSource.getFont().getStyle() | Font.BOLD, lblEditDataSource.getFont().getSize() + 2f));
-     lblEditDataSource.setBounds(16, 6, 134, 16);
-     totalGUI.add(lblEditDataSource);
-
-     inputPane = new JPanel();
-     inputPane.setBounds(6, 26, 507, 61);
-     inputPane.setBorder(loweredetched);
-     totalGUI.add(inputPane);
-     inputPane.setLayout(null);
-
-     tableList = new JComboBox<Object>(tableNameList);
-     tableList.setToolTipText("Click to change table");
-     tableList.setMaximumRowCount(4);
-     tableList.setBounds(6,29,230,27);
-     tableList.addActionListener(this);
-     inputPane.add(tableList);   
-
-     directoryOUList = new JComboBox<Objects>(OUNameList);
-     directoryOUList.setToolTipText("Click to change OU");
-     directoryOUList.setMaximumRowCount(4);
-     directoryOUList.setBounds(271, 29, 230, 27);
-     inputPane.add(directoryOUList);
-
-     lblDatabaseTables = new JLabel("Select table");
-     lblDatabaseTables.setBounds(11, 6, 128, 16);
-     inputPane.add(lblDatabaseTables);
-
-     lblSelectOu = new JLabel("Select OU\n");
-     lblSelectOu.setBounds(276, 6, 128, 16);
-     inputPane.add(lblSelectOu);
-     directoryOUList.addActionListener(this);
-
-     dataPane = new JPanel();
-     dataPane.setBounds(6, 99, 511, 308);
-     totalGUI.add(dataPane);
-     dataPane.setLayout(new GridLayout(0, 1, 0, 0));
-
-     //Create the scroll pane and add the table to it.
-     scrollPane = new JScrollPane();
-     fillTable();
-     UpdateTable();
-     dataPane.add(scrollPane);
-
-     table.setPreferredScrollableViewportSize(new Dimension(500, 70));
-     table.setFillsViewportHeight(true);
-     table.getTableHeader().setReorderingAllowed(false);
-     table.getTableHeader().setResizingAllowed(false);
-
-     btnPane = new JPanel();
-     btnPane.setLayout(null);
-     btnPane.setBounds(6, 411, 512, 68);
-     totalGUI.add(btnPane);
-
-     btnSetMap = new JButton("Save current mapping");
-     btnSetMap.setBounds(87, 3, 169, 28);
-     btnSetMap.addActionListener(this);
-     btnPane.add(btnSetMap);
-
-     btnResetMap = new JButton("Reset current mapping");
-     btnResetMap.setBounds(270, 3, 169, 28);
-     btnResetMap.addActionListener(this);
-     btnPane.add(btnResetMap);
-
-     btnSave = new JButton("Save to file");
-     btnSave.setBounds(127, 36, 129, 28);
-     btnSave.addActionListener(this);
-     btnPane.add(btnSave);
-
-     btnQuitConnection = new JButton("Close");
-     btnQuitConnection.setBounds(270, 36, 129, 28);
-     btnQuitConnection.addActionListener(this);
-     btnPane.add(btnQuitConnection);
-
-     return totalGUI;
-   }
-
-   private void fillTable() throws SQLException {
-     String tableName = tableList.getSelectedItem().toString();
-     ArrayList<String> columnsList = JDBCM.getTableColumns(tableName);
-     Object[][] rowData = new Object[columnsList.size()][2];
-
-     for(int i = 0; i < columnsList.size(); i++){
-       String columnName = columnsList.get(i);
-
-       if(!JDBCM.getTableColumnNullable(tableName, columnName)){
-         columnName = columnName.concat("(*)");
-       }
-       rowData[i][0] = columnName;
-       rowData[i][1] = "----";
-     }
-
-     MyTable myTable = new MyTable();
-     myTable.data = rowData;
-     table = new JTable(myTable);
-     scrollPane.setViewportView(table);
-
-     createTableComboBoxList();
-   }
-   private void createTableComboBoxList(){
-     JComboBox<String> comboBox = new JComboBox<String>();
-     ArrayList<String> attributesList = JDBCM.getOrganizationalUnitAttributes(directoryOUList.getSelectedItem().toString());
-
-     for(int i = 0; i < attributesList.size(); i++){
-       comboBox.addItem(attributesList.get(i));
-     }
-     TableColumn directoryColumn = table.getColumnModel().getColumn(1);
-     directoryColumn.setCellEditor(new DefaultCellEditor(comboBox));
-     DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
-     directoryColumn.setCellRenderer(renderer);
-   }
-
-   public void UpdateTable(){
-     String tableName = tableList.getSelectedItem().toString();
-     Map<String, String> currentMap = JDBCM.loadCurrentMapFromMapping(tableName);
-
-     if(!currentMap.isEmpty()){
-       String mappingKey, mappingValue;
-       MyTable mt = (MyTable) table.getModel();
-
-       for(int i = 0; i < mt.data.length; i++){
-         mappingKey = tableName + ":" + mt.data[i][0].toString();
-         mappingKey = mappingKey.replace("(*)", "");
-         mappingValue = currentMap.get(mappingKey);
-         String[] stringSplitter = mappingValue.split((":"));
-         mt.data[i][1] = stringSplitter[1];
-       }
-     }
-   }
-
-   public void actionPerformed(ActionEvent e) {
-     Object source = e.getSource();
-     if((source == tableList) || (source == directoryOUList))
-     {
-       try {
-         fillTable();
-         createTableComboBoxList();
-         if(source == tableList){
-           UpdateTable();
-         }
-       } catch (SQLException e1) {
-         e1.printStackTrace();
-       }
-     }
-     else if(source == btnSetMap){
-       MyTable mt = (MyTable) table.getModel();
-       String tableName = tableList.getSelectedItem().toString();
-       String OUName = directoryOUList.getSelectedItem().toString();
-       String [] columnStrings = new String[mt.data.length], attributeStrings = new String[mt.data.length];
-       boolean success = true;
-       String columnName, attributeName;
-
-       for(int i = 0; i < mt.data.length; i++){
-         columnName = mt.data[i][0].toString();
-         attributeName = mt.data[i][1].toString();
-
-         if(columnName.contains("(*)") && attributeName.equals("----")){
-           success = false;
-           JOptionPane.showMessageDialog(frame, "Map all the required fields!", "Error", JOptionPane.ERROR_MESSAGE);
-           break;
-         }
-         columnStrings[i] = columnName.replace("(*)", "");
-         attributeStrings[i] = attributeName;
-       }
-       if(success) JDBCM.addCurrentMapToMapping(tableName, columnStrings, OUName, attributeStrings);
-     }
-     else if(source == btnSave){
-       mcm.saveMapping(JDBCM.getMapping());
-     }
-     else if(source == btnResetMap){
-       try {
-         fillTable();
-       } catch (SQLException e1) {
-         e1.printStackTrace();
-       }
-     }
-     else if(source == btnQuitConnection){
-       try {
-         JDBCM.closeConnections();
-       } catch (SQLException e1) {
-         e1.printStackTrace();
-       }
-       System.exit(0);
-     }
-   }
-}
\ No newline at end of file

--
Gitblit v1.10.0