directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r514647 - in /directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas: model/AttributeType.java view/editors/AttributeTypeFormEditor.java view/editors/AttributeTypeFormEditorOverviewPage.java
Date Mon, 05 Mar 2007 10:59:36 GMT
Author: pamarcelot
Date: Mon Mar  5 02:59:35 2007
New Revision: 514647

URL: http://svn.apache.org/viewvc?view=rev&rev=514647
Log:
Fixed DIRSTUDIO-64 (Unable to modify an Attribute Type's OID).

Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/AttributeType.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditor.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditorOverviewPage.java

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/AttributeType.java?view=diff&rev=514647&r1=514646&r2=514647
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/AttributeType.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/model/AttributeType.java
Mon Mar  5 02:59:35 2007
@@ -231,7 +231,6 @@
     }
 
 
-    //set
     public void setDescription( String description )
     {
         literal.setDescription( description );
@@ -294,7 +293,14 @@
         notifyChanged();
     }
 
-
+    
+    public void setOid( String oid )
+    {
+        literal.setOid( oid );
+        notifyChanged();
+    }
+    
+    
     public void setObsolete( boolean bool )
     {
         literal.setObsolete( bool );
@@ -323,7 +329,6 @@
     }
 
 
-    //test
     public boolean isObsolete()
     {
         return literal.isObsolete();

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditor.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditor.java?view=diff&rev=514647&r1=514646&r2=514647
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditor.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditor.java
Mon Mar  5 02:59:35 2007
@@ -275,7 +275,7 @@
         at2.setNames( at1.getNames() );
         at2.setNoUserModification( at1.isNoUserModification() );
         at2.setObsolete( at1.isObsolete() );
-        // TODO Need to update the Shared LDAP lirary to be able to modify the OID
+        at2.setOid( at1.getOid() );
         at2.setOrdering( at1.getOrdering() );
         at2.setSingleValue( at1.isSingleValue() );
         at2.setSubstr( at1.getSubstr() );

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditorOverviewPage.java?view=diff&rev=514647&r1=514646&r2=514647
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditorOverviewPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/editors/AttributeTypeFormEditorOverviewPage.java
Mon Mar  5 02:59:35 2007
@@ -142,7 +142,15 @@
     };
 
     /** The listener for the OID Text Widget */
-    //    private Object oidTextListener;
+    private ModifyListener oidTextListener = new ModifyListener()
+    {
+        public void modifyText( ModifyEvent e )
+        {
+            modifiedAttributeType.setOid( oidText.getText() );
+            setEditorDirty();
+        }
+    };
+    
     /** The listener for the Schema Hyperlink Widget*/
     private HyperlinkAdapter schemaLinkListener = new HyperlinkAdapter()
     {
@@ -909,6 +917,7 @@
         {
             // If the attribute type is in a core-schema file, we disable editing
             nameText.setEditable( false );
+            oidText.setEditable( false );
             descriptionText.setEditable( false );
             supCombo.setEnabled( false );
             usageCombo.setEnabled( false );
@@ -922,9 +931,6 @@
             orderingCombo.setEnabled( false );
             substringCombo.setEnabled( false );
         }
-
-        // AT THE MOMENT, WE CANNOT SET A NEW OID TO THE ATTRIBUTE TYPE, SO WE DISABLE THIS
FUNCTIONNALITY
-        oidText.setEditable( false );
     }
 
 
@@ -936,6 +942,7 @@
         if ( modifiedAttributeType.getOriginatingSchema().type == Schema.SchemaType.userSchema
)
         {
             nameText.addModifyListener( nameTextListener );
+            oidText.addModifyListener( oidTextListener );
             descriptionText.addModifyListener( descriptionTextListener );
             supLabel.addHyperlinkListener( supLabelListener );
             supCombo.addModifyListener( supComboListener );
@@ -965,6 +972,7 @@
     private void removeListeners()
     {
         nameText.removeModifyListener( nameTextListener );
+        oidText.removeModifyListener( oidTextListener );
         aliasesButton.removeSelectionListener( aliasesButtonListener );
         schemaLink.removeHyperlinkListener( schemaLinkListener );
         descriptionText.removeModifyListener( descriptionTextListener );



Mime
View raw message