directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1080337 [1/2] - in /directory: apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/ sha...
Date Thu, 10 Mar 2011 20:27:56 GMT
Author: akarasulu
Date: Thu Mar 10 20:27:55 2011
New Revision: 1080337

URL: http://svn.apache.org/viewvc?rev=1080337&view=rev
Log:
Small steps begun towards schema model refactoring ...

 o extracted mutators from SchemaObject into MutableSchemaObject
 o using mutable version of SchemaObject for now in place of SchemaObject
 o fixed compilation issues resulting from extraction in various registries


Added:
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSchemaObject.java
      - copied, changed from r1079988, directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java
Modified:
    directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
    directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
    directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java
    directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/AbstractSchemaParser.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultDITStructureRuleRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultNormalizerRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
    directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SchemaObjectRegistry.java
    directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
    directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorHierarchyViewAction.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoaderUtils.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java
    directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchViewContentProvider.java

Modified: directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java (original)
+++ directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java Thu Mar 10 20:27:55 2011
@@ -43,6 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectWrapper;
 import org.apache.directory.shared.ldap.model.schema.registries.Schema;
@@ -243,7 +244,7 @@ public abstract class AbstractRegistrySy
      * Add a new SchemaObject to the schema content, assuming that
      * it has an associated schema and that this schema is loaded
      */
