directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1299733 [1/2] - in /directory: shared/trunk/ldap/model/src/main/antlr/ shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema...
Date Mon, 12 Mar 2012 16:40:11 GMT
Author: elecharny
Date: Mon Mar 12 16:40:09 2012
New Revision: 1299733

URL: http://svn.apache.org/viewvc?rev=1299733&view=rev
Log:
o Created a MutableObjectClass class
o Removed the modifiers from the ObjectClass class
o Modified the impacted code in the api and Studio

Added:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableObjectClass.java
Modified:
    directory/shared/trunk/ldap/model/src/main/antlr/schema.g
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/ObjectClassDescriptionSchemaParser.java
    directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
    directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
    directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameSchemaElementAction.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/Schema.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileExporter.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoader.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorUsedByPage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/AbstractObjectClassEditorPage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditor.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorInput.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSourceCodePage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorOverviewPage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewContentProvider.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasWizard.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassWizard.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ObjectClassWrapper.java
    directory/studio/trunk/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java

Modified: directory/shared/trunk/ldap/model/src/main/antlr/schema.g
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/antlr/schema.g?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/antlr/schema.g (original)
+++ directory/shared/trunk/ldap/model/src/main/antlr/schema.g Mon Mar 12 16:40:09 2012
@@ -36,7 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.parsers.NormalizerDescription;
 import org.apache.directory.shared.ldap.model.schema.parsers.ParserMonitor;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.model.schema.syntaxCheckers.OpenLdapObjectIdentifierMacro;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
@@ -244,7 +244,7 @@ options    {
 openLdapSchema returns [List<Object> list = new ArrayList<Object>()]
     {
         AttributeType attributeType = null;
-        ObjectClass objectClass = null;
+        MutableObjectClass objectClass = null;
         OpenLdapObjectIdentifierMacro oloid = null;
     }
     :
@@ -274,7 +274,7 @@ openLdapObjectIdentifier returns [OpenLd
     ;
     
 
-openLdapObjectClass returns [ObjectClass objectClass]
+openLdapObjectClass returns [MutableObjectClass objectClass]
     {
         matchedProduction( "openLdapObjectClass()" );
     }
@@ -320,13 +320,13 @@ openLdapAttributeType returns [Attribute
      * xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
      * </pre>
     */
-objectClassDescription returns [ObjectClass objectClass]
+objectClassDescription returns [MutableObjectClass objectClass]
     {
         matchedProduction( "objectClassDescription()" );
         ElementTracker et = new ElementTracker();
     }
     :
-    ( oid:STARTNUMERICOID { objectClass = new ObjectClass(numericoid(oid.getText())); } )
+    ( oid:STARTNUMERICOID { objectClass = new MutableObjectClass(numericoid(oid.getText())); } )
     (
         ( name:NAME { et.track("NAME", name); objectClass.setNames(qdescrs(name.getText())); } )
         |

Added: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableObjectClass.java?rev=1299733&view=auto
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableObjectClass.java (added)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableObjectClass.java Mon Mar 12 16:40:09 2012
@@ -0,0 +1,461 @@
+/*
+ *  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.shared.ldap.model.schema;
+
+
+import java.util.List;
+
+import org.apache.directory.shared.i18n.I18n;
+
+
+/**
+ * An objectClass definition.
+ * <p>
+ * According to ldapbis [MODELS]:
+ * </p>
+ *
+ * <pre>
+ *  Object Class definitions are written according to the ABNF:
+ *
+ *    ObjectClassDescription = LPAREN WSP
+ *        numericoid                ; object identifier
+ *        [ SP &quot;NAME&quot; SP qdescrs ]  ; short names (descriptors)
+ *        [ SP &quot;DESC&quot; SP qdstring ] ; description
+ *        [ SP &quot;OBSOLETE&quot; ]         ; not active
+ *        [ SP &quot;SUP&quot; SP oids ]      ; superior object classes
+ *        [ SP kind ]               ; kind of class
+ *        [ SP &quot;MUST&quot; SP oids ]     ; attribute types
+ *        [ SP &quot;MAY&quot; SP oids ]      ; attribute types
+ *        extensions WSP RPAREN
+ *
+ *     kind = &quot;ABSTRACT&quot; / &quot;STRUCTURAL&quot; / &quot;AUXILIARY&quot;
+ *
+ *   where:
+ *     [numericoid] is object identifier assigned to this object class;
+ *     NAME [qdescrs] are short names (descriptors) identifying this object
+ *         class;
+ *     DESC [qdstring] is a short descriptive string;
+ *     OBSOLETE indicates this object class is not active;
+ *     SUP [oids] specifies the direct superclasses of this object class;
+ *     the kind of object class is indicated by one of ABSTRACT,
+ *         STRUCTURAL, or AUXILIARY, default is STRUCTURAL;
+ *     MUST and MAY specify the sets of required and allowed attribute
+ *         types, respectively; and
+ *    [extensions] describe extensions.
+ * </pre>
+ *
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 4.4</a>
+ * @see <a
+ *      href="http://www.ietf.org/internet-drafts/draft-ietf-ldapbis-models-11.txt">ldapbis
+ *      [MODELS]</a>
+ * @see DescriptionUtils#getDescription(MutableObjectClass)
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+// super.hashCode is final
+@SuppressWarnings("PMD.OverrideBothEqualsAndHashcode")
+public class MutableObjectClass extends ObjectClass
+{
+    /**
+     * Creates a new instance of MatchingRuleUseDescription
+     * @param oid the OID for this objectClass
+     */
+    public MutableObjectClass( String oid )
+    {
+        super( oid );
+    }
+
+
+    /**
+     * Add some allowed AttributeType
+     *
+     * @param oids The attributeType oids
+     */
+    public void addMayAttributeTypeOids( String... oids )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            for ( String oid : oids )
+            {
+                mayAttributeTypeOids.add( oid );
+            }
+        }
+    }
+
+
+    /**
+     * Add some allowed AttributeTypes
+     *
+     * @param attributeTypes The attributeTypes
+     */
+    public void addMayAttributeTypes( AttributeType... attributeTypes )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            for ( AttributeType attributeType : attributeTypes )
+            {
+                if ( !mayAttributeTypeOids.contains( attributeType.getOid() ) )
+                {
+                    mayAttributeTypes.add( attributeType );
+                    mayAttributeTypeOids.add( attributeType.getOid() );
+                }
+            }
+        }
+    }
+
+
+    /**
+     * @param mayAttributeTypeOids the mayAttributeTypeOids to set
+     */
+    public void setMayAttributeTypeOids( List<String> mayAttributeTypeOids )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.mayAttributeTypeOids = mayAttributeTypeOids;
+        }
+    }
+
+
+    /**
+     * Sets the list of allowed AttributeTypes
+     *
+     * @param mayAttributeTypes the list of allowed AttributeTypes
+     */
+    public void setMayAttributeTypes( List<AttributeType> mayAttributeTypes )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.mayAttributeTypes = mayAttributeTypes;
+
+            // update the OIDS now
+            mayAttributeTypeOids.clear();
+
+            for ( AttributeType may : mayAttributeTypes )
+            {
+                mayAttributeTypeOids.add( may.getOid() );
+            }
+        }
+    }
+
+
+    /**
+     * Update the associated MAY AttributeType, even if the SchemaObject is readOnly
+     *
+     * @param mayAttributeTypes the list of allowed AttributeTypes
+     */
+    public void updateMayAttributeTypes( List<AttributeType> mayAttributeTypes )
+    {
+        this.mayAttributeTypes.clear();
+        this.mayAttributeTypes.addAll( mayAttributeTypes );
+
+        // update the OIDS now
+        mayAttributeTypeOids.clear();
+
+        for ( AttributeType may : mayAttributeTypes )
+        {
+            mayAttributeTypeOids.add( may.getOid() );
+        }
+    }
+
+
+    /**
+     * Add some required AttributeType OIDs
+     *
+     * @param oids The attributeType OIDs
+     */
+    public void addMustAttributeTypeOids( String... oids )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            for ( String oid : oids )
+            {
+                mustAttributeTypeOids.add( oid );
+            }
+        }
+    }
+
+
+    /**
+     * Add some required AttributeTypes
+     *
+     * @param attributeTypes The attributeTypse
+     */
+    public void addMustAttributeTypes( AttributeType... attributeTypes )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            for ( AttributeType attributeType : attributeTypes )
+            {
+                if ( !mustAttributeTypeOids.contains( attributeType.getOid() ) )
+                {
+                    mustAttributeTypes.add( attributeType );
+                    mustAttributeTypeOids.add( attributeType.getOid() );
+                }
+            }
+        }
+    }
+
+
+    /**
+     * @param mustAttributeTypeOids the mustAttributeTypeOids to set
+     */
+    public void setMustAttributeTypeOids( List<String> mustAttributeTypeOids )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.mustAttributeTypeOids = mustAttributeTypeOids;
+        }
+    }
+
+
+    /**
+     * Sets the list of required AttributeTypes
+     *
+     * @param mustAttributeTypes the list of required AttributeTypes
+     */
+    public void setMustAttributeTypes( List<AttributeType> mustAttributeTypes )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.mustAttributeTypes = mustAttributeTypes;
+
+            // update the OIDS now
+            mustAttributeTypeOids.clear();
+
+            for ( AttributeType may : mustAttributeTypes )
+            {
+                mustAttributeTypeOids.add( may.getOid() );
+            }
+        }
+    }
+
+
+    /**
+     * Update the associated MUST AttributeType, even if the SchemaObject is readOnly
+     *
+     * @param mustAttributeTypes the list of allowed AttributeTypes
+     */
+    public void updateMustAttributeTypes( List<AttributeType> mustAttributeTypes )
+    {
+        this.mustAttributeTypes.clear();
+        this.mustAttributeTypes.addAll( mustAttributeTypes );
+
+        // update the OIDS now
+        mustAttributeTypeOids.clear();
+
+        for ( AttributeType must : mustAttributeTypes )
+        {
+            mustAttributeTypeOids.add( must.getOid() );
+        }
+    }
+
+
+    /**
+     * Add some superior ObjectClass OIDs
+     *
+     * @param oids The superior ObjectClass OIDs
+     */
+    public void addSuperiorOids( String... oids )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            for ( String oid : oids )
+            {
+                if ( !superiorOids.contains( oid ) )
+                {
+                    superiorOids.add( oid );
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Add some superior ObjectClasses
+     *
+     * @param objectClasses The superior ObjectClasses
+     */
+    public void addSuperior( MutableObjectClass... objectClasses )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            for ( MutableObjectClass objectClass : objectClasses )
+            {
+                if ( !superiorOids.contains( objectClass.getOid() ) )
+                {
+                    superiorOids.add( objectClass.getOid() );
+                    superiors.add( objectClass );
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Sets the superior object classes
+     *
+     * @param superiors the object classes to set
+     */
+    public void setSuperiors( List<ObjectClass> superiors )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.superiors = superiors;
+
+            // update the OIDS now
+            superiorOids.clear();
+
+            for ( ObjectClass oc : superiors )
+            {
+                superiorOids.add( oc.getOid() );
+            }
+        }
+    }
+
+
+    /**
+     * Update the associated SUPERIORS ObjectClasses, even if the SchemaObject is readOnly
+     *
+     * @param superiors the object classes to set
+     */
+    public void updateSuperiors( List<ObjectClass> superiors )
+    {
+        this.superiors.clear();
+        this.superiors.addAll( superiors );
+
+        // update the OIDS now
+        superiorOids.clear();
+
+        for ( ObjectClass oc : superiors )
+        {
+            superiorOids.add( oc.getOid() );
+        }
+    }
+
+
+    /**
+     * Sets the superior object class OIDs
+     *
+     * @param superiorOids the object class OIDs to set
+     */
+    public void setSuperiorOids( List<String> superiorOids )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.superiorOids = superiorOids;
+        }
+    }
+
+
+    /**
+     * Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.
+     *
+     * @param objectClassType The ObjectClassType value
+     */
+    public void setType( ObjectClassTypeEnum objectClassType )
+    {
+        if ( locked )
+        {
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
+        }
+
+        if ( !isReadOnly )
+        {
+            this.objectClassType = objectClassType;
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void clear()
+    {
+        // Clear the common elements
+        super.clear();
+
+        // Clear the references
+        mayAttributeTypes.clear();
+        mayAttributeTypeOids.clear();
+        mustAttributeTypes.clear();
+        mustAttributeTypeOids.clear();
+        superiors.clear();
+        superiorOids.clear();
+    }
+}
\ No newline at end of file

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ObjectClass.java Mon Mar 12 16:40:09 2012
@@ -23,8 +23,6 @@ package org.apache.directory.shared.ldap
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.shared.i18n.I18n;
-
 
 /**
  * An objectClass definition.
@@ -74,25 +72,25 @@ import org.apache.directory.shared.i18n.
 public class ObjectClass extends AbstractSchemaObject
 {
     /** The ObjectClass type : ABSTRACT, AUXILIARY or STRUCTURAL */
-    private ObjectClassTypeEnum objectClassType = ObjectClassTypeEnum.STRUCTURAL;
+    protected ObjectClassTypeEnum objectClassType = ObjectClassTypeEnum.STRUCTURAL;
 
     /** The ObjectClass superior OIDs */
-    private List<String> superiorOids;
+    protected List<String> superiorOids;
 
     /** The ObjectClass superiors */
-    private List<ObjectClass> superiors;
+    protected List<ObjectClass> superiors;
 
     /** The list of allowed AttributeType OIDs */
-    private List<String> mayAttributeTypeOids;
+    protected List<String> mayAttributeTypeOids;
 
     /** The list of allowed AttributeTypes */
-    private List<AttributeType> mayAttributeTypes;
+    protected List<AttributeType> mayAttributeTypes;
 
     /** The list of required AttributeType OIDs */
-    private List<String> mustAttributeTypeOids;
+    protected List<String> mustAttributeTypeOids;
 
     /** The list of required AttributeTypes */
-    private List<AttributeType> mustAttributeTypes;
+    protected List<AttributeType> mustAttributeTypes;
 
 
     /**
@@ -133,118 +131,6 @@ public class ObjectClass extends Abstrac
 
 
     /**
-     * Add some allowed AttributeType
-     *
-     * @param oids The attributeType oids
-     */
-    public void addMayAttributeTypeOids( String... oids )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            for ( String oid : oids )
-            {
-                mayAttributeTypeOids.add( oid );
-            }
-        }
-    }
-
-
-    /**
-     * Add some allowed AttributeTypes
-     *
-     * @param attributeTypes The attributeTypes
-     */
-    public void addMayAttributeTypes( AttributeType... attributeTypes )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            for ( AttributeType attributeType : attributeTypes )
-            {
-                if ( !mayAttributeTypeOids.contains( attributeType.getOid() ) )
-                {
-                    mayAttributeTypes.add( attributeType );
-                    mayAttributeTypeOids.add( attributeType.getOid() );
-                }
-            }
-        }
-    }
-
-
-    /**
-     * @param mayAttributeTypeOids the mayAttributeTypeOids to set
-     */
-    public void setMayAttributeTypeOids( List<String> mayAttributeTypeOids )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.mayAttributeTypeOids = mayAttributeTypeOids;
-        }
-    }
-
-
-    /**
-     * Sets the list of allowed AttributeTypes
-     *
-     * @param mayAttributeTypes the list of allowed AttributeTypes
-     */
-    public void setMayAttributeTypes( List<AttributeType> mayAttributeTypes )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.mayAttributeTypes = mayAttributeTypes;
-
-            // update the OIDS now
-            mayAttributeTypeOids.clear();
-
-            for ( AttributeType may : mayAttributeTypes )
-            {
-                mayAttributeTypeOids.add( may.getOid() );
-            }
-        }
-    }
-
-
-    /**
-     * Update the associated MAY AttributeType, even if the SchemaObject is readOnly
-     *
-     * @param mayAttributeTypes the list of allowed AttributeTypes
-     */
-    public void updateMayAttributeTypes( List<AttributeType> mayAttributeTypes )
-    {
-        this.mayAttributeTypes.clear();
-        this.mayAttributeTypes.addAll( mayAttributeTypes );
-
-        // update the OIDS now
-        mayAttributeTypeOids.clear();
-
-        for ( AttributeType may : mayAttributeTypes )
-        {
-            mayAttributeTypeOids.add( may.getOid() );
-        }
-    }
-
-
-    /**
      * @return the mustAttributeTypeOids
      */
     public List<String> getMustAttributeTypeOids()
@@ -263,118 +149,6 @@ public class ObjectClass extends Abstrac
 
 
     /**
-     * Add some required AttributeType OIDs
-     *
-     * @param oids The attributeType OIDs
-     */
-    public void addMustAttributeTypeOids( String... oids )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            for ( String oid : oids )
-            {
-                mustAttributeTypeOids.add( oid );
-            }
-        }
-    }
-
-
-    /**
-     * Add some required AttributeTypes
-     *
-     * @param attributeTypes The attributeTypse
-     */
-    public void addMustAttributeTypes( AttributeType... attributeTypes )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            for ( AttributeType attributeType : attributeTypes )
-            {
-                if ( !mustAttributeTypeOids.contains( attributeType.getOid() ) )
-                {
-                    mustAttributeTypes.add( attributeType );
-                    mustAttributeTypeOids.add( attributeType.getOid() );
-                }
-            }
-        }
-    }
-
-
-    /**
-     * @param mustAttributeTypeOids the mustAttributeTypeOids to set
-     */
-    public void setMustAttributeTypeOids( List<String> mustAttributeTypeOids )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.mustAttributeTypeOids = mustAttributeTypeOids;
-        }
-    }
-
-
-    /**
-     * Sets the list of required AttributeTypes
-     *
-     * @param mustAttributeTypes the list of required AttributeTypes
-     */
-    public void setMustAttributeTypes( List<AttributeType> mustAttributeTypes )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.mustAttributeTypes = mustAttributeTypes;
-
-            // update the OIDS now
-            mustAttributeTypeOids.clear();
-
-            for ( AttributeType may : mustAttributeTypes )
-            {
-                mustAttributeTypeOids.add( may.getOid() );
-            }
-        }
-    }
-
-
-    /**
-     * Update the associated MUST AttributeType, even if the SchemaObject is readOnly
-     *
-     * @param mustAttributeTypes the list of allowed AttributeTypes
-     */
-    public void updateMustAttributeTypes( List<AttributeType> mustAttributeTypes )
-    {
-        this.mustAttributeTypes.clear();
-        this.mustAttributeTypes.addAll( mustAttributeTypes );
-
-        // update the OIDS now
-        mustAttributeTypeOids.clear();
-
-        for ( AttributeType must : mustAttributeTypes )
-        {
-            mustAttributeTypeOids.add( must.getOid() );
-        }
-    }
-
-
-    /**
      * Gets the superclasses of this ObjectClass.
      *
      * @return the superclasses
@@ -397,123 +171,6 @@ public class ObjectClass extends Abstrac
 
 
     /**
-     * Add some superior ObjectClass OIDs
-     *
-     * @param oids The superior ObjectClass OIDs
-     */
-    public void addSuperiorOids( String... oids )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            for ( String oid : oids )
-            {
-                if ( !superiorOids.contains( oid ) )
-                {
-                    superiorOids.add( oid );
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Add some superior ObjectClasses
-     *
-     * @param objectClasses The superior ObjectClasses
-     */
-    public void addSuperior( ObjectClass... objectClasses )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            for ( ObjectClass objectClass : objectClasses )
-            {
-                if ( !superiorOids.contains( objectClass.getOid() ) )
-                {
-                    superiorOids.add( objectClass.getOid() );
-                    superiors.add( objectClass );
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Sets the superior object classes
-     *
-     * @param superiors the object classes to set
-     */
-    public void setSuperiors( List<ObjectClass> superiors )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.superiors = superiors;
-
-            // update the OIDS now
-            superiorOids.clear();
-
-            for ( ObjectClass oc : superiors )
-            {
-                superiorOids.add( oc.getOid() );
-            }
-        }
-    }
-
-
-    /**
-     * Update the associated SUPERIORS ObjectClasses, even if the SchemaObject is readOnly
-     *
-     * @param superiors the object classes to set
-     */
-    public void updateSuperiors( List<ObjectClass> superiors )
-    {
-        this.superiors.clear();
-        this.superiors.addAll( superiors );
-
-        // update the OIDS now
-        superiorOids.clear();
-
-        for ( ObjectClass oc : superiors )
-        {
-            superiorOids.add( oc.getOid() );
-        }
-    }
-
-
-    /**
-     * Sets the superior object class OIDs
-     *
-     * @param superiorOids the object class OIDs to set
-     */
-    public void setSuperiorOids( List<String> superiorOids )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.superiorOids = superiorOids;
-        }
-    }
-
-
-    /**
      * Gets the type of this ObjectClass as a type safe enum.
      *
      * @return the ObjectClass type as an enum
@@ -525,25 +182,6 @@ public class ObjectClass extends Abstrac
 
 
     /**
-     * Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.
-     *
-     * @param objectClassType The ObjectClassType value
-     */
-    public void setType( ObjectClassTypeEnum objectClassType )
-    {
-        if ( locked )
-        {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
-        }
-
-        if ( !isReadOnly )
-        {
-            this.objectClassType = objectClassType;
-        }
-    }
-
-
-    /**
      * Tells if the current ObjectClass is STRUCTURAL
      *
      * @return <code>true</code> if the ObjectClass is STRUCTURAL
@@ -805,22 +443,4 @@ public class ObjectClass extends Abstrac
 
         return true;
     }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void clear()
-    {
-        // Clear the common elements
-        super.clear();
-
-        // Clear the references
-        mayAttributeTypes.clear();
-        mayAttributeTypeOids.clear();
-        mustAttributeTypes.clear();
-        mustAttributeTypeOids.clear();
-        superiors.clear();
-        superiorOids.clear();
-    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/ObjectClassDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/ObjectClassDescriptionSchemaParser.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/ObjectClassDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/ObjectClassDescriptionSchemaParser.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.shared.ldap.model.schema.parsers;
 
@@ -23,6 +23,7 @@ package org.apache.directory.shared.ldap
 import java.text.ParseException;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -69,14 +70,14 @@ public class ObjectClassDescriptionSchem
      * kind = "ABSTRACT" / "STRUCTURAL" / "AUXILIARY"
      * 
      * extensions = *( SP xstring SP qdstrings )
-     * xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE ) 
+     * xstring = "X" HYPHEN 1*( ALPHA / HYPHEN / USCORE )
      * </pre>
      * 
      * @param objectClassDescription the object class description to be parsed
      * @return the parsed ObjectClassDescription bean
      * @throws ParseException if there are any recognition errors (bad syntax)
      */
-    public synchronized ObjectClass parseObjectClassDescription( String objectClassDescription )
+    public synchronized MutableObjectClass parseObjectClassDescription( String objectClassDescription )
         throws ParseException
     {
         LOG.debug( "Parsing an ObjectClass : {}", objectClassDescription );
@@ -91,7 +92,7 @@ public class ObjectClassDescriptionSchem
 
         try
         {
-            ObjectClass objectClass = parser.objectClassDescription();
+            MutableObjectClass objectClass = parser.objectClassDescription();
 
             // Update the schemaName
             updateSchemaName( objectClass );

Modified: directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java (original)
+++ directory/shared/trunk/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java Mon Mar 12 16:40:09 2012
@@ -43,6 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.LoadableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
@@ -813,7 +814,7 @@ public class SchemaEntityFactory impleme
         }
 
         // Create the ObjectClass instance
-        ObjectClass oc = new ObjectClass( oid );
+        MutableObjectClass oc = new MutableObjectClass( oid );
 
         // The Sup field
         Attribute mSuperiors = entry.get( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT );

Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java (original)
+++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerAddTest.java Mon Mar 12 16:40:09 2012
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.LdapComparator;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
@@ -1387,7 +1388,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.addMayAttributeTypeOids( "cn", "none", "sn" );
 
         assertFalse( schemaManager.add( objectClass ) );
@@ -1414,7 +1415,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.addMustAttributeTypeOids( "cn", "none", "sn" );
 
         assertFalse( schemaManager.add( objectClass ) );
@@ -1441,7 +1442,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.addMayAttributeTypeOids( "cn", "ref", "commonName" );
 
         assertFalse( schemaManager.add( objectClass ) );
@@ -1466,7 +1467,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.addMustAttributeTypeOids( "cn", "ref", "2.5.4.3" );
 
         assertFalse( schemaManager.add( objectClass ) );
@@ -1491,7 +1492,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.addMustAttributeTypeOids( "cn", "ref" );
         objectClass.addMayAttributeTypeOids( "2.5.4.3" );
 
@@ -1520,7 +1521,7 @@ public class SchemaManagerAddTest
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
         // Check a addition in MUST
-        ObjectClass objectClassMust = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClassMust = new MutableObjectClass( "1.1.1" );
         objectClassMust.addMustAttributeTypeOids( "c-o", "ref" );
 
         // collective attribute in MUST : failure expected
@@ -1535,7 +1536,7 @@ public class SchemaManagerAddTest
         assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
 
         // Check an addition in MAY
-        ObjectClass objectClassMay = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClassMay = new MutableObjectClass( "1.1.1" );
         objectClassMay.addMayAttributeTypeOids( "c-o", "ref" );
 
         // collective attribute in MAY : failure expected
@@ -1564,7 +1565,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
         objectClass.addSuperiorOids( "alias", "referral", "top" );
@@ -1606,7 +1607,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
         objectClass.addSuperiorOids( "alias", "Test", "referral" );
@@ -1631,7 +1632,7 @@ public class SchemaManagerAddTest
         SchemaManager schemaManager = loadSystem();
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
 
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
@@ -1658,7 +1659,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
         objectClass.addSuperiorOids( "alias", "refessal" );
@@ -1684,7 +1685,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.ABSTRACT );
         objectClass.addSuperiorOids( "extensibleObject" );
@@ -1710,7 +1711,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.ABSTRACT );
         objectClass.addSuperiorOids( "referral" );
@@ -1736,7 +1737,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.AUXILIARY );
         objectClass.addSuperiorOids( "referral" );
@@ -1762,7 +1763,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
         objectClass.addSuperiorOids( "extensibleObject" );
@@ -1789,7 +1790,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
         objectClass.addSuperiorOids( "alias", "OpenLDAProotDSE" );
@@ -1832,7 +1833,7 @@ public class SchemaManagerAddTest
         int ocrSize = schemaManager.getObjectClassRegistry().size();
         int goidSize = schemaManager.getGlobalOidRegistry().size();
 
-        ObjectClass objectClass = new ObjectClass( "1.1.1" );
+        MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
         objectClass.setNames( "Test" );
         objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
         objectClass.addSuperiorOids( "alias", "OpenLDAProotDSE" );

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.ldapbrowser.core.model.schema;
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
 import org.apache.directory.shared.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
@@ -127,7 +128,7 @@ public class Schema
 
     private String modifyTimestamp;
 
-    private Map<String, ObjectClass> ocdMapByNameOrNumericOid;
+    private Map<String, MutableObjectClass> ocdMapByNameOrNumericOid;
 
     private Map<String, AttributeType> atdMapByNameOrNumericOid;
 
@@ -147,7 +148,7 @@ public class Schema
         this.dn = null;
         this.createTimestamp = null;
         this.modifyTimestamp = null;
-        this.ocdMapByNameOrNumericOid = new HashMap<String, ObjectClass>();
+        this.ocdMapByNameOrNumericOid = new HashMap<String, MutableObjectClass>();
         this.atdMapByNameOrNumericOid = new HashMap<String, AttributeType>();
         this.lsdMapByNumericOid = new HashMap<String, LdapSyntax>();
         this.mrdMapByNameOrNumericOid = new HashMap<String, MatchingRule>();
@@ -259,7 +260,7 @@ public class Schema
             {
                 if ( attributeName.equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT ) )
                 {
-                    ObjectClass ocd = ocdPparser.parseObjectClassDescription( value );
+                    MutableObjectClass ocd = ocdPparser.parseObjectClassDescription( value );
                     ocd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addObjectClass( ocd );
                 }
@@ -328,7 +329,7 @@ public class Schema
         }
 
         // set extensibleObject may attributes
-        ObjectClass extensibleObjectOcd = this
+        MutableObjectClass extensibleObjectOcd = this
             .getObjectClassDescription( SchemaConstants.EXTENSIBLE_OBJECT_OC );
         Collection<AttributeType> userAtds = SchemaUtils.getUserAttributeDescriptions( this );
         Collection<String> atdNames = SchemaUtils.getNames( userAtds );
@@ -447,7 +448,7 @@ public class Schema
      * 
      * @param ocd the object class description
      */
-    private void addObjectClass( ObjectClass ocd )
+    private void addObjectClass( MutableObjectClass ocd )
     {
         if ( ocd.getOid() != null )
         {
@@ -503,7 +504,7 @@ public class Schema
      * 
      * @return the object class description, or the default or a dummy
      */
-    public ObjectClass getObjectClassDescription( String nameOrOid )
+    public MutableObjectClass getObjectClassDescription( String nameOrOid )
     {
         if ( ocdMapByNameOrNumericOid.containsKey( Strings.toLowerCase( nameOrOid ) ) )
         {
@@ -518,7 +519,7 @@ public class Schema
             // DUMMY
             List<String> names = new ArrayList<String>();
             names.add( nameOrOid );
-            ObjectClass ocd = new ObjectClass( nameOrOid );
+            MutableObjectClass ocd = new MutableObjectClass( nameOrOid );
             ocd.setNames( names );
             ocd.setExtensions( DUMMY_EXTENSIONS );
             return ocd;

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/PluginUtils.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor;
 
@@ -34,6 +34,7 @@ import java.util.List;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
@@ -65,7 +66,7 @@ import org.eclipse.core.runtime.Status;
 public class PluginUtils
 {
     /**
-     * Verifies that the given name is syntaxely correct according to the RFC 2252 
+     * Verifies that the given name is syntaxely correct according to the RFC 2252
      * (Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions).
      *
      * @param name
@@ -117,9 +118,9 @@ public class PluginUtils
      * @return
      *      a clone of the given object class
      */
-    public static ObjectClass getClone( ObjectClass oc )
+    public static MutableObjectClass getClone( ObjectClass oc )
     {
-        ObjectClass clone = new ObjectClass( oc.getOid() );
+        MutableObjectClass clone = new MutableObjectClass( oc.getOid() );
         clone.setNames( oc.getNames() );
         clone.setSchemaName( oc.getSchemaName() );
         clone.setDescription( oc.getDescription() );
@@ -186,7 +187,7 @@ public class PluginUtils
 
             if ( !loadFailed )
             {
-                // If everything went fine, we add the projects 
+                // If everything went fine, we add the projects
                 for ( Project project : projects )
                 {
                     projectsHandler.addProject( project );
@@ -221,7 +222,7 @@ public class PluginUtils
                         return;
                     }
 
-                    // We add the projects 
+                    // We add the projects
                     for ( Project project : projects )
                     {
                         projectsHandler.addProject( project );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/ProblemsViewController.java Mon Mar 12 16:40:09 2012
@@ -6,21 +6,22 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.controller;
 
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
@@ -140,7 +141,7 @@ public class ProblemsViewController
                     }
                     else if ( object instanceof ObjectClass )
                     {
-                        input = new ObjectClassEditorInput( ( ObjectClass ) object );
+                        input = new ObjectClassEditorInput( ( MutableObjectClass ) object );
                         editorId = ObjectClassEditor.ID;
                     }
                 }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaHandler.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.controller;
 
@@ -28,6 +28,7 @@ import org.apache.commons.collections.ma
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.util.Strings;
@@ -37,7 +38,7 @@ import org.apache.directory.studio.schem
 /**
  * This class represents the SchemaHandler.
  * <p>
- * It used to handle the whole Schema (including schemas, attribute types, 
+ * It used to handle the whole Schema (including schemas, attribute types,
  * object classes, matching rules and syntaxes).
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -244,13 +245,13 @@ public class SchemaHandler
      * @return
      *      the corresponding object class, or null if no one is found
      */
-    public ObjectClass getObjectClass( String id )
+    public MutableObjectClass getObjectClass( String id )
     {
         List<?> list = getObjectClassList( Strings.toLowerCase( id ) );
 
         if ( ( list != null ) && ( list.size() >= 1 ) )
         {
-            return ( ObjectClass ) list.get( 0 );
+            return ( MutableObjectClass ) list.get( 0 );
         }
         else
         {
@@ -482,7 +483,7 @@ public class SchemaHandler
 
 
     /**
-     * Removes the given schema. 
+     * Removes the given schema.
      *
      * @param schema
      *      the schema
@@ -589,7 +590,7 @@ public class SchemaHandler
 
 
     /**
-     * Renames the given schema. 
+     * Renames the given schema.
      *
      * @param schema the schema
      * @param newName the new name
@@ -647,7 +648,7 @@ public class SchemaHandler
 
 
     /**
-     * Update the source attribute type with the values of the 
+     * Update the source attribute type with the values of the
      * destination attribute type.
      *
      * @param at1
@@ -708,7 +709,7 @@ public class SchemaHandler
      * @param oc
      *      the object class
      */
-    public void addObjectClass( ObjectClass oc )
+    public void addObjectClass( MutableObjectClass oc )
     {
         Schema schema = getSchema( oc.getSchemaName() );
 
@@ -721,15 +722,15 @@ public class SchemaHandler
 
 
     /**
-     * Update the source object class with the values of the 
+     * Update the source object class with the values of the
      * destination object class.
      *
      * @param oc1
      *      the source object class
      * @param oc2
-     *      the destination object class  
+     *      the destination object class
      */
-    public void modifyObjectClass( ObjectClass oc1, ObjectClass oc2 )
+    public void modifyObjectClass( MutableObjectClass oc1, ObjectClass oc2 )
     {
         // Removing the references (in case of the names or oid have changed)
         removeSchemaObject( oc1 );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/SchemaViewController.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.controller;
 
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -152,7 +153,7 @@ public class SchemaViewController
         /**
          * {@inheritDoc}
          */
-        public void objectClassAdded( ObjectClass oc )
+        public void objectClassAdded( MutableObjectClass oc )
         {
             SchemaViewContentProvider contentProvider = ( SchemaViewContentProvider ) viewer.getContentProvider();
             contentProvider.objectClassAdded( oc );
@@ -168,7 +169,7 @@ public class SchemaViewController
         /**
          * {@inheritDoc}
          */
-        public void objectClassModified( ObjectClass oc )
+        public void objectClassModified( MutableObjectClass oc )
         {
             ( ( SchemaViewContentProvider ) viewer.getContentProvider() ).objectClassModified( oc );
         }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameSchemaElementAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameSchemaElementAction.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameSchemaElementAction.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/RenameSchemaElementAction.java Mon Mar 12 16:40:09 2012
@@ -6,21 +6,22 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.controller.actions;
 
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -125,7 +126,7 @@ public class RenameSchemaElementAction e
                 // OBJECT CLASS
                 else if ( selectedElement instanceof ObjectClassWrapper )
                 {
-                    ObjectClass objectClass = ( ( ObjectClassWrapper ) selectedElement ).getObjectClass();
+                    MutableObjectClass objectClass = ( ( ObjectClassWrapper ) selectedElement ).getObjectClass();
 
                     RenameObjectClassDialog dialog = new RenameObjectClassDialog( objectClass.getNames() );
                     if ( dialog.open() == RenameObjectClassDialog.OK )

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/DependenciesComputer.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.model;
 
@@ -30,6 +30,7 @@ import org.apache.commons.collections.ma
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.studio.schemaeditor.controller.SchemaHandler;
@@ -63,7 +64,7 @@ public class DependenciesComputer
      *
      * @param schemasList
      *      the schemasList
-     * @throws DependencyComputerException 
+     * @throws DependencyComputerException
      */
     public DependenciesComputer( List<Schema> schemas ) throws DependencyComputerException
     {
@@ -97,7 +98,7 @@ public class DependenciesComputer
                     }
                 }
 
-                List<ObjectClass> objectClasses = schema.getObjectClasses();
+                List<MutableObjectClass> objectClasses = schema.getObjectClasses();
                 if ( objectClasses != null )
                 {
                     for ( ObjectClass objectClass : objectClasses )
@@ -120,7 +121,7 @@ public class DependenciesComputer
      *      the schema
      * @param attributeType
      *      the attribute type
-     * @throws DependencyComputerException 
+     * @throws DependencyComputerException
      */
     private void computeDependencies( Schema schema, AttributeType attributeType )
         throws DependencyComputerException
@@ -234,7 +235,7 @@ public class DependenciesComputer
      *      the schema
      * @param objectClass
      *      the object class
-     * @throws DependencyComputerException 
+     * @throws DependencyComputerException
      */
     private void computeDependencies( Schema schema, ObjectClass objectClass ) throws DependencyComputerException
     {
@@ -295,7 +296,7 @@ public class DependenciesComputer
                 {
                     throw new DependencyComputerException( NLS.bind( Messages
                         .getString( "DependenciesComputer.Mandatory" ), new String[] //$NON-NLS-1$
-                        { mandatoryAttributeTypeName } ) ); //$NON-NLS-1$
+                        { mandatoryAttributeTypeName } ) );
                 }
                 else
                 {
@@ -317,7 +318,7 @@ public class DependenciesComputer
      *      the schema
      * @param object
      *      the SchemaObject
-     * @throws DependencyComputerException 
+     * @throws DependencyComputerException
      */
     private void computeSchemaDependency( Schema schema, SchemaObject object ) throws DependencyComputerException
     {
@@ -328,7 +329,7 @@ public class DependenciesComputer
             if ( schemaFromSuperiorAT == null )
             {
                 throw new DependencyComputerException( NLS.bind(
-                    Messages.getString( "DependenciesComputer.Schema" ), new String[] { schemaName } ) ); //$NON-NLS-1$ //$NON-NLS-2$
+                    Messages.getString( "DependenciesComputer.Schema" ), new String[] { schemaName } ) ); //$NON-NLS-1$
             }
             else
             {

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/Schema.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/Schema.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/Schema.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.model;
 
@@ -26,6 +26,7 @@ import java.util.List;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.registries.DefaultSchema;
 
@@ -44,7 +45,7 @@ public class Schema extends DefaultSchem
     private List<AttributeType> attributeTypes = new ArrayList<AttributeType>();
 
     /** The ObjectClass List */
-    private List<ObjectClass> objectClasses = new ArrayList<ObjectClass>();
+    private List<MutableObjectClass> objectClasses = new ArrayList<MutableObjectClass>();
 
     /** The MatchingRule List */
     private List<MatchingRule> matchingRules = new ArrayList<MatchingRule>();
@@ -95,7 +96,7 @@ public class Schema extends DefaultSchem
      * @param oc
      *      the ObjectClass
      */
-    public boolean addObjectClass( ObjectClass oc )
+    public boolean addObjectClass( MutableObjectClass oc )
     {
         return objectClasses.add( oc );
     }
@@ -119,7 +120,7 @@ public class Schema extends DefaultSchem
      * @param id
      *      the name or the oid of the AttributeType
      * @return
-     *      the AttributeType identified by the given id, or null if the 
+     *      the AttributeType identified by the given id, or null if the
      * AttributeType has not been found
      */
     public AttributeType getAttributeType( String id )
@@ -165,7 +166,7 @@ public class Schema extends DefaultSchem
      * @param id
      *      the name or the oid of the MatchingRule
      * @return
-     *      the MatchingRule identified by the given id, or null if the 
+     *      the MatchingRule identified by the given id, or null if the
      * MatchingRule has not been found
      */
     public MatchingRule getMatchingRule( String id )
@@ -223,7 +224,7 @@ public class Schema extends DefaultSchem
      * @param id
      *      the name or the oid of the ObjectClass
      * @return
-     *      the ObjectClass identified by the given id, or null if the 
+     *      the ObjectClass identified by the given id, or null if the
      * ObjectClass has not been found
      */
     public ObjectClass getObjectClass( String id )
@@ -257,7 +258,7 @@ public class Schema extends DefaultSchem
      * @return
      *      all the ObjectClass objects contained in the Schema
      */
-    public List<ObjectClass> getObjectClasses()
+    public List<MutableObjectClass> getObjectClasses()
     {
         return objectClasses;
     }
@@ -269,7 +270,7 @@ public class Schema extends DefaultSchem
      * @param id
      *      the name or the oid of the Syntax
      * @return
-     *      the Syntax identified by the given id, or null if the 
+     *      the Syntax identified by the given id, or null if the
      * Syntax has not been found
      */
     public LdapSyntax getSyntax( String id )

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java Mon Mar 12 16:40:09 2012
@@ -34,7 +34,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
@@ -218,7 +218,7 @@ public class ApacheDsSchemaConnector ext
                             schema.addAttributeType( at );
                             break;
                         case OBJECT_CLASS:
-                            ObjectClass oc = createObjectClass( searchResult );
+                            MutableObjectClass oc = createObjectClass( searchResult );
                             oc.setSchemaName( name );
                             schema.addObjectClass( oc );
                             break;
@@ -329,9 +329,9 @@ public class ApacheDsSchemaConnector ext
      * ObjectClassImpl could be created
      * @throws NamingException
      */
-    private static ObjectClass createObjectClass( SearchResult sr ) throws NamingException
+    private static MutableObjectClass createObjectClass( SearchResult sr ) throws NamingException
     {
-        ObjectClass oc = new ObjectClass( getOid( sr ) );
+        MutableObjectClass oc = new MutableObjectClass( getOid( sr ) );
         oc.setNames( getNames( sr ) );
         oc.setDescription( getDescription( sr ) );
         oc.setObsolete( isObsolete( sr ) );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java Mon Mar 12 16:40:09 2012
@@ -34,6 +34,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.model.schema.parsers.LdapSyntaxDescriptionSchemaParser;
@@ -256,7 +257,7 @@ public class GenericSchemaConnector exte
                         parser.setQuirksMode( true );
                         ObjectClass ocd = parser.parseObjectClassDescription( value );
 
-                        ObjectClass impl = new ObjectClass( ocd.getOid() );
+                        MutableObjectClass impl = new MutableObjectClass( ocd.getOid() );
                         impl.setNames( ocd.getNames().toArray( new String[0] ) );
                         impl.setDescription( ocd.getDescription() );
                         impl.setSuperiorOids( ocd.getSuperiorOids() );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.model.io;
 
@@ -30,6 +30,7 @@ import java.util.Scanner;
 import java.util.regex.MatchResult;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.parsers.OpenLdapSchemaParser;
 import org.apache.directory.studio.schemaeditor.model.Schema;
@@ -103,7 +104,7 @@ public class OpenLdapSchemaFileImporter
         List<?> ocs = parser.getObjectClassTypes();
         for ( int i = 0; i < ocs.size(); i++ )
         {
-            ObjectClass oc = convertObjectClass( ( ObjectClass ) ocs.get( i ) );
+            MutableObjectClass oc = convertObjectClass( ( ObjectClass ) ocs.get( i ) );
             oc.setSchemaName( schemaName );
             schema.addObjectClass( oc );
         }
@@ -171,9 +172,9 @@ public class OpenLdapSchemaFileImporter
      * @return
      *      the corresponding ObjectClassImpl
      */
-    private static final ObjectClass convertObjectClass( ObjectClass oc )
+    private static final MutableObjectClass convertObjectClass( ObjectClass oc )
     {
-        ObjectClass newOC = new ObjectClass( oc.getOid() );
+        MutableObjectClass newOC = new MutableObjectClass( oc.getOid() );
         newOC.setNames( oc.getNames() );
         newOC.setDescription( oc.getDescription() );
         newOC.setSuperiorOids( oc.getSuperiorOids() );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileExporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileExporter.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileExporter.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileExporter.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  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. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.model.io;
 
@@ -28,6 +28,7 @@ import java.util.List;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
@@ -91,7 +92,7 @@ public class XMLSchemaFileExporter
      *      the schema to convert
      * @return
      *      the corresponding source code representation
-     * @throws IOException 
+     * @throws IOException
      */
     public static String toXml( Schema schema ) throws IOException
     {
@@ -124,7 +125,7 @@ public class XMLSchemaFileExporter
      *      the array of schemas to convert
      * @return
      *      the corresponding source code representation
-     * @throws IOException 
+     * @throws IOException
      */
     public static String toXml( Schema[] schemas ) throws IOException
     {
@@ -185,7 +186,7 @@ public class XMLSchemaFileExporter
         Element element = branch.addElement( SCHEMA_TAG );
         if ( schema != null )
         {
-            // Name 
+            // Name
             String name = schema.getSchemaName();
             if ( ( name != null ) && ( !name.equals( "" ) ) ) //$NON-NLS-1$
             {
@@ -204,7 +205,7 @@ public class XMLSchemaFileExporter
             }
 
             // Object Classes
-            List<ObjectClass> ocs = schema.getObjectClasses();
+            List<MutableObjectClass> ocs = schema.getObjectClasses();
             if ( ( ocs != null ) && ( ocs.size() >= 1 ) )
             {
                 Element objectClassesNode = element.addElement( OBJECT_CLASSES_TAG );



Mime
View raw message