[Pkg-fedora-ds-maintainers] 389-ds-console: Changes to 'upstream'

Timo Aaltonen tjaalton at moszumanska.debian.org
Thu May 7 10:23:30 UTC 2015


 389-ds-console.spec                                                              |    2 
 build.properties                                                                 |    2 
 build.xml                                                                        |    6 
 fedora-ds-console.spec                                                           |    2 
 help/en/help/configtab_replication.html                                          |   29 
 help/en/help/configtab_replication3.html                                         |    4 
 help/en/tokens.map                                                               |    1 
 src/com/netscape/admin/dirserv/ContentMenuController.java                        |   66 
 src/com/netscape/admin/dirserv/DSBaseModel.java                                  |    2 
 src/com/netscape/admin/dirserv/DSContentPage.java                                |  965 ++++++----
 src/com/netscape/admin/dirserv/DSResourceModel.java                              |    6 
 src/com/netscape/admin/dirserv/DSUtil.java                                       |   58 
 src/com/netscape/admin/dirserv/dirserv.properties                                |    4 
 src/com/netscape/admin/dirserv/panel/BlankPanel.java                             |    3 
 src/com/netscape/admin/dirserv/panel/EncryptionPanel.java                        |   20 
 src/com/netscape/admin/dirserv/panel/PasswordPolicyPanel.java                    |    5 
 src/com/netscape/admin/dirserv/panel/RestorePanel.java                           |   15 
 src/com/netscape/admin/dirserv/panel/SchemaAttributesPanel.java                  |    2 
 src/com/netscape/admin/dirserv/panel/replication/LegacyConsumerSettingPanel.java |  582 ------
 src/com/netscape/admin/dirserv/panel/replication/ReplicaSettingPanel.java        |  135 -
 src/com/netscape/admin/dirserv/panel/replication/ReplicationSettingPanel.java    |   11 
 src/com/netscape/admin/dirserv/panel/replication/ReplicationTool.java            |    1 
 src/com/netscape/admin/dirserv/panel/replication/WindowsSyncSettingPanel.java    |  114 -
 src/com/netscape/admin/dirserv/panel/replication/replication.properties          |   14 
 24 files changed, 747 insertions(+), 1302 deletions(-)

New commits:
commit 497b0e8e6add0fdb085049b33b6eca16720792c1
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Wed Apr 15 11:37:11 2015 -0700

    Bumped version to 1.2.12

diff --git a/389-ds-console.spec b/389-ds-console.spec
index c913e7c..38e36ac 100644
--- a/389-ds-console.spec
+++ b/389-ds-console.spec
@@ -1,5 +1,5 @@
 %define major_version 1.2
-%define minor_version 11
+%define minor_version 12
 
 %define shortname 389-ds
 %define pkgname   dirsrv
diff --git a/build.properties b/build.properties
index 2ff5c74..0eebe75 100755
--- a/build.properties
+++ b/build.properties
@@ -21,7 +21,7 @@
 lang=en
 
 ldapconsole.root=..
-ldapconsole.version=1.2.11
+ldapconsole.version=1.2.12
 ldapconsole.gen.version=1.2
 brand=389
 ldapconsole.name=${brand}-ds-${ldapconsole.version}
diff --git a/fedora-ds-console.spec b/fedora-ds-console.spec
index c312177..9e6e4c7 100755
--- a/fedora-ds-console.spec
+++ b/fedora-ds-console.spec
@@ -1,5 +1,5 @@
 %define major_version 1.2
-%define minor_version 11
+%define minor_version 12
 
 %define shortname fedora-ds
 %define pkgname   dirsrv

commit 8b276a5533ff4945e23f2091c9de29c605491b25
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Tue Apr 7 09:54:18 2015 -0700

    Ticket #48139 - drop support for legacy replication
    
    Description: Deleted the code for the DS to act as a legacy consumer
    of a 4.x supplier server (4xcompatible) as well as its online doc.
    
    https://fedorahosted.org/389/ticket/48139
    
    Reviewed by nkinder at redhat.com (Thank you, Nathan!!)

