directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1299733 [2/2] - in /directory: shared/trunk/ldap/model/src/main/antlr/ shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/ shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema...
Date Mon, 12 Mar 2012 16:40:11 GMT
Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.model.io;
 
@@ -29,7 +29,7 @@ import java.util.List;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
 import org.apache.directory.studio.schemaeditor.model.Schema;
@@ -279,7 +279,7 @@ public class XMLSchemaFileImporter
      *      the element
      * @param schema
      *      the schema
-     * @throws XMLSchemaFileImportException 
+     * @throws XMLSchemaFileImportException
      */
     private static void readAttributeTypes( Element element, Schema schema ) throws XMLSchemaFileImportException
     {
@@ -448,7 +448,7 @@ public class XMLSchemaFileImporter
      *      the element
      * @param schema
      *      the schema
-     * @throws XMLSchemaFileImportException 
+     * @throws XMLSchemaFileImportException
      */
     private static void readObjectClasses( Element element, Schema schema ) throws XMLSchemaFileImportException
     {
@@ -470,17 +470,17 @@ public class XMLSchemaFileImporter
      *      the element
      * @param schema
      *      the schema
-     * @throws XMLSchemaFileImportException 
+     * @throws XMLSchemaFileImportException
      */
     private static void readObjectClass( Element element, Schema schema ) throws XMLSchemaFileImportException
     {
-        ObjectClass oc = null;
+        MutableObjectClass oc = null;
 
         // OID
         Attribute oidAttribute = element.attribute( OID_TAG );
         if ( ( oidAttribute != null ) && ( !oidAttribute.getValue().equals( "" ) ) ) //$NON-NLS-1$
         {
-            oc = new ObjectClass( oidAttribute.getValue() );
+            oc = new MutableObjectClass( oidAttribute.getValue() );
         }
         else
         {
@@ -595,7 +595,7 @@ public class XMLSchemaFileImporter
      *      the element
      * @param schema
      *      the schema
-     * @throws XMLSchemaFileImportException 
+     * @throws XMLSchemaFileImportException
      */
     private static void readMatchingRules( Element element, Schema schema ) throws XMLSchemaFileImportException
     {

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoader.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoader.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/schemamanager/SchemaEditorSchemaLoader.java Mon Mar 12 16:40:09 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.registries.AbstractSchemaLoader;
 import org.apache.directory.shared.ldap.model.schema.registries.Schema;
@@ -222,7 +223,7 @@ public class SchemaEditorSchemaLoader ex
         {
             for ( Schema schema : schemas )
             {
-                List<ObjectClass> objectClasses = project.getSchemaHandler().getSchema( schema.getSchemaName() )
+                List<MutableObjectClass> objectClasses = project.getSchemaHandler().getSchema( schema.getSchemaName() )
                     .getObjectClasses();
                 for ( ObjectClass objectClass : objectClasses )
                 {

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorUsedByPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorUsedByPage.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorUsedByPage.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorUsedByPage.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.attributetype;
@@ -24,6 +24,7 @@ package org.apache.directory.studio.sche
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -156,7 +157,7 @@ public class AttributeTypeEditorUsedByPa
                 IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                 try
                 {
-                    page.openEditor( new ObjectClassEditorInput( ( ObjectClass ) selectedItem ),
+                    page.openEditor( new ObjectClassEditorInput( ( MutableObjectClass ) selectedItem ),
                         ObjectClassEditor.ID );
                 }
                 catch ( PartInitException exception )
@@ -180,7 +181,7 @@ public class AttributeTypeEditorUsedByPa
                 IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                 try
                 {
-                    page.openEditor( new ObjectClassEditorInput( ( ObjectClass ) selectedItem ),
+                    page.openEditor( new ObjectClassEditorInput( ( MutableObjectClass ) selectedItem ),
                         ObjectClassEditor.ID );
                 }
                 catch ( PartInitException exception )

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/AbstractObjectClassEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/AbstractObjectClassEditorPage.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/AbstractObjectClassEditorPage.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/AbstractObjectClassEditorPage.java Mon Mar 12 16:40:09 2012
@@ -6,21 +6,22 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.objectclass;
 
 
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.view.editors.AbstractSchemaObjectEditorPage;
 
@@ -65,7 +66,7 @@ public abstract class AbstractObjectClas
      * @return
      *      the modified object class
      */
-    public ObjectClass getModifiedObjectClass()
+    public MutableObjectClass getModifiedObjectClass()
     {
         return getEditor().getModifiedObjectClass();
     }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditor.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditor.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditor.java Mon Mar 12 16:40:09 2012
@@ -6,21 +6,22 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.objectclass;
 
 
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -63,10 +64,10 @@ public class ObjectClassEditor extends F
     private boolean dirty = false;
 
     /** The original object class */
-    private ObjectClass originalObjectClass;
+    private MutableObjectClass originalObjectClass;
 
     /** The object class used to save modifications */
-    private ObjectClass modifiedObjectClass;
+    private MutableObjectClass modifiedObjectClass;
 
     /** The originalSchema */
     private Schema originalSchema;
@@ -194,9 +195,9 @@ public class ObjectClassEditor extends F
     {
         try
         {
-            overviewPage = new ObjectClassEditorOverviewPage( this ); //$NON-NLS-1$ //$NON-NLS-2$
+            overviewPage = new ObjectClassEditorOverviewPage( this );
             addPage( overviewPage );
-            sourceCodePage = new ObjectClassEditorSourceCodePage( this ); //$NON-NLS-1$ //$NON-NLS-2$
+            sourceCodePage = new ObjectClassEditorSourceCodePage( this );
             addPage( sourceCodePage );
         }
         catch ( PartInitException e )
@@ -286,7 +287,7 @@ public class ObjectClassEditor extends F
      * @return
      *      the modified object class
      */
-    public ObjectClass getModifiedObjectClass()
+    public MutableObjectClass getModifiedObjectClass()
     {
         return modifiedObjectClass;
     }
@@ -298,7 +299,7 @@ public class ObjectClassEditor extends F
      * @param modifiedObjectClass
      *      the modified object class to set.
      */
-    public void setModifiedObjectClass( ObjectClass modifiedObjectClass )
+    public void setModifiedObjectClass( MutableObjectClass modifiedObjectClass )
     {
         this.modifiedObjectClass = modifiedObjectClass;
     }
@@ -306,13 +307,13 @@ public class ObjectClassEditor extends F
 
     /**
      * Opens an error dialog displaying the given message.
-     *  
+     * 
      * @param message
      *      the message to display
      */
     private void notifyError( String message )
     {
         MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
-            Messages.getString( "ObjectClassEditor.Error" ), message ); //$NON-NLS-1$ 
+            Messages.getString( "ObjectClassEditor.Error" ), message ); //$NON-NLS-1$
     }
 }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorInput.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorInput.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorInput.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.objectclass;
@@ -23,7 +23,7 @@ package org.apache.directory.studio.sche
 
 import java.util.List;
 
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IEditorInput;
@@ -35,7 +35,7 @@ import org.eclipse.ui.IPersistableElemen
  */
 public class ObjectClassEditorInput implements IEditorInput
 {
-    private ObjectClass objectClass;
+    private MutableObjectClass objectClass;
 
 
     /**
@@ -44,7 +44,7 @@ public class ObjectClassEditorInput impl
      * @param obj
      *      the object class
      */
-    public ObjectClassEditorInput( ObjectClass obj )
+    public ObjectClassEditorInput( MutableObjectClass obj )
     {
         super();
         objectClass = obj;
@@ -135,7 +135,7 @@ public class ObjectClassEditorInput impl
      * @return
      *      the input object class
      */
-    public ObjectClass getObjectClass()
+    public MutableObjectClass getObjectClass()
     {
         return this.objectClass;
     }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.objectclass;
@@ -28,6 +28,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.studio.schemaeditor.Activator;
@@ -351,7 +352,7 @@ public class ObjectClassEditorOverviewPa
     {
         public void modifyText( ModifyEvent e )
         {
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
 
             if ( classTypeCombo.getSelectionIndex() == 0 )
             {
@@ -426,7 +427,7 @@ public class ObjectClassEditorOverviewPa
     {
         public void widgetSelected( SelectionEvent e )
         {
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
 
             AttributeTypeSelectionDialog dialog = new AttributeTypeSelectionDialog();
             List<AttributeType> hiddenATs = new ArrayList<AttributeType>();
@@ -491,7 +492,7 @@ public class ObjectClassEditorOverviewPa
                 return;
             }
 
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
 
             Object selectedElement = selection.getFirstElement();
             if ( selectedElement != null )
@@ -567,7 +568,7 @@ public class ObjectClassEditorOverviewPa
     {
         public void widgetSelected( SelectionEvent e )
         {
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
             AttributeTypeSelectionDialog dialog = new AttributeTypeSelectionDialog();
             List<AttributeType> hiddenATs = new ArrayList<AttributeType>();
             List<String> maysHidden = modifiedObjectClass.getMayAttributeTypeOids();
@@ -631,7 +632,7 @@ public class ObjectClassEditorOverviewPa
                 return;
             }
 
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
 
             Object selectedElement = selection.getFirstElement();
             if ( selectedElement != null )
@@ -684,7 +685,7 @@ public class ObjectClassEditorOverviewPa
                     IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                     try
                     {
-                        page.openEditor( new ObjectClassEditorInput( ( ObjectClass ) selectedElement ),
+                        page.openEditor( new ObjectClassEditorInput( ( MutableObjectClass ) selectedElement ),
                             ObjectClassEditor.ID );
                     }
                     catch ( PartInitException exception )
@@ -707,7 +708,7 @@ public class ObjectClassEditorOverviewPa
     {
         public void widgetSelected( SelectionEvent e )
         {
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
             ObjectClassSelectionDialog dialog = new ObjectClassSelectionDialog();
             List<ObjectClass> hiddenOCs = new ArrayList<ObjectClass>();
             for ( String sup : modifiedObjectClass.getSuperiorOids() )
@@ -765,7 +766,7 @@ public class ObjectClassEditorOverviewPa
                 return;
             }
 
-            ObjectClass modifiedObjectClass = getModifiedObjectClass();
+            MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
 
             Object selectedElement = selection.getFirstElement();
             if ( selectedElement != null )

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSourceCodePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSourceCodePage.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSourceCodePage.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorSourceCodePage.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.objectclass;
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.text.ParseException;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.parsers.OpenLdapSchemaParser;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -67,7 +68,7 @@ public class ObjectClassEditorSourceCode
             canLeaveThePage = true;
             try
             {
-                ( ( ObjectClassEditor ) getEditor() ).setDirty( true );
+                getEditor().setDirty( true );
                 OpenLdapSchemaParser parser = new OpenLdapSchemaParser();
                 parser.parse( schemaSourceViewer.getTextWidget().getText() );
 
@@ -195,7 +196,7 @@ public class ObjectClassEditorSourceCode
      */
     private void updateObjectClass( ObjectClass ocl )
     {
-        ObjectClass modifiedObjectClass = getModifiedObjectClass();
+        MutableObjectClass modifiedObjectClass = getModifiedObjectClass();
 
         modifiedObjectClass.setDescription( ocl.getDescription() );
         modifiedObjectClass.setMayAttributeTypeOids( ocl.getMayAttributeTypeOids() );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorOverviewPage.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorOverviewPage.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/schema/SchemaEditorOverviewPage.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.editors.schema;
@@ -24,6 +24,7 @@ package org.apache.directory.studio.sche
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -212,7 +213,7 @@ public class SchemaEditorOverviewPage ex
 
             if ( !selection.isEmpty() )
             {
-                ObjectClass oc = ( ObjectClass ) selection.getFirstElement();
+                MutableObjectClass oc = ( MutableObjectClass ) selection.getFirstElement();
 
                 try
                 {

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewContentProvider.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewContentProvider.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/HierarchyViewContentProvider.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.views;
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -62,7 +63,7 @@ public class HierarchyViewContentProvide
 
         if ( parentElement instanceof ObjectClass )
         {
-            ObjectClass oc = ( ObjectClass ) parentElement;
+            MutableObjectClass oc = ( MutableObjectClass ) parentElement;
 
             children = createTypeHierarchyObjectClass( oc );
         }
@@ -89,7 +90,7 @@ public class HierarchyViewContentProvide
      * @return
      *      the Type Hierarchy for an object class
      */
-    private List<TreeNode> createTypeHierarchyObjectClass( ObjectClass oc )
+    private List<TreeNode> createTypeHierarchyObjectClass( MutableObjectClass oc )
     {
         List<TreeNode> children = new ArrayList<TreeNode>();
 
@@ -145,7 +146,7 @@ public class HierarchyViewContentProvide
             {
                 if ( parent instanceof ObjectClass )
                 {
-                    ObjectClass parentOC = ( ObjectClass ) parent;
+                    MutableObjectClass parentOC = ( MutableObjectClass ) parent;
                     ObjectClassWrapper duplicatedOCW = ( ObjectClassWrapper ) duplicateTreeNode( ocw );
 
                     ObjectClassWrapper ocw2 = new ObjectClassWrapper( parentOC );
@@ -312,7 +313,7 @@ public class HierarchyViewContentProvide
                 }
                 else if ( child instanceof ObjectClass )
                 {
-                    ObjectClass oc = ( ObjectClass ) child;
+                    MutableObjectClass oc = ( MutableObjectClass ) child;
                     childNode = new ObjectClassWrapper( oc, node );
                     node.addChild( childNode );
                 }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SchemaViewContentProvider.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.view.views;
 
@@ -26,6 +26,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.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
@@ -184,7 +185,7 @@ public class SchemaViewContentProvider i
                                 }
                                 else if ( rootChild instanceof ObjectClass )
                                 {
-                                    ObjectClass oc = ( ObjectClass ) rootChild;
+                                    MutableObjectClass oc = ( MutableObjectClass ) rootChild;
                                     childNode = new ObjectClassWrapper( oc, ocFolder );
                                     ocFolder.addChild( childNode );
                                 }
@@ -318,7 +319,7 @@ public class SchemaViewContentProvider i
                 }
                 else if ( child instanceof ObjectClass )
                 {
-                    ObjectClass oc = ( ObjectClass ) child;
+                    MutableObjectClass oc = ( MutableObjectClass ) child;
                     childNode = new ObjectClassWrapper( oc, node );
                     node.addChild( childNode );
                 }
@@ -577,7 +578,7 @@ public class SchemaViewContentProvider i
                 {
                     AttributeTypeWrapper atw = new AttributeTypeWrapper( ( AttributeType ) child, createdWrapper );
                     atw.getParent().addChild( atw );
-                    elementsToWrappersMap.put( ( AttributeType ) child, atw );
+                    elementsToWrappersMap.put( child, atw );
                 }
             }
         }
@@ -732,7 +733,7 @@ public class SchemaViewContentProvider i
      */
     private void attributeTypeRemovedHierarchicalPresentation( AttributeType at )
     {
-        // Creating children nodes of the AT 
+        // Creating children nodes of the AT
         // and attaching them to the root
         List<Object> children = hierarchyManager.getChildren( at );
         if ( children != null )
@@ -762,7 +763,7 @@ public class SchemaViewContentProvider i
                 }
 
                 atw.getParent().addChild( atw );
-                elementsToWrappersMap.put( ( AttributeType ) child, atw );
+                elementsToWrappersMap.put( child, atw );
             }
         }
 
@@ -820,7 +821,7 @@ public class SchemaViewContentProvider i
      * @param oc
      *      the added object class
      */
-    public void objectClassAdded( ObjectClass oc )
+    public void objectClassAdded( MutableObjectClass oc )
     {
         int presentation = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION );
         if ( presentation == PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION_FLAT )
@@ -841,7 +842,7 @@ public class SchemaViewContentProvider i
      * @param oc
      *      the added object class
      */
-    public void objectClassAddedFlatPresentation( ObjectClass oc )
+    public void objectClassAddedFlatPresentation( MutableObjectClass oc )
     {
         SchemaWrapper schemaWrapper = ( SchemaWrapper ) getWrapper( Activator.getDefault().getSchemaHandler()
             .getSchema( oc.getSchemaName() ) );
@@ -878,7 +879,7 @@ public class SchemaViewContentProvider i
      * @param oc
      *      the added object class
      */
-    public void objectClassAddedHierarchicalPresentation( ObjectClass oc )
+    public void objectClassAddedHierarchicalPresentation( MutableObjectClass oc )
     {
         // Removing unattached nodes for "top"
         List<Object> ocChildren = new ArrayList<Object>();
@@ -997,9 +998,9 @@ public class SchemaViewContentProvider i
 
                 for ( TreeNode createdWrapper : createdWrappers )
                 {
-                    ObjectClassWrapper ocw = new ObjectClassWrapper( ( ObjectClass ) child, createdWrapper );
+                    ObjectClassWrapper ocw = new ObjectClassWrapper( ( MutableObjectClass ) child, createdWrapper );
                     ocw.getParent().addChild( ocw );
-                    elementsToWrappersMap.put( ( ObjectClass ) child, ocw );
+                    elementsToWrappersMap.put( child, ocw );
                     addHierarchyChildren( ocw, hierarchyManager.getChildren( child ) );
                 }
             }
@@ -1013,7 +1014,7 @@ public class SchemaViewContentProvider i
      * @param oc
      *      the modified object class
      */
-    public void objectClassModified( ObjectClass oc )
+    public void objectClassModified( MutableObjectClass oc )
     {
         int presentation = store.getInt( PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION );
         if ( presentation == PluginConstants.PREFS_SCHEMA_VIEW_SCHEMA_PRESENTATION_FLAT )
@@ -1047,7 +1048,7 @@ public class SchemaViewContentProvider i
      * @param oc
      *      the modified object class
      */
-    public void objectClassModifiedHierarchicalPresentation( ObjectClass oc )
+    public void objectClassModifiedHierarchicalPresentation( MutableObjectClass oc )
     {
         // Propagating the modification to the hierarchy manager
         hierarchyManager.objectClassModified( oc );
@@ -1155,7 +1156,7 @@ public class SchemaViewContentProvider i
      */
     public void objectClassRemovedHierarchicalPresentation( ObjectClass oc )
     {
-        // Creating children nodes of the OC 
+        // Creating children nodes of the OC
         // and attaching them to the root
         List<Object> children = hierarchyManager.getChildren( oc );
         if ( children != null )
@@ -1173,7 +1174,7 @@ public class SchemaViewContentProvider i
                             Folder folder = ( Folder ) rootChild;
                             if ( folder.getType().equals( FolderType.OBJECT_CLASS ) )
                             {
-                                ocw = new ObjectClassWrapper( ( ObjectClass ) child, folder );
+                                ocw = new ObjectClassWrapper( ( MutableObjectClass ) child, folder );
                                 break;
                             }
                         }
@@ -1181,11 +1182,11 @@ public class SchemaViewContentProvider i
                 }
                 else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )
                 {
-                    ocw = new ObjectClassWrapper( ( ObjectClass ) child, root );
+                    ocw = new ObjectClassWrapper( ( MutableObjectClass ) child, root );
                 }
 
                 ocw.getParent().addChild( ocw );
-                elementsToWrappersMap.put( ( ObjectClass ) child, ocw );
+                elementsToWrappersMap.put( child, ocw );
                 addHierarchyChildren( ocw, hierarchyManager.getChildren( child ) );
             }
         }
@@ -1255,7 +1256,7 @@ public class SchemaViewContentProvider i
             attributeTypeAddedHierarchicalPresentation( at );
         }
 
-        for ( ObjectClass oc : schema.getObjectClasses() )
+        for ( MutableObjectClass oc : schema.getObjectClasses() )
         {
             objectClassAddedHierarchicalPresentation( oc );
         }
@@ -1349,7 +1350,7 @@ public class SchemaViewContentProvider i
             Folder ocFolder = new Folder( FolderType.OBJECT_CLASS, schemaWrapper );
             schemaWrapper.addChild( ocFolder );
 
-            for ( ObjectClass objectClass : schema.getObjectClasses() )
+            for ( MutableObjectClass objectClass : schema.getObjectClasses() )
             {
                 ObjectClassWrapper ocw = new ObjectClassWrapper( objectClass, ocFolder );
                 ocw.getParent().addChild( ocw );
@@ -1365,7 +1366,7 @@ public class SchemaViewContentProvider i
                 elementsToWrappersMap.put( attributeType, atw );
             }
 
-            for ( ObjectClass objectClass : schema.getObjectClasses() )
+            for ( MutableObjectClass objectClass : schema.getObjectClasses() )
             {
                 ObjectClassWrapper ocw = new ObjectClassWrapper( objectClass, schemaWrapper );
                 ocw.getParent().addChild( ocw );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/views/SearchView.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 
 package org.apache.directory.studio.schemaeditor.view.views;
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.regex.Pattern;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.SchemaObject;
 import org.apache.directory.studio.schemaeditor.Activator;
@@ -150,7 +151,7 @@ public class SearchView extends ViewPart
         Label separatorLabel2 = new Label( parent, SWT.SEPARATOR | SWT.HORIZONTAL );
         separatorLabel2.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
 
-        // Create the table 
+        // Create the table
         createTableViewer();
 
         setSearchResultsLabel( null, 0 );
@@ -201,7 +202,7 @@ public class SearchView extends ViewPart
                 {
                     resultsTable.setFocus();
                 }
-                else if ( ( e.keyCode == Action.findKeyCode( "RETURN" ) ) || ( e.keyCode == SWT.KEYPAD_CR ) ) //$NON-NLS-1$ 
+                else if ( ( e.keyCode == Action.findKeyCode( "RETURN" ) ) || ( e.keyCode == SWT.KEYPAD_CR ) ) //$NON-NLS-1$
                 {
                     search();
                 }
@@ -558,7 +559,7 @@ public class SearchView extends ViewPart
                 }
                 else if ( item instanceof ObjectClass )
                 {
-                    input = new ObjectClassEditorInput( ( ObjectClass ) item );
+                    input = new ObjectClassEditorInput( ( MutableObjectClass ) item );
                     editorId = ObjectClassEditor.ID;
                 }
 

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/ExportSchemasForADSWizard.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.view.wizards;
 
@@ -38,6 +38,7 @@ import org.apache.directory.shared.conve
 import org.apache.directory.shared.converter.schema.ObjectClassHolder;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.schemaeditor.Activator;
@@ -114,7 +115,7 @@ public class ExportSchemasForADSWizard e
                             sb
                                 .append( NLS
                                     .bind(
-                                        Messages.getString( "ExportSchemasForADSWizard.GeneratedByApacheComment" ), new String[] { format.format( date ) } ) ); //$NON-NLS-1$ 
+                                        Messages.getString( "ExportSchemasForADSWizard.GeneratedByApacheComment" ), new String[] { format.format( date ) } ) ); //$NON-NLS-1$
 
                             try
                             {
@@ -231,14 +232,14 @@ public class ExportSchemasForADSWizard e
      *      the StringBuffer
      * @throws NamingException
      *      if an error occurs during the conversion
-     * @throws LdapException 
+     * @throws LdapException
      */
     private void toLdif( Schema schema, StringBuffer sb ) throws NamingException, LdapException
     {
         sb
             .append( NLS
                 .bind(
-                    Messages.getString( "ExportSchemasForADSWizard.SchemaComment" ), new String[] { schema.getSchemaName().toUpperCase() } ) ); //$NON-NLS-1$ 
+                    Messages.getString( "ExportSchemasForADSWizard.SchemaComment" ), new String[] { schema.getSchemaName().toUpperCase() } ) ); //$NON-NLS-1$
 
         sb.append( "dn: cn=" + schema.getSchemaName() + ", ou=schema\n" ); //$NON-NLS-1$ //$NON-NLS-2$
         sb.append( "objectclass: metaSchema\n" ); //$NON-NLS-1$
@@ -341,7 +342,7 @@ public class ExportSchemasForADSWizard e
         sb.append( "\n" ); //$NON-NLS-1$
 
         // Generating LDIF for Object Classes
-        List<ObjectClass> sortedObjectClasses = getSortedObjectClasses( schema.getObjectClasses() );
+        List<MutableObjectClass> sortedObjectClasses = getSortedObjectClasses( schema.getObjectClasses() );
         for ( ObjectClass oc : sortedObjectClasses )
         {
             ObjectClassHolder holder = new ObjectClassHolder( oc.getOid() );
@@ -398,10 +399,10 @@ public class ExportSchemasForADSWizard e
      * @param objectClasses the unsorted object classes
      * @return the sorted object classes
      */
-    private List<ObjectClass> getSortedObjectClasses( List<ObjectClass> objectClasses )
+    private List<MutableObjectClass> getSortedObjectClasses( List<MutableObjectClass> objectClasses )
     {
         // clone the unsorted list
-        List<ObjectClass> unsortedObjectClasses = new ArrayList<ObjectClass>( objectClasses );
+        List<MutableObjectClass> unsortedObjectClasses = new ArrayList<MutableObjectClass>( objectClasses );
 
         // list of all existing names
         Set<String> objectClassNames = new HashSet<String>();
@@ -414,16 +415,16 @@ public class ExportSchemasForADSWizard e
         }
 
         // sort object classes
-        List<ObjectClass> sortedObjectClasses = new ArrayList<ObjectClass>();
+        List<MutableObjectClass> sortedObjectClasses = new ArrayList<MutableObjectClass>();
         Set<String> movedObjectClasses = new HashSet<String>();
         boolean moved = true;
         while ( !unsortedObjectClasses.isEmpty() && moved )
         {
             moved = false;
-            Iterator<ObjectClass> unsortedIterator = unsortedObjectClasses.iterator();
+            Iterator<MutableObjectClass> unsortedIterator = unsortedObjectClasses.iterator();
             while ( unsortedIterator.hasNext() )
             {
-                ObjectClass oc = unsortedIterator.next();
+                MutableObjectClass oc = unsortedIterator.next();
                 for ( String superName : oc.getSuperiorOids() )
                 {
                     if ( !objectClassNames.contains( Strings.toLowerCase( superName ) )
@@ -443,7 +444,7 @@ public class ExportSchemasForADSWizard e
         }
 
         // add the rest
-        for ( ObjectClass oc : unsortedObjectClasses )
+        for ( MutableObjectClass oc : unsortedObjectClasses )
         {
             sortedObjectClasses.add( oc );
         }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasWizard.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasWizard.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/MergeSchemasWizard.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.view.wizards;
 
@@ -29,6 +29,7 @@ import java.util.Set;
 
 import org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.model.Project;
@@ -104,13 +105,13 @@ public class MergeSchemasWizard extends 
     private void mergeObjects( Object[] sourceObjects, List<String> errorMessages, boolean replaceUnknownSyntax,
         boolean mergeDependencies, boolean pullUpAttributes )
     {
-        /* 
+        /*
          * List of already processed schema objects. Used to avoid that schema objects are process multiple time.
          */
         Set<Object> processedObjects = new HashSet<Object>();
 
         /*
-         * List of created target schemas. 
+         * List of created target schemas.
          */
         Map<String, Schema> targetSchemas = new HashMap<String, Schema>();
 
@@ -151,7 +152,7 @@ public class MergeSchemasWizard extends 
             {
                 ObjectClassFolder ocf = ( ObjectClassFolder ) sourceObject;
                 Schema targetSchema = getTargetSchema( ocf.schema.getProject(), targetProject, targetSchemas );
-                List<ObjectClass> sourceObjectClasses = ocf.schema.getObjectClasses();
+                List<MutableObjectClass> sourceObjectClasses = ocf.schema.getObjectClasses();
                 for ( ObjectClass sourceObjectClass : sourceObjectClasses )
                 {
                     mergeObjectClass( sourceObjectClass, targetProject, targetSchema, processedObjects, errorMessages,
@@ -208,7 +209,7 @@ public class MergeSchemasWizard extends 
 
 
     /**
-     * Merges all attribute types and object classes and form the given sourceSchema to the targetSchema. 
+     * Merges all attribute types and object classes and form the given sourceSchema to the targetSchema.
      */
     private void mergeSchema( Schema sourceSchema, Project targetProject, Schema targetSchema,
         Set<Object> processedObjects, List<String> errorMessages, boolean replaceUnknownSyntax,
@@ -221,7 +222,7 @@ public class MergeSchemasWizard extends 
                 replaceUnknownSyntax, mergeDependencies, pullUpAttributes );
         }
 
-        List<ObjectClass> sourceObjectClasses = sourceSchema.getObjectClasses();
+        List<MutableObjectClass> sourceObjectClasses = sourceSchema.getObjectClasses();
         for ( ObjectClass sourceObjectClass : sourceObjectClasses )
         {
             mergeObjectClass( sourceObjectClass, targetProject, targetSchema, processedObjects, errorMessages,
@@ -231,7 +232,7 @@ public class MergeSchemasWizard extends 
 
 
     /**
-     * Merges the given attribute type to the targetSchema. 
+     * Merges the given attribute type to the targetSchema.
      */
     private void mergeAttributeType( AttributeType sourceAttributeType, Project targetProject, Schema targetSchema,
         Set<Object> processedObjects, List<String> errorMessages, boolean replaceUnknownSyntax,
@@ -355,7 +356,7 @@ public class MergeSchemasWizard extends 
 
 
     /**
-     * Merges the given object class to the targetSchema. 
+     * Merges the given object class to the targetSchema.
      */
     private void mergeObjectClass( ObjectClass sourceObjectClass, Project targetProject, Schema targetSchema,
         Set<Object> processedObjects, List<String> errorMessages, boolean replaceUnknownSyntax,
@@ -419,7 +420,7 @@ public class MergeSchemasWizard extends 
                 }
 
                 // create object class
-                ObjectClass clonedObjectClass = new ObjectClass( sourceObjectClass.getOid() );
+                MutableObjectClass clonedObjectClass = new MutableObjectClass( sourceObjectClass.getOid() );
                 clonedObjectClass.setOid( sourceObjectClass.getOid() );
                 clonedObjectClass.setNames( sourceObjectClass.getNames() );
                 clonedObjectClass.setDescription( sourceObjectClass.getDescription() );
@@ -498,7 +499,7 @@ public class MergeSchemasWizard extends 
     }
 
 
-    private void pullUpAttributes( ObjectClass targetObjectClass, ObjectClass sourceSuperObjectClass,
+    private void pullUpAttributes( MutableObjectClass targetObjectClass, ObjectClass sourceSuperObjectClass,
         ObjectClass targetSuperObjectClass )
     {
         // must

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassWizard.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassWizard.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassWizard.java Mon Mar 12 16:40:09 2012
@@ -6,21 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.view.wizards;
 
 
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.studio.schemaeditor.Activator;
 import org.apache.directory.studio.schemaeditor.PluginConstants;
 import org.apache.directory.studio.schemaeditor.PluginUtils;
@@ -76,7 +76,7 @@ public class NewObjectClassWizard extend
     public boolean performFinish()
     {
         // Creating the new object class
-        ObjectClass newOC = new ObjectClass( generalPage.getOidValue() );
+        MutableObjectClass newOC = new MutableObjectClass( generalPage.getOidValue() );
         newOC.setSchemaName( generalPage.getSchemaValue() );
         newOC.setNames( generalPage.getAliasesValue() );
         newOC.setDescription( generalPage.getDescriptionValue() );

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ObjectClassWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ObjectClassWrapper.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ObjectClassWrapper.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wrappers/ObjectClassWrapper.java Mon Mar 12 16:40:09 2012
@@ -6,21 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.view.wrappers;
 
 
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.eclipse.osgi.util.NLS;
 
 
@@ -32,7 +32,7 @@ import org.eclipse.osgi.util.NLS;
 public class ObjectClassWrapper extends AbstractTreeNode
 {
     /** The wrapped ObjectClass */
-    private ObjectClass objectClass;
+    private MutableObjectClass objectClass;
 
 
     /**
@@ -41,7 +41,7 @@ public class ObjectClassWrapper extends 
      * @param oc
      *      the wrapped ObjectClass
      */
-    public ObjectClassWrapper( ObjectClass oc )
+    public ObjectClassWrapper( MutableObjectClass oc )
     {
         super( null );
         objectClass = oc;
@@ -56,7 +56,7 @@ public class ObjectClassWrapper extends 
      * @param parent
      *      the parent TreeNode
      */
-    public ObjectClassWrapper( ObjectClass oc, TreeNode parent )
+    public ObjectClassWrapper( MutableObjectClass oc, TreeNode parent )
     {
         super( parent );
         objectClass = oc;
@@ -69,7 +69,7 @@ public class ObjectClassWrapper extends 
      * @return
      *      the wrapped ObjectClass
      */
-    public ObjectClass getObjectClass()
+    public MutableObjectClass getObjectClass()
     {
         return objectClass;
     }

Modified: directory/studio/trunk/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java?rev=1299733&r1=1299732&r2=1299733&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java (original)
+++ directory/studio/trunk/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java Mon Mar 12 16:40:09 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.studio.schemaeditor.model.difference;
 
@@ -26,6 +26,7 @@ import java.util.List;
 import junit.framework.TestCase;
 
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.model.schema.UsageEnum;
@@ -126,7 +127,7 @@ public class DifferenceEngineTest extend
     public void testAddMandatoryATDifference() throws Exception
     {
         ObjectClass o1 = new ObjectClass( "1.2.3.4" );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setMustAttributeTypeOids( Arrays.asList( new String[]
             { "must" } ) );
 
@@ -154,7 +155,7 @@ public class DifferenceEngineTest extend
     public void testAddOptionalATDifference() throws Exception
     {
         ObjectClass o1 = new ObjectClass( "1.2.3.4" );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setMayAttributeTypeOids( Arrays.asList( new String[]
             { "may" } ) );
 
@@ -259,7 +260,7 @@ public class DifferenceEngineTest extend
     public void testAddSuperiorOCDifference() throws Exception
     {
         ObjectClass o1 = new ObjectClass( "1.2.3.4" );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setSuperiorOids( Arrays.asList( new String[]
             { "superiorOC" } ) );
 
@@ -338,9 +339,9 @@ public class DifferenceEngineTest extend
      */
     public void testModifyClassTypeDifference() throws Exception
     {
-        ObjectClass o1 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o1 = new MutableObjectClass( "1.2.3.4" );
         o1.setType( ObjectClassTypeEnum.STRUCTURAL );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setType( ObjectClassTypeEnum.ABSTRACT );
 
         List<PropertyDifference> differences = DifferenceEngine.getDifferences( o1, o2 );
@@ -798,10 +799,10 @@ public class DifferenceEngineTest extend
      */
     public void testRemoveMandatoryATDifference() throws Exception
     {
-        ObjectClass o1 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o1 = new MutableObjectClass( "1.2.3.4" );
         o1.setMustAttributeTypeOids( Arrays.asList( new String[]
             { "must1", "must2" } ) );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setMustAttributeTypeOids( Arrays.asList( new String[]
             { "must2" } ) );
 
@@ -829,10 +830,10 @@ public class DifferenceEngineTest extend
      */
     public void testRemoveOptionalATDifference() throws Exception
     {
-        ObjectClass o1 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o1 = new MutableObjectClass( "1.2.3.4" );
         o1.setMayAttributeTypeOids( Arrays.asList( new String[]
             { "may1", "may2" } ) );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setMayAttributeTypeOids( Arrays.asList( new String[]
             { "may2" } ) );
 
@@ -943,10 +944,10 @@ public class DifferenceEngineTest extend
      */
     public void testRemoveSuperiorOCDifference() throws Exception
     {
-        ObjectClass o1 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o1 = new MutableObjectClass( "1.2.3.4" );
         o1.setSuperiorOids( Arrays.asList( new String[]
             { "sup1", "sup2" } ) );
-        ObjectClass o2 = new ObjectClass( "1.2.3.4" );
+        MutableObjectClass o2 = new MutableObjectClass( "1.2.3.4" );
         o2.setSuperiorOids( Arrays.asList( new String[]
             { "sup2" } ) );
 



Mime
View raw message