Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 681D11755A for ; Thu, 16 Apr 2015 13:14:54 +0000 (UTC) Received: (qmail 31929 invoked by uid 500); 16 Apr 2015 13:14:54 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 31887 invoked by uid 500); 16 Apr 2015 13:14:54 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 31877 invoked by uid 99); 16 Apr 2015 13:14:54 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2015 13:14:54 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id F1EABAC00B5 for ; Thu, 16 Apr 2015 13:14:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1674067 - /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java Date: Thu, 16 Apr 2015 13:14:53 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150416131453.F1EABAC00B5@hades.apache.org> Author: elecharny Date: Thu Apr 16 13:14:53 2015 New Revision: 1674067 URL: http://svn.apache.org/r1674067 Log: Added the support of the olcLastMod and olcAddContentAcl flags Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java?rev=1674067&r1=1674066&r2=1674067&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/databases/DatabasesDetailsPage.java Thu Apr 16 13:14:53 2015 @@ -180,6 +180,12 @@ public class DatabasesDetailsPage implem /** The olcDisabled flag (only available in OpenDLAP 2.4.36) */ private BooleanWithDefaultWidget disabledBooleanWithDefaultWidget; + /** The olcLastMod flag */ + private BooleanWithDefaultWidget lastModBooleanWithDefaultWidget; + + /** The olcAddContentAcl flag */ + private BooleanWithDefaultWidget addContentAclBooleanWithDefaultWidget; + /** The Syncrepl consumer part */ private TableViewer replicationConsumersTableViewer; private Button addReplicationConsumerButton; @@ -562,9 +568,35 @@ public class DatabasesDetailsPage implem disabledCheckboxDecoration.setImage( OpenLdapConfigurationPlugin.getDefault().getImageDescriptor( OpenLdapConfigurationPluginConstants.IMG_INFORMATION ).createImage() ); disabledCheckboxDecoration.setMarginWidth( 4 ); - disabledCheckboxDecoration - .setDescriptionText( "Disable this Database" ); + disabledCheckboxDecoration.setDescriptionText( "Disable this Database" ); } + + // The olcLastMod parameter : Controls whether slapd will automatically maintain the + // modifiersName, modifyTimestamp, creatorsName, and createTimestamp attributes for entries + toolkit.createLabel( composite, "Last Modifier:" ); + lastModBooleanWithDefaultWidget = new BooleanWithDefaultWidget(); + lastModBooleanWithDefaultWidget.create( composite, toolkit ); + lastModBooleanWithDefaultWidget.setValue( false ); + lastModBooleanWithDefaultWidget.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) ); + ControlDecoration lastModCheckboxDecoration = new ControlDecoration( + lastModBooleanWithDefaultWidget.getControl(), SWT.CENTER | SWT.RIGHT ); + lastModCheckboxDecoration.setImage( OpenLdapConfigurationPlugin.getDefault().getImageDescriptor( + OpenLdapConfigurationPluginConstants.IMG_INFORMATION ).createImage() ); + lastModCheckboxDecoration.setMarginWidth( 4 ); + lastModCheckboxDecoration.setDescriptionText( "Controls whether slapd will automatically maintain the modifiersName, modifyTimestamp, creatorsName, and createTimestamp attributes for entries" ); + + // The olcAddAclContent parameter : Controls whether Add operations will perform ACL checks on the content of the entry being added + toolkit.createLabel( composite, "Last Modifier:" ); + addContentAclBooleanWithDefaultWidget = new BooleanWithDefaultWidget(); + addContentAclBooleanWithDefaultWidget.create( composite, toolkit ); + addContentAclBooleanWithDefaultWidget.setValue( false ); + addContentAclBooleanWithDefaultWidget.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) ); + ControlDecoration addAclContentCheckboxDecoration = new ControlDecoration( + addContentAclBooleanWithDefaultWidget.getControl(), SWT.CENTER | SWT.RIGHT ); + addAclContentCheckboxDecoration.setImage( OpenLdapConfigurationPlugin.getDefault().getImageDescriptor( + OpenLdapConfigurationPluginConstants.IMG_INFORMATION ).createImage() ); + addAclContentCheckboxDecoration.setMarginWidth( 4 ); + addAclContentCheckboxDecoration.setDescriptionText( "Controls whether Add operations will perform ACL checks on the content of the entry being added" ); } @@ -838,6 +870,12 @@ public class DatabasesDetailsPage implem { database.setOlcDisabled( disabledBooleanWithDefaultWidget.getValue() ); } + + // LastMod + database.setOlcLastMod( lastModBooleanWithDefaultWidget.getValue() ); + + // AddAclContent + database.setOlcAddContentAcl( addContentAclBooleanWithDefaultWidget.getValue() ); } } @@ -923,6 +961,9 @@ public class DatabasesDetailsPage implem { disabledBooleanWithDefaultWidget.setEnabled( false ); } + + lastModBooleanWithDefaultWidget.setEnabled( false ); + addContentAclBooleanWithDefaultWidget.setEnabled( false ); } else if ( isConfigDatabase( database ) ) { @@ -939,6 +980,9 @@ public class DatabasesDetailsPage implem { disabledBooleanWithDefaultWidget.setEnabled( false ); } + + lastModBooleanWithDefaultWidget.setEnabled( false ); + addContentAclBooleanWithDefaultWidget.setEnabled( false ); } else { @@ -955,6 +999,9 @@ public class DatabasesDetailsPage implem { disabledBooleanWithDefaultWidget.setEnabled( true ); } + + lastModBooleanWithDefaultWidget.setEnabled( true ); + addContentAclBooleanWithDefaultWidget.setEnabled( true ); } // Suffixes @@ -992,6 +1039,12 @@ public class DatabasesDetailsPage implem disabledBooleanWithDefaultWidget.setValue( database.getOlcDisabled() ); } + // LastMod + lastModBooleanWithDefaultWidget.setValue( database.getOlcLastMod() ); + + // AddAclContent + addContentAclBooleanWithDefaultWidget.setValue( database.getOlcAddContentAcl() ); + // Overlays refreshOverlaysTableViewer(); @@ -1160,6 +1213,9 @@ public class DatabasesDetailsPage implem addModifyListener( disabledBooleanWithDefaultWidget, dirtyWidgetModifyListener ); } + addModifyListener( lastModBooleanWithDefaultWidget, dirtyWidgetModifyListener ); + addModifyListener( addContentAclBooleanWithDefaultWidget, dirtyWidgetModifyListener ); + addSelectionChangedListener( databaseTypeComboViewer, databaseTypeComboViewerSelectionChangedListener ); addDoubleClickListener( overlaysTableViewer, overlaysTableViewerDoubleClickListener ); @@ -1194,6 +1250,9 @@ public class DatabasesDetailsPage implem removeModifyListener( disabledBooleanWithDefaultWidget, dirtyWidgetModifyListener ); } + removeModifyListener( lastModBooleanWithDefaultWidget, dirtyWidgetModifyListener ); + removeModifyListener( addContentAclBooleanWithDefaultWidget, dirtyWidgetModifyListener ); + removeSelectionChangedListener( databaseTypeComboViewer, databaseTypeComboViewerSelectionChangedListener ); removeDoubleClickListener( overlaysTableViewer, overlaysTableViewerDoubleClickListener );