directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r557690 [1/3] - in /directory/studio/trunk/studio-apacheds-schemaeditor/src: main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/ main/java/or...
Date Thu, 19 Jul 2007 17:03:36 GMT
Author: pamarcelot
Date: Thu Jul 19 10:03:26 2007
New Revision: 557690

URL: http://svn.apache.org/viewvc?view=rev&rev=557690
Log:
Refactored the Difference Engine. Added new SchemaDifference, AttributeTypeDifference and ObjectClassDifference Classes.

Added:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractPropertyDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AliasDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddAliasDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AttributeTypeDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ClassTypeDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyClassTypeDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/CollectiveDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyCollectiveDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DescriptionDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddDescriptionDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceType.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/EqualityDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddEqualityDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/MandatoryATDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddMandatoryATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/NoUserModificationDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyNoUserModificationDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObjectClassDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObsoleteDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyObsoleteDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OptionalATDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOptionalATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OrderingDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOrderingDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/PropertyDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SchemaDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SingleValueDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySingleValueDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SubstringDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSubstringDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorATDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SuperiorOCDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorOCDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SyntaxLengthDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxLengthDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/UsageDifference.java
      - copied, changed from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyUsageDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AbstractDifferenceWrapper.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/AttributeTypeDifferenceWrapper.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/ObjectClassDifferenceWrapper.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/SchemaDifferenceWrapper.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wrappers/difference/WrapperState.java
Removed:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractAddDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractModifyDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractRemoveDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddAliasDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddDescriptionDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddEqualityDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddMandatoryATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOptionalATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOrderingDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSubstringDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSuperiorOCDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddSyntaxLengthDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyClassTypeDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyCollectiveDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyDescriptionDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyEqualityDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyNoUserModificationDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyObsoleteDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyOrderingDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySingleValueDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySubstringDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySuperiorATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySyntaxDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySyntaxLengthDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyUsageDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveAliasDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveDescriptionDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveEqualityDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveMandatoryATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveOptionalATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveOrderingDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveSubstringDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveSuperiorATDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveSuperiorOCDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveSyntaxDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/RemoveSyntaxLengthDifference.java
Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractDifference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/Difference.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetLabelProvider.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetPropertySorter.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/widget/DifferencesWidgetTypeSorter.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/wizards/CommitChangesDifferencesWizardPage.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/test/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngineTest.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractDifference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractDifference.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractDifference.java Thu Jul 19 10:03:26 2007
@@ -20,14 +20,23 @@
 package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
 
 
+/**
+ * This class represents the AbstractDifference.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class AbstractDifference implements Difference
 {
     /** The source Object */
     private Object source;
 
-    /** The sestination Object */
+    /** The destination Object */
     private Object destination;
 
+    /** The type of difference */
+    private DifferenceType type;
+
 
     /**
      * Creates a new instance of AbstractDifference.
@@ -44,6 +53,24 @@
     }
 
 
+    /**
+     * Creates a new instance of AbstractDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     * @param type
+     *      the type
+     */
+    public AbstractDifference( Object source, Object destination, DifferenceType type )
+    {
+        this.source = source;
+        this.destination = destination;
+        this.type = type;
+    }
+
+
     /* (non-Javadoc)
      * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.Difference#getDestination()
      */