diff --git a/help/en/help/configtab_replication.html b/help/en/help/configtab_replication.html
deleted file mode 100644
index ef38c4c..0000000
--- a/help/en/help/configtab_replication.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<p class="topic">
-Legacy Consumer Settings
-</p>
-
-<p class="text">
-The replication model used in Directory Server 4.1x and the current replication model are different. The former replication model is termed Legacy Replication.  Only use this tab if you wish to accept replication updates from a 4.1x Directory Server using legacy replication.
-</p>
-
-<p class="text">
-<b>Enable Legacy Consumer. </b> Select this checkbox if you want this Directory Server to act as a legacy consumer. This means that this server can accept updates from a 4.1x supplier server. You must check this checkbox to activate the other fields in this window.
-</p>
-
-<p class="text">
-<b>Authentication</b>
-</p>
-
-<blockquote>
-<p class="text">
-<b>Supplier DN.</b> Use this field to specify the distinguished name that any supplier server must use to bind to this consumer server to send replication updates. The supplier DN must correspond to an entry that is stored on the consumer server. This entry must not be part of the replicated database.
-</p>
-
-<p class="text">
-<b>New supplier password (min 8 char). </b> If a password is specified, the supplier server uses this password to bind to the consumer server. Minimum 8 characters.
-</p>
-
-<p class="text">
-<b>Confirm new supplier password. </b> Confirms that the password entered in the "New supplier password" field is correct.
-</p>
-</blockquote>
diff --git a/help/en/help/configtab_replication3.html b/help/en/help/configtab_replication3.html
index e71f4e2..0d132a9 100644
--- a/help/en/help/configtab_replication3.html
+++ b/help/en/help/configtab_replication3.html
@@ -48,10 +48,6 @@ If the ID is incorrect, the field labels turn red and the Save button is disable
 <p class="text">
 <b>Purge delay. </b>The delay you specify in these fields determines how long the server keeps replication state information in the database before it is purged.  A longer time means that the risk of needing to perform a replication re-initialization is lower, but you will need more disk space to store the extra data and more memory to cache the extra data.  A shorter time means the risk of needing to perform a replication re-initializtion is higher, but you will need less disk space and memory.  Check the Never checkbox if you want to save this information indefinitely.  
 </p>
-
-<p class="text">
-<b>Updatable by a 4.x Replica. </b>Check this checkbox if you want this Directory Server to act as a legacy consumer of a 4.x supplier server.
-</p>
 </blockquote>
 
 <p class="text">
diff --git a/help/en/tokens.map b/help/en/tokens.map
index aa75632..bf4edca 100644
--- a/help/en/tokens.map
+++ b/help/en/tokens.map
@@ -110,7 +110,6 @@ configuration-schema-attr-create-dbox-help = help/configtab_schema4.html
 configuration-schema-mrule-help = help/configtab_schema5.html
 
 ;Replication Agreements Icon
-configuration-replication-legacyconsumersettings-help = help/configtab_replication.html
 configuration-replication-suppliersettings-help = help/configtab_replication2.html
 configuration-replication-replicasettings-help = help/configtab_replication3.html
 configuration-replication-summary-help = help/configtab_replication4.html
diff --git a/src/com/netscape/admin/dirserv/panel/replication/LegacyConsumerSettingPanel.java b/src/com/netscape/admin/dirserv/panel/replication/LegacyConsumerSettingPanel.java
deleted file mode 100644
index 7846044..0000000
--- a/src/com/netscape/admin/dirserv/panel/replication/LegacyConsumerSettingPanel.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- * END COPYRIGHT BLOCK **/
-
-package com.netscape.admin.dirserv.panel.replication;
-
-import java.util.StringTokenizer;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import javax.swing.*;
-import javax.swing.event.*;
-import netscape.ldap.*;
-import com.netscape.admin.dirserv.*;
-import com.netscape.admin.dirserv.panel.*;
-import com.netscape.management.client.*;
-import com.netscape.management.client.util.*;
-
-/**
- * Panel for Directory Server Consumer Replication Setting
- *
- * @author  jpanchen
- * @version %I%, %G%
- * @date	 	9/15/97
- * @see     com.netscape.admin.dirserv.panel.replication
- */
-public class LegacyConsumerSettingPanel extends BlankPanel {
-    
-    /*==========================================================
-     * constructors
-     *==========================================================*/
-     
-    /**
-     * public constructor
-     * construction is delayed until selected.
-     * @param parent parent panel
-     */
-    public LegacyConsumerSettingPanel(IDSModel model) {
-		super(model, "replication");
-		setTitle(_resource.getString(_section+"-setting","title"));
-		_model = model;
-		_helpToken = "configuration-replication-legacyconsumersettings-help";
-		_refreshWhenSelect = false;
-    }
-	
-    /*==========================================================
-     * public methods
-     *==========================================================*/
-         
-    /**
-     * Actual panel construction
-     */
-    public void init() {
-		if (_isInitialized) {
-			return;
-		}
-		_entryExists = false;
-		try {
-			LDAPConnection ldc = _model.getServerInfo().getLDAPConnection();
-			_legacyEntry = ldc.read(REPSETTINGS_DN);
-			if (_legacyEntry != null) {
-				_entryExists = true;
-			}
-		} catch (LDAPException lde) {
-		}
-		
-		_isLegacyConsumerEnabled = _entryExists;
-		
-		GridBagConstraints gbc = getGBC();	
-		
-		_myPanel.setLayout(new GridBagLayout());
-		_myPanel.setBackground(getBackground());
-		_myPanel.setPreferredSize(ReplicationTool.DEFAULT_PANEL_SIZE);
-		_myPanel.setMaximumSize(ReplicationTool.DEFAULT_PANEL_SIZE);
-		
-		//add Description label
-        JTextArea desc = makeMultiLineLabel( 2, 60,
-											 _resource.getString(
-																 _section,"setting-desc") );
-		gbc.anchor = gbc.NORTHWEST;
-        gbc.gridwidth = 2;
-		gbc.weightx    = 1.0;
-		gbc.fill = gbc.HORIZONTAL;
-        _myPanel.add(desc, gbc);
-		gbc.weightx    = 0.0;
-		gbc.fill = gbc.HORIZONTAL;
-		gbc.gridwidth = gbc.REMAINDER;
-		_myPanel.add(Box.createGlue(),gbc);
-		
-		// Switch on/off
-		_cbEnable = makeJCheckBox( _section,
-								   "enable",
-								   _entryExists,
-								   _resource);
-		_cbEnable.setSelected( _entryExists );
-		_cbEnable.addItemListener(this);
-		gbc.gridwidth = 2;
-		gbc.weightx    = 0;
-		gbc.fill = gbc.NONE;
-		_myPanel.add(_cbEnable,gbc);
-		gbc.weightx    = 1.0;
-		gbc.fill = gbc.HORIZONTAL;
-		gbc.gridwidth = gbc.REMAINDER;
-		_myPanel.add(Box.createGlue(),gbc);	    
-		
-		// Auth param
-		ReplicationTool.resetGBC(gbc);
-		gbc.insets = (Insets) ReplicationTool.BOTTOM_INSETS.clone();
-        gbc.anchor = gbc.NORTH;
-        gbc.gridwidth = gbc.REMAINDER;
-        gbc.weightx=1.0;
-		_myPanel.add(createAuth(), gbc);
-
-		checkEnabledField();
-		addBottomGlue ();
-        _isInitialized = true;
-    }
-	
-    private JPanel createAuth(){
-        //setup Normal Auth panel		
-		String title = _resource.getString(_section+"-normalAuth","label");
-        JPanel panel = new GroupPanel(title);        
-        
-		//add supplier DN
-        _dnLabel = makeJLabel(_resource.getString(_section+"-supplierDN","label"));				
-        _dnLabel.setToolTipText(_resource.getString(_section+"-supplierDN","ttip"));
-		_dnLabel.resetKeyboardActions();
-		
-		GridBagConstraints gbc = new GridBagConstraints();
-   		ReplicationTool.resetGBC(gbc);
-		gbc.insets = (Insets) ReplicationTool.BOTTOM_INSETS.clone();
-        gbc.anchor = gbc.NORTHEAST;
-		gbc.gridwidth  = gbc.RELATIVE;
-		gbc.fill = gbc.NONE;
-		gbc.weightx = 0.0;		
-        panel.add(_dnLabel, gbc);
-		
-        _dnText= makeJTextField(_section, "supplierDN", _resource);
-		_dnLabel.setLabelFor(_dnText);
-		_saveDN = DSUtil.getAttrValue( _legacyEntry, UPDATEDN_ATTR_NAME );
-		if( _saveDN != null ) {
-			_dnText.setText( _saveDN );
-		} else {
-			_dnText.setText("");
-		}		
-
-		gbc.gridwidth  = gbc.REMAINDER;
-        gbc.anchor = gbc.NORTHWEST;
-		gbc.fill = gbc.HORIZONTAL;
-		gbc.weightx = 1.0;
-        panel.add(_dnText, gbc);
-		
-        
-        // passwd 
-        _pwdLabel = makeJLabel(_resource.getString(_section+"-SupplierNewPwd","label"));
-        _pwdLabel.setToolTipText(_resource.getString(_section+"-SupplierNewPwd","ttip"));
-		_pwdLabel.resetKeyboardActions();
- 
-        gbc.anchor = gbc.NORTHEAST;
-		gbc.gridwidth  = gbc.RELATIVE;
-		gbc.fill = gbc.NONE;
-		gbc.weightx = 0.0;
-        panel.add(_pwdLabel, gbc);
-		
-        _pwdText= makeJPasswordField(_section, "SupplierNewPwd",
-									 "", 10, _resource);
-		_pwdLabel.setLabelFor(_pwdText);
-		_savePwd = DSUtil.getAttrValue( _legacyEntry, UPDATEDN_PASSWORD_ATTR_NAME);
-		if( _savePwd != null){
-			_pwdText.setText( _savePwd );
-		} else {
-			_savePwd = "";
-			_pwdText.setText("");
-		}
-
-        gbc.anchor = gbc.NORTHWEST;
-		gbc.gridwidth  = gbc.REMAINDER;
-		gbc.fill = gbc.HORIZONTAL;
-		gbc.weightx = 1.0;
-        panel.add(_pwdText, gbc);
-		
-        // pwd again
-        _againLabel= makeJLabel(_resource.getString(_section+"-SupplierNewPwd","again"));
-		_againLabel.resetKeyboardActions(); 
-		
-		gbc.anchor = gbc.NORTHEAST;
-		gbc.gridwidth  = gbc.RELATIVE;
-		gbc.fill = gbc.NONE;
-		gbc.weightx = 0.0;
-        panel.add(_againLabel, gbc);
-		
-		_againText= makeJPasswordField(_section, "SupplierNewPwd",
-									   "", 10, _resource);		
-		_againLabel.setLabelFor(_againText);
-        gbc.anchor = gbc.NORTHWEST;
-		gbc.fill = gbc.HORIZONTAL;
-		gbc.gridwidth  = gbc.REMAINDER;
-		// empty passwd is not valid
-		_againText.setText( _savePwd );
-        panel.add(_againText, gbc);        
-		
-		return(panel);
-    }
-
-   /**
-     * Update on-screen data from Directory.
-     *
-     **/
-    public boolean refresh () {
-		Debug.println("LegacyConsumerPanel.refresh()");
-		/* We re-read the entry from the server */
-		_entryExists = false;
-		try {
-			LDAPConnection ldc = _model.getServerInfo().getLDAPConnection();
-			_legacyEntry = ldc.read(REPSETTINGS_DN);
-			if (_legacyEntry != null) {
-				_entryExists = true;
-			}
-		} catch (LDAPException lde) {
-			_legacyEntry = null;
-		}
-		_isLegacyConsumerEnabled = _entryExists;
-		_saveDN = DSUtil.getAttrValue( _legacyEntry, UPDATEDN_ATTR_NAME );		
-		_savePwd = DSUtil.getAttrValue( _legacyEntry, UPDATEDN_PASSWORD_ATTR_NAME);
-
-		checkOkay();
-		return true;
-	}
-
-    /**
-     * Update on-screen data from Directory.
-	 *
-	 * Note: we overwrite the data that the user may have modified.  This is done in order to keep
-	 * the coherency between the refresh behaviour of the different panels of the configuration tab.
-     *
-     **/
-    public void refreshFromServer () {
-		Debug.println("LegacyConsumerPanel.refreshFromServer()");
-		resetCallback();
-	}
-	
-
-    public void resetCallback() {
-		/* We re-read the entry from the server */
-		_entryExists = false;
-		try {
-			LDAPConnection ldc = _model.getServerInfo().getLDAPConnection();
-			_legacyEntry = ldc.read(REPSETTINGS_DN);
-			if (_legacyEntry != null) {
-				_entryExists = true;
-			}
-		} catch (LDAPException lde) {
-			_legacyEntry = null;
-		}
-		_isLegacyConsumerEnabled = _entryExists;
-		_saveDN = DSUtil.getAttrValue( _legacyEntry, UPDATEDN_ATTR_NAME );		
-		_savePwd = DSUtil.getAttrValue( _legacyEntry, UPDATEDN_PASSWORD_ATTR_NAME);
-
-		if( _saveDN != null){
-			_dnText.setText( _saveDN );
-		} else {
-			_dnText.setText("");
-		}
-		_cbEnable.setSelected( _entryExists );
-		_isDNDirty = false;
-		_pwdText.setText( _savePwd );
-		_againText.setText( _savePwd );
-		_isPwdDirty = false;	
-		checkOkay();
-    }
-
-    public void okCallback() {
-		if (!_isValid ||
-			!_isDirty) {
-			return;
-		}
-		LDAPConnection ldc = _model.getServerInfo().getLDAPConnection();
-		/* We read again the entry to check if it exists ...*/
-		_entryExists = false;
-		try {
-			_legacyEntry = ldc.read(REPSETTINGS_DN);
-			if (_legacyEntry != null) {
-				_entryExists = true;
-			}
-		} catch (LDAPException lde) {
-			_legacyEntry = null;
-		}
-		checkStatus();
-
-		String pwd = new String( _pwdText.getPassword() );		
-		
-		if( _mustDelete ) {
-			try {
-				ldc.delete(  REPSETTINGS_DN );
-				_entryExists = false;
-				_mustDelete = false;
-				_dnText.setText("");
-				_pwdText.setText("");
-				_againText.setText("");
-			} catch (LDAPException e) {
-				/* If the entry does not exists, it's already removed, and we don't display any error message */
-				if (e.getLDAPResultCode() == LDAPException.NO_SUCH_OBJECT) {
-					_entryExists = false;
-					_mustDelete = false;
-					_dnText.setText("");
-					_pwdText.setText("");
-					_againText.setText("");
-				} else {
-					String ldapError =  e.errorCodeToString();
-					String ldapMessage = e.getLDAPErrorMessage();
-					if ((ldapMessage != null) &&
-						(ldapMessage.length() > 0)) {
-						ldapError = ldapError + ". "+ldapMessage;
-					}
-					String[] args_m = { ldapError };
-					DSUtil.showErrorDialog( _model.getFrame(),
-											"error-del-legacy",
-											args_m,
-											_section,
-											_resource);
-					checkOkay();
-					return;
-				}
-			}
-		} else if (!_entryExists) {
-			
-			LDAPAttributeSet las = new LDAPAttributeSet();
-			
-			// add the more well known attributes and values
-			las.add(new LDAPAttribute("objectclass",
-									  REPSETTINGS_OBJECTCLASSES));
-			las.add(new LDAPAttribute("cn",
-									  REPSETTINGS_CN));
-			las.add(new LDAPAttribute(UPDATEDN_ATTR_NAME,
-									  _dnText.getText()));
-			las.add(new LDAPAttribute(UPDATEDN_PASSWORD_ATTR_NAME,
-									  pwd));	
-			LDAPEntry newEntry = new LDAPEntry(REPSETTINGS_DN, las);
-			
-			try {
-				ldc.add( newEntry );				
-			} catch(LDAPException e) {
-				String ldapError =  e.errorCodeToString();
-				String ldapMessage = e.getLDAPErrorMessage();
-				if ((ldapMessage != null) &&
-					(ldapMessage.length() > 0)) {
-					ldapError = ldapError + ". "+ldapMessage;
-				}
-				String[] args_m = { ldapError };
-				DSUtil.showErrorDialog( _model.getFrame(),
-										"error-add-legacy",
-										args_m,
-										_section,
-										_resource);
-				checkOkay();
-				return;
-			}	    
-			_legacyEntry = newEntry;
-			_entryExists = true;		    
-		} else {
-			LDAPModificationSet attrs = new LDAPModificationSet();
-			attrs.add(LDAPModification.REPLACE,
-					  new LDAPAttribute("nsslapd-legacy-updatedn",
-										_dnText.getText()));
-			attrs.add(LDAPModification.REPLACE,
-					  new LDAPAttribute("nsslapd-legacy-updatepw",
-										pwd));	
-			try {
-				ldc.modify( _legacyEntry.getDN(), attrs );
-			} catch(LDAPException e) {				
-				String ldapError =  e.errorCodeToString();
-				String ldapMessage = e.getLDAPErrorMessage();
-				if ((ldapMessage != null) &&
-					(ldapMessage.length() > 0)) {
-					ldapError = ldapError + ". "+ldapMessage;
-				}
-				String[] args_m = { ldapError };			
-				DSUtil.showErrorDialog( _model.getFrame(),
-										"error-mod-legacy",
-										args_m,
-										_section,
-										_resource);
-				checkOkay();
-				return;
-			}
-		}
-		_saveDN = _dnText.getText();
-		_savePwd = new String(_pwdText.getPassword());
-		checkOkay();
-    }
-
-
-    public void changedUpdate(DocumentEvent e) {
-		insertUpdate(e);
-    }
-	
-    public void insertUpdate(DocumentEvent e) {
-		if (!_isInitialized) return;
-		checkOkay();		
-    }
-	
-    public void removeUpdate(DocumentEvent e) {
-		changedUpdate(e);
-    }
-
-	public void itemStateChanged(ItemEvent e) {
-		if(e.getSource().equals(_cbEnable)) {			
-			checkOkay();			
-		}
-	}
-
-	public void actionPerformed(ActionEvent e) {
-		checkOkay();		
-	}
-
-    private void checkPwd(){
-		String p1 = new String( _pwdText.getPassword() );
-		String p2 = new String( _againText.getPassword() );
-		
-		// (p1.length() == 0) && ( p2.length() == 0) in case of SSL strong auth
-		// for the rest i think there is a min and of course they must be the same
-		_isPasswdOK = (((p1.length() == 0) && ( p2.length() == 0)) ||
-					   (( p1.length() >= _pwdMinLength ) && 
-						( p2.length() >= _pwdMinLength ) &&
-						( p1.compareTo( p2 ) == 0)));
-		
-		_isPwdDirty = !p1.equals(_savePwd);
-		
-		if( _isPasswdOK ) {
-			if( _isPwdDirty){
-				setChangeState( _pwdLabel, CHANGE_STATE_MODIFIED);
-				setChangeState( _againLabel, CHANGE_STATE_MODIFIED);
-			} else {
-				setChangeState( _pwdLabel, CHANGE_STATE_UNMODIFIED);
-				setChangeState( _againLabel, CHANGE_STATE_UNMODIFIED);
-			}
-		} else {
-			setChangeState( _pwdLabel, CHANGE_STATE_ERROR);
-			setChangeState( _againLabel, CHANGE_STATE_ERROR);
-		}
-    }
-	
-    private void checkDN(){
-		_isDNDirty = !DSUtil.equalDNs(_dnText.getText(), _saveDN);
-		_isDNOK = DSUtil.isValidDN( _dnText.getText());
-		if( _isDNOK ) {
-			if( _isDNDirty ) {
-				setChangeState( _dnLabel, CHANGE_STATE_MODIFIED);
-			} else {
-				setChangeState( _dnLabel, CHANGE_STATE_UNMODIFIED );
-			}
-		} else {
-			setChangeState( _dnLabel, CHANGE_STATE_ERROR);
-		}
-    }
-
-	private void checkEnable() {
-		_isEnableDirty = (_cbEnable.isSelected() != _entryExists);
-		if (_isEnableDirty) {
-			setChangeState( _cbEnable, CHANGE_STATE_MODIFIED);
-		} else {
-			setChangeState( _cbEnable, CHANGE_STATE_UNMODIFIED );
-		}
-	}
-    
-    private void checkOkay() {				
-		checkEnabledField();
-		checkPwd();
-		checkDN();
-		checkEnable();
-		
-		/* if the check box enable is not selected, what we have is always valid */
-		_isValid = _isPasswdOK && _isDNOK || !_cbEnable.isSelected();
-		_isDirty = (_isPwdDirty || _isDNDirty || _isEnableDirty)  &&
-			(_isEnableDirty || _cbEnable.isSelected());  /* We don't consider dirty if the user has kept the 
-															legacy disabled ... even if the other fields have been 
-															modified */
-		if( _mustDelete ) {
-			setDirtyFlag();
-			setValidFlag();
-		} else {
-			if( _isDirty ){				
-				setDirtyFlag();
-			} else {				
-				clearDirtyFlag();
-			}
-			if (_isValid) {				
-				setValidFlag();				
-			} else {		
-				clearValidFlag();				
-			}
-		}
-    }
-
-
-    private void checkStatus() {
-		_mustDelete = _entryExists && !_cbEnable.isSelected();
-		_isLegacyConsumerEnabled = _cbEnable.isSelected();
-    }
-    
-    /*==========================================================
-     * private methods
-     *==========================================================*/	 
-    private void clearPWDFields() {
-        _pwdText.setText("");
-        _againText.setText("");	    
-    }	    	  
-
-    private void checkEnabledField(){
-		checkStatus();
-		_dnLabel.setEnabled( _isLegacyConsumerEnabled );
-		_dnText.setEnabled( _isLegacyConsumerEnabled );
-		_pwdText.setBackground( _dnText.getBackground());
-		_againText.setBackground( _dnText.getBackground());
-		_pwdLabel.setEnabled( _isLegacyConsumerEnabled );
-		_pwdText.setEnabled( _isLegacyConsumerEnabled );
-		_againLabel.setEnabled( _isLegacyConsumerEnabled );
-		_againText.setEnabled( _isLegacyConsumerEnabled );
-    }
-    
-    /*==========================================================
-     * variables
-     *==========================================================*/
-    private IDSModel	_model;
-    private boolean		_entryExists;
-	private boolean		_isValid = true;
-	private boolean		_isDirty = false;
-    private boolean		_isDNDirty = false;
-    private boolean		_isDNOK = true;
-    private boolean		_isPwdDirty = false;
-    private boolean		_isPasswdOK = true;
-	private boolean     _isEnableDirty = false;
-    private boolean		_mustDelete;
-    private boolean		_isLegacyConsumerEnabled;
-	
-    private JTextField		_dnText;
-    private JPasswordField	_pwdText;
-    private JPasswordField	_againText;
-    private JCheckBox		_cbEnable = null;
-    private JLabel		_dnLabel;
-    private JLabel		_againLabel;
-    private JLabel		_pwdLabel;
-    private String		_savePwd;
-    private String		_saveDN;
-    
-//     DSEntryConfirmPassword _againDSEntry;
-//     DSEntryPassword _pwdDSEntry;
-    private LDAPEntry		_legacyEntry;
-
-    //get resource bundle
-    private static ResourceSet _resource =
-	new ResourceSet("com.netscape.admin.dirserv.panel.replication.replication");
-    private static final String _section = "replication-legacyconsumer";
-
-    private static final int _pwdMinLength = 8;
-
-    private static final String REPSETTINGS_CN = "legacy consumer";
-    public static final String REPSETTINGS_DN = "cn=" + REPSETTINGS_CN +
-	",cn=replication,cn=config";
-    private static final String[] REPSETTINGS_OBJECTCLASSES =
-    {"top", "extensibleObject"};
-    private static final String UPDATEDN_ATTR_NAME =
-	"nsslapd-legacy-updatedn";
-    private static final String UPDATEDN_PASSWORD_ATTR_NAME =
-	"nsslapd-legacy-updatepw";
-}
-
diff --git a/src/com/netscape/admin/dirserv/panel/replication/ReplicaSettingPanel.java b/src/com/netscape/admin/dirserv/panel/replication/ReplicaSettingPanel.java
index 0fc2a42..3ed4715 100644
--- a/src/com/netscape/admin/dirserv/panel/replication/ReplicaSettingPanel.java
+++ b/src/com/netscape/admin/dirserv/panel/replication/ReplicaSettingPanel.java
@@ -250,15 +250,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 		gbc.gridwidth = gbc.REMAINDER;
 		gbc.weightx = 1.0;
 		purgeDelayPanel.add(Box.createHorizontalGlue(), gbc);
-		
-		_cb4xConsumer = makeJCheckBox(_section, "4xcompatible", false, _resource);
-		_cb4xConsumer.setToolTipText(_resource.getString( "replication-replica-4xcompatible",
-														 "ttip"));
-		gbc.gridwidth = gbc.RELATIVE;
-		gbc.anchor = gbc.NORTHWEST;
-		consumerTypePanel.add(_cb4xConsumer, gbc);	
-		gbc.gridwidth = gbc.REMAINDER;
-		consumerTypePanel.add(Box.createHorizontalGlue(), gbc);
    }
 
 
@@ -438,7 +429,6 @@ public class ReplicaSettingPanel extends BlankPanel {
         _saveWindowsSyncEnabled = false;
 
 		_saveDS5ReplicaTypeExist = false;
-		_saveDS5ReplicaLegacyConsumerExist = false;
 		_saveReplicaIDExist = false;
 		_saveReplicaIDExist = false;
 		_saveBindDNExist = false;
@@ -452,7 +442,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 		_saveBindDNList = new Vector();
 		_saveDS5Flags = true;
 		_saveReferralList = new Vector();
-		_save4xConsumer = false;
 
 		_saveIsSimpleMaster = false;
 		_saveIsSlave = false;
@@ -480,14 +469,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 				_saveDS5ReplicaTypeExist = true;
 			}			
 
-			// nsds5ReplicaLegacyConsumer			
-			valattr = DSUtil.getAttrValue( replicaEntry, ReplicationTool.REPLICA_LEGACY_CONSUMER_ATTR );
-			_save4xConsumer = (valattr.length() != 0) &&
-				valattr.equalsIgnoreCase("on");				
-			if (valattr.length() != 0) {
-				_saveDS5ReplicaLegacyConsumerExist = true;
-			}
-
 			// nsds5ReplicaPurgeDelay		
 			valattr = DSUtil.getAttrValue( replicaEntry, ReplicationTool.REPLICA_PURGE_DELAY_ATTR );
 			if( valattr.length() != 0 ) {
@@ -581,7 +562,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 					  "_saveBindDNExist = "+_saveBindDNExist+"\n"+
 					  "_saveReferralListExist = "+_saveReferralListExist+"\n"+
 					  "_savePurgeDelayExist = "+_savePurgeDelayExist+"\n"+
-					  "_save4xConsumer = "+_save4xConsumer+"\n"+
 					  "_saveDS5FlagsExist = "+_saveDS5FlagsExist+"\n"+
 					  "_saveReadOnly = "+_saveReadOnly+"\n"+
 					  "_savePurgeDelay = "+_savePurgeDelay+"\n"+
@@ -636,11 +616,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 		for (int i=0; i<_saveReferralList.size(); i++) {
 			_referralListData.addElement(_saveReferralList.elementAt(i));
 		}
-		if (_save4xConsumer) {			
-			_cb4xConsumer.setSelected(true);
-		} else {
-			_cb4xConsumer.setSelected(false);
-		}
 	}
 
 	private void populatePurgeDelay(String time) {
@@ -679,36 +654,12 @@ public class ReplicaSettingPanel extends BlankPanel {
 		}		
 		Object source = e.getSource();
 
-		/* If the user tries to define a 4.x Consumer, the legacy settings are needed.
-		   That's why we see if the legacy settings entry exists or not.
-		   If the legacy settings entry does not exist we display an error message telling 
-		   the user that he/she has to define the legacy settings first.  In this dialog we 
-		   describe the steps to follow */				
-		if (source.equals(_cb4xConsumer) && _cb4xConsumer.isSelected()) {	
-			boolean legacyEntryExists = false;
-			try {
-				LDAPConnection ldc = _model.getServerInfo().getLDAPConnection();		
-				String[] attrs = {"dn"};
-				LDAPEntry entry = ldc.read(LegacyConsumerSettingPanel.REPSETTINGS_DN, attrs);
-				if (entry != null) {
-					legacyEntryExists = true;
-				}
-			} catch (LDAPException lde) {
-			}
-			if (!legacyEntryExists) {				
-				_cb4xConsumer.setSelected(false);
-				DSUtil.showErrorDialog( _model.getFrame(),
-										"enable-legacy-error",
-										(String[])null,
-										_section,
-										_resource);								
-			}
 		/* If the user tries to define a master or a hub, we need to log the changes.
 		   That's why we see if the change log entry exists or not.
 		   If the change log entry does not exist we display an error message telling 
 		   the user that he/she has to define the Change Log first.  In this dialog we 
 		   describe the steps to follow */
-		} else if ((source.equals(_rbIsSimpleMaster) &&
+		if ((source.equals(_rbIsSimpleMaster) &&
 			 _rbIsSimpleMaster.isSelected()) ||
 			(source.equals(_rbIsMultiMaster) &&
 			 _rbIsMultiMaster.isSelected()) ||
@@ -971,43 +922,7 @@ public class ReplicaSettingPanel extends BlankPanel {
 	  */
 	private boolean saveConfirmationDialog() {
 		boolean confirmation = true;
-		if (_cbReplicaEnabled.isSelected() &&
-			_cb4xConsumer.isSelected()) {
-		
-			/* The user is defining a multi master that can be updated by a 4.X server.
-			   With this configuration the replica won't accept client modifications. */
-			if (_rbIsMultiMaster.isSelected()) {
-				int option = DSUtil.showConfirmationDialog(
-														   _model.getFrame(),
-														   "confirm-multimaster-4xcompatible",
-														   "",
-														   _section,
-														   _resource);
-				if (option != JOptionPane.YES_OPTION) {
-					confirmation = false;
-				} 
-			} else if (_rbIsSimpleMaster.isSelected()) {
-				int option = DSUtil.showConfirmationDialog(
-														   _model.getFrame(),
-														   "confirm-simplemaster-4xcompatible",
-														   "",
-														   _section,
-														   _resource);
-				if (option != JOptionPane.YES_OPTION) {
-					confirmation = false;
-				} 
-			} else {
-				int option = DSUtil.showConfirmationDialog(
-														   _model.getFrame(),
-														   "confirm-readonly-4xcompatible",
-														   "",
-														   _section,
-														   _resource);
-				if (option != JOptionPane.YES_OPTION) {
-					confirmation = false;
-				}
-			}			
-		} else if (_rbIsSlave.isSelected() &&
+		if (_rbIsSlave.isSelected() &&
 				   !_saveIsSlave &&
 				   _saveReplicaEnabled &&
 				   hasReplicationAgreements()) {
@@ -1207,14 +1122,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 								 value);
 		attrSet.add(attr);
 
-		// nsds5ReplicaLegacyConsumer		
-		if (_cb4xConsumer.isSelected()) {
-			value = "on";
-			attr = new LDAPAttribute(ReplicationTool.REPLICA_LEGACY_CONSUMER_ATTR,
-									 value);
-			attrSet.add(attr);
-		}
-
 		// ndsDS5flags
 		/* If we are a slave we DON'T log changes */
 		if (!_rbIsSlave.isSelected()) {
@@ -1332,22 +1239,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 										 value));
 		}
 
-		// nsds5ReplicaLegacyConsumer	
-		modType = _saveDS5ReplicaLegacyConsumerExist?LDAPModification.REPLACE:LDAPModification.ADD;
-		if (_cb4xConsumer.isSelected() &&
-			!_save4xConsumer ) {
-			value = "on";
-			modSet.add(modType,
-					   new LDAPAttribute(ReplicationTool.REPLICA_LEGACY_CONSUMER_ATTR,
-										 value));		
-		} else if (!_cb4xConsumer.isSelected() &&
-				   _save4xConsumer) {
-			value = "off";
-			modSet.add(modType,
-					   new LDAPAttribute(ReplicationTool.REPLICA_LEGACY_CONSUMER_ATTR,
-										 value));	
-		}
-		
 		// ndsDS5flags
 		/* If we are a slave we DON'T log changes */
 		modType = _saveDS5FlagsExist?LDAPModification.REPLACE:LDAPModification.ADD;
@@ -1700,13 +1591,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 				isPurgeDelayDirty = true;
 			}
 		}
-
-		/* Check the 4x compatibility */
-		boolean is4xCompatibleDirty = false;
-		if (_cb4xConsumer.isSelected() != _save4xConsumer) {
-			is4xCompatibleDirty = true;			
-		}
-
 		/* Check the supplier DN field */
 		boolean isBindDNListDirty = false;
 		boolean isBindDNListValid = true;
@@ -1748,13 +1632,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 		} else {
 			setChangeState(_lBindDNList, CHANGE_STATE_UNMODIFIED);
 		}
-		
-		if (is4xCompatibleDirty) {	
-			setChangeState( _cb4xConsumer, CHANGE_STATE_MODIFIED );	
-		} else {	
-			setChangeState( _cb4xConsumer, CHANGE_STATE_UNMODIFIED);	
-		}
-
 		if (!isPurgeDelayValid) {
 			setChangeState(_lPurgeDelay, CHANGE_STATE_ERROR );
 			setChangeState(_cbPurgeDelayNever, CHANGE_STATE_ERROR );
@@ -1780,7 +1657,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 		}
 
 		if (isReplicaIDDirty ||			
-			is4xCompatibleDirty ||
 			isBindDNListDirty ||
 			isPurgeDelayDirty ||
 			isReferralListDirty ||
@@ -1887,7 +1763,6 @@ public class ReplicaSettingPanel extends BlankPanel {
 
 	private JCheckBox _cbReplicaEnabled = null;
 	private JCheckBox _cbPurgeDelayNever = null;
-	private JCheckBox _cb4xConsumer = null;
 
 	private JRadioButton _rbIsSimpleMaster = null;
 	private JRadioButton _rbIsSlave = null;
@@ -1918,7 +1793,6 @@ public class ReplicaSettingPanel extends BlankPanel {
     private boolean _saveReferralListExist = false;
     private boolean _savePurgeDelayExist = false;
 	private boolean _saveDS5FlagsExist = false;
-	private boolean _saveDS5ReplicaLegacyConsumerExist = false;
 
     private JLabel _lBindDNList = null;
 	private JLabel _lReferralList = null; 
@@ -1934,11 +1808,8 @@ public class ReplicaSettingPanel extends BlankPanel {
 	private boolean _saveIsHub = false;
 	private boolean _saveReadOnly = false;
 	private boolean _saveReplicaEnabled = false;
-        private boolean _saveWindowsSyncEnabled = false;
+	private boolean _saveWindowsSyncEnabled = false;
 	private boolean _saveDS5Flags = false;
-	private boolean _save4xConsumer = false;
-        
-       
 
 	/* These members, tell which are the values in the server (or the default values
 	   if there are no values on the server) */
diff --git a/src/com/netscape/admin/dirserv/panel/replication/ReplicationSettingPanel.java b/src/com/netscape/admin/dirserv/panel/replication/ReplicationSettingPanel.java
index 07c7a50..687f5b0 100644
--- a/src/com/netscape/admin/dirserv/panel/replication/ReplicationSettingPanel.java
+++ b/src/com/netscape/admin/dirserv/panel/replication/ReplicationSettingPanel.java
@@ -48,15 +48,11 @@ public class ReplicationSettingPanel extends DSTabbedPanel
         _tabbedPanel = _tabbedPane;
         _model = model;
         _supplierTab = new SupplierSettingPanel(_model);
-        _consumerTab = new LegacyConsumerSettingPanel(_model);
 		addTab(_supplierTab);
-		addTab(_consumerTab);



More information about the Pkg-fedora-ds-maintainers mailing list