directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1696737 [1/2] - in /directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl: model/ widgets/ widgets/composites/
Date Thu, 20 Aug 2015 09:27:18 GMT
Author: elecharny
Date: Thu Aug 20 09:27:17 2015
New Revision: 1696737

URL: http://svn.apache.org/r1696737
Log:
Commit my changes to shut up jenkins...
o Added a getStyle() method to the AclAttributeStyleEnum
o Big refactoring of the AttributesWidget
o Added Javadoc
o Propagated the OpenLdapAclValueContext to all the  ACL related widgets and Composites

All in all, it's a work in progress.


Added:
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseComposite.java
Removed:
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseComposite.java
Modified:
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/AttributesWidget.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclVisualEditorComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhatClauseWidget.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClauseWidget.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClausesBuilderWidget.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractClauseComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseCryptoStrengthComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/ClauseComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseDnComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseFilterComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseStarComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseAnonymousComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnAttributeComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseGroupComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSaslSsfComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSelfComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSsfComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseStarComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseTlsSsfComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseTransportSsfComposite.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseUsersComposite.java

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/model/AclAttributeStyleEnum.java Thu Aug 20 09:27:17 2015
@@ -59,6 +59,26 @@ public enum AclAttributeStyleEnum
 
     
     /**
+     * Return an instance of AclAttributeStyleEnum from a String
+     * 
+     * @param name The feature's name
+     * @return The associated AclAttributeStyleEnum
+     */
+    public static AclAttributeStyleEnum getStyle( String name )
+    {
+        for ( AclAttributeStyleEnum style : values() )
+        {
+            if ( style.name.equalsIgnoreCase( name ) )
+            {
+                return style;
+            }
+        }
+        
+        return NONE;
+    }
+
+    
+    /**
      * @return An array with all the Enum value's name
      */
     public static String[] getNames()

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/AttributesWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/AttributesWidget.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/AttributesWidget.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/AttributesWidget.java Thu Aug 20 09:27:17 2015
@@ -23,42 +23,81 @@ package org.apache.directory.studio.open
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.studio.common.ui.HistoryUtils;
+import org.apache.directory.studio.common.ui.CommonUIUtils;
 import org.apache.directory.studio.common.ui.widgets.AbstractWidget;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.common.ui.widgets.TableWidget;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.eclipse.jface.bindings.keys.KeyStroke;
-import org.eclipse.jface.fieldassist.ComboContentAdapter;
 import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.fieldassist.IContentProposal;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.VerifyEvent;
 import org.eclipse.swt.events.VerifyListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
 import org.apache.directory.studio.openldap.config.acl.OpenLdapAclEditorPlugin;
 import org.apache.directory.studio.openldap.config.acl.OpenLdapAclEditorPluginConstants;
+import org.apache.directory.studio.openldap.config.acl.model.AclAttribute;
+import org.apache.directory.studio.openldap.config.acl.model.AclAttributeStyleEnum;
+import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseAttributes;
+import org.apache.directory.studio.openldap.config.acl.wrapper.AclAttributeDecorator;
+import org.apache.directory.studio.openldap.config.acl.wrapper.AclAttributeWrapper;
 
 
 /**
+ * A widget used to create an AclWhatClause Attribute :
+ * 
+ * <pre>
+ * ...
+ * | .--------------------------------------------------------. |
+ * | | Attribute list :                                       | |
+ * | | +-------------------------------------------+          | |
+ * | | | abc                                       | (Add)    | |
+ * | | | !def                                      | (Edit)   | |
+ * | | | entry                                     | (Delete) | |
+ * | | +-------------------------------------------+          | |
+ * | | Val : [ ]  MatchingRule : [ ] Style : [--------------] | |
+ * | | Value : [////////////////////////////////////////////] | |
+ * | `--------------------------------------------------------' |
+ * ...
+ * </pre>
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class AttributesWidget extends AbstractWidget
 {
+    /** The Attributes table */
+    private TableWidget<AclAttributeWrapper> attributeTable;
+    
+    /** The WhatAttributes clause */
+    private AclWhatClauseAttributes aclWhatClauseAttributes;
+    
+    /** The checkbox for the Val */
+    private Button valButton;
+    
+    /** The checkbox for the matchingrule */
+    private Button matchingRuleButton;
+    
+    /** The style combo */
+    private Combo styleCombo;
+    
+    /** The Value Text */
+    private Text valueText;
+    
     /** The initial attributes. */
     private String[] initialAttributes;
 
-    /** The attributes combo */
-    private Combo attributesCombo;
-
     /** The proposal provider */
     private AttributesWidgetContentProposalProvider proposalProvider;
 
@@ -111,6 +150,7 @@ public class AttributesWidget extends Ab
             }
         }
     };
+    
 
     /** The modify listener */
     private ModifyListener modifyListener = new ModifyListener()
@@ -120,61 +160,149 @@ public class AttributesWidget extends Ab
             notifyListeners();
         }
     };
-
-
+    
+    
+    /** The Val button listener */
+    private SelectionAdapter valButtonListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent event )
+        {
+            // If the Val Button is selected, then the MatchingRule Button, 
+            // the Style Combo and the value Text must be enabled
+            boolean valSelected = valButton.getSelection();
+
+            matchingRuleButton.setEnabled( valSelected );
+            styleCombo.setEnabled( valSelected );
+            valueText.setEnabled( valSelected );
+            aclWhatClauseAttributes.setVal( valSelected );
+            
+            // TODO : disable the OK button if Val is set and there is no value
+        }
+    };
+    
+    
+    /** The MatchingRule button listener */
+    private SelectionAdapter matchingRuleButtonListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent event )
+        {
+            aclWhatClauseAttributes.setMatchingRule( matchingRuleButton.getSelection() );
+        }
+    };
+    
+    
+    /** The style combo listener */
+    private SelectionAdapter styleComboListener = new SelectionAdapter()
+    {
+        public void widgetSelected( SelectionEvent event )
+        {
+            aclWhatClauseAttributes.setStyle( AclAttributeStyleEnum.getStyle( styleCombo.getText() ) );
+        }
+    };
+    
+    
     /**
      * Creates the widget.
+     * <pre>
+     * Attribute list :
+     * +-------------------------------------------+
+     * | abc                                       | (Add)   
+     * | !def                                      | (Edit)  
+     * | entry                                     | (Delete)
+     * +-------------------------------------------+         
+     * Val : [ ]  MatchingRule : [ ] Style : [--------------]
+     * Value : [////////////////////////////////////////////]
+     * </pre>
      * 
      * @param parent the parent
      */
-    public void createWidget( Composite parent )
+    public void createWidget( Composite parent, IBrowserConnection connection, AclWhatClauseAttributes clause )
     {
-        // Combo
-        attributesCombo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 4, 1 );
         GridData gd = new GridData( GridData.FILL_HORIZONTAL );
         gd.horizontalSpan = 1;
-        gd.widthHint = 200;
-        attributesCombo.setLayoutData( gd );
-        attributesCombo.addVerifyListener( verifyListener );
-
-        // Content assist
-        proposalProvider = new AttributesWidgetContentProposalProvider();
-        proposalAdapter = new ContentProposalAdapter( attributesCombo, new ComboContentAdapter(),
-            proposalProvider, KeyStroke.getInstance( SWT.CTRL, SWT.SPACE ), new char[0] );
-        proposalProvider.setProposalAdapter( proposalAdapter );
-        proposalAdapter.setLabelProvider( labelProvider );
-
-        // History
-        String[] history = HistoryUtils.load( OpenLdapAclEditorPlugin.getDefault().getDialogSettings(),
-            OpenLdapAclEditorPluginConstants.DIALOGSETTING_KEY_ATTRIBUTES_HISTORY );
-        for ( int i = 0; i < history.length; i++ )
-        {
-            history[i] = history[i];
-        }
-        attributesCombo.setItems( history );
-        attributesCombo.setText( arrayToString( initialAttributes ) );
-        attributesCombo.addModifyListener( modifyListener );
+        gd.widthHint = 30;
+        composite.setLayoutData( gd );
+
+        // The Attribute table
+        BaseWidgetUtils.createLabel( composite, "Attributes list :", 4 );
+        AclAttributeDecorator decorator = new AclAttributeDecorator( composite.getShell(), connection );
+        attributeTable = new TableWidget<AclAttributeWrapper>( decorator );
+        attributeTable.createWidgetWithEdit( composite, null );
+        attributeTable.getControl().setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 4, 3 ) );
+        //attributeTable.addWidgetModifyListener( attributeTableListener );
+        
+        // The Val
+        valButton = BaseWidgetUtils.createCheckbox( composite, "Val", 1 );
+        valButton.addSelectionListener( valButtonListener );
+        
+        // The MatchingRule
+        matchingRuleButton = BaseWidgetUtils.createCheckbox( composite, "MatchingRule", 1 );
+        matchingRuleButton.setEnabled( false );
+        matchingRuleButton.addSelectionListener( matchingRuleButtonListener );
+        
+        // The style
+        BaseWidgetUtils.createLabel( composite, "Style :", 1 );
+        styleCombo = BaseWidgetUtils.createCombo( composite, AclAttributeStyleEnum.getNames(), 9, 1 );
+        styleCombo.setEnabled( false );
+        styleCombo.addSelectionListener( styleComboListener );
+
+        // The value
+        BaseWidgetUtils.createLabel( composite, "Value :", 1 );
+        valueText = BaseWidgetUtils.createText( composite, "", 3 );
+        valueText.setEnabled( false );
+        //valueText.addModifyListener( valueTextListener );
+        
+        initWidget( clause );
     }
 
 
     /**
-     * Sets the initial attributes.
-     * 
-     * @param initialAttributes the initial attributes
+     * Initialize the widget with the current value
      */
-    public void setInitialAttributes( String[] initialAttributes )
+    private void initWidget( AclWhatClauseAttributes clause )
     {
-        this.initialAttributes = initialAttributes;
-        attributesCombo.setText( arrayToString( initialAttributes ) );
+        aclWhatClauseAttributes = clause;
+        
+        // Update the table
+        setAttributes( clause.getAttributes() );
+        
+        // The Val button is always enabled
+        valButton.setEnabled( true );
+        
+        if ( clause.hasVal() )
+        {
+            matchingRuleButton.setEnabled( clause.hasMatchingRule() );
+            styleCombo.setEnabled( false );
+            styleCombo.setText( clause.getStyle().getName() );
+            valueText.setEnabled( false );
+            valueText.setText( CommonUIUtils.getTextValue( clause.getValue() ) );
+        }
+        else
+        {
+            matchingRuleButton.setEnabled( false );
+            styleCombo.setEnabled( false );
+            valueText.setEnabled( false );
+        }
     }
-
-
+    
+    
     /**
-     * @param browserConnection the browser connection to set
+     * Sets the initial attributes.
+     * 
+     * @param aclAttributes the initial attributes
      */
-    public void setBrowserConnection( IBrowserConnection browserConnection )
+    private void setAttributes( List<AclAttribute> aclAttributes )
     {
-        proposalProvider.setBrowserConnection( browserConnection );
+        List<AclAttributeWrapper> aclAttributeWrappers = new ArrayList<AclAttributeWrapper>( aclAttributes.size() );
+        
+        for ( AclAttribute aclAttribute: aclAttributes )
+        {
+            AclAttributeWrapper aclAttributeWrapper = new AclAttributeWrapper( aclAttribute );
+            aclAttributeWrappers.add( aclAttributeWrapper );
+        }
+        
+        attributeTable.setElements( aclAttributeWrappers );
     }
 
 
@@ -185,7 +313,6 @@ public class AttributesWidget extends Ab
      */
     public void setEnabled( boolean b )
     {
-        attributesCombo.setEnabled( b );
     }
 
 
@@ -194,98 +321,17 @@ public class AttributesWidget extends Ab
      * 
      * @return the attributes
      */
-    public String[] getAttributes()
+    public List<AclAttribute> getAttributes()
     {
-        String s = attributesCombo.getText();
-        return stringToArray( s );
-    }
-
-
-    /**
-     * Saves widget settings.
-     */
-    public void saveWidgetSettings()
-    {
-        HistoryUtils.save( OpenLdapAclEditorPlugin.getDefault().getDialogSettings(),
-            OpenLdapAclEditorPluginConstants.DIALOGSETTING_KEY_ATTRIBUTES_HISTORY,
-            arrayToString( getAttributes() ) );
-    }
-
-
-    /**
-     * Splits the given string into an array. Only the following
-     * characters are kept, all other are used to split the string
-     * and are truncated:
-     * <li>a-z
-     * <li>A-Z
-     * <li>0-9
-     * <li>-
-     * <li>.
-     * <li>;
-     * <li>_
-     * <li>*
-     * <li>+
-     * <li>@
-     * <li>!
-     * 
-     * @param s the string to split
-     * 
-     * @return the array with the splitted string, or null
-     */
-    public static String[] stringToArray( String s )
-    {
-        if ( s == null )
-        {
-            return null;
-        }
-        else
+        List<AclAttributeWrapper> elementList = attributeTable.getElements();
+        
+        List<AclAttribute> result = new ArrayList<AclAttribute>( elementList.size() );
+        
+        for ( AclAttributeWrapper element : elementList )
         {
-            List<String> attributeList = new ArrayList<String>();
-
-            StringBuffer temp = new StringBuffer();
-            for ( int i = 0; i < s.length(); i++ )
-            {
-                char c = s.charAt( i );
-
-                if ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) || c == '-'
-                    || c == '.' || c == ';' || c == '_' || c == '*' || c == '+' || c == '@' || c == '!' )
-                {
-                    temp.append( c );
-                }
-                else
-                {
-                    if ( temp.length() > 0 )
-                    {
-                        attributeList.add( temp.toString() );
-                        temp = new StringBuffer();
-                    }
-                }
-            }
-            if ( temp.length() > 0 )
-            {
-                attributeList.add( temp.toString() );
-            }
-
-            return ( String[] ) attributeList.toArray( new String[attributeList.size()] );
-        }
-    }
-
-
-    public static String arrayToString( String[] array )
-    {
-        if ( array == null || array.length == 0 )
-        {
-            return "";
-        }
-        else
-        {
-            StringBuffer sb = new StringBuffer( array[0] );
-            for ( int i = 1; i < array.length; i++ )
-            {
-                sb.append( "," );
-                sb.append( array[i] );
-            }
-            return sb.toString();
+            result.add( element.getAclAttribute() );
         }
+        
+        return result;
     }
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclVisualEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclVisualEditorComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclVisualEditorComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclVisualEditorComposite.java Thu Aug 20 09:27:17 2015
@@ -37,6 +37,26 @@ import org.apache.directory.studio.openl
  * <p>
  * It extends ScrolledComposite.
  * 
+ * <pre>
+ * .----------------(##Visual Editor##|  Source  )----------------.
+ * |                                                              |
+ * |  Access to "What"                                            |
+ * | .----------------------------------------------------------. |
+ * | |                                                          | |
+ * ...
+ * | |                                                          | |
+ * | `----------------------------------------------------------' |
+ * |  Access to "Who"                                             |
+ * | .----------------------------------------------------------. |
+ * | |                                                          | |
+ * ...
+ * | |                                                          | |
+ * | `----------------------------------------------------------' |
+ * |                                                              |
+ * |                                                              |
+ * `--------------------------------------------------------------'
+ * </pre>
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class OpenLdapAclVisualEditorComposite extends ScrolledComposite
@@ -53,8 +73,23 @@ public class OpenLdapAclVisualEditorComp
 
 
     /**
-     * Creates a new instance of OpenLdapAclVisualEditorComposite.
+     * Creates a new instance of OpenLdapAclVisualEditorComposite. It contains
+     * the WhatClause and WhoClause widgets :
      *
+     * <pre>
+     *  Access to "What"
+     * .----------------------------------------------------------.
+     * |                                                          |
+     * ...
+     * |                                                          |
+     * `----------------------------------------------------------'
+     *  Access to "Who"
+     * .----------------------------------------------------------.
+     * |                                                          |
+     * ...
+     * |                                                          |
+     * `----------------------------------------------------------'
+     * </pre>
      * @param parent a widget which will be the parent of the new instance (cannot be null)
      * @param style the style of widget to construct
      */
@@ -65,43 +100,22 @@ public class OpenLdapAclVisualEditorComp
         this.context = context;
 
         // Creating the composite
-        Composite composite = new Composite( this, SWT.NONE );
-        composite.setLayout( new GridLayout() );
-        composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
-
-        // Creating the widgets
-        createWhatClauseWidget( composite );
-        createWhoClausesWidget( composite );
+        Composite visualEditorComposite = new Composite( this, SWT.NONE );
+        visualEditorComposite.setLayout( new GridLayout() );
+        visualEditorComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
+
+        // Creating the WhatClause widget
+        whatClauseWidget = new OpenLdapAclWhatClauseWidget( this, visualEditorComposite, context );
+
+        // Creating the WhoClause widget
+        whoClausesBuilderWidget = new OpenLdapAclWhoClausesBuilderWidget( this, context );
+        whoClausesBuilderWidget.create( visualEditorComposite );
 
         // Configuring the composite
-        setContent( composite );
+        setContent( visualEditorComposite );
         setExpandHorizontal( true );
         setExpandVertical( true );
-        setMinSize( composite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
-    }
-
-
-    /**
-     * Creates the "What" clause widget.
-     *
-     * @param parent the parent composite
-     */
-    private void createWhatClauseWidget( Composite parent )
-    {
-        whatClauseWidget = new OpenLdapAclWhatClauseWidget( this, context );
-        whatClauseWidget.create( parent );
-    }
-
-
-    /**
-     * Creates the "Who" clauses widget.
-     *
-     * @param parent the parent composite
-     */
-    private void createWhoClausesWidget( Composite parent )
-    {
-        whoClausesBuilderWidget = new OpenLdapAclWhoClausesBuilderWidget( this, context );
-        whoClausesBuilderWidget.create( parent );
+        setMinSize( visualEditorComposite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
     }
 
 

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhatClauseWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhatClauseWidget.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhatClauseWidget.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhatClauseWidget.java Thu Aug 20 09:27:17 2015
@@ -39,8 +39,26 @@ import org.apache.directory.studio.openl
 
 
 /**
- * The WhatCaluse widget builder
+ * The WhatClause widget. It coves all the What possible options :
+ * <ul>
+ * <li>DN</li>
+ * <li>Filter</li>
+ * <li>Attributes</li>
+ * </ul>
+ * The three possible options, when selected, will open new composites dynamically.
  * 
+ * <pre>
+ * </pre>
+ * .---------------------------------------------------------.
+ * |                                                         |
+ * | [ ] DN                                                  |
+ * |                                                         |
+ * | [ ] Filter                                              |
+ * |                                                         |
+ * | [ ] Attributes                                          |
+ * |                                                         |
+ * `---------------------------------------------------------'
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class OpenLdapAclWhatClauseWidget extends AbstractWidget
@@ -108,6 +126,10 @@ public class OpenLdapAclWhatClauseWidget
     };
     
     
+    /**
+     * The listener on the Attributes Checkbox. It creates the Attributes composite
+     * when selected, dispose it when unchecked.
+     */
     private SelectionAdapter attributesCheckboxListener = new SelectionAdapter()
     {
         public void widgetSelected( org.eclipse.swt.events.SelectionEvent e )
@@ -128,19 +150,31 @@ public class OpenLdapAclWhatClauseWidget
 
 
     /**
-     * Creates a new instance of OpenLdapAclWhatClauseWidget.
+     * Creates a new instance of OpenLdapAclWhatClauseWidget. It's just a list of
+     * 3 checkboxes which, when selected, open a new composite dynamically created.
+     * 
+     * <pre>
+     * .---------------------------------------------------------.
+     * |                                                         |
+     * | [ ] DN                                                  |
+     * |                                                         |
+     * | [ ] Filter                                              |
+     * |                                                         |
+     * | [ ] Attributes                                          |
+     * |                                                         |
+     * `---------------------------------------------------------'
+     * </pre>
      * 
      * @param visualEditorComposite the visual editor composite
+     * @param parent The WhatClause parent's composite
+     * @param context the Acl context
      */
-    public OpenLdapAclWhatClauseWidget( OpenLdapAclVisualEditorComposite visualEditorComposite, OpenLdapAclValueWithContext context )
+    public OpenLdapAclWhatClauseWidget( OpenLdapAclVisualEditorComposite visualEditorComposite, 
+        Composite parent, OpenLdapAclValueWithContext context )
     {
         this.visualEditorComposite = visualEditorComposite;
         this.context = context;
-    }
-
-
-    public void create( Composite parent )
-    {
+        
         // Creating the widget base composite
         composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
 
@@ -151,17 +185,17 @@ public class OpenLdapAclWhatClauseWidget
         // DN
         dnCheckbox = BaseWidgetUtils.createCheckbox( whatGroup, "DN", 1 );
         dnComposite = BaseWidgetUtils.createColumnContainer( whatGroup, 1, 1 );
+        dnCheckbox.addSelectionListener( dnCheckboxListener );
 
         // Filter
         filterCheckbox = BaseWidgetUtils.createCheckbox( whatGroup, "Filter", 1 );
         filterComposite = BaseWidgetUtils.createColumnContainer( whatGroup, 1, 1 );
+        filterCheckbox.addSelectionListener( filterCheckboxListener );
 
         // Attributes
         attributesCheckbox = BaseWidgetUtils.createCheckbox( whatGroup, "Attributes", 1 );
         attributesComposite = BaseWidgetUtils.createColumnContainer( whatGroup, 1, 1 );
-
-        // Adding the listeners to the UI widgets
-        addListeners();
+        attributesCheckbox.addSelectionListener( attributesCheckboxListener );
     }
 
 
@@ -174,9 +208,10 @@ public class OpenLdapAclWhatClauseWidget
         dnGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         dnSubComposite = dnGroup;
 
-        dnClauseComposite = new WhatClauseDnComposite( visualEditorComposite );
+        dnClauseComposite = new WhatClauseDnComposite( context, visualEditorComposite );
         dnClauseComposite.createComposite( dnGroup );
 
+        /*
         AclWhatClause whatClause = context.getAclItem().getWhatClause();
         
         if ( whatClause.getDnClause() != null )
@@ -188,6 +223,7 @@ public class OpenLdapAclWhatClauseWidget
         {
             dnClauseComposite.setConnection( context.getConnection() );
         }
+        */
     }
 
 
@@ -200,9 +236,10 @@ public class OpenLdapAclWhatClauseWidget
         filterGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
         filterSubComposite = filterGroup;
 
-        filterClauseComposite = new WhatClauseFilterComposite( visualEditorComposite );
+        filterClauseComposite = new WhatClauseFilterComposite( context, visualEditorComposite );
         filterClauseComposite.createComposite( filterGroup );
 
+        /*
         AclWhatClause whatClause = context.getAclItem().getWhatClause();
 
         if ( whatClause.getFilterClause() != null )
@@ -214,6 +251,7 @@ public class OpenLdapAclWhatClauseWidget
         {
             filterClauseComposite.setConnection( context.getConnection() );
         }
+        */
     }
 
 
@@ -222,14 +260,12 @@ public class OpenLdapAclWhatClauseWidget
      */
     private void createAttributesComposite()
     {
-        Group attributesGroup = BaseWidgetUtils.createGroup( attributesComposite, "", 1 );
-        attributesGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
-        attributesSubComposite = attributesGroup;
-
-        attributesClauseComposite = new WhatClauseAttributesComposite( visualEditorComposite );
-        attributesClauseComposite.createComposite( attributesGroup );
-        attributesClauseComposite.setContext( context );
+        attributesSubComposite = BaseWidgetUtils.createGroup( attributesComposite, "", 1 );
+        attributesSubComposite.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
+        attributesClauseComposite = new WhatClauseAttributesComposite( visualEditorComposite, attributesSubComposite, context );
+
+        /*
         AclWhatClause whatClause = context.getAclItem().getWhatClause();
 
         if ( whatClause.getAttributesClause() != null )
@@ -241,6 +277,7 @@ public class OpenLdapAclWhatClauseWidget
         {
             attributesClauseComposite.setConnection( context.getConnection() );
         }
+        */
     }
 
 
@@ -259,24 +296,12 @@ public class OpenLdapAclWhatClauseWidget
 
 
     /**
-     * Adds the listeners to the UI widgets.
-     */
-    private void addListeners()
-    {
-        dnCheckbox.addSelectionListener( dnCheckboxListener );
-        filterCheckbox.addSelectionListener( filterCheckboxListener );
-        attributesCheckbox.addSelectionListener( attributesCheckboxListener );
-    }
-
-
-    /**
      * Refresh the WhatClause GUI
      */
     public void refresh()
     {
         AclWhatClause whatClause = context.getAclItem().getWhatClause();
 
-
         if ( whatClause != null )
         {
             // DN clause

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClauseWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClauseWidget.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClauseWidget.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClauseWidget.java Thu Aug 20 09:27:17 2015
@@ -38,6 +38,7 @@ import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
 import org.apache.directory.studio.openldap.config.acl.OpenLdapAclEditorPlugin;
 import org.apache.directory.studio.openldap.config.acl.OpenLdapAclEditorPluginConstants;
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.dialogs.OpenLdapAccessLevelDialog;
 import org.apache.directory.studio.openldap.config.acl.model.AclAccessLevel;
 import org.apache.directory.studio.openldap.config.acl.model.AclAccessLevelLevelEnum;
@@ -70,6 +71,9 @@ import org.apache.directory.studio.openl
  */
 public class OpenLdapAclWhoClauseWidget extends AbstractWidget implements SelectionListener
 {
+    /** The ACL context */
+    private OpenLdapAclValueWithContext context;
+
     /** The array of clauses */
     private Object[] clauses = new Object[]
         {
@@ -293,11 +297,13 @@ public class OpenLdapAclWhoClauseWidget
      * @param builderWidget the parent builder widget
      * @param index the row index
      */
-    public OpenLdapAclWhoClauseWidget( OpenLdapAclWhoClausesBuilderWidget builderWidget, AclWhoClause clause, int index )
+    public OpenLdapAclWhoClauseWidget( OpenLdapAclWhoClausesBuilderWidget builderWidget, 
+                OpenLdapAclValueWithContext context, AclWhoClause clause, int index )
     {
         this.builderWidget = builderWidget;
         this.clause = clause;
         this.index = index;
+        this.context = context;
     }
 
 
@@ -686,7 +692,7 @@ public class OpenLdapAclWhoClauseWidget
     {
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
-        WhoClauseDnComposite composite = new WhoClauseDnComposite( builderWidget.visualEditorComposite );
+        WhoClauseDnComposite composite = new WhoClauseDnComposite( context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 
@@ -698,7 +704,7 @@ public class OpenLdapAclWhoClauseWidget
     {
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
-        WhoClauseDnAttributeComposite composite = new WhoClauseDnAttributeComposite( builderWidget.visualEditorComposite );
+        WhoClauseDnAttributeComposite composite = new WhoClauseDnAttributeComposite( context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 
@@ -710,7 +716,7 @@ public class OpenLdapAclWhoClauseWidget
     {
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
-        WhoClauseGroupComposite composite = new WhoClauseGroupComposite( builderWidget.visualEditorComposite );
+        WhoClauseGroupComposite composite = new WhoClauseGroupComposite( context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 
@@ -722,7 +728,7 @@ public class OpenLdapAclWhoClauseWidget
     {
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
-        WhoClauseSaslSsfComposite composite = new WhoClauseSaslSsfComposite( builderWidget.visualEditorComposite );
+        WhoClauseSaslSsfComposite composite = new WhoClauseSaslSsfComposite( context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 
@@ -734,7 +740,7 @@ public class OpenLdapAclWhoClauseWidget
     {
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
-        WhoClauseSsfComposite composite = new WhoClauseSsfComposite( builderWidget.visualEditorComposite );
+        WhoClauseSsfComposite composite = new WhoClauseSsfComposite( context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 
@@ -746,7 +752,7 @@ public class OpenLdapAclWhoClauseWidget
     {
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
-        WhoClauseTlsSsfComposite composite = new WhoClauseTlsSsfComposite( builderWidget.visualEditorComposite );
+        WhoClauseTlsSsfComposite composite = new WhoClauseTlsSsfComposite( context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 
@@ -759,7 +765,7 @@ public class OpenLdapAclWhoClauseWidget
         configurationComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );
 
         WhoClauseTransportSsfComposite composite = new WhoClauseTransportSsfComposite(
-            builderWidget.visualEditorComposite );
+            context, builderWidget.visualEditorComposite );
         composite.createComposite( configurationComposite );
     }
 

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClausesBuilderWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClausesBuilderWidget.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClausesBuilderWidget.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/OpenLdapAclWhoClausesBuilderWidget.java Thu Aug 20 09:27:17 2015
@@ -161,7 +161,7 @@ public class OpenLdapAclWhoClausesBuilde
             }
 
             // Creating the clause widget
-            OpenLdapAclWhoClauseWidget clauseWidget = new OpenLdapAclWhoClauseWidget( this, whoClause, pos );
+            OpenLdapAclWhoClauseWidget clauseWidget = new OpenLdapAclWhoClauseWidget( this, context, whoClause, pos );
             clauseWidget.create( whoGroup );
             
             clauseWidget.addWidgetModifyListener( whoClauseModifyListener );

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractClauseComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractClauseComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractClauseComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractClauseComposite.java Thu Aug 20 09:27:17 2015
@@ -30,11 +30,8 @@ import org.eclipse.swt.widgets.Composite
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractClauseComposite<C> implements ClauseComposite<C>
+public abstract class AbstractClauseComposite implements ClauseComposite
 {
-    /** The clause */
-    protected C clause;
-
     /** The visual editor composite */
     protected Composite visualEditorComposite;
 
@@ -58,10 +55,11 @@ public abstract class AbstractClauseComp
      *
      * @param clause the clause
      */
-    public AbstractClauseComposite( C clause, Composite visualEditorComposite )
+    public AbstractClauseComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        this.clause = clause;
+        this.context = context;
         this.visualEditorComposite = visualEditorComposite;
+        connection = context.getConnection();
     }
 
 
@@ -110,24 +108,6 @@ public abstract class AbstractClauseComp
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
-    public C getClause()
-    {
-        return clause;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setClause( C clause )
-    {
-        this.clause = clause;
-    }
-
-
     /**
      * {@inheritDoc}
      */

Added: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseComposite.java?rev=1696737&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseComposite.java (added)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseComposite.java Thu Aug 20 09:27:17 2015
@@ -0,0 +1,73 @@
+/*
+ *   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.directory.studio.openldap.config.acl.widgets.composites;
+
+
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * A basic common abstract class implementing {@link ClauseComposite}.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public abstract class AbstractWhoClauseComposite<C> extends AbstractClauseComposite
+{
+    /** The Who clause */
+    protected C whoClause;
+
+    /**
+     * Creates a new instance of AbstractClauseComposite.
+     */
+    public AbstractWhoClauseComposite()
+    {
+    }
+
+
+    /**
+     * Creates a new instance of AbstractClauseComposite.
+     *
+     * @param whoClause the clause
+     */
+    public AbstractWhoClauseComposite( OpenLdapAclValueWithContext context, C whoClause, Composite visualEditorComposite )
+    {
+        super( context, visualEditorComposite );
+        this.whoClause = whoClause;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public C getClause()
+    {
+        return whoClause;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setClause( C clause )
+    {
+        this.whoClause = clause;
+    }
+}

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseCryptoStrengthComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseCryptoStrengthComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseCryptoStrengthComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/AbstractWhoClauseCryptoStrengthComposite.java Thu Aug 20 09:27:17 2015
@@ -33,7 +33,7 @@ import org.eclipse.swt.events.ModifyList
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Spinner;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AbstractAclWhoClauseCryptoStrength;
 import org.apache.directory.studio.openldap.config.acl.widgets.AclWhoClauseSsfValuesEnum;
 
@@ -45,7 +45,7 @@ import org.apache.directory.studio.openl
  * @param <C>
  */
 public class AbstractWhoClauseCryptoStrengthComposite<C extends AbstractAclWhoClauseCryptoStrength> extends
-    AbstractClauseComposite<C> implements WhoClauseComposite<C>
+    AbstractWhoClauseComposite<C>
 {
     /** The array of SSF who clause values */
     private static final AclWhoClauseSsfValuesEnum[] aclWhoClauseSsfValues = new AclWhoClauseSsfValuesEnum[]
@@ -76,9 +76,9 @@ public class AbstractWhoClauseCryptoStre
      * @param clause the clause
      * @param visualEditorComposite the visual editor composite
      */
-    public AbstractWhoClauseCryptoStrengthComposite( C clause, Composite visualEditorComposite )
+    public AbstractWhoClauseCryptoStrengthComposite( OpenLdapAclValueWithContext context, C clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/ClauseComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/ClauseComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/ClauseComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/ClauseComposite.java Thu Aug 20 09:27:17 2015
@@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.Composite
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface ClauseComposite<C>
+public interface ClauseComposite
 {
     /**
      * Creates the composite.
@@ -73,22 +73,6 @@ public interface ClauseComposite<C>
 
 
     /**
-     * Gets the clause.
-     *
-     * @return the clause
-     */
-    C getClause();
-
-
-    /**
-     * Sets the clause.
-     *
-     * @param clause the clause
-     */
-    void setClause( C clause );
-
-
-    /**
      * Saves widget settings.
      */
     void saveWidgetSettings();

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java Thu Aug 20 09:27:17 2015
@@ -23,34 +23,62 @@ package org.apache.directory.studio.open
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.directory.api.ldap.model.schema.AttributeType;
+import org.apache.directory.api.util.Strings;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
+import org.apache.directory.studio.openldap.config.acl.model.AclAttribute;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClause;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseAttributes;
 import org.apache.directory.studio.openldap.config.acl.widgets.AttributesWidget;
 
 
 /**
+ * The WhatClause Attribute form. It contains only the AttributeWidget :
  * 
+ * <pre>
+ * ...
+ * | .--------------------------------------------------------. |
+ * | | Attribute list :                                       | |
+ * | | +-------------------------------------------+          | |
+ * | | | abc                                       | (Add)    | |
+ * | | | !def                                      | (Edit)   | |
+ * | | | entry                                     | (Delete) | |
+ * | | +-------------------------------------------+          | |
+ * | | Val : [ ]  MatchingRule : [ ] Style : [--------------] | |
+ * | | Value : [////////////////////////////////////////////] | |
+ * | `--------------------------------------------------------' |
+ * ...
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhatClauseAttributesComposite extends AbstractClauseComposite<AclWhatClauseAttributes> implements
-    WhatClauseComposite<AclWhatClauseAttributes>
+public class WhatClauseAttributesComposite extends AbstractClauseComposite
 {
     /** The attributes widget */
     private AttributesWidget attributesWidget;
 
-    /** The modify listener */
+    /** 
+     * The modify listener. We update the AclWhatClause attributes with what's inside the 
+     * Attribute widget (ie, we add the new attributes).
+     * Note that some attributes might be prefixed by '!' or '@'.
+     **/
     private WidgetModifyListener modifyListener = new WidgetModifyListener()
     {
         public void widgetModified( WidgetModifyEvent event )
         {
-            getClause().clearAttributes();
-            List<String> attributes = Arrays.asList( attributesWidget.getAttributes() );
-            getClause().addAllAttributes( attributes );
+            // Get the clause attributes and convert them to attributeTypes
+            List<AclAttribute> existingAttributes = null;//getClause().getAttributes();
+            //List<AttributeType> existingAttributeType = convertToAttributeTypes( existingAttributes );
+            
+            // Get the added attributes
+            List<AclAttribute> attributes = attributesWidget.getAttributes();
+            
+            //getClause().addAllAttributes( attributes );
             AclWhatClause aclWhatClause = context.getAclItem().getWhatClause();
             AclWhatClauseAttributes whatClauseAttributes = aclWhatClause.getAttributesClause();
             
@@ -58,6 +86,12 @@ public class WhatClauseAttributesComposi
             {
                 whatClauseAttributes = new AclWhatClauseAttributes();
             }
+            else 
+            {
+                for ( AclAttribute attribute : whatClauseAttributes.getAttributes() )
+                {
+                }
+            }
             
             whatClauseAttributes.addAllAttributes( attributes );
             aclWhatClause.setAttributesClause( whatClauseAttributes );
@@ -65,77 +99,44 @@ public class WhatClauseAttributesComposi
     };
 
 
-    public WhatClauseAttributesComposite( AclWhatClauseAttributes clause, Composite visualEditorComposite )
-    {
-        super( clause, visualEditorComposite );
-    }
-
-
-    public WhatClauseAttributesComposite( Composite visualEditorComposite )
-    {
-        super( new AclWhatClauseAttributes(), visualEditorComposite );
-    }
-
-
-    public Composite createComposite( Composite parent )
-    {
-        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 2, 1 );
-
-        BaseWidgetUtils.createLabel( composite, "Attributes:", 1 );
-        attributesWidget = new AttributesWidget();
-        attributesWidget.createWidget( composite );
-        attributesWidget.addWidgetModifyListener( modifyListener );
-
-        return composite;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setClause( AclWhatClauseAttributes clause )
-    {
-        super.setClause( clause );
-        setInput();
-    }
-
-
     /**
-     * {@inheritDoc}
+     * Create a WhatClauseAttributesComposite instance
+     * <pre>
+     * ...
+     * | .--------------------------------------------------------. |
+     * | | Attribute list :                                       | |
+     * | | +-------------------------------------------+          | |
+     * | | | abc                                       | (Add)    | |
+     * | | | !def                                      | (Edit)   | |
+     * | | | entry                                     | (Delete) | |
+     * | | +-------------------------------------------+          | |
+     * | | Val : [ ]  MatchingRule : [ ] Style : [--------------] | |
+     * | | Value : [////////////////////////////////////////////] | |
+     * | `--------------------------------------------------------' |
+     * ...
+     * </pre>
+     * 
+     * @param visualEditorComposite The parent composite
+     * @param attributesSubComposite The Parent sub-composite
+     * @param context The OpenLdapAclValueWithContext instance
      */
-    public void setConnection( IBrowserConnection connection )
+    public WhatClauseAttributesComposite( Composite visualEditorComposite, Composite attributesSubComposite, OpenLdapAclValueWithContext context )
     {
-        super.setConnection( connection );
-        setInput();
-    }
-
-
-    private void setInput()
-    {
-        if ( attributesWidget != null )
+        super( context, visualEditorComposite );
+        Composite whatComposite = BaseWidgetUtils.createColumnContainer( attributesSubComposite, 2, 1 );
+        
+        // Create the Attributes clause if it does not already exist
+        AclWhatClause aclWhatClause = context.getAclItem().getWhatClause();
+        
+        if ( aclWhatClause.getAttributesClause() == null )
         {
-            attributesWidget.setBrowserConnection( connection );
-            
-            if ( clause != null )
-            {
-                attributesWidget.setInitialAttributes( clause.getAttributes().toArray( new String[0] ) );
-            }
-            else
-            {
-                attributesWidget.setInitialAttributes( new String[0] );
-            }
+            aclWhatClause.setAttributesClause( new AclWhatClauseAttributes() );
         }
-    }
 
-
-    /**
-     * Saves widget settings.
-     */
-    public void saveWidgetSettings()
-    {
-        if ( attributesWidget != null )
-        {
-            attributesWidget.saveWidgetSettings();
-        }
+        // The Attribute widget
+        BaseWidgetUtils.createLabel( whatComposite, "", 1 );
+        attributesWidget = new AttributesWidget();
+        attributesWidget.createWidget( whatComposite, connection, aclWhatClause.getAttributesClause() );
+        attributesWidget.addWidgetModifyListener( modifyListener );
     }
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseDnComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseDnComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseDnComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseDnComposite.java Thu Aug 20 09:27:17 2015
@@ -33,6 +33,8 @@ import org.eclipse.jface.viewers.LabelPr
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
+import org.apache.directory.studio.openldap.config.acl.model.AclWhatClause;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseDn;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseDnTypeEnum;
 
@@ -41,8 +43,7 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhatClauseDnComposite extends AbstractClauseComposite<AclWhatClauseDn> implements
-    WhatClauseComposite<AclWhatClauseDn>
+public class WhatClauseDnComposite extends AbstractClauseComposite
 {
     /** The entry widget */
     private EntryWidget entryWidget;
@@ -52,20 +53,20 @@ public class WhatClauseDnComposite exten
     {
         public void widgetModified( WidgetModifyEvent event )
         {
-            getClause().setPattern( entryWidget.getDn().toString() );
+            context.getAclItem().getWhatClause().getDnClause().setPattern( entryWidget.getDn().toString() );
         }
     };
 
 
-    public WhatClauseDnComposite( AclWhatClauseDn clause, Composite visualEditorComposite )
+    public WhatClauseDnComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
-    }
-
-
-    public WhatClauseDnComposite( Composite visualEditorComposite )
-    {
-        super( new AclWhatClauseDn(), visualEditorComposite );
+        super( context, visualEditorComposite );
+        AclWhatClause aclWhatClause = context.getAclItem().getWhatClause();
+        
+        if ( aclWhatClause.getDnClause() == null )
+        {
+            aclWhatClause.setDnClause( new AclWhatClauseDn() );
+        }
     }
 
 
@@ -108,16 +109,6 @@ public class WhatClauseDnComposite exten
     /**
      * {@inheritDoc}
      */
-    public void setClause( AclWhatClauseDn clause )
-    {
-        super.setClause( clause );
-        setInput();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void setConnection( IBrowserConnection connection )
     {
         super.setConnection( connection );
@@ -129,11 +120,11 @@ public class WhatClauseDnComposite exten
     {
         if ( entryWidget != null )
         {
-            if ( clause != null )
+            if ( context.getAclItem().getWhatClause().getDnClause() != null )
             {
                 try
                 {
-                    entryWidget.setInput( connection, new Dn( clause.getPattern() ) );
+                    entryWidget.setInput( connection, new Dn( context.getAclItem().getWhatClause().getDnClause().getPattern() ) );
                 }
                 catch ( LdapInvalidDnException e )
                 {

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseFilterComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseFilterComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseFilterComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseFilterComposite.java Thu Aug 20 09:27:17 2015
@@ -26,6 +26,7 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.eclipse.swt.widgets.Composite;
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseFilter;
 
 
@@ -33,8 +34,7 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhatClauseFilterComposite extends AbstractClauseComposite<AclWhatClauseFilter> implements
-    WhatClauseComposite<AclWhatClauseFilter>
+public class WhatClauseFilterComposite extends AbstractClauseComposite
 {
     /** The filter widget */
     private FilterWidget filterWidget;
@@ -43,20 +43,14 @@ public class WhatClauseFilterComposite e
     {
         public void widgetModified( WidgetModifyEvent event )
         {
-            getClause().setFilter( filterWidget.getFilter() );
+            context.getAclItem().getWhatClause().getFilterClause().setFilter( filterWidget.getFilter() );
         }
     };
 
 
-    public WhatClauseFilterComposite( AclWhatClauseFilter clause, Composite visualEditorComposite )
+    public WhatClauseFilterComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
-    }
-
-
-    public WhatClauseFilterComposite( Composite visualEditorComposite )
-    {
-        super( new AclWhatClauseFilter(), visualEditorComposite );
+        super( context, visualEditorComposite );
     }
 
 
@@ -76,16 +70,6 @@ public class WhatClauseFilterComposite e
     /**
      * {@inheritDoc}
      */
-    public void setClause( AclWhatClauseFilter clause )
-    {
-        super.setClause( clause );
-        setInput();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void setConnection( IBrowserConnection connection )
     {
         super.setConnection( connection );
@@ -98,9 +82,11 @@ public class WhatClauseFilterComposite e
         if ( filterWidget != null )
         {
             filterWidget.setBrowserConnection( connection );
-            if ( clause != null )
+            AclWhatClauseFilter aclWhatClauseFilter = context.getAclItem().getWhatClause().getFilterClause();
+            
+            if ( aclWhatClauseFilter != null )
             {
-                String filter = clause.getFilter();
+                String filter = aclWhatClauseFilter.getFilter();
                 filterWidget.setFilter( ( filter != null ) ? filter : "" );
             }
             else

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseStarComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseStarComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseStarComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseStarComposite.java Thu Aug 20 09:27:17 2015
@@ -21,7 +21,7 @@ package org.apache.directory.studio.open
 
 
 import org.eclipse.swt.widgets.Composite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseStar;
 
 
@@ -29,17 +29,10 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhatClauseStarComposite extends AbstractClauseComposite<AclWhatClauseStar> implements
-    WhatClauseComposite<AclWhatClauseStar>
+public class WhatClauseStarComposite extends AbstractClauseComposite
 {
-    public WhatClauseStarComposite( AclWhatClauseStar clause, Composite visualEditorComposite )
-    {
-        super( clause, visualEditorComposite );
-    }
-
-
-    public WhatClauseStarComposite( Composite visualEditorComposite )
+    public WhatClauseStarComposite( OpenLdapAclValueWithContext context, AclWhatClauseStar clause, Composite visualEditorComposite )
     {
-        super( new AclWhatClauseStar(), visualEditorComposite );
+        super( context, visualEditorComposite );
     }
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseAnonymousComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseAnonymousComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseAnonymousComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseAnonymousComposite.java Thu Aug 20 09:27:17 2015
@@ -21,7 +21,7 @@ package org.apache.directory.studio.open
 
 
 import org.eclipse.swt.widgets.Composite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseAnonymous;
 
 
@@ -29,17 +29,16 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseAnonymousComposite extends AbstractClauseComposite<AclWhoClauseAnonymous> implements
-    WhoClauseComposite<AclWhoClauseAnonymous>
+public class WhoClauseAnonymousComposite extends AbstractWhoClauseComposite<AclWhoClauseAnonymous>
 {
-    public WhoClauseAnonymousComposite( AclWhoClauseAnonymous clause, Composite visualEditorComposite )
+    public WhoClauseAnonymousComposite( OpenLdapAclValueWithContext context, AclWhoClauseAnonymous clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseAnonymousComposite( Composite visualEditorComposite )
+    public WhoClauseAnonymousComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseAnonymous(), visualEditorComposite );
+        super( context, new AclWhoClauseAnonymous(), visualEditorComposite );
     }
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseComposite.java Thu Aug 20 09:27:17 2015
@@ -28,6 +28,6 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface WhoClauseComposite<C extends AclWhoClause> extends ClauseComposite<C>
+public interface WhoClauseComposite<C extends AclWhoClause> extends ClauseComposite
 {
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnAttributeComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnAttributeComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnAttributeComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnAttributeComposite.java Thu Aug 20 09:27:17 2015
@@ -25,7 +25,7 @@ import org.apache.directory.studio.ldapb
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseDnAttr;
 
 
@@ -33,21 +33,20 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseDnAttributeComposite extends AbstractClauseComposite<AclWhoClauseDnAttr> implements
-    WhoClauseComposite<AclWhoClauseDnAttr>
+public class WhoClauseDnAttributeComposite extends AbstractWhoClauseComposite<AclWhoClauseDnAttr>
 {
     private Combo dnAttributeCombo;
 
 
-    public WhoClauseDnAttributeComposite( AclWhoClauseDnAttr clause, Composite visualEditorComposite )
+    public WhoClauseDnAttributeComposite( OpenLdapAclValueWithContext context, AclWhoClauseDnAttr clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseDnAttributeComposite( Composite visualEditorComposite )
+    public WhoClauseDnAttributeComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseDnAttr(), visualEditorComposite );
+        super( context, new AclWhoClauseDnAttr(), visualEditorComposite );
     }
 
 
@@ -91,9 +90,9 @@ public class WhoClauseDnAttributeComposi
     {
         if ( dnAttributeCombo != null )
         {
-            if ( clause != null )
+            if ( whoClause != null )
             {
-                dnAttributeCombo.setText( clause.getAttribute() );
+                dnAttributeCombo.setText( whoClause.getAttribute() );
             }
             else
             {

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseDnComposite.java Thu Aug 20 09:27:17 2015
@@ -33,6 +33,7 @@ import org.eclipse.jface.viewers.LabelPr
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhatClauseDnTypeEnum;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseDn;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseDnTypeEnum;
@@ -41,8 +42,7 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseDnComposite extends AbstractClauseComposite<AclWhoClauseDn> implements
-    WhoClauseComposite<AclWhoClauseDn>
+public class WhoClauseDnComposite extends AbstractWhoClauseComposite<AclWhoClauseDn>
 {
     /** The array of DN who clause types */
     private static final AclWhoClauseDnTypeEnum[] aclWhoClauseDnTypes = new AclWhoClauseDnTypeEnum[]
@@ -68,15 +68,15 @@ public class WhoClauseDnComposite extend
     };
 
 
-    public WhoClauseDnComposite( AclWhoClauseDn clause, Composite visualEditorComposite )
+    public WhoClauseDnComposite( OpenLdapAclValueWithContext context, AclWhoClauseDn clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseDnComposite( Composite visualEditorComposite )
+    public WhoClauseDnComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseDn(), visualEditorComposite );
+        super( context, new AclWhoClauseDn(), visualEditorComposite );
     }
 
 
@@ -153,11 +153,11 @@ public class WhoClauseDnComposite extend
     {
         if ( entryWidget != null )
         {
-            if ( clause != null )
+            if ( whoClause != null )
             {
                 try
                 {
-                    entryWidget.setInput( connection, new Dn( clause.getPattern() ) );
+                    entryWidget.setInput( connection, new Dn( whoClause.getPattern() ) );
                 }
                 catch ( LdapInvalidDnException e )
                 {

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseGroupComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseGroupComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseGroupComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseGroupComposite.java Thu Aug 20 09:27:17 2015
@@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.ui.forms.events.ExpansionAdapter;
 import org.eclipse.ui.forms.events.ExpansionEvent;
 import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseGroup;
 
 
@@ -42,8 +42,7 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseGroupComposite extends AbstractClauseComposite<AclWhoClauseGroup> implements
-    WhoClauseComposite<AclWhoClauseGroup>
+public class WhoClauseGroupComposite extends AbstractWhoClauseComposite<AclWhoClauseGroup>
 {
     /** The expansion listener used on expandable composites */
     private ExpansionAdapter expansionListener = new ExpansionAdapter()
@@ -56,15 +55,15 @@ public class WhoClauseGroupComposite ext
     };
 
 
-    public WhoClauseGroupComposite( AclWhoClauseGroup clause, Composite visualEditorComposite )
+    public WhoClauseGroupComposite( OpenLdapAclValueWithContext context, AclWhoClauseGroup clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseGroupComposite( Composite visualEditorComposite )
+    public WhoClauseGroupComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseGroup(), visualEditorComposite );
+        super( context, new AclWhoClauseGroup(), visualEditorComposite );
     }
 
 

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSaslSsfComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSaslSsfComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSaslSsfComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSaslSsfComposite.java Thu Aug 20 09:27:17 2015
@@ -21,7 +21,7 @@ package org.apache.directory.studio.open
 
 
 import org.eclipse.swt.widgets.Composite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseSaslSsf;
 
 
@@ -29,17 +29,16 @@ import org.apache.directory.studio.openl
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseSaslSsfComposite extends AbstractWhoClauseCryptoStrengthComposite<AclWhoClauseSaslSsf> implements
-    WhoClauseComposite<AclWhoClauseSaslSsf>
+public class WhoClauseSaslSsfComposite extends AbstractWhoClauseCryptoStrengthComposite<AclWhoClauseSaslSsf>
 {
-    public WhoClauseSaslSsfComposite( AclWhoClauseSaslSsf clause, Composite visualEditorComposite )
+    public WhoClauseSaslSsfComposite( OpenLdapAclValueWithContext context, AclWhoClauseSaslSsf clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseSaslSsfComposite( Composite visualEditorComposite )
+    public WhoClauseSaslSsfComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseSaslSsf(), visualEditorComposite );
+        super( context, new AclWhoClauseSaslSsf(), visualEditorComposite );
     }
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSelfComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSelfComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSelfComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSelfComposite.java Thu Aug 20 09:27:17 2015
@@ -21,24 +21,23 @@ package org.apache.directory.studio.open
 
 
 import org.eclipse.swt.widgets.Composite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseSelf;
 
 /**
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseSelfComposite extends AbstractClauseComposite<AclWhoClauseSelf> implements
-    WhoClauseComposite<AclWhoClauseSelf>
+public class WhoClauseSelfComposite extends AbstractWhoClauseComposite<AclWhoClauseSelf>
 {
-    public WhoClauseSelfComposite( AclWhoClauseSelf clause, Composite visualEditorComposite )
+    public WhoClauseSelfComposite( OpenLdapAclValueWithContext context, AclWhoClauseSelf clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseSelfComposite( Composite visualEditorComposite )
+    public WhoClauseSelfComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseSelf(), visualEditorComposite );
+        super( context, new AclWhoClauseSelf(), visualEditorComposite );
     }
 }

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSsfComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSsfComposite.java?rev=1696737&r1=1696736&r2=1696737&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSsfComposite.java (original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhoClauseSsfComposite.java Thu Aug 20 09:27:17 2015
@@ -21,24 +21,23 @@ package org.apache.directory.studio.open
 
 
 import org.eclipse.swt.widgets.Composite;
-
+import org.apache.directory.studio.openldap.config.acl.OpenLdapAclValueWithContext;
 import org.apache.directory.studio.openldap.config.acl.model.AclWhoClauseSsf;
 
 /**
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class WhoClauseSsfComposite extends AbstractWhoClauseCryptoStrengthComposite<AclWhoClauseSsf> implements
-    WhoClauseComposite<AclWhoClauseSsf>
+public class WhoClauseSsfComposite extends AbstractWhoClauseCryptoStrengthComposite<AclWhoClauseSsf>
 {
-    public WhoClauseSsfComposite( AclWhoClauseSsf clause, Composite visualEditorComposite )
+    public WhoClauseSsfComposite( OpenLdapAclValueWithContext context, AclWhoClauseSsf clause, Composite visualEditorComposite )
     {
-        super( clause, visualEditorComposite );
+        super( context, clause, visualEditorComposite );
     }
 
 
-    public WhoClauseSsfComposite( Composite visualEditorComposite )
+    public WhoClauseSsfComposite( OpenLdapAclValueWithContext context, Composite visualEditorComposite )
     {
-        super( new AclWhoClauseSsf(), visualEditorComposite );
+        super( context, new AclWhoClauseSsf(), visualEditorComposite );
     }
 }



Mime
View raw message