@@ -77,5 +104,23 @@
     public void setSource( Object source )
     {
         this.source = source;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.Difference#getType()
+     */
+    public DifferenceType getType()
+    {
+        return type;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.Difference#setType(org.apache.directory.studio.apacheds.schemaeditor.model.difference.DifferenceType)
+     */
+    public void setType( DifferenceType type )
+    {
+        this.type = type;
     }
 }

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractPropertyDifference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractPropertyDifference.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractPropertyDifference.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AbstractPropertyDifference.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,102 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
+
+
+/**
+ * This abstract class represents an Abstract Property Difference.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AbstractPropertyDifference extends AbstractDifference implements PropertyDifference
+{
+    /** The old value*/
+    private Object oldValue;
+
+    /** The new value */
+    private Object newValue;
+
+
+    /**
+     * Creates a new instance of AbstractPropertyDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     * @param type
+     *      the type
+     */
+    public AbstractPropertyDifference( Object source, Object destination, DifferenceType type )
+    {
+        super( source, destination, type );
+    }
+
+
+    /**
+     * Creates a new instance of AbstractPropertyDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     */
+    public AbstractPropertyDifference( Object source, Object destination )
+    {
+        super( source, destination );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.PropertyDifference#getNewValue()
+     */
+    public Object getNewValue()
+    {
+        return newValue;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.PropertyDifference#setNewValue(java.lang.Object)
+     */
+    public void setNewValue( Object newValue )
+    {
+        this.newValue = newValue;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.PropertyDifference#getOldValue()
+     */
+    public Object getOldValue()
+    {
+        return oldValue;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.studio.apacheds.schemaeditor.model.difference.PropertyDifference#setOldValue(java.lang.Object)
+     */
+    public void setOldValue( Object oldValue )
+    {
+        this.oldValue = oldValue;
+    }
+}

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AliasDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddAliasDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AliasDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddAliasDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AliasDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddAliasDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AliasDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added alias.
+ * This class represents a difference of alias.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddAliasDifference extends AbstractAddDifference
+public class AliasDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddAliasDifference.
+     * Creates a new instance of AliasDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddAliasDifference( Object source, Object destination )
+    public AliasDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddAliasDifference.
+     * Creates a new instance of AliasDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddAliasDifference( Object source, Object destination, Object value )
+    public AliasDifference( Object source, Object destination )
     {
-        super( source, destination, value );
-    }
+        super( source, destination );
+    }    
 }

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AttributeTypeDifference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AttributeTypeDifference.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AttributeTypeDifference.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AttributeTypeDifference.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,103 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This class represents an attribute type difference.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeDifference extends AbstractDifference
+{
+    /** The differences */
+    private List<PropertyDifference> differences = new ArrayList<PropertyDifference>();
+
+
+    /**
+     * Creates a new instance of AttributeTypeDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     * @param type
+     *      the type
+     */
+    public AttributeTypeDifference( Object source, Object destination, DifferenceType type )
+    {
+        super( source, destination, type );
+    }
+
+
+    /**
+     * Creates a new instance of AttributeTypeDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     */
+    public AttributeTypeDifference( Object source, Object destination )
+    {
+        super( source, destination );
+    }
+
+
+    /**
+     * Gets the property differences.
+     *
+     * @return
+     *      the property differences
+     */
+    public List<PropertyDifference> getDifferences()
+    {
+        return differences;
+    }
+
+
+    /**
+     * Adds a difference.
+     *
+     * @param difference
+     *      the difference
+     */
+    public void addDifference( PropertyDifference difference )
+    {
+        differences.add( difference );
+    }
+
+
+    /**
+     * Removes a difference.
+     *
+     * @param difference
+     *      the difference
+     */
+    public void removeDifference( PropertyDifference difference )
+    {
+        differences.remove( difference );
+    }
+}

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ClassTypeDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyClassTypeDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ClassTypeDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyClassTypeDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ClassTypeDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyClassTypeDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ClassTypeDifference.java Thu Jul 19 10:03:26 2007
@@ -21,41 +21,23 @@
 
 
 /**
- * This class represents the difference of a modified class type.
+ * This class represents a difference of class type.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifyClassTypeDifference extends AbstractModifyDifference
+public class ClassTypeDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of ModifyClassTypeDifference.
+     * Creates a new instance of ClassTypeDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
      */
-    public ModifyClassTypeDifference( Object source, Object destination )
+    public ClassTypeDifference( Object source, Object destination )
     {
-        super( source, destination );
-    }
-
-
-    /**
-     * Creates a new instance of ModifyClassTypeDifference.
-     *
-     * @param source
-     *      the source Object
-     * @param destination
-     *      the destination Object
-     * @param oldValue
-     *      the old value
-     * @param newValue
-     *      the new value
-     */
-    public ModifyClassTypeDifference( Object source, Object destination, Object oldValue, Object newValue )
-    {
-        super( source, destination, oldValue, newValue );
+        super( source, destination, DifferenceType.MODIFIED );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/CollectiveDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyCollectiveDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/CollectiveDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyCollectiveDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/CollectiveDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyCollectiveDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/CollectiveDifference.java Thu Jul 19 10:03:26 2007
@@ -21,41 +21,23 @@
 
 
 /**
- * This class represents the difference of a modified collective value.
+ * This class represents a difference of collective value.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifyCollectiveDifference extends AbstractModifyDifference
+public class CollectiveDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of ModifyCollectiveDifference.
+     * Creates a new instance of CollectiveDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
      */
-    public ModifyCollectiveDifference( Object source, Object destination )
+    public CollectiveDifference( Object source, Object destination )
     {
-        super( source, destination );
-    }
-
-
-    /**
-     * Creates a new instance of ModifyCollectiveDifference.
-     *
-     * @param source
-     *      the source Object
-     * @param destination
-     *      the destination Object
-     * @param oldValue
-     *      the old value
-     * @param newValue
-     *      the new value
-     */
-    public ModifyCollectiveDifference( Object source, Object destination, Object oldValue, Object newValue )
-    {
-        super( source, destination, oldValue, newValue );
+        super( source, destination, DifferenceType.MODIFIED );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DescriptionDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddDescriptionDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DescriptionDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddDescriptionDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DescriptionDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddDescriptionDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DescriptionDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added description.
+ * This class represents a difference of description.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddDescriptionDifference extends AbstractAddDifference
+public class DescriptionDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddDescriptionDifference.
+     * Creates a new instance of DescriptionDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddDescriptionDifference( Object source, Object destination )
+    public DescriptionDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddDescriptionDifference.
+     * Creates a new instance of DescriptionDifference.
      *
      * @param source
      *      the source Object
      * @param destination
-     *      the destination Object 
-     * @param value
-     *      the value
+     *      the destination Object
      */
-    public AddDescriptionDifference( Object source, Object destination, Object value )
+    public DescriptionDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/Difference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/Difference.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/Difference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/Difference.java Thu Jul 19 10:03:26 2007
@@ -28,28 +28,6 @@
  */
 public interface Difference
 {
-    public enum DifferenceType
-    {
-        ADD_ALIAS, REMOVE_ALIAS, 
-        ADD_DESCRIPTION, MODIFY_DESCRIPTION, REMOVE_DRESCRIPTION, 
-        ADD_SUPERIOR_AT, MODIFY_SUPERIOR_AT, REMOVE_SUPERIOR_AT, 
-        ADD_SUPERIOR_OC, REMOVE_SUPERIOR_OC, 
-        ADD_USAGE, MODIFY_USAGE, REMOVE_USAGE, 
-        ADD_CLASS_TYPE, MODIFY_CLASS_TYPE, REMOVE_CLASS_TYPE, 
-        ADD_SYNTAX, MODIFY_SYNTAX, REMOVE_SYNTAX, 
-        ADD_SYNTAX_LENGTH, MODIFY_SYNTAX_LENGTH, REMOVE_SYNTAX_LENGTH, 
-        SET_OBSOLETE,
-        SET_SINGLE_VALUE,
-        SET_COLLECTIVE,
-        SET_NO_USER_MODIFICATION,
-        ADD_EQUALITY, MODIFY_EQUALITY, REMOVE_EQUALITY, 
-        ADD_ORDERING, MODIFY_ORDERING, REMOVE_ORDERING, 
-        ADD_SUBSTRING, MODIFY_SUBSTRING, REMOVE_SUBSTRING, 
-        ADD_MANDATORY_AT, REMOVE_MANDATORY_AT, 
-        ADD_OPTIONAL_AT, REMOVE_OPTIONAL_AT
-    }
-
-
     /**
      * Gets the source Object.
      *
@@ -84,4 +62,22 @@
      *      the destination Object
      */
     public void setDestination( Object destination );
+
+
+    /**
+     * Gets the type.
+     *
+     * @return
+     *      the type
+     */
+    public DifferenceType getType();
+
+
+    /**
+     * Sets the type.
+     *
+     * @param type
+     *      the type
+     */
+    public void setType( DifferenceType type );
 }

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java?view=diff&rev=557690&r1=557689&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceEngine.java Thu Jul 19 10:03:26 2007
@@ -127,7 +127,7 @@
         {
             differences.add( usageDifference );
         }
-        
+
         // Superior
         Difference superiorDifference = getSuperiorDifference( at1, at2 );
         if ( superiorDifference != null )
@@ -233,7 +233,9 @@
         {
             if ( !so2NamesList.contains( name ) )
             {
-                differences.add( new RemoveAliasDifference( so1, so2, name ) );
+                PropertyDifference diff = new AliasDifference( so1, so2, DifferenceType.REMOVED );
+                diff.setOldValue( name );
+                differences.add( diff );
             }
         }
 
@@ -241,7 +243,9 @@
         {
             if ( !so1NamesList.contains( name ) )
             {
-                differences.add( new AddAliasDifference( so1, so2, name ) );
+                PropertyDifference diff = new AliasDifference( so1, so2, DifferenceType.ADDED );
+                diff.setNewValue( name );
+                differences.add( diff );
             }
         }
 
@@ -266,17 +270,24 @@
 
         if ( ( so1Description == null ) && ( so2Description != null ) )
         {
-            return new AddDescriptionDifference( so1, so2, so2Description );
+            PropertyDifference diff = new DescriptionDifference( so1, so2, DifferenceType.ADDED );
+            diff.setNewValue( so2Description );
+            return diff;
         }
         else if ( ( so1Description != null ) && ( so2Description == null ) )
         {
-            return new RemoveDescriptionDifference( so1, so2, null );
+            PropertyDifference diff = new DescriptionDifference( so1, so2, DifferenceType.REMOVED );
+            diff.setOldValue( so1Description );
+            return diff;
         }
         else if ( ( so1Description != null ) && ( so2Description != null ) )
         {
             if ( !so1Description.equals( so2Description ) )
             {
-                return new ModifyDescriptionDifference( so1, so2, so1Description, so2Description );
+                PropertyDifference diff = new DescriptionDifference( so1, so2, DifferenceType.MODIFIED );
+                diff.setOldValue( so1Description );
+                diff.setNewValue( so2Description );
+                return diff;
             }
         }
 
@@ -301,7 +312,10 @@
 
         if ( so1Obsolete != so2Obsolete )
         {
-            return new ModifyObsoleteDifference( so1, so2, so1Obsolete, so2Obsolete );
+            PropertyDifference diff = new ObsoleteDifference( so1, so2 );
+            diff.setOldValue( so1Obsolete );
+            diff.setNewValue( so2Obsolete );
+            return diff;
         }
 
         return null;
@@ -325,7 +339,10 @@
 
         if ( oc1ClassType != oc2ClassType )
         {
-            return new ModifyClassTypeDifference( oc1, oc2, oc1ClassType, oc2ClassType );
+            PropertyDifference diff = new ClassTypeDifference( oc1, oc2 );
+            diff.setOldValue( oc1ClassType );
+            diff.setNewValue( oc2ClassType );
+            return diff;
         }
 
         return null;
@@ -370,7 +387,9 @@
         {
             if ( !oc2SupsList.contains( name ) )
             {
-                differences.add( new RemoveSuperiorOCDifference( oc1, oc2, name ) );
+                PropertyDifference diff = new SuperiorOCDifference( oc1, oc2, DifferenceType.REMOVED );
+                diff.setOldValue( name );
+                differences.add( diff );
             }
         }
 
@@ -378,7 +397,9 @@
         {
             if ( !oc1SupsList.contains( name ) )
             {
-                differences.add( new AddSuperiorOCDifference( oc1, oc2, name ) );
+                PropertyDifference diff = new SuperiorOCDifference( oc1, oc2, DifferenceType.ADDED );
+                diff.setNewValue( name );
+                differences.add( diff );
             }
         }
 
@@ -424,7 +445,9 @@
         {
             if ( !oc2MustsList.contains( name ) )
             {
-                differences.add( new RemoveMandatoryATDifference( oc1, oc2, name ) );
+                PropertyDifference diff = new MandatoryATDifference( oc1, oc2, DifferenceType.REMOVED );
+                diff.setOldValue( name );
+                differences.add( diff );
             }
         }
 
@@ -432,7 +455,9 @@
         {
             if ( !oc1MustsList.contains( name ) )
             {
-                differences.add( new AddMandatoryATDifference( oc1, oc2, name ) );
+                PropertyDifference diff = new MandatoryATDifference( oc1, oc2, DifferenceType.ADDED );
+                diff.setNewValue( name );
+                differences.add( diff );
             }
         }
 
@@ -478,7 +503,9 @@
         {
             if ( !oc2MaysList.contains( name ) )
             {
-                differences.add( new RemoveOptionalATDifference( oc1, oc2, name ) );
+                PropertyDifference diff = new OptionalATDifference( oc1, oc2, DifferenceType.REMOVED );
+                diff.setOldValue( name );
+                differences.add( diff );
             }
         }
 
@@ -486,7 +513,9 @@
         {
             if ( !oc1MaysList.contains( name ) )
             {
-                differences.add( new AddOptionalATDifference( oc1, oc2, name ) );
+                PropertyDifference diff = new OptionalATDifference( oc1, oc2, DifferenceType.ADDED );
+                diff.setNewValue( name );
+                differences.add( diff );
             }
         }
 
@@ -511,13 +540,16 @@
 
         if ( at1Usage != at2Usage )
         {
-            return new ModifyUsageDifference( at1, at2, at1Usage, at2Usage );
+            PropertyDifference diff = new UsageDifference( at1, at2 );
+            diff.setOldValue( at1Usage );
+            diff.setNewValue( at2Usage );
+            return diff;
         }
 
         return null;
     }
-    
-    
+
+
     /**
      * Gets the 'Superior' difference between the two AttributeTypeImpl Objects.
      *
@@ -535,17 +567,24 @@
 
         if ( ( at1Superior == null ) && ( at2Superior != null ) )
         {
-            return new AddSuperiorATDifference( at1, at2, at2Superior );
+            PropertyDifference diff = new SuperiorATDifference( at1, at2, DifferenceType.ADDED );
+            diff.setNewValue( at2Superior );
+            return diff;
         }
         else if ( ( at1Superior != null ) && ( at2Superior == null ) )
         {
-            return new RemoveSuperiorATDifference( at1, at2, null );
+            PropertyDifference diff = new SuperiorATDifference( at1, at2, DifferenceType.REMOVED );
+            diff.setOldValue( at1Superior );
+            return diff;
         }
         else if ( ( at1Superior != null ) && ( at2Superior != null ) )
         {
             if ( !at1Superior.equals( at2Superior ) )
             {
-                return new ModifySuperiorATDifference( at1, at2, at1Superior, at2Superior );
+                PropertyDifference diff = new SuperiorATDifference( at1, at2, DifferenceType.MODIFIED );
+                diff.setOldValue( at1Superior );
+                diff.setNewValue( at2Superior );
+                return diff;
             }
         }
 
@@ -570,17 +609,24 @@
 
         if ( ( at1Syntax == null ) && ( at2Syntax != null ) )
         {
-            return new AddSyntaxDifference( at1, at2, at2Syntax );
+            PropertyDifference diff = new SyntaxDifference( at1, at2, DifferenceType.ADDED );
+            diff.setNewValue( at2Syntax );
+            return diff;
         }
         else if ( ( at1Syntax != null ) && ( at2Syntax == null ) )
         {
-            return new RemoveSyntaxDifference( at1, at2, null );
+            PropertyDifference diff = new SyntaxDifference( at1, at2, DifferenceType.REMOVED );
+            diff.setOldValue( at1Syntax );
+            return diff;
         }
         else if ( ( at1Syntax != null ) && ( at2Syntax != null ) )
         {
             if ( !at1Syntax.equals( at2Syntax ) )
             {
-                return new ModifySyntaxDifference( at1, at2, at1Syntax, at2Syntax );
+                PropertyDifference diff = new SyntaxDifference( at1, at2, DifferenceType.MODIFIED );
+                diff.setOldValue( at1Syntax );
+                diff.setNewValue( at2Syntax );
+                return diff;
             }
         }
 
@@ -605,17 +651,24 @@
 
         if ( ( at1SyntaxLength == -1 ) && ( at2SyntaxLength != -1 ) )
         {
-            return new AddSyntaxLengthDifference( at1, at2, at2SyntaxLength );
+            PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.ADDED );
+            diff.setNewValue( at2SyntaxLength );
+            return diff;
         }
         else if ( ( at1SyntaxLength != -1 ) && ( at2SyntaxLength == -1 ) )
         {
-            return new RemoveSyntaxLengthDifference( at1, at2, null );
+            PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.REMOVED );
+            diff.setOldValue( at1SyntaxLength );
+            return diff;
         }
         else if ( ( at1SyntaxLength != -1 ) && ( at2SyntaxLength != -1 ) )
         {
             if ( at1SyntaxLength != at2SyntaxLength )
             {
-                return new ModifySyntaxLengthDifference( at1, at2, at1SyntaxLength, at2SyntaxLength );
+                PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.MODIFIED );
+                diff.setOldValue( at1SyntaxLength );
+                diff.setNewValue( at2SyntaxLength );
+                return diff;
             }
         }
 
@@ -640,7 +693,10 @@
 
         if ( at1SingleValue != at2SingleValue )
         {
-            return new ModifySingleValueDifference( at1, at2, at1SingleValue, at2SingleValue );
+            PropertyDifference diff = new SingleValueDifference( at1, at2 );
+            diff.setOldValue( at1SingleValue );
+            diff.setNewValue( at2SingleValue );
+            return diff;
         }
 
         return null;
@@ -664,7 +720,10 @@
 
         if ( at1Collective != at2Collective )
         {
-            return new ModifyCollectiveDifference( at1, at2, at1Collective, at2Collective );
+            PropertyDifference diff = new CollectiveDifference( at1, at2 );
+            diff.setOldValue( at1Collective );
+            diff.setNewValue( at2Collective );
+            return diff;
         }
 
         return null;
@@ -688,7 +747,10 @@
 
         if ( at1CanUserModify != at2CanUserModify )
         {
-            return new ModifyNoUserModificationDifference( at1, at2, at1CanUserModify, at2CanUserModify );
+            PropertyDifference diff = new NoUserModificationDifference( at1, at2 );
+            diff.setOldValue( at1CanUserModify );
+            diff.setNewValue( at2CanUserModify );
+            return diff;
         }
 
         return null;
@@ -712,17 +774,24 @@
 
         if ( ( at1Equality == null ) && ( at2Equality != null ) )
         {
-            return new AddEqualityDifference( at1, at2, at2Equality );
+            PropertyDifference diff = new EqualityDifference( at1, at2, DifferenceType.ADDED );
+            diff.setNewValue( at2Equality );
+            return diff;
         }
         else if ( ( at1Equality != null ) && ( at2Equality == null ) )
         {
-            return new RemoveEqualityDifference( at1, at2, null );
+            PropertyDifference diff = new EqualityDifference( at1, at2, DifferenceType.REMOVED );
+            diff.setOldValue( at1Equality );
+            return diff;
         }
         else if ( ( at1Equality != null ) && ( at2Equality != null ) )
         {
             if ( !at1Equality.equals( at2Equality ) )
             {
-                return new ModifyEqualityDifference( at1, at2, at1Equality, at2Equality );
+                PropertyDifference diff = new EqualityDifference( at1, at2, DifferenceType.MODIFIED );
+                diff.setOldValue( at1Equality );
+                diff.setNewValue( at2Equality );
+                return diff;
             }
         }
 
@@ -747,17 +816,24 @@
 
         if ( ( at1Ordering == null ) && ( at2Ordering != null ) )
         {
-            return new AddOrderingDifference( at1, at2, at2Ordering );
+            PropertyDifference diff = new OrderingDifference( at1, at2, DifferenceType.ADDED );
+            diff.setNewValue( at2Ordering );
+            return diff;
         }
         else if ( ( at1Ordering != null ) && ( at2Ordering == null ) )
         {
-            return new RemoveOrderingDifference( at1, at2, null );
+            PropertyDifference diff = new OrderingDifference( at1, at2, DifferenceType.REMOVED );
+            diff.setOldValue( at1Ordering );
+            return diff;
         }
         else if ( ( at1Ordering != null ) && ( at2Ordering != null ) )
         {
             if ( !at1Ordering.equals( at2Ordering ) )
             {
-                return new ModifyOrderingDifference( at1, at2, at1Ordering, at2Ordering );
+                PropertyDifference diff = new OrderingDifference( at1, at2, DifferenceType.MODIFIED );
+                diff.setOldValue( at1Ordering );
+                diff.setNewValue( at2Ordering );
+                return diff;
             }
         }
 
@@ -782,17 +858,24 @@
 
         if ( ( at1Substring == null ) && ( at2Substring != null ) )
         {
-            return new AddSubstringDifference( at1, at2, at2Substring );
+            PropertyDifference diff = new SubstringDifference( at1, at2, DifferenceType.ADDED );
+            diff.setNewValue( at2Substring );
+            return diff;
         }
         else if ( ( at1Substring != null ) && ( at2Substring == null ) )
         {
-            return new RemoveSubstringDifference( at1, at2, null );
+            PropertyDifference diff = new SubstringDifference( at1, at2, DifferenceType.REMOVED );
+            diff.setOldValue( at1Substring );
+            return diff;
         }
         else if ( ( at1Substring != null ) && ( at2Substring != null ) )
         {
             if ( !at1Substring.equals( at2Substring ) )
             {
-                return new ModifySubstringDifference( at1, at2, at1Substring, at2Substring );
+                PropertyDifference diff = new SubstringDifference( at1, at2, DifferenceType.MODIFIED );
+                diff.setOldValue( at1Substring );
+                diff.setNewValue( at2Substring );
+                return diff;
             }
         }
 

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceType.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceType.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceType.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/DifferenceType.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,32 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
+
+
+/**
+ * This enum represents the type of Difference.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum DifferenceType
+{
+    IDENTICAL, ADDED, MODIFIED, REMOVED
+}
\ No newline at end of file

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/EqualityDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddEqualityDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/EqualityDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddEqualityDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/EqualityDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddEqualityDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/EqualityDifference.java Thu Jul 19 10:03:26 2007
@@ -26,34 +26,35 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddEqualityDifference extends AbstractAddDifference
+public class EqualityDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddEqualityDifference.
+     * Creates a new instance of EqualityDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddEqualityDifference( Object source, Object destination )
+    public EqualityDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
+        // TODO Auto-generated constructor stub
     }
 
 
     /**
-     * Creates a new instance of AddEqualityDifference.
+     * Creates a new instance of EqualityDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddEqualityDifference( Object source, Object destination, Object value )
+    public EqualityDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/MandatoryATDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddMandatoryATDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/MandatoryATDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddMandatoryATDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/MandatoryATDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddMandatoryATDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/MandatoryATDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,38 @@
 
 
 /**
- * This class represents the difference of an added mandatory attribute type.
+ * This class represents a difference of mandatory attribute type.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddMandatoryATDifference extends AbstractAddDifference
+public class MandatoryATDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddMandatoryATDifference.
+     * Creates a new instance of MandatoryATDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddMandatoryATDifference( Object source, Object destination )
+    public MandatoryATDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
-
     /**
-     * Creates a new instance of AddMandatoryATDifference.
+     * Creates a new instance of MandatoryATDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddMandatoryATDifference( Object source, Object destination, Object value )
+    public MandatoryATDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/NoUserModificationDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyNoUserModificationDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/NoUserModificationDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyNoUserModificationDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/NoUserModificationDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyNoUserModificationDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/NoUserModificationDifference.java Thu Jul 19 10:03:26 2007
@@ -21,41 +21,23 @@
 
 
 /**
- * This class represents the difference of a modified no user modification value.
+ * This class represents a difference of no user modification value.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifyNoUserModificationDifference extends AbstractModifyDifference
+public class NoUserModificationDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of ModifyNoUserModificationDifference.
+     * Creates a new instance of NoUserModificationDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
      */
-    public ModifyNoUserModificationDifference( Object source, Object destination )
+    public NoUserModificationDifference( Object source, Object destination )
     {
-        super( source, destination );
-    }
-
-
-    /**
-     * Creates a new instance of ModifyNoUserModificationDifference.
-     *
-     * @param source
-     *      the source Object
-     * @param destination
-     *      the destination Object
-     * @param oldValue
-     *      the old value
-     * @param newValue
-     *      the new value
-     */
-    public ModifyNoUserModificationDifference( Object source, Object destination, Object oldValue, Object newValue )
-    {
-        super( source, destination, oldValue, newValue );
+        super( source, destination, DifferenceType.MODIFIED );
     }
 }

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObjectClassDifference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObjectClassDifference.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObjectClassDifference.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObjectClassDifference.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,103 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This interface represents an object class difference.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ObjectClassDifference extends AbstractDifference
+{
+    /** The differences */
+    private List<PropertyDifference> differences = new ArrayList<PropertyDifference>();
+
+
+    /**
+     * Creates a new instance of AttributeTypeDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     * @param type
+     *      the type
+     */
+    public ObjectClassDifference( Object source, Object destination, DifferenceType type )
+    {
+        super( source, destination, type );
+    }
+
+
+    /**
+     * Creates a new instance of AttributeTypeDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     */
+    public ObjectClassDifference( Object source, Object destination )
+    {
+        super( source, destination );
+    }
+
+
+    /**
+     * Gets the property differences.
+     *
+     * @return
+     *      the property differences
+     */
+    public List<PropertyDifference> getDifferences()
+    {
+        return differences;
+    }
+
+
+    /**
+     * Adds a difference.
+     *
+     * @param difference
+     *      the difference
+     */
+    public void addDifference( PropertyDifference difference )
+    {
+        differences.add( difference );
+    }
+
+
+    /**
+     * Removes a difference.
+     *
+     * @param difference
+     *      the difference
+     */
+    public void removeDifference( PropertyDifference difference )
+    {
+        differences.remove( difference );
+    }
+}

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObsoleteDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyObsoleteDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObsoleteDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyObsoleteDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObsoleteDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifyObsoleteDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ObsoleteDifference.java Thu Jul 19 10:03:26 2007
@@ -21,41 +21,23 @@
 
 
 /**
- * This class represents the difference of a modified obsolete value.
+ * This class represents a difference of obsolete value.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifyObsoleteDifference extends AbstractModifyDifference
+public class ObsoleteDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of ModifyObsoleteDifference.
+     * Creates a new instance of ObsoleteDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
      */
-    public ModifyObsoleteDifference( Object source, Object destination )
+    public ObsoleteDifference( Object source, Object destination )
     {
-        super( source, destination );
-    }
-
-
-    /**
-     * Creates a new instance of ModifyObsoleteDifference.
-     *
-     * @param source
-     *      the source Object
-     * @param destination
-     *      the destination Object
-     * @param oldValue
-     *      the old value
-     * @param newValue
-     *      the new value
-     */
-    public ModifyObsoleteDifference( Object source, Object destination, Object oldValue, Object newValue )
-    {
-        super( source, destination, oldValue, newValue );
+        super( source, destination, DifferenceType.MODIFIED );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OptionalATDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOptionalATDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OptionalATDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOptionalATDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OptionalATDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOptionalATDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OptionalATDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,39 @@
 
 
 /**
- * This class represents the difference of an added optional attribute type.
+ * This class represents a difference of optional attribute type.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddOptionalATDifference extends AbstractAddDifference
+public class OptionalATDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddOptionalATDifference.
+     * Creates a new instance of OptionalATDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddOptionalATDifference( Object source, Object destination )
+    public OptionalATDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
 
     /**
-     * Creates a new instance of AddOptionalATDifference.
+     * Creates a new instance of OptionalATDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddOptionalATDifference( Object source, Object destination, Object value )
+    public OptionalATDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OrderingDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOrderingDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OrderingDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOrderingDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OrderingDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/AddOrderingDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/OrderingDifference.java Thu Jul 19 10:03:26 2007
@@ -21,39 +21,38 @@
 
 
 /**
- * This class represents the difference of a added ordering.
+ * This class represents a difference of ordering.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AddOrderingDifference extends AbstractAddDifference
+public class OrderingDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of AddOrderingDifference.
+     * Creates a new instance of OrderingDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
+     * @param type
+     *      the type
      */
-    public AddOrderingDifference( Object source, Object destination )
+    public OrderingDifference( Object source, Object destination, DifferenceType type )
     {
-        super( source, destination );
+        super( source, destination, type );
     }
 
-
     /**
-     * Creates a new instance of AddOrderingDifference.
+     * Creates a new instance of OrderingDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
-     * @param value
-     *      the value
      */
-    public AddOrderingDifference( Object source, Object destination, Object value )
+    public OrderingDifference( Object source, Object destination )
     {
-        super( source, destination, value );
+        super( source, destination );
     }
 }

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/PropertyDifference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/PropertyDifference.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/PropertyDifference.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/PropertyDifference.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,65 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
+
+
+/**
+ * This interface represents a property difference
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface PropertyDifference extends Difference
+{
+    /**
+     * Gets the old value.
+     *
+     * @return
+     *      the old value
+     */
+    public Object getOldValue();
+
+
+    /**
+     * Sets the old value.
+     *
+     * @param oldValue
+     *      the old value
+     */
+    public void setOldValue( Object oldValue );
+
+
+    /**
+     * Gets the new value.
+     *
+     * @return
+     *      the new value
+     */
+    public Object getNewValue();
+
+
+    /**
+     * Sets the new value.
+     *
+     * @param newValue
+     *      the new value
+     */
+    public void setNewValue( Object newValue );
+}

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SchemaDifference.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SchemaDifference.java?view=auto&rev=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SchemaDifference.java (added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SchemaDifference.java Thu Jul 19 10:03:26 2007
@@ -0,0 +1,142 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.schemaeditor.model.difference;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This class represents a schema difference.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SchemaDifference extends AbstractDifference
+{
+    /** The attribute types differences*/
+    private List<AttributeTypeDifference> attributeTypesDifferences = new ArrayList<AttributeTypeDifference>();
+
+    /** The object classes differences */
+    private List<ObjectClassDifference> objectClassesDifferences = new ArrayList<ObjectClassDifference>();
+
+
+    /**
+     * Creates a new instance of AbstractSchemaDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     * @param type
+     *      the type
+     */
+    public SchemaDifference( Object source, Object destination, DifferenceType type )
+    {
+        super( source, destination, type );
+    }
+
+
+    /**
+     * Creates a new instance of AbstractSchemaDifference.
+     *
+     * @param source
+     *      the source Object
+     * @param destination
+     *      the destination Object
+     */
+    public SchemaDifference( Object source, Object destination )
+    {
+        super( source, destination );
+    }
+
+
+    /**
+     * Gets the attribute types differences.
+     *
+     * @return
+     *      the attribute types differences
+     */
+    public List<AttributeTypeDifference> getAttributeTypesDifferences()
+    {
+        return attributeTypesDifferences;
+    }
+
+
+    /**
+     * Adds an attribute type difference.
+     *
+     * @param difference
+     *      the attribute type difference
+     */
+    public void addAttributeTypeDifference( AttributeTypeDifference difference )
+    {
+        attributeTypesDifferences.add( difference );
+    }
+
+
+    /**
+     * Removes an attribute type difference.
+     *
+     * @param difference
+     *      the attribute type difference
+     */
+    public void removeAttributeTypeDifference( AttributeTypeDifference difference )
+    {
+        attributeTypesDifferences.remove( difference );
+    }
+
+
+    /**
+     * Gets the object classes differences.
+     *
+     * @return
+     *      the object classes differences
+     */
+    public List<ObjectClassDifference> getObjectClassesDifferences()
+    {
+        return objectClassesDifferences;
+    }
+
+
+    /**
+     * Adds an object class difference.
+     *
+     * @param difference
+     *      the object class difference
+     */
+    public void addObjectClassDifference( ObjectClassDifference difference )
+    {
+        objectClassesDifferences.add( difference );
+    }
+
+
+    /**
+     * Removes an object class difference.
+     *
+     * @param difference
+     *      the object class difference
+     */
+    public void removeObjectClassDifference( ObjectClassDifference difference )
+    {
+        objectClassesDifferences.remove( difference );
+    }
+}

Copied: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SingleValueDifference.java (from r555904, directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySingleValueDifference.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SingleValueDifference.java?view=diff&rev=557690&p1=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySingleValueDifference.java&r1=555904&p2=directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SingleValueDifference.java&r2=557690
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/ModifySingleValueDifference.java (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/model/difference/SingleValueDifference.java Thu Jul 19 10:03:26 2007
@@ -21,41 +21,23 @@
 
 
 /**
- * This class represents the difference of a modified single value value.
+ * This class represents a difference of single value value.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModifySingleValueDifference extends AbstractModifyDifference
+public class SingleValueDifference extends AbstractPropertyDifference
 {
     /**
-     * Creates a new instance of ModifySingleValueDifference.
+     * Creates a new instance of SingleValueDifference.
      *
      * @param source
      *      the source Object
      * @param destination
      *      the destination Object
      */
-    public ModifySingleValueDifference( Object source, Object destination )
+    public SingleValueDifference( Object source, Object destination )
     {
-        super( source, destination );
-    }
-
-
-    /**
-     * Creates a new instance of ModifySingleValueDifference.
-     *
-     * @param source
-     *      the source Object
-     * @param destination
-     *      the destination Object
-     * @param oldValue
-     *      the old value
-     * @param newValue
-     *      the new value
-     */
-    public ModifySingleValueDifference( Object source, Object destination, Object oldValue, Object newValue )
-    {
-        super( source, destination, oldValue, newValue );
+        super( source, destination, DifferenceType.MODIFIED );
     }
 }



Mime
View raw message