From 56eb2be6865fdad4950bf784d292104ebb058f85 Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Thu, 21 Jul 2016 11:41:56 -0700
Subject: [PATCH] Ticket #48933 - drop support for legacy replication - need to
 clean code

Description: Fix for #84139 (commit 8b276a5533ff4945e23f2091c9de29c605491b25)
still contains legacy repliation code which is unused.  Cleaning it up.
---
 .../panel/replication/WindowsSyncSettingPanel.java | 73 ----------------------
 1 file changed, 73 deletions(-)

diff --git a/src/com/netscape/admin/dirserv/panel/replication/WindowsSyncSettingPanel.java b/src/com/netscape/admin/dirserv/panel/replication/WindowsSyncSettingPanel.java
index 8b0d6cc..a1852ef 100755
--- a/src/com/netscape/admin/dirserv/panel/replication/WindowsSyncSettingPanel.java
+++ b/src/com/netscape/admin/dirserv/panel/replication/WindowsSyncSettingPanel.java
@@ -88,8 +88,6 @@ public class WindowsSyncSettingPanel extends BlankPanel {
         
         createEnableReplicaArea(_myPanel);
         
-        //createReplicaTypeArea(_myPanel);
-        
         //createCommonAttributeArea(_myPanel);
         
         //createConsumerArea(_myPanel);
@@ -124,40 +122,6 @@ public class WindowsSyncSettingPanel extends BlankPanel {
         cc.add(Box.createHorizontalGlue(), gbc);
     }
     
-    private void createReplicaTypeArea(Container cc) {
-        _replicaTypePanel = new GroupPanel(_resource.getString(_section,"type-label"));
-        
-        GridBagConstraints gbc = new GridBagConstraints();
-        gbc.weightx = 1.0;
-        gbc.gridwidth = gbc.REMAINDER;
-        gbc.fill = gbc.HORIZONTAL;
-        gbc.anchor = gbc.NORTHWEST;
-        cc.add(_replicaTypePanel, gbc);
-        
-        /* Replica type radiobuttons */
-        //_rbIsActiveDirectory = makeJRadioButton(_section,"activedirectory", true, _resource);
-        _rbIsActiveDirectory = makeJRadioButton("activedirectory");
-        _rbIsActiveDirectory.setToolTipText("activedirectory"); //XXX
-        
-        //_rbIsLegacyNT = makeJRadioButton(_section,"activedirectory", true, _resource);
-        _rbIsLegacyNT = makeJRadioButton("legacy nt"); //XXX
-        _rbIsLegacyNT.setToolTipText("not activedirectory"); //XXX
-        
-        ButtonGroup replicaType = new ButtonGroup();
-        replicaType.add(_rbIsActiveDirectory);
-        replicaType.add(_rbIsLegacyNT);
-        
-        gbc.insets = (Insets)ReplicationTool.DEFAULT_INSETS.clone();
-        gbc.fill = gbc.HORIZONTAL;
-        gbc.weightx = 1.0;
-        gbc.anchor = gbc.NORTHWEST;
-        gbc.gridwidth = gbc.RELATIVE;
-        _replicaTypePanel.add(_rbIsActiveDirectory, gbc);
-        gbc.gridwidth = gbc.REMAINDER;
-        _replicaTypePanel.add(_rbIsLegacyNT, gbc);
-        
-    }
-    
     private void createCommonAttributeArea(Container cc) {
         _commonAttributePanel = new GroupPanel(_resource.getString(_section, "common-panel-label"));
         
@@ -1216,40 +1180,6 @@ public class WindowsSyncSettingPanel extends BlankPanel {
         if (!_isInitialized) {
             return;
         }
-//        if (_cbWindowsReplicaEnabled.isSelected()) {
-            //            setEnabledPanel(_replicaTypePanel, true);
-            //            setEnabledPanel(_commonAttributePanel, true);
-            //            /* Check the consumer panel */
-            //            setEnabledPanel(_consumerPanel, !_rbIsActiveDirectory.isSelected());
-            //            _bindDNList.setBackground(_tfNewBindDN.getBackground());
-            //            _referralList.setBackground(_tfNewReferral.getBackground());
-            //
-            //            /* Check the purge delay panel */
-            //            _tfPurgeDelay.setEnabled(!_cbPurgeDelayNever.isSelected());
-            //            _cboPurgeUnit.setEnabled(!_cbPurgeDelayNever.isSelected());
-            
-            
-      /* We don't ask for the replica ID if we are NOT defining a master.
-       
-       The only case where we change the replica ID is when  we are
-       changing the replica from a slave to a master */
-            //            boolean enableID = !_rbIsHub.isSelected() &&
-            //            !_rbIsSlave.isSelected() &&
-            //            (!_saveReplicaEnabled || _saveIsHub || _saveIsSlave);
-            //            _tfReplicaID.setEnabled(enableID);
-            //            _lReplicaID.setEnabled(enableID);
-            //            _lReplicaIDWarning.setEnabled(enableID);
-//        } else {
-            //            setEnabledPanel(_replicaTypePanel, false);
-            //            setEnabledPanel(_commonAttributePanel, false);
-            //            setEnabledPanel(_consumerPanel, false);
-            //            _bindDNList.setBackground(_tfNewBindDN.getBackground());
-            //            _referralList.setBackground(_tfNewReferral.getBackground());
-//        }
-        //        checkAddReferralButton();
-        //        checkAddBindDNButtonAndLabel();
-        //        checkDeleteBindDNButton();
-        //        checkDeleteReferralButton();
     }
     
   /* Disable/Enable the elements of a container.  It is used to disable the elements of a panel
@@ -1602,9 +1532,6 @@ setValidFlag();
     private JCheckBox _cbWindowsReplicaEnabled = null;
     private JCheckBox _cbPurgeDelayNever = null;
     
-    private JRadioButton _rbIsLegacyNT = null;
-    private JRadioButton _rbIsActiveDirectory = null;
-    
     private GroupPanel _replicaTypePanel = null;
     private GroupPanel _commonAttributePanel = null;
     private GroupPanel _consumerPanel = null;
-- 
2.4.11