-    protected void addToSchema( SchemaObject schemaObject, String schemaName ) throws LdapException
+    protected void addToSchema( MutableSchemaObject schemaObject, String schemaName ) throws LdapException
     {
         if ( isSchemaLoaded( schemaName ) )
         {
@@ -285,7 +286,7 @@ public abstract class AbstractRegistrySy
      * Delete a SchemaObject from the schema registry, assuming that
      * it has an associated schema and that this schema is loaded
      */
-    protected void deleteFromSchema( SchemaObject schemaObject, String schemaName ) throws LdapException
+    protected void deleteFromSchema( MutableSchemaObject schemaObject, String schemaName ) throws LdapException
     {
         if ( isSchemaLoaded( schemaName ) )
         {
@@ -366,7 +367,7 @@ public abstract class AbstractRegistrySy
      * @param obj The SchemaObject to register
      * @throws Exception If the registering failed
      */
-    protected void registerOids( SchemaObject obj ) throws LdapException
+    protected void registerOids( MutableSchemaObject obj ) throws LdapException
     {
         schemaManager.getGlobalOidRegistry().register( obj );
     }
@@ -379,7 +380,7 @@ public abstract class AbstractRegistrySy
      * @param schemaObject The SchemaObject we want the referencing SchemaObjects for
      * @return A String containing all the SchemaObjects referencing the give SchemaObject
      */
-    protected String getReferenced( SchemaObject schemaObject )
+    protected String getReferenced( MutableSchemaObject schemaObject )
     {
         StringBuilder sb = new StringBuilder();
 

Modified: directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java (original)
+++ directory/apacheds/branches/akarasulu/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java Thu Mar 10 20:27:55 2011
@@ -38,6 +38,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.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.registries.Schema;
 import org.apache.directory.shared.util.Strings;
@@ -143,9 +144,9 @@ public class SyntaxSynchronizer extends 
     /**
      * Check if a syntax is used by an AT or a MR
      */
-    private List<SchemaObject> checkInUse( String oid )
+    private List<MutableSchemaObject> checkInUse( String oid )
     {
-        List<SchemaObject> dependees = new ArrayList<SchemaObject>();
+        List<MutableSchemaObject> dependees = new ArrayList<MutableSchemaObject>();
 
         for ( AttributeType attributeType : schemaManager.getAttributeTypeRegistry() )
         {
@@ -170,7 +171,7 @@ public class SyntaxSynchronizer extends 
     /**
      * Get the list of SchemaObject's name using a given syntax
      */
-    private String getNames( List<SchemaObject> schemaObjects )
+    private String getNames( List<MutableSchemaObject> schemaObjects )
     {
         StringBuilder sb = new StringBuilder();
         boolean isFirst = true;
@@ -255,7 +256,7 @@ public class SyntaxSynchronizer extends 
         String schemaName = getSchemaName( entry.getDn() );
 
         // Check that this syntax is not used by an AttributeType
-        List<SchemaObject> dependees = checkInUse( oldOid );
+        List<MutableSchemaObject> dependees = checkInUse( oldOid );
 
         if ( dependees.size() != 0 )
         {
@@ -295,7 +296,7 @@ public class SyntaxSynchronizer extends 
         String newSchemaName = getSchemaName( newParentName );
 
         // Check that this syntax is not used by an AttributeType
-        List<SchemaObject> dependees = checkInUse( oldOid );
+        List<MutableSchemaObject> dependees = checkInUse( oldOid );
 
         if ( dependees.size() != 0 )
         {

Modified: directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java (original)
+++ directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java Thu Mar 10 20:27:55 2011
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 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.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.registries.Schema;
@@ -55,7 +56,7 @@ import org.apache.directory.shared.util.
  */
 public class AttributesFactory
 {
-    public Entry getAttributes( SchemaObject obj, Schema schema, SchemaManager schemaManager ) throws LdapException
+    public Entry getAttributes( MutableSchemaObject obj, Schema schema, SchemaManager schemaManager ) throws LdapException
     {
         if ( obj instanceof LdapSyntax )
         {

Modified: directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java (original)
+++ directory/apacheds/branches/akarasulu/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java Thu Mar 10 20:27:55 2011
@@ -47,6 +47,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.NameForm;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescription;
 import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription;
@@ -186,7 +187,7 @@ public class SchemaSubentryModifier
     }
     
     
-    public void addSchemaObject( OperationContext opContext, SchemaObject obj ) throws LdapException
+    public void addSchemaObject( OperationContext opContext, MutableSchemaObject obj ) throws LdapException
     {
         Schema schema = schemaManager.getLoadedSchema( obj.getSchemaName() );
         Dn dn = getDn( obj );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/exception/LdapSchemaException.java Thu Mar 10 20:27:55 2011
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 
 

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java Thu Mar 10 20:27:55 2011
@@ -71,7 +71,7 @@ import org.apache.directory.shared.util.
  * <b>obsolete</b> : LdapSyntax, Comparator, Normalizer, SyntaxChecker
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractSchemaObject implements SchemaObject, Serializable
+public abstract class AbstractSchemaObject implements MutableSchemaObject, Serializable
 {
     /** The serial version UID */
     private static final long serialVersionUID = 2L;
@@ -794,7 +794,7 @@ public abstract class AbstractSchemaObje
      * @param registries The registries in which we want it to be stored
      * @throws LdapException If the OID is invalid
      */
-    public void registerOid( SchemaObject schemaObject, Registries registries ) throws LdapException
+    public void registerOid( MutableSchemaObject schemaObject, Registries registries ) throws LdapException
     {
         // Add the SchemaObject into the globalOidRegistry
         registries.getGlobalOidRegistry().register( schemaObject );
@@ -806,7 +806,7 @@ public abstract class AbstractSchemaObje
      *
      * @return The copied SchemaObject
      */
-    public abstract SchemaObject copy();
+    public abstract MutableSchemaObject copy();
 
 
     /**

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/DescriptionUtils.java Thu Mar 10 20:27:55 2011
@@ -837,7 +837,7 @@ public final class DescriptionUtils
     }
 
 
-    private static void getQDStrings( StringBuilder sb, List<? extends SchemaObject> schemaObjects )
+    private static void getQDStrings( StringBuilder sb, List<? extends MutableSchemaObject> schemaObjects )
     {
         if ( ( schemaObjects != null ) && ( schemaObjects.size() != 0 ) )
         {

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/LoadableSchemaObject.java Thu Mar 10 20:27:55 2011
@@ -135,7 +135,7 @@ public abstract class LoadableSchemaObje
     /**
      * {@inheritDoc}
      */
-    public void registerOid( SchemaObject schemaObject, Registries registries ) throws LdapException
+    public void registerOid( MutableSchemaObject schemaObject, Registries registries ) throws LdapException
     {
         // Do nothing : the current SchemaObject ha sthe same OID than the one it is realted to
     }

Copied: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSchemaObject.java (from r1079988, directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSchemaObject.java?p2=directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSchemaObject.java&p1=directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java&r1=1079988&r2=1080337&rev=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/MutableSchemaObject.java Thu Mar 10 20:27:55 2011
@@ -63,110 +63,9 @@ import org.apache.directory.shared.ldap.
  * <b>obsolete</b> : LdapSyntax, Comparator, Normalizer, SyntaxChecker
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface SchemaObject
+public interface MutableSchemaObject extends SchemaObject
 {
     /**
-     * Gets usually what is the numeric object identifier assigned to this
-     * SchemaObject. All schema objects except for MatchingRuleUses have an OID
-     * assigned specifically to then. A MatchingRuleUse's OID really is the OID
-     * of it's MatchingRule and not specific to the MatchingRuleUse. This
-     * effects how MatchingRuleUse objects are maintained by the system.
-     * 
-     * @return an OID for this SchemaObject or its MatchingRule if this
-     *         SchemaObject is a MatchingRuleUse object
-     */
-    String getOid();
-
-
-    /**
-     * Gets short names for this SchemaObject if any exists for it, otherwise,
-     * returns an empty list.
-     * 
-     * @return the names for this SchemaObject
-     */
-    List<String> getNames();
-
-
-    /**
-     * Gets the first name in the set of short names for this SchemaObject if
-     * any exists for it.
-     * 
-     * @return the first of the names for this SchemaObject or the oid
-     * if one does not exist
-     */
-    String getName();
-
-
-    /**
-     * Gets a short description about this SchemaObject.
-     * 
-     * @return a short description about this SchemaObject
-     */
-    String getDescription();
-
-
-    /**
-     * Gets the SchemaObject specification.
-     * 
-     * @return the SchemaObject specification
-     */
-    String getSpecification();
-
-
-    /**
-     * Tells if this SchemaObject is enabled.
-     *  
-     * @return true if the SchemaObject is enabled, or if it depends on 
-     * an enabled schema
-     */
-    boolean isEnabled();
-
-
-    /**
-     * Tells if this SchemaObject is disabled.
-     *  
-     * @return true if the SchemaObject is disabled
-     */
-    boolean isDisabled();
-
-
-    /**
-     * Tells if this SchemaObject is ReadOnly.
-     *  
-     * @return true if the SchemaObject is not modifiable
-     */
-    boolean isReadOnly();
-
-
-    /**
-     * Gets whether or not this SchemaObject has been inactivated. All
-     * SchemaObjects except Syntaxes allow for this parameter within their
-     * definition. For Syntaxes this property should always return false in
-     * which case it is never included in the description.
-     * 
-     * @return true if inactive, false if active
-     */
-    boolean isObsolete();
-
-
-    /**
-     * @return The SchemaObject extensions, as a Map of [extension, values]
-     */
-    Map<String, List<String>> getExtensions();
-
-    
-    /**
-     * Gets the name of the schema this SchemaObject is associated with.
-     *
-     * @return the name of the schema associated with this schemaObject
-     */
-    String getSchemaName();
-
-
-    // -------------- STUFF THAT NEEDS TO GO -----------------
-
-    
-    /**
      * Sets the Obsolete flag.
      * 
      * @param obsolete The Obsolete flag state
@@ -175,25 +74,6 @@ public interface SchemaObject
 
     
     /**
-     * The SchemaObject type :
-     * <li> AttributeType
-     * <li> DitCOntentRule
-     * <li> DitStructureRule
-     * <li> LdapComparator (specific to ADS)
-     * <li> LdapSyntaxe
-     * <li> MatchingRule
-     * <li> MatchingRuleUse
-     * <li> NameForm
-     * <li> Normalizer (specific to ADS)
-     * <li> ObjectClass
-     * <li> SyntaxChecker (specific to ADS)
-     * 
-     * @return the SchemaObject type
-     */
-    SchemaObjectType getObjectType();
-
-
-    /**
      * {@inheritDoc}
      */
     int hashCode();
@@ -206,14 +86,6 @@ public interface SchemaObject
 
 
     /**
-     * Copy the current SchemaObject on place
-     *
-     * @return The copied SchemaObject
-     */
-    SchemaObject copy();
-
-
-    /**
      * Copies the given schema object into this schema object.
      *
      * @param original the original SchemaObject
@@ -318,7 +190,7 @@ public interface SchemaObject
      * @param registries The registries in which we want it to be stored
      * @throws LdapException If the OID is invalid
      */
-    void registerOid( SchemaObject schemaObject, Registries registries ) throws LdapException;
+    void registerOid( MutableSchemaObject schemaObject, Registries registries ) throws LdapException;
 
 
     /**

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaManager.java Thu Mar 10 20:27:55 2011
@@ -662,7 +662,7 @@ public interface SchemaManager
      * @throws LdapException if the SchemaObject is already registered or
      * the registration operation is not supported
      */
-    boolean add( SchemaObject schemaObject ) throws LdapException;
+    boolean add( MutableSchemaObject schemaObject ) throws LdapException;
 
 
     /**
@@ -676,7 +676,7 @@ public interface SchemaManager
      * @throws Exception if the SchemaObject is not registered or
      * the deletion operation is not supported
      */
-    boolean delete( SchemaObject schemaObject ) throws LdapException;
+    boolean delete( MutableSchemaObject schemaObject ) throws LdapException;
 
 
     /**

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObject.java Thu Mar 10 20:27:55 2011
@@ -23,48 +23,10 @@ package org.apache.directory.shared.ldap
 import java.util.List;
 import java.util.Map;
 
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.schema.registries.Registries;
 
-
-/**
- * Most schema objects have some common attributes. This class
- * contains the minimum set of properties exposed by a SchemaObject.<br> 
- * We have 11 types of SchemaObjects :
- * <li> AttributeType
- * <li> DitCOntentRule
- * <li> DitStructureRule
- * <li> LdapComparator (specific to ADS)
- * <li> LdapSyntaxe
- * <li> MatchingRule
- * <li> MatchingRuleUse
- * <li> NameForm
- * <li> Normalizer (specific to ADS)
- * <li> ObjectClass
- * <li> SyntaxChecker (specific to ADS)
- * <br>
- * <br>
- * This class provides accessors and setters for the following attributes, 
- * which are common to all those SchemaObjects :
- * <li>oid : The numeric OID 
- * <li>description : The SchemaObject description
- * <li>obsolete : Tells if the schema object is obsolete
- * <li>extensions : The extensions, a key/Values map
- * <li>schemaObjectType : The SchemaObject type (see upper)
- * <li>schema : The schema the SchemaObject is associated with (it's an extension).
- * Can be null
- * <li>isEnabled : The SchemaObject status (it's related to the schema status)
- * <li>isReadOnly : Tells if the SchemaObject can be modified or not
- * <br><br>
- * Some of those attributes are not used by some Schema elements, even if they should
- * have been used. Here is the list :
- * <b>name</b> : LdapSyntax, Comparator, Normalizer, SyntaxChecker
- * <b>numericOid</b> : DitStructureRule, 
- * <b>obsolete</b> : LdapSyntax, Comparator, Normalizer, SyntaxChecker
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
 public interface SchemaObject
 {
+
     /**
      * Gets usually what is the numeric object identifier assigned to this
      * SchemaObject. All schema objects except for MatchingRuleUses have an OID
@@ -75,7 +37,7 @@ public interface SchemaObject
      * @return an OID for this SchemaObject or its MatchingRule if this
      *         SchemaObject is a MatchingRuleUse object
      */
-    String getOid();
+    public abstract String getOid();
 
 
     /**
@@ -84,7 +46,7 @@ public interface SchemaObject
      * 
      * @return the names for this SchemaObject
      */
-    List<String> getNames();
+    public abstract List<String> getNames();
 
 
     /**
@@ -94,7 +56,7 @@ public interface SchemaObject
      * @return the first of the names for this SchemaObject or the oid
      * if one does not exist
      */
-    String getName();
+    public abstract String getName();
 
 
     /**
@@ -102,7 +64,7 @@ public interface SchemaObject
      * 
      * @return a short description about this SchemaObject
      */
-    String getDescription();
+    public abstract String getDescription();
 
 
     /**
@@ -110,7 +72,7 @@ public interface SchemaObject
      * 
      * @return the SchemaObject specification
      */
-    String getSpecification();
+    public abstract String getSpecification();
 
 
     /**
@@ -119,7 +81,7 @@ public interface SchemaObject
      * @return true if the SchemaObject is enabled, or if it depends on 
      * an enabled schema
      */
-    boolean isEnabled();
+    public abstract boolean isEnabled();
 
 
     /**
@@ -127,7 +89,7 @@ public interface SchemaObject
      *  
      * @return true if the SchemaObject is disabled
      */
-    boolean isDisabled();
+    public abstract boolean isDisabled();
 
 
     /**
@@ -135,7 +97,7 @@ public interface SchemaObject
      *  
      * @return true if the SchemaObject is not modifiable
      */
-    boolean isReadOnly();
+    public abstract boolean isReadOnly();
 
 
     /**
@@ -146,34 +108,23 @@ public interface SchemaObject
      * 
      * @return true if inactive, false if active
      */
-    boolean isObsolete();
+    public abstract boolean isObsolete();
 
 
     /**
      * @return The SchemaObject extensions, as a Map of [extension, values]
      */
-    Map<String, List<String>> getExtensions();
+    public abstract Map<String, List<String>> getExtensions();
+
 
-    
     /**
      * Gets the name of the schema this SchemaObject is associated with.
      *
      * @return the name of the schema associated with this schemaObject
      */
-    String getSchemaName();
+    public abstract String getSchemaName();
 
 
-    // -------------- STUFF THAT NEEDS TO GO -----------------
-
-    
-    /**
-     * Sets the Obsolete flag.
-     * 
-     * @param obsolete The Obsolete flag state
-     */
-    void setObsolete( boolean obsolete );
-
-    
     /**
      * The SchemaObject type :
      * <li> AttributeType
@@ -190,19 +141,7 @@ public interface SchemaObject
      * 
      * @return the SchemaObject type
      */
-    SchemaObjectType getObjectType();
-
-
-    /**
-     * {@inheritDoc}
-     */
-    int hashCode();
-
-
-    /**
-     * {@inheritDoc}
-     */
-    boolean equals( Object o1 );
+    public abstract SchemaObjectType getObjectType();
 
 
     /**
@@ -210,151 +149,5 @@ public interface SchemaObject
      *
      * @return The copied SchemaObject
      */
-    SchemaObject copy();
-
-
-    /**
-     * Copies the given schema object into this schema object.
-     *
-     * @param original the original SchemaObject
-     * @return this
-     */
-    SchemaObject copy( SchemaObject original );
-
-
-    /**
-     * Clear the current SchemaObject : remove all the references to other objects, 
-     * and all the Maps. 
-     */
-    void clear();
-
-    
-    /**
-     * Sets the SchemaObject readOnly flag
-     * 
-     * @param isReadOnly The current SchemaObject ReadOnly status
-     */
-    void setReadOnly( boolean isReadOnly );
-
-
-    /**
-     * Sets the SchemaObject state, either enabled or disabled.
-     * 
-     * @param enabled The current SchemaObject state
-     */
-    void setEnabled( boolean enabled );
-
-
-    /**
-     * Sets the SchemaObject's description
-     * 
-     * @param description The SchemaObject's description
-     */
-    void setDescription( String description );
-
-
-    /**
-     * A special method used when renaming an SchemaObject: we may have to
-     * change it's OID
-     * @param oid The new OID
-     */
-    void setOid( String oid );
-
-
-    /**
-     * Add a new name to the list of names for this SchemaObject. The name
-     * is lower cased and trimmed.
-     *  
-     * @param names The names to add
-     */
-    void addName( String... names );
-
-
-    /**
-     * Sets the list of names for this SchemaObject. The names are
-     * lower cased and trimmed.
-     *  
-     * @param names The list of names. Can be empty
-     */
-    void setNames( List<String> names );
-
-
-    /**
-     * Sets the SchemaObject's specification
-     * 
-     * @param specification The SchemaObject's specification
-     */
-    void setSpecification( String specification );
-
-
-    /**
-     * Add an extension with its values
-     * @param key The extension key
-     * @param values The associated values
-     */
-    void addExtension( String key, List<String> values );
-
-
-    /**
-     * Add an extensions with their values. (Actually do a copy)
-     * 
-     * @param extensions The extensions map
-     */
-    void setExtensions( Map<String, List<String>> extensions );
-
-
-    /**
-     * Sets the name of the schema this SchemaObject is associated with.
-     * 
-     * @param schemaName the new schema name
-     */
-    void setSchemaName( String schemaName );
-
-
-    /**
-     * Register the given SchemaObject into the given registries' globalOidRegistry
-     *
-     * @param schemaObject the SchemaObject we want to register
-     * @param registries The registries in which we want it to be stored
-     * @throws LdapException If the OID is invalid
-     */
-    void registerOid( SchemaObject schemaObject, Registries registries ) throws LdapException;
-
-
-    /**
-     * Inject this SchemaObject into the given registries, updating the references to
-     * other SchemaObject
-     *
-     * @param errors the errors we got
-     * @param registries the registries
-     * @throws LdapException if one of the referenced schema objects does not exist
-     */
-    void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException;
-
-
-    /**
-     * Remove this SchemaObject from the given registries, updating the references to
-     * other SchemaObject.
-     *
-     * @param errors the errors we got
-     * @param registries The registries
-     * @throws org.apache.directory.shared.ldap.model.exception.LdapException if one of the referenced schema objects does not exist
-     */
-    void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException;
-
-    
-    /**
-     * Inject the Registries into the SchemaObject
-     *
-     * @param registries The Registries
-     */
-    void setRegistries( Registries registries );
-    
-    
-    /**
-     * Transform the SchemaObject to an immutable object
-     * TODO locked.
-     *
-     */
-    void lock();
-}
+    <R extends SchemaObject> R copy();
+}
\ No newline at end of file

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaObjectWrapper.java Thu Mar 10 20:27:55 2011
@@ -31,7 +31,7 @@ package org.apache.directory.shared.ldap
 public class SchemaObjectWrapper
 {
     /** The internal schemaObject */
-    private SchemaObject schemaObject;
+    private MutableSchemaObject schemaObject;
 
 
     /**
@@ -39,7 +39,7 @@ public class SchemaObjectWrapper
      *
      * @param schemaObject The contained SchemaObject
      */
-    public SchemaObjectWrapper( SchemaObject schemaObject )
+    public SchemaObjectWrapper( MutableSchemaObject schemaObject )
     {
         this.schemaObject = schemaObject;
     }
@@ -84,7 +84,7 @@ public class SchemaObjectWrapper
     /**
      *  @return The interned SchemaObject
      */
-    public SchemaObject get()
+    public MutableSchemaObject get()
     {
         return schemaObject;
     }

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/AbstractSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/AbstractSchemaParser.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/AbstractSchemaParser.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/parsers/AbstractSchemaParser.java Thu Mar 10 20:27:55 2011
@@ -25,6 +25,7 @@ import java.text.ParseException;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.constants.MetaSchemaConstants;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.util.Strings;
 
@@ -125,7 +126,7 @@ public abstract class AbstractSchemaPars
      *
      * @param schemaObject the schema object where the name should be updated
      */
-    protected static void updateSchemaName( SchemaObject schemaObject )
+    protected static void updateSchemaName( MutableSchemaObject schemaObject )
     {
         // Update the Schema if we have the X-SCHEMA extension
         List<String> schemaExtension = schemaObject.getExtensions().get( MetaSchemaConstants.X_SCHEMA );

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultComparatorRegistry.java Thu Mar 10 20:27:55 2011
@@ -22,7 +22,7 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.LdapComparator;
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -69,7 +69,7 @@ public class DefaultComparatorRegistry e
             if ( schemaName.equalsIgnoreCase( comparator.getSchemaName() ) )
             {
                 String oid = comparator.getOid();
-                SchemaObject removed = unregister( oid );
+                MutableSchemaObject removed = unregister( oid );
 
                 if ( DEBUG )
                 {

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultDITStructureRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultDITStructureRuleRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultDITStructureRuleRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultDITStructureRuleRegistry.java Thu Mar 10 20:27:55 2011
@@ -27,7 +27,7 @@ import java.util.Map;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.DITStructureRule;
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -183,7 +183,7 @@ public class DefaultDITStructureRuleRegi
             if ( schemaName.equalsIgnoreCase( ditStructureRule.getSchemaName() ) )
             {
                 int ruleId = ditStructureRule.getRuleId();
-                SchemaObject removed = byRuleId.remove( ruleId );
+                MutableSchemaObject removed = byRuleId.remove( ruleId );
 
                 if ( DEBUG )
                 {

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultNormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultNormalizerRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultNormalizerRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultNormalizerRegistry.java Thu Mar 10 20:27:55 2011
@@ -22,7 +22,7 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.Normalizer;
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -69,7 +69,7 @@ public class DefaultNormalizerRegistry e
             if ( schemaName.equalsIgnoreCase( normalizer.getSchemaName() ) )
             {
                 String oid = normalizer.getOid();
-                SchemaObject removed = unregister( oid );
+                MutableSchemaObject removed = unregister( oid );
 
                 if ( DEBUG )
                 {

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultObjectClassRegistry.java Thu Mar 10 20:27:55 2011
@@ -31,7 +31,7 @@ import java.util.Set;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 
 
@@ -226,7 +226,7 @@ public class DefaultObjectClassRegistry 
     public void clear()
     {
         // Clear the contained SchemaObjects
-        for ( SchemaObject objectClass : oidRegistry )
+        for ( MutableSchemaObject objectClass : oidRegistry )
         {
             objectClass.clear();
         }

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSchemaObjectRegistry.java Thu Mar 10 20:27:55 2011
@@ -30,6 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.exception.LdapSchemaException;
 import org.apache.directory.shared.ldap.model.exception.LdapSchemaExceptionCodes;
 import org.apache.directory.shared.ldap.model.schema.LoadableSchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 import org.apache.directory.shared.util.Strings;
@@ -114,28 +115,6 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    public void renameSchema( String originalSchemaName, String newSchemaName )
-    {
-        // Loop on all the SchemaObjects stored and remove those associated
-        // with the give schemaName
-        for ( T schemaObject : this )
-        {
-            if ( originalSchemaName.equalsIgnoreCase( schemaObject.getSchemaName() ) )
-            {
-                schemaObject.setSchemaName( newSchemaName );
-
-                if ( DEBUG )
-                {
-                    LOG.debug( "Renamed {} schemaName to {}", schemaObject, newSchemaName );
-                }
-            }
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public Iterator<T> iterator()
     {
         return ( Iterator<T> ) oidRegistry.iterator();
@@ -358,8 +337,7 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
-    // This will suppress PMD.EmptyCatchBlock warnings in this method
-    @SuppressWarnings({ "PMD.EmptyCatchBlock", "unchecked" })
+    @SuppressWarnings("unchecked")
     public SchemaObjectRegistry<T> copy( SchemaObjectRegistry<T> original )
     {
         // Fill the byName and OidRegistry maps, the type has already be copied
@@ -477,6 +455,10 @@ public abstract class DefaultSchemaObjec
 
     /**
      * {@inheritDoc}
+     * 
+     * @TODO akarasulu - this method also clears the SchemaObject as a side 
+     * effect, perhaps it should not and stick to only it's scope of clearing 
+     * this registry?
      */
     public void clear()
     {
@@ -486,7 +468,10 @@ public abstract class DefaultSchemaObjec
             // Don't clear LoadableSchemaObject
             if ( !( schemaObject instanceof LoadableSchemaObject ) )
             {
-                schemaObject.clear();
+                if ( schemaObject instanceof MutableSchemaObject )
+                {
+                    ( ( MutableSchemaObject ) schemaObject ).clear();
+                }
             }
         }
 

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/DefaultSyntaxCheckerRegistry.java Thu Mar 10 20:27:55 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectType;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.slf4j.Logger;
@@ -69,7 +69,7 @@ public class DefaultSyntaxCheckerRegistr
             if ( schemaName.equalsIgnoreCase( syntaxChecker.getSchemaName() ) )
             {
                 String oid = syntaxChecker.getOid();
-                SchemaObject removed = unregister( oid );
+                MutableSchemaObject removed = unregister( oid );
 
                 if ( DEBUG )
                 {

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java Thu Mar 10 20:27:55 2011
@@ -49,6 +49,7 @@ import org.apache.directory.shared.ldap.
 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.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectWrapper;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
@@ -101,7 +102,7 @@ public class Registries implements Schem
     protected NormalizerRegistry normalizerRegistry;
 
     /** The global OID registry */
-    protected OidRegistry<SchemaObject> globalOidRegistry;
+    protected OidRegistry<MutableSchemaObject> globalOidRegistry;
 
     /** The SyntaxChecker registry */
     protected SyntaxCheckerRegistry syntaxCheckerRegistry;
@@ -147,7 +148,7 @@ public class Registries implements Schem
      */
     public Registries( SchemaManager schemaManager )
     {
-        globalOidRegistry = new OidRegistry<SchemaObject>();
+        globalOidRegistry = new OidRegistry<MutableSchemaObject>();
         attributeTypeRegistry = new DefaultAttributeTypeRegistry();
         comparatorRegistry = new DefaultComparatorRegistry();
         ditContentRuleRegistry = new DefaultDITContentRuleRegistry();
@@ -253,7 +254,7 @@ public class Registries implements Schem
     /**
      * @return The global Oid registry
      */
-    public OidRegistry<SchemaObject> getGlobalOidRegistry()
+    public OidRegistry<MutableSchemaObject> getGlobalOidRegistry()
     {
         return globalOidRegistry;
     }
@@ -722,7 +723,7 @@ public class Registries implements Schem
     /**
      * Build the SchemaObject references
      */
-    public void buildReference( List<Throwable> errors, SchemaObject schemaObject )
+    public void buildReference( List<Throwable> errors, MutableSchemaObject schemaObject )
     {
         try
         {
@@ -743,7 +744,7 @@ public class Registries implements Schem
     /**
      * Unlink the SchemaObject references
      */
-    public void removeReference( List<Throwable> errors, SchemaObject schemaObject )
+    public void removeReference( List<Throwable> errors, MutableSchemaObject schemaObject )
     {
         try
         {
@@ -1358,7 +1359,7 @@ public class Registries implements Schem
     /**
      * Applies the added SchemaObject to the given register
      */
-    public List<Throwable> add( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
+    public List<Throwable> add( List<Throwable> errors, MutableSchemaObject schemaObject ) throws LdapException
     {
         // Relax the registries
         boolean wasRelaxed = isRelaxed;
@@ -1405,7 +1406,7 @@ public class Registries implements Schem
         setRelaxed();
 
         // Remove the SchemaObject from the registries
-        SchemaObject removed = unregister( errors, schemaObject );
+        MutableSchemaObject removed = unregister( errors, schemaObject );
 
         // Remove the SchemaObject from its schema
         dissociateFromSchema( errors, removed );
@@ -1502,7 +1503,7 @@ public class Registries implements Schem
      * @param schemaObject The schemaObject we are looking for
      * @return true if the schemaObject is present in a schema
      */
-    public boolean contains( SchemaObject schemaObject )
+    public boolean contains( MutableSchemaObject schemaObject )
     {
         String schemaName = schemaObject.getSchemaName();
 
@@ -1624,7 +1625,7 @@ public class Registries implements Schem
      * @param schemaObject The schemaObject to register
      * @throws LdapException If there is a problem
      */
-    public void associateWithSchema( List<Throwable> errors, SchemaObject schemaObject )
+    public void associateWithSchema( List<Throwable> errors, MutableSchemaObject schemaObject )
     {
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1693,7 +1694,7 @@ public class Registries implements Schem
      * @throws LdapException If there is a problem
      */
 
-    public void dissociateFromSchema( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
+    public void dissociateFromSchema( List<Throwable> errors, MutableSchemaObject schemaObject ) throws LdapException
     {
         LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1758,7 +1759,7 @@ public class Registries implements Schem
     // Remove me when TODO is implemented
     @SuppressWarnings(
         { "PMD.UnusedFormalParameter", "PMD.EmptyIfStmt" })
-    private SchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
+    private MutableSchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
     {
         LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
@@ -1778,7 +1779,7 @@ public class Registries implements Schem
             }
         }
 
-        SchemaObject unregistered = null;
+        MutableSchemaObject unregistered = null;
 
         // First call the specific registry's register method
         switch ( schemaObject.getObjectType() )
@@ -1839,7 +1840,7 @@ public class Registries implements Schem
      * @param schemaObject The schemaObject to remove
      * @throws LdapException If there is a problem
      */
-    public void dissociateFromSchema( SchemaObject schemaObject ) throws LdapException
+    public void dissociateFromSchema( MutableSchemaObject schemaObject ) throws LdapException
     {
         // And unregister the schemaObject within its schema
         Set<SchemaObjectWrapper> content = schemaObjects.get( Strings.toLowerCase( schemaObject.getSchemaName() ) );
@@ -1879,7 +1880,7 @@ public class Registries implements Schem
      * @param schemaObject The SchemaObject we are looking for
      * @return true if there is at least one SchemaObjetc referencing the given one
      */
-    public boolean isReferenced( SchemaObject schemaObject )
+    public boolean isReferenced( MutableSchemaObject schemaObject )
     {
         SchemaObjectWrapper wrapper = new SchemaObjectWrapper( schemaObject );
 
@@ -1909,7 +1910,7 @@ public class Registries implements Schem
      * @param schemaObject The SchemaObject we are looking for
      * @return The Set of referencing SchemaObject, or null 
      */
-    public Set<SchemaObjectWrapper> getUsedBy( SchemaObject schemaObject )
+    public Set<SchemaObjectWrapper> getUsedBy( MutableSchemaObject schemaObject )
     {
         SchemaObjectWrapper wrapper = new SchemaObjectWrapper( schemaObject );
 
@@ -1995,7 +1996,7 @@ public class Registries implements Schem
      * @param schemaObject The SchemaObject we are looking for
      * @return The Set of referenced SchemaObject, or null 
      */
-    public Set<SchemaObjectWrapper> getUsing( SchemaObject schemaObject )
+    public Set<SchemaObjectWrapper> getUsing( MutableSchemaObject schemaObject )
     {
         SchemaObjectWrapper wrapper = new SchemaObjectWrapper( schemaObject );
 
@@ -2009,7 +2010,7 @@ public class Registries implements Schem
      * @param reference The base SchemaObject
      * @param referee The SchemaObject pointing on the reference
      */
-    private void addUsing( SchemaObject reference, SchemaObject referee )
+    private void addUsing( MutableSchemaObject reference, MutableSchemaObject referee )
     {
         if ( ( reference == null ) || ( referee == null ) )
         {
@@ -2038,7 +2039,7 @@ public class Registries implements Schem
      * @param base The base SchemaObject
      * @param referenced The referenced SchemaObject
      */
-    public void addReference( SchemaObject base, SchemaObject referenced )
+    public void addReference( MutableSchemaObject base, MutableSchemaObject referenced )
     {
         if ( LOG.isDebugEnabled() )
         {
@@ -2062,7 +2063,7 @@ public class Registries implements Schem
      * @param reference The base SchemaObject
      * @param referee The SchemaObject pointing on the reference
      */
-    private void addUsedBy( SchemaObject referee, SchemaObject reference )
+    private void addUsedBy( MutableSchemaObject referee, MutableSchemaObject reference )
     {
         if ( ( reference == null ) || ( referee == null ) )
         {
@@ -2091,7 +2092,7 @@ public class Registries implements Schem
      * @param reference The base SchemaObject
      * @param referee The SchemaObject pointing on the reference
      */
-    private void delUsing( SchemaObject reference, SchemaObject referee )
+    private void delUsing( MutableSchemaObject reference, MutableSchemaObject referee )
     {
         if ( ( reference == null ) || ( referee == null ) )
         {
@@ -2126,7 +2127,7 @@ public class Registries implements Schem
      * @param reference The base SchemaObject
      * @param referee The SchemaObject pointing on the reference
      */
-    private void delUsedBy( SchemaObject referee, SchemaObject reference )
+    private void delUsedBy( MutableSchemaObject referee, MutableSchemaObject reference )
     {
         if ( ( reference == null ) || ( referee == null ) )
         {
@@ -2161,7 +2162,7 @@ public class Registries implements Schem
      * @param base The base SchemaObject
      * @param referenced The referenced SchemaObject
      */
-    public void delReference( SchemaObject base, SchemaObject referenced )
+    public void delReference( MutableSchemaObject base, MutableSchemaObject referenced )
     {
         if ( LOG.isDebugEnabled() )
         {
@@ -2189,7 +2190,7 @@ public class Registries implements Schem
     }
 
 
-    private boolean checkReferences( SchemaObject reference, SchemaObject referee, String message )
+    private boolean checkReferences( MutableSchemaObject reference, MutableSchemaObject referee, String message )
     {
         SchemaObjectWrapper referenceWrapper = new SchemaObjectWrapper( reference );
         SchemaObjectWrapper refereeWrapper = new SchemaObjectWrapper( referee );
@@ -2613,13 +2614,13 @@ public class Registries implements Schem
 
             for ( SchemaObjectWrapper schemaObjectWrapper : schemaObjects.get( schemaName ) )
             {
-                SchemaObject original = schemaObjectWrapper.get();
+                MutableSchemaObject original = schemaObjectWrapper.get();
 
                 try
                 {
                     if ( !( original instanceof LoadableSchemaObject ) )
                     {
-                        SchemaObject copy = clone.globalOidRegistry.getSchemaObject( original.getOid() );
+                        MutableSchemaObject copy = clone.globalOidRegistry.getSchemaObject( original.getOid() );
                         SchemaObjectWrapper newWrapper = new SchemaObjectWrapper( copy );
                         objects.add( newWrapper );
                     }
@@ -2703,7 +2704,7 @@ public class Registries implements Schem
      * @param schemaObject The SchemaObject to remove
      * @return The list of SchemaObjects referencing the SchemaObjetc we want to remove
      */
-    public Set<SchemaObjectWrapper> getReferencing( SchemaObject schemaObject )
+    public Set<SchemaObjectWrapper> getReferencing( MutableSchemaObject schemaObject )
     {
         SchemaObjectWrapper schemaObjectWrapper = new SchemaObjectWrapper( schemaObject );
 

Modified: directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SchemaObjectRegistry.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SchemaObjectRegistry.java (original)
+++ directory/shared/branches/akarasulu/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/SchemaObjectRegistry.java Thu Mar 10 20:27:55 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface SchemaObjectRegistry<T extends SchemaObject>
+public interface SchemaObjectRegistry<T extends SchemaObject> extends Iterable<T>
 {
     /**
      * Checks to see if an SchemaObject exists in the registry, by its
@@ -65,16 +65,6 @@ public interface SchemaObjectRegistry<T 
 
 
     /**
-     * Modify all the SchemaObject using a schemaName when this name changes.
-     *
-     * @param originalSchemaName The original Schema name
-     * @param newSchemaName The new Schema name
-     * @throws LdapException if the schema object does not exist
-     */
-    void renameSchema( String originalSchemaName, String newSchemaName ) throws LdapException;
-
-
-    /**
      * Gets an iterator over the registered schema objects in the registry.
      *
      * @return an Iterator of homogeneous schema objects

Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java (original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemaloader/SchemaEntityFactory.java Thu Mar 10 20:27:55 2011
@@ -48,6 +48,7 @@ import org.apache.directory.shared.ldap.
 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.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
@@ -1071,7 +1072,7 @@ public class SchemaEntityFactory impleme
      *  - isEnabled
      * @throws org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException
      */
-    private void setSchemaObjectProperties( SchemaObject schemaObject, Entry entry, Schema schema )
+    private void setSchemaObjectProperties( MutableSchemaObject schemaObject, Entry entry, Schema schema )
         throws LdapInvalidAttributeValueException
     {
         // The isObsolete field
@@ -1180,7 +1181,7 @@ public class SchemaEntityFactory impleme
      *  - isReadOnly
      *  - isEnabled
      */
-    private void setSchemaObjectProperties( SchemaObject schemaObject, SchemaObject description, Schema schema )
+    private void setSchemaObjectProperties( MutableSchemaObject schemaObject, SchemaObject description, Schema schema )
     {
         // The isObsolete field
         schemaObject.setObsolete( description.isObsolete() );

Modified: directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/branches/akarasulu/ldap/schema/data/src/main/java/org/apache/directory/shared/ldap/schemamanager/impl/DefaultSchemaManager.java Thu Mar 10 20:27:55 2011
@@ -50,6 +50,7 @@ import org.apache.directory.shared.ldap.
 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.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObjectWrapper;
 import org.apache.directory.shared.ldap.model.schema.SyntaxChecker;
@@ -280,7 +281,7 @@ public class DefaultSchemaManager implem
         Map<String, Set<SchemaObjectWrapper>> schemaObjects = registries.getObjectBySchemaName();
         Set<SchemaObjectWrapper> content = schemaObjects.get( Strings.toLowerCase( schema.getSchemaName() ) );
 
-        List<SchemaObject> toBeDeleted = new ArrayList<SchemaObject>();
+        List<MutableSchemaObject> toBeDeleted = new ArrayList<MutableSchemaObject>();
 
         // Buid an intermediate list to avoid concurrent modifications
         for ( SchemaObjectWrapper schemaObjectWrapper : content )
@@ -947,7 +948,7 @@ public class DefaultSchemaManager implem
      * @return the created schemaObject instance
      * @throws LdapException If the registering failed
      */
-    private SchemaObject addSchemaObject( Registries registries, SchemaObject schemaObject, Schema schema )
+    private SchemaObject addSchemaObject( Registries registries, MutableSchemaObject schemaObject, Schema schema )
         throws LdapException
     {
         if ( registries.isRelaxed() )
@@ -1625,7 +1626,7 @@ public class DefaultSchemaManager implem
     /**
      * Get the inner SchemaObject if it's not a C/N/SC
      */
-    private SchemaObject getSchemaObject( SchemaObject schemaObject ) throws LdapException
+    private MutableSchemaObject getSchemaObject( MutableSchemaObject schemaObject ) throws LdapException
     {
         if ( schemaObject instanceof LoadableSchemaObject )
         {
@@ -1661,9 +1662,9 @@ public class DefaultSchemaManager implem
     }
 
 
-    private SchemaObject copy( SchemaObject schemaObject )
+    private MutableSchemaObject copy( MutableSchemaObject schemaObject )
     {
-        SchemaObject copy = null;
+        MutableSchemaObject copy = null;
 
         if ( !( schemaObject instanceof LoadableSchemaObject ) )
         {
@@ -1695,13 +1696,13 @@ public class DefaultSchemaManager implem
     /**
      * {@inheritDoc}
      */
-    public boolean add( SchemaObject schemaObject ) throws LdapException
+    public boolean add( MutableSchemaObject schemaObject ) throws LdapException
     {
         // First, clear the errors
         errors.clear();
 
         // Clone the schemaObject
-        SchemaObject copy = copy( schemaObject );
+        MutableSchemaObject copy = copy( schemaObject );
 
         if ( copy == null )
         {
@@ -1820,7 +1821,7 @@ public class DefaultSchemaManager implem
     /**
      * {@inheritDoc}
      */
-    public boolean delete( SchemaObject schemaObject ) throws LdapException
+    public boolean delete( MutableSchemaObject schemaObject ) throws LdapException
     {
         // First, clear the errors
         errors.clear();
@@ -1844,7 +1845,7 @@ public class DefaultSchemaManager implem
             }
 
             // Get the SchemaObject to delete if it's not a LoadableSchemaObject
-            SchemaObject toDelete = getSchemaObject( schemaObject );
+            MutableSchemaObject toDelete = getSchemaObject( schemaObject );
 
             // First check that this SchemaObject does not have any referencing SchemaObjects
             Set<SchemaObjectWrapper> referencing = registries.getReferencing( toDelete );

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/DeleteSchemaElementAction.java Thu Mar 10 20:27:55 2011
@@ -28,6 +28,7 @@ import java.util.Map;
 
 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.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -153,7 +154,7 @@ public class DeleteSchemaElementAction e
             {
 
                 Map<String, Schema> schemasMap = new HashMap<String, Schema>();
-                List<SchemaObject> schemaObjectsList = new ArrayList<SchemaObject>();
+                List<MutableSchemaObject> schemaObjectsList = new ArrayList<MutableSchemaObject>();
 
                 for ( Iterator<?> iterator = selection.iterator(); iterator.hasNext(); )
                 {

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorHierarchyViewAction.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorHierarchyViewAction.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorHierarchyViewAction.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorHierarchyViewAction.java Thu Mar 10 20:27:55 2011
@@ -22,7 +22,7 @@ package org.apache.directory.studio.sche
 
 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.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
 import org.apache.directory.studio.schemaeditor.view.editors.attributetype.AttributeTypeEditor;
@@ -197,7 +197,7 @@ public class LinkWithEditorHierarchyView
      * @param schemaElement
      *      the Schema Element
      */
-    private void linkViewWithEditor( SchemaObject schemaElement )
+    private void linkViewWithEditor( MutableSchemaObject schemaElement )
     {
         if ( schemaElement instanceof AttributeType )
         {

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/OpenTypeHierarchyAction.java Thu Mar 10 20:27:55 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.studio.schemaeditor.controller.actions;
 
 
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
 import org.apache.directory.studio.schemaeditor.PluginUtils;
 import org.apache.directory.studio.schemaeditor.view.ViewUtils;
@@ -151,7 +151,7 @@ public class OpenTypeHierarchyAction ext
      * @param element
      *      the element to open
      */
-    private void openTypeHierarchy( SchemaObject element )
+    private void openTypeHierarchy( MutableSchemaObject element )
     {
         HierarchyView view = ( HierarchyView ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
             .findView( HierarchyView.ID );

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java Thu Mar 10 20:27:55 2011
@@ -25,7 +25,7 @@ import java.util.List;
 import org.apache.commons.collections.map.MultiValueMap;
 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.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.controller.SchemaHandler;
 import org.apache.directory.studio.schemaeditor.model.Schema;
@@ -228,7 +228,7 @@ public class HierarchyManager
      * @param object
      *      an attribute type or an object class.
      */
-    private void checkAliasesAndOID( SchemaObject object )
+    private void checkAliasesAndOID( MutableSchemaObject object )
     {
         // Aliases
         List<String> aliases = object.getNames();

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemachecker/SchemaChecker.java Thu Mar 10 20:27:55 2011
@@ -31,6 +31,7 @@ import org.apache.directory.shared.ldap.
 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.SchemaManager;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
 import org.apache.directory.studio.schemaeditor.Activator;
@@ -396,7 +397,7 @@ public class SchemaChecker
      * @return
      *      the associated errors
      */
-    public List<?> getErrors( SchemaObject so )
+    public List<?> getErrors( MutableSchemaObject so )
     {
         return ( List<?> ) errorsMap.get( so );
     }
@@ -410,7 +411,7 @@ public class SchemaChecker
      * @return
      *      true if the given Schema Object has errors.
      */
-    public boolean hasErrors( SchemaObject so )
+    public boolean hasErrors( MutableSchemaObject so )
     {
         List<?> errors = getErrors( so );
 

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoaderUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoaderUtils.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoaderUtils.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoaderUtils.java Thu Mar 10 20:27:55 2011
@@ -36,6 +36,7 @@ import org.apache.directory.shared.ldap.
 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.ObjectClassTypeEnum;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
 import org.apache.directory.shared.util.Strings;
@@ -233,7 +234,7 @@ public class SchemaEditorSchemaLoaderUti
 
 
     /**
-     * Adds the values common to all {@link SchemaObject}(s) to the entry.
+     * Adds the values common to all {@link MutableSchemaObject}(s) to the entry.
      *
      * @param schemaObject
      *      the schema object

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/ProblemsViewLabelProvider.java Thu Mar 10 20:27:55 2011
@@ -25,6 +25,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.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -475,7 +476,7 @@ public class ProblemsViewLabelProvider e
 
 
     /**
-     * Gets the original {@link SchemaObject} from the {@link SchemaHandler}.
+     * Gets the original {@link MutableSchemaObject} from the {@link SchemaHandler}.
      *
      * @param so
      *      the schema object

Modified: directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java?rev=1080337&r1=1080336&r2=1080337&view=diff
==============================================================================
--- directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java (original)
+++ directory/studio/branches/akarasulu/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java Thu Mar 10 20:27:55 2011
@@ -28,7 +28,7 @@ import java.util.regex.Pattern;
 
 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.SchemaObject;
+import org.apache.directory.shared.ldap.model.schema.MutableSchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
 import org.apache.directory.studio.schemaeditor.PluginUtils;
@@ -662,7 +662,7 @@ public class SearchView extends ViewPart
             validateSearchField();
         }
 
-        List<SchemaObject> results = search( searchString, searchIn, scope );
+        List<MutableSchemaObject> results = search( searchString, searchIn, scope );
         setSearchResultsLabel( searchString, results.size() );
         resultsTableViewer.setInput( results );
     }
@@ -678,9 +678,9 @@ public class SearchView extends ViewPart
      * @param scope
      *      the scope
      */
-    private List<SchemaObject> search( String searchString, SearchInEnum[] searchIn, int scope )
+    private List<MutableSchemaObject> search( String searchString, SearchInEnum[] searchIn, int scope )
     {
-        List<SchemaObject> searchResults = new ArrayList<SchemaObject>();
+        List<MutableSchemaObject> searchResults = new ArrayList<MutableSchemaObject>();
 
         if ( searchString != null )
         {



Mime
View raw message