directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1696894 - /directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java
Date Fri, 21 Aug 2015 05:18:12 GMT
Author: elecharny
Date: Fri Aug 21 05:18:12 2015
New Revision: 1696894

URL: http://svn.apache.org/r1696894
Log:
o Removed the modify listener. It's already handled by the attributesWidget

Modified:
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/widgets/composites/WhatClauseAttributesComposite.java

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=1696894&r1=1696893&r2=1696894&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
Fri Aug 21 05:18:12 2015
@@ -20,17 +20,12 @@
 package org.apache.directory.studio.openldap.config.acl.widgets.composites;
 
 
-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;
@@ -62,43 +57,6 @@ public class WhatClauseAttributesComposi
     /** The attributes widget */
     private AttributesWidget attributesWidget;
 
-    /** 
-     * 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 )
-        {
-            // 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();
-            
-            if ( whatClauseAttributes == null )
-            {
-                whatClauseAttributes = new AclWhatClauseAttributes();
-            }
-            else 
-            {
-                for ( AclAttribute attribute : whatClauseAttributes.getAttributes() )
-                {
-                }
-            }
-            
-            whatClauseAttributes.addAllAttributes( attributes );
-            aclWhatClause.setAttributesClause( whatClauseAttributes );
-        }
-    };
-
-
     /**
      * Create a WhatClauseAttributesComposite instance
      * <pre>
@@ -136,7 +94,6 @@ public class WhatClauseAttributesComposi
         // The Attribute widget
         BaseWidgetUtils.createLabel( whatComposite, "", 1 );
         attributesWidget = new AttributesWidget();
-        attributesWidget.createWidget( whatComposite, connection, aclWhatClause.getAttributesClause()
);
-        attributesWidget.addWidgetModifyListener( modifyListener );
+        attributesWidget.createWidget( context, whatComposite, connection, aclWhatClause.getAttributesClause()
);
     }
 }



Mime
View raw message