1. mirror
  2. Apache Directory Studio

Commits

Alex Karasulu  committed 4de582f
  • Participants
  • Parent commits 536de89
  • Branches akarasulu

Comments (0)

Files changed (102)

File plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java

View file
 import org.apache.directory.shared.ldap.aci.protectedItem.RestrictedByItem;
 import org.apache.directory.shared.ldap.aci.protectedItem.SelfValueItem;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.osgi.util.NLS;
 
         if ( item.getClass() == AttributeTypeItem.class )
         {
             AttributeTypeItem at = ( AttributeTypeItem ) item;
-            for ( Iterator<AttributeType> it = at.iterator(); it.hasNext(); )
+            for ( Iterator<MutableAttributeTypeImpl> it = at.iterator(); it.hasNext(); )
             {
-                AttributeType attributeType = it.next();
+                MutableAttributeTypeImpl attributeType = it.next();
                 values.add( attributeType.toString() );
             }
         }
         else if ( item.getClass() == AllAttributeValuesItem.class )
         {
             AllAttributeValuesItem aav = ( AllAttributeValuesItem ) item;
-            for ( Iterator<AttributeType> it = aav.iterator(); it.hasNext(); )
+            for ( Iterator<MutableAttributeTypeImpl> it = aav.iterator(); it.hasNext(); )
             {
-                AttributeType attributeType = it.next();
+                MutableAttributeTypeImpl attributeType = it.next();
                 values.add( attributeType.toString() );
             }
         }
         else if ( item.getClass() == SelfValueItem.class )
         {
             SelfValueItem sv = ( SelfValueItem ) item;
-            for ( Iterator<AttributeType> it = sv.iterator(); it.hasNext(); )
+            for ( Iterator<MutableAttributeTypeImpl> it = sv.iterator(); it.hasNext(); )
             {
-                AttributeType attributeType = it.next();
+                MutableAttributeTypeImpl attributeType = it.next();
                 values.add( attributeType.toString() );
             }
         }

File plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java

View file
 import org.apache.directory.shared.ldap.model.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.AttributeTypeOptions;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.SchemaUtils;
                 String id = SchemaUtils.stripOptions( returnAttribute );
                 Set<String> options = SchemaUtils.getOptions( returnAttribute );
 
-                AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id );
+                MutableAttributeTypeImpl attributeType = schemaManager.lookupAttributeTypeRegistry( id );
                 AttributeTypeOptions attrOptions = new AttributeTypeOptions( attributeType, options );
 
                 returningAttributes.add( attrOptions );
     private void compareEntries( Entry originalEntry, Entry destinationEntry, LdifEntry modificationEntry )
     {
         // Creating a list to store the already evaluated attribute type
-        List<AttributeType> evaluatedATs = new ArrayList<AttributeType>();
+        List<MutableAttributeTypeImpl> evaluatedATs = new ArrayList<MutableAttributeTypeImpl>();
 
         // Checking attributes of the original entry
         for ( EntryAttribute originalAttribute : originalEntry )
         {
-            AttributeType originalAttributeType = originalAttribute.getAttributeType();
+            MutableAttributeTypeImpl originalAttributeType = originalAttribute.getAttributeType();
 
             // We're only working on 'userApplications' attributes
             if ( originalAttributeType.getUsage() == UsageEnum.USER_APPLICATIONS )
         // Checking attributes of the destination entry
         for ( EntryAttribute destinationAttribute : destinationEntry )
         {
-            AttributeType destinationAttributeType = destinationAttribute.getAttributeType();
+            MutableAttributeTypeImpl destinationAttributeType = destinationAttribute.getAttributeType();
 
             // We're only working on 'userApplications' attributes
             if ( destinationAttributeType.getUsage() == UsageEnum.USER_APPLICATIONS )

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java

View file
 import java.util.List;
 import java.util.Set;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.ui.actions.SelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserCategory;
      * @param selection the selection
      * @return an array with AttributeTypeDescription beans, may be empty.
      */
-    public static AttributeType[] getAttributeTypeDescription( ISelection selection )
+    public static MutableAttributeTypeImpl[] getAttributeTypeDescription( ISelection selection )
     {
-        List<Object> list = getTypes( selection, AttributeType.class );
-        return list.toArray( new AttributeType[list.size()] );
+        List<Object> list = getTypes( selection, MutableAttributeTypeImpl.class );
+        return list.toArray( new MutableAttributeTypeImpl[list.size()] );
     }
 
 

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java

View file
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.DeleteDialog;
 
     protected void appendValuesWarnMessage( StringBuffer message, Collection<IValue> values )
     {
-        Map<AttributeType, Integer> attributeNameToSelectedValuesCountMap = new HashMap<AttributeType, Integer>();
+        Map<MutableAttributeTypeImpl, Integer> attributeNameToSelectedValuesCountMap = new HashMap<MutableAttributeTypeImpl, Integer>();
         Set<ObjectClass> selectedObjectClasses = new HashSet<ObjectClass>();
         for ( IValue value : values )
         {
             String type = value.getAttribute().getType();
-            AttributeType atd = value.getAttribute().getAttributeTypeDescription();
+            MutableAttributeTypeImpl atd = value.getAttribute().getAttributeTypeDescription();
             AttributeHierarchy ah = value.getAttribute().getEntry().getAttributeWithSubtypes( type );
 
             // check if (part of) Rdn is selected
             // get remaining attributes
             Collection<ObjectClass> remainingObjectClasses = entry.getObjectClassDescriptions();
             remainingObjectClasses.removeAll( selectedObjectClasses );
-            Set<AttributeType> remainingAttributeSet = new HashSet<AttributeType>();
+            Set<MutableAttributeTypeImpl> remainingAttributeSet = new HashSet<MutableAttributeTypeImpl>();
             for ( ObjectClass ocd : remainingObjectClasses )
             {
                 {
                         schema );
                     for ( String mustAttr : mustAttrs )
                     {
-                        AttributeType atd = entry.getBrowserConnection().getSchema()
+                        MutableAttributeTypeImpl atd = entry.getBrowserConnection().getSchema()
                             .getAttributeTypeDescription( mustAttr );
                         remainingAttributeSet.add( atd );
                     }
                         schema );
                     for ( String mayAttr : mayAttrs )
                     {
-                        AttributeType atd = entry.getBrowserConnection().getSchema()
+                        MutableAttributeTypeImpl atd = entry.getBrowserConnection().getSchema()
                             .getAttributeTypeDescription( mayAttr );
                         remainingAttributeSet.add( atd );
                     }

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/RenameEntryDialog.java

View file
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.directory.shared.ldap.model.name.Rdn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.widgets.DnBuilderWidget;
         dnBuilderWidget = new DnBuilderWidget( true, false );
         dnBuilderWidget.addWidgetModifyListener( this );
         dnBuilderWidget.createContents( composite );
-        Collection<AttributeType> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( entry );
+        Collection<MutableAttributeTypeImpl> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( entry );
         String[] allAttributeNames = SchemaUtils.getNames( allAtds ).toArray( ArrayUtils.EMPTY_STRING_ARRAY );
         dnBuilderWidget.setInput( entry.getBrowserConnection(), allAttributeNames, entry.getRdn(), null );
 

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java

View file
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.Utils;
 {
 
     /** Map with attribute OID => attribute type description */
-    private SortedMap<String, AttributeType> attributeOid2AtdMap;
+    private SortedMap<String, MutableAttributeTypeImpl> attributeOid2AtdMap;
 
     /** Map with attribute name => attribute type description */
-    private SortedMap<String, AttributeType> attributeNames2AtdMap;
+    private SortedMap<String, MutableAttributeTypeImpl> attributeNames2AtdMap;
 
     /** The attribute names and OIDs. */
     private String[] attributeNamesAndOids;
         composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
 
         // init available attribute types
-        attributeNames2AtdMap = new TreeMap<String, AttributeType>();
-        attributeOid2AtdMap = new TreeMap<String, AttributeType>();
+        attributeNames2AtdMap = new TreeMap<String, MutableAttributeTypeImpl>();
+        attributeOid2AtdMap = new TreeMap<String, MutableAttributeTypeImpl>();
         BrowserConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
         IBrowserConnection[] connections = cm.getBrowserConnections();
         for ( IBrowserConnection browserConnection : connections )
 
     private void createAttributeMaps( Schema schema )
     {
-        Collection<AttributeType> atds = schema.getAttributeTypeDescriptions();
-        for ( AttributeType atd : atds )
+        Collection<MutableAttributeTypeImpl> atds = schema.getAttributeTypeDescriptions();
+        for ( MutableAttributeTypeImpl atd : atds )
         {
             attributeOid2AtdMap.put( atd.getOid(), atd );
             for ( String name : atd.getNames() )
                     {
                         if ( attributeNames2AtdMap.containsKey( attribute.getAttributeNumericOidOrName() ) )
                         {
-                            AttributeType atd = ( AttributeType ) attributeNames2AtdMap
+                            MutableAttributeTypeImpl atd = ( MutableAttributeTypeImpl ) attributeNames2AtdMap
                                 .get( attribute.getAttributeNumericOidOrName() );
                             String s = atd.getOid();
                             for ( String attributeName : atd.getNames() )
                         }
                         else if ( attributeOid2AtdMap.containsKey( attribute.getAttributeNumericOidOrName() ) )
                         {
-                            AttributeType atd = ( AttributeType ) attributeOid2AtdMap
+                            MutableAttributeTypeImpl atd = ( MutableAttributeTypeImpl ) attributeOid2AtdMap
                                 .get( attribute.getAttributeNumericOidOrName() );
                             return SchemaUtils.toString( atd );
                         }

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java

View file
 import java.util.SortedMap;
 import java.util.TreeMap;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
     private SortedMap<String, ValueEditorExtension> class2ValueEditorExtensionMap;
 
     /** Map with attribute OID => attribute type description */
-    private SortedMap<String, AttributeType> attributeOid2AtdMap;
+    private SortedMap<String, MutableAttributeTypeImpl> attributeOid2AtdMap;
 
     /** Map with attribute name => attribute type description */
-    private SortedMap<String, AttributeType> attributeNames2AtdMap;
+    private SortedMap<String, MutableAttributeTypeImpl> attributeNames2AtdMap;
 
     /** The attribute names and OIDs. */
     private String[] attributeTypesAndOids;
         }
 
         // init available attribute types
-        attributeNames2AtdMap = new TreeMap<String, AttributeType>();
-        attributeOid2AtdMap = new TreeMap<String, AttributeType>();
+        attributeNames2AtdMap = new TreeMap<String, MutableAttributeTypeImpl>();
+        attributeOid2AtdMap = new TreeMap<String, MutableAttributeTypeImpl>();
         BrowserConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
         IBrowserConnection[] connections = cm.getBrowserConnections();
         for ( IBrowserConnection browserConnection : connections )
 
     private void createAttributeMaps( Schema schema )
     {
-        Collection<AttributeType> atds = schema.getAttributeTypeDescriptions();
-        for ( AttributeType atd : atds )
+        Collection<MutableAttributeTypeImpl> atds = schema.getAttributeTypeDescriptions();
+        for ( MutableAttributeTypeImpl atd : atds )
         {
             attributeOid2AtdMap.put( atd.getOid(), atd );
 
                     {
                         if ( attributeNames2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                         {
-                            AttributeType atd = ( AttributeType ) attributeNames2AtdMap
+                            MutableAttributeTypeImpl atd = ( MutableAttributeTypeImpl ) attributeNames2AtdMap
                                 .get( relation.getAttributeNumericOidOrType() );
                             String s = atd.getOid();
                             for ( String name : atd.getNames() )
                         }
                         else if ( attributeOid2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                         {
-                            AttributeType atd = ( AttributeType ) attributeOid2AtdMap
+                            MutableAttributeTypeImpl atd = ( MutableAttributeTypeImpl ) attributeOid2AtdMap
                                 .get( relation.getAttributeNumericOidOrType() );
                             return atd.toString();
                         }

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java

View file
 import java.util.TreeMap;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
     private Schema schema;
 
     /** The possible attribute types. */
-    private Map<String, AttributeType> possibleAttributeTypes;
+    private Map<String, MutableAttributeTypeImpl> possibleAttributeTypes;
 
     /** The possible filter types. */
     private Map<String, String> possibleFilterTypes;
     {
         this.schema = schema;
 
-        possibleAttributeTypes = new TreeMap<String, AttributeType>( nameAndOidComparator );
+        possibleAttributeTypes = new TreeMap<String, MutableAttributeTypeImpl>( nameAndOidComparator );
         possibleFilterTypes = new LinkedHashMap<String, String>();
         possibleObjectClasses = new TreeMap<String, ObjectClass>( nameAndOidComparator );
         possibleMatchingRules = new TreeMap<String, MutableMatchingRule>( nameAndOidComparator );
 
         if ( schema != null )
         {
-            Collection<AttributeType> attributeTypeDescriptions = schema.getAttributeTypeDescriptions();
-            for ( AttributeType atd : attributeTypeDescriptions )
+            Collection<MutableAttributeTypeImpl> attributeTypeDescriptions = schema.getAttributeTypeDescriptions();
+            for ( MutableAttributeTypeImpl atd : attributeTypeDescriptions )
             {
                 possibleAttributeTypes.put( atd.getOid(), atd );
                 for ( String atdName : atd.getNames() )
         {
             for ( String possibleAttributeType : possibleAttributeTypes.keySet() )
             {
-                AttributeType description = possibleAttributeTypes.get( possibleAttributeType );
+                MutableAttributeTypeImpl description = possibleAttributeTypes.get( possibleAttributeType );
                 if ( possibleAttributeType.toUpperCase().startsWith( attributeType.toUpperCase() ) )
                 {
                     String replacementString = possibleAttributeType;

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java

View file
 
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilter;
                         + fc.getAttributeToken().getLength() )
                 {
                     String attributeType = fc.getAttributeToken().getValue();
-                    AttributeType attributeTypeDescription = schema
+                    MutableAttributeTypeImpl attributeTypeDescription = schema
                         .getAttributeTypeDescription( attributeType );
                     String ldifLine = SchemaUtils.getLdifLine( attributeTypeDescription );
                     return ldifLine;
                         + fc.getAttributeToken().getLength() )
                 {
                     String attributeType = fc.getAttributeToken().getValue();
-                    AttributeType attributeTypeDescription = schema
+                    MutableAttributeTypeImpl attributeTypeDescription = schema
                         .getAttributeTypeDescription( attributeType );
                     String ldifLine = SchemaUtils.getLdifLine( attributeTypeDescription );
                     return ldifLine;

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java

View file
 import java.util.Arrays;
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.ui.widgets.ExtendedContentAssistCommandAdapter;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
             String[] atdNames;
             if ( connection != null )
             {
-                Collection<AttributeType> atds = connection.getSchema().getAttributeTypeDescriptions();
+                Collection<MutableAttributeTypeImpl> atds = connection.getSchema().getAttributeTypeDescriptions();
                 atdNames = SchemaUtils.getNames( atds ).toArray( EMPTY );
             }
             else

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenBestEditorAction.java

View file
 
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 
                 // validate if value is allowed
                 IEntry entry = value.getAttribute().getEntry();
-                Collection<AttributeType> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( entry );
-                AttributeType atd = value.getAttribute().getAttributeTypeDescription();
+                Collection<MutableAttributeTypeImpl> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( entry );
+                MutableAttributeTypeImpl atd = value.getAttribute().getAttributeTypeDescription();
                 if ( !allAtds.contains( atd ) )
                 {
                     message.append( NLS.bind( Messages.getString( "OpenBestEditorAction.AttributeNotInSubSchema" ), //$NON-NLS-1$

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java

View file
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.StudioControl;
                 {
                     if ( returnOperationalAttributesButton.getSelection() )
                     {
-                        Collection<AttributeType> opAtds = SchemaUtils
+                        Collection<MutableAttributeTypeImpl> opAtds = SchemaUtils
                             .getOperationalAttributeDescriptions( browserConnectionWidget.getBrowserConnection()
                                 .getSchema() );
                         Collection<String> opAtdNames = SchemaUtils.getNames( opAtds );

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java

View file
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.ui.widgets.ExtendedContentAssistCommandAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
         this.initialShowSubschemaAttributesOnly = initialShowSubschemaAttributesOnly;
         this.initialHideExistingAttributes = initialHideExistingAttributes;
 
-        Collection<AttributeType> atds = initialEntry.getBrowserConnection().getSchema()
+        Collection<MutableAttributeTypeImpl> atds = initialEntry.getBrowserConnection().getSchema()
             .getAttributeTypeDescriptions();
         Collection<String> atdNames = SchemaUtils.getNames( atds );
         possibleAttributeTypes = atdNames.toArray( new String[atdNames.size()] );
         Arrays.sort( possibleAttributeTypes );
 
-        Collection<AttributeType> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( initialEntry );
+        Collection<MutableAttributeTypeImpl> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( initialEntry );
         Collection<String> names = SchemaUtils.getNames( allAtds );
         possibleAttributeTypesSubschemaOnly = names.toArray( new String[0] );
         Arrays.sort( possibleAttributeTypesSubschemaOnly );

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java

View file
 
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidget;
                 // remove empty must attributes
                 // necessary when navigating back, modifying object classes
                 // and Dn and navigation forward again.
-                Collection<AttributeType> oldMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
-                for ( AttributeType oldMust : oldMusts )
+                Collection<MutableAttributeTypeImpl> oldMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
+                for ( MutableAttributeTypeImpl oldMust : oldMusts )
                 {
                     IAttribute attribute = newEntry.getAttribute( oldMust.getOid() );
                     if ( attribute != null )
                 }
 
                 // add must attributes
-                Collection<AttributeType> newMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
-                for ( AttributeType newMust : newMusts )
+                Collection<MutableAttributeTypeImpl> newMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
+                for ( MutableAttributeTypeImpl newMust : newMusts )
                 {
                     if ( newEntry.getAttributeWithSubtypes( newMust.getOid() ) == null )
                     {

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java

View file
 import org.apache.directory.shared.ldap.model.name.Ava;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.name.Rdn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.ui.RunnableContextRunner;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
         }
         else
         {
-            Collection<AttributeType> atds = SchemaUtils.getAllAttributeTypeDescriptions( newEntry );
+            Collection<MutableAttributeTypeImpl> atds = SchemaUtils.getAllAttributeTypeDescriptions( newEntry );
             String[] attributeNames = SchemaUtils.getNames( atds ).toArray( ArrayUtils.EMPTY_STRING_ARRAY );
 
             Dn parentDn = newEntry.getDn().getParent();

File plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java

View file
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
             return userSelectedValueEditor;
         }
 
-        AttributeType atd = schema.getAttributeTypeDescription( attributeType );
+        MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( attributeType );
         // check attribute preferences
         Map<String, String> attributeValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
             .getAttributeValueEditorMap();
     {
         List<IValueEditor> alternativeList = new ArrayList<IValueEditor>();
 
-        AttributeType atd = schema.getAttributeTypeDescription( attributeName );
+        MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( attributeName );
 
         if ( SchemaUtils.isBinary( atd, schema ) )
         {

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java

View file
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.IConnectionListener;
         List<String> binaryAttributeNames = new ArrayList<String>();
 
         Schema schema = browserConnection.getSchema();
-        Collection<AttributeType> attributeTypeDescriptions = schema.getAttributeTypeDescriptions();
-        for ( AttributeType atd : attributeTypeDescriptions )
+        Collection<MutableAttributeTypeImpl> attributeTypeDescriptions = schema.getAttributeTypeDescriptions();
+        for ( MutableAttributeTypeImpl atd : attributeTypeDescriptions )
         {
             if ( SchemaUtils.isBinary( atd, schema ) )
             {

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java

View file
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
             }
             else
             {
-                Collection<AttributeType> opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry
+                Collection<MutableAttributeTypeImpl> opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry
                     .getBrowserConnection().getSchema() );
                 Collection<String> atdNames = SchemaUtils.getNames( opAtds );
                 raSet.addAll( atdNames );

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java

View file
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.ObjectClass;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
             return description;
         }
 
-        AttributeType atd = schema.getAttributeTypeDescription( parsedAttributeType );
+        MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( parsedAttributeType );
         String oidString = atd.getOid();
 
         if ( !parsedLangList.isEmpty() )
             return false;
         }
 
-        AttributeType myAtd = schema.getAttributeTypeDescription( this.getParsedAttributeType() );
-        AttributeType otherAtd = schema.getAttributeTypeDescription( other.getParsedAttributeType() );
+        MutableAttributeTypeImpl myAtd = schema.getAttributeTypeDescription( this.getParsedAttributeType() );
+        MutableAttributeTypeImpl otherAtd = schema.getAttributeTypeDescription( other.getParsedAttributeType() );
 
         // special case *: all user attributes (RFC4511)
         if ( SchemaConstants.ALL_USER_ATTRIBUTES.equals( other.description ) && !SchemaUtils.isOperational( myAtd ) )
             names.addAll( SchemaUtils.getMustAttributeTypeDescriptionNamesTransitive( ocd, schema ) );
             for ( String name : names )
             {
-                AttributeType atd = schema.getAttributeTypeDescription( name );
+                MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( name );
                 if ( myAtd == atd )
                 {
                     return true;
         // check type
         if ( myAtd != otherAtd )
         {
-            AttributeType superiorAtd = null;
+            MutableAttributeTypeImpl superiorAtd = null;
             String superiorName = myAtd.getSuperiorOid();
             while ( superiorName != null )
             {

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java

View file
 
 import java.io.Serializable;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.AttributePropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
      * @return the AttributeTypeDescription of this attribute, may be the
      *         default or a dummy
      */
-    public abstract AttributeType getAttributeTypeDescription();
+    public abstract MutableAttributeTypeImpl getAttributeTypeDescription();
 
 
     /**

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java

View file
 import java.util.List;
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EmptyValueAddedEvent;
         }
         else
         {
-            Collection<AttributeType> mustAtds = SchemaUtils.getMustAttributeTypeDescriptions( entry );
+            Collection<MutableAttributeTypeImpl> mustAtds = SchemaUtils.getMustAttributeTypeDescriptions( entry );
             return mustAtds.contains( getAttributeTypeDescription() );
         }
     }
     /**
      * {@inheritDoc}
      */
-    public AttributeType getAttributeTypeDescription()
+    public MutableAttributeTypeImpl getAttributeTypeDescription()
     {
         return getEntry().getBrowserConnection().getSchema().getAttributeTypeDescription( getType() );
     }

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java

View file
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl;
 import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule;
 
     private Map<String, ObjectClass> ocdMapByNameOrNumericOid;
 
-    private Map<String, AttributeType> atdMapByNameOrNumericOid;
+    private Map<String, MutableAttributeTypeImpl> atdMapByNameOrNumericOid;
 
     private Map<String, MutableLdapSyntax> lsdMapByNumericOid;
 
         this.createTimestamp = null;
         this.modifyTimestamp = null;
         this.ocdMapByNameOrNumericOid = new HashMap<String, ObjectClass>();
-        this.atdMapByNameOrNumericOid = new HashMap<String, AttributeType>();
+        this.atdMapByNameOrNumericOid = new HashMap<String, MutableAttributeTypeImpl>();
         this.lsdMapByNumericOid = new HashMap<String, MutableLdapSyntax>();
         this.mrdMapByNameOrNumericOid = new HashMap<String, MutableMatchingRule>();
         this.mrudMapByNameOrNumericOid = new HashMap<String, MatchingRuleUse>();
                 }
                 else if ( attributeName.equalsIgnoreCase( SchemaConstants.ATTRIBUTE_TYPES_AT ) )
                 {
-                    AttributeType atd = atdParser.parseAttributeTypeDescription( value );
+                    MutableAttributeTypeImpl atd = atdParser.parseAttributeTypeDescription( value );
                     atd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addAttributeType( atd );
                 }
             }
         }
 
-        for ( AttributeType atd : getAttributeTypeDescriptions() )
+        for ( MutableAttributeTypeImpl atd : getAttributeTypeDescriptions() )
         {
             // assume all received syntaxes in attributes are valid -> create pseudo syntaxes if missing
             String syntaxOid = atd.getSyntaxOid();
         // set extensibleObject may attributes
         ObjectClass extensibleObjectOcd = this
             .getObjectClassDescription( SchemaConstants.EXTENSIBLE_OBJECT_OC );
-        Collection<AttributeType> userAtds = SchemaUtils.getUserAttributeDescriptions( this );
+        Collection<MutableAttributeTypeImpl> userAtds = SchemaUtils.getUserAttributeDescriptions( this );
         Collection<String> atdNames = SchemaUtils.getNames( userAtds );
         List<String> atdNames2 = new ArrayList<String>( atdNames );
         extensibleObjectOcd.setMayAttributeTypeOids( atdNames2 );
      * 
      * @param atd the attribute type description
      */
-    private void addAttributeType( AttributeType atd )
+    private void addAttributeType( MutableAttributeTypeImpl atd )
     {
         if ( atd.getOid() != null )
         {
      * 
      * @return the attribute type descriptions
      */
-    public Collection<AttributeType> getAttributeTypeDescriptions()
+    public Collection<MutableAttributeTypeImpl> getAttributeTypeDescriptions()
     {
-        Set<AttributeType> set = new HashSet<AttributeType>( atdMapByNameOrNumericOid.values() );
+        Set<MutableAttributeTypeImpl> set = new HashSet<MutableAttributeTypeImpl>( atdMapByNameOrNumericOid.values() );
         return set;
     }
 
      * 
      * @return the attribute type description, or the default or a dummy
      */
-    public AttributeType getAttributeTypeDescription( String nameOrOid )
+    public MutableAttributeTypeImpl getAttributeTypeDescription( String nameOrOid )
     {
         AttributeDescription ad = new AttributeDescription( nameOrOid );
         String attributeType = ad.getParsedAttributeType();
             // DUMMY
             List<String> attributeTypes = new ArrayList<String>();
             attributeTypes.add( attributeType );
-            AttributeType atd = new AttributeType( attributeType );
+            MutableAttributeTypeImpl atd = new MutableAttributeTypeImpl( attributeType );
             atd.setNames( attributeTypes );
             atd.setUserModifiable( true );
             atd.setUsage( UsageEnum.USER_APPLICATIONS );

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java

View file
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
      * 
      * @return all operational attributes types
      */
-    public static Collection<AttributeType> getOperationalAttributeDescriptions( Schema schema )
+    public static Collection<MutableAttributeTypeImpl> getOperationalAttributeDescriptions( Schema schema )
     {
-        Set<AttributeType> operationalAtds = new HashSet<AttributeType>();
-        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
+        Set<MutableAttributeTypeImpl> operationalAtds = new HashSet<MutableAttributeTypeImpl>();
+        for ( MutableAttributeTypeImpl atd : schema.getAttributeTypeDescriptions() )
         {
             if ( isOperational( atd ) )
             {
      * 
      * @return all user attributes type descriptions
      */
-    public static Collection<AttributeType> getUserAttributeDescriptions( Schema schema )
+    public static Collection<MutableAttributeTypeImpl> getUserAttributeDescriptions( Schema schema )
     {
-        Set<AttributeType> userAtds = new HashSet<AttributeType>();
-        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
+        Set<MutableAttributeTypeImpl> userAtds = new HashSet<MutableAttributeTypeImpl>();
+        for ( MutableAttributeTypeImpl atd : schema.getAttributeTypeDescriptions() )
         {
             if ( !isOperational( atd ) )
             {
      * 
      * @return true, if is operational
      */
-    public static boolean isOperational( AttributeType atd )
+    public static boolean isOperational( MutableAttributeTypeImpl atd )
     {
         return atd.getUsage() != UsageEnum.USER_APPLICATIONS || atd.getExtensions() == Schema.DUMMY_EXTENSIONS
             || CollectionUtils.containsAny( OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES, getLowerCaseIdentifiers( atd ) );
     }
 
 
-    public static boolean isModifiable( AttributeType atd )
+    public static boolean isModifiable( MutableAttributeTypeImpl atd )
     {
         if ( atd == null )
         {
      * 
      * @return the must attribute type descriptions of all object class descriptions of the given entry.
      */
-    public static Collection<AttributeType> getMustAttributeTypeDescriptions( IEntry entry )
+    public static Collection<MutableAttributeTypeImpl> getMustAttributeTypeDescriptions( IEntry entry )
     {
         Schema schema = entry.getBrowserConnection().getSchema();
-        Collection<AttributeType> atds = new HashSet<AttributeType>();
+        Collection<MutableAttributeTypeImpl> atds = new HashSet<MutableAttributeTypeImpl>();
         for ( ObjectClass ocd : entry.getObjectClassDescriptions() )
         {
             Collection<String> musts = getMustAttributeTypeDescriptionNamesTransitive( ocd, schema );
             for ( String must : musts )
             {
-                AttributeType atd = schema.getAttributeTypeDescription( must );
+                MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( must );
                 atds.add( atd );
             }
         }
      * 
      * @return the may attribute type descriptions of all object class descriptions of the given entry.
      */
-    public static Collection<AttributeType> getMayAttributeTypeDescriptions( IEntry entry )
+    public static Collection<MutableAttributeTypeImpl> getMayAttributeTypeDescriptions( IEntry entry )
     {
         Schema schema = entry.getBrowserConnection().getSchema();
-        Collection<AttributeType> atds = new HashSet<AttributeType>();
+        Collection<MutableAttributeTypeImpl> atds = new HashSet<MutableAttributeTypeImpl>();
         for ( ObjectClass ocd : entry.getObjectClassDescriptions() )
         {
             Collection<String> mays = getMayAttributeTypeDescriptionNamesTransitive( ocd, schema );
             for ( String may : mays )
             {
-                AttributeType atd = schema.getAttributeTypeDescription( may );
+                MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( may );
                 atds.add( atd );
             }
         }
      * 
      * @return all attribute type descriptions of all object class descriptions of the given entry.
      */
-    public static Collection<AttributeType> getAllAttributeTypeDescriptions( IEntry entry )
+    public static Collection<MutableAttributeTypeImpl> getAllAttributeTypeDescriptions( IEntry entry )
     {
-        Collection<AttributeType> atds = new HashSet<AttributeType>();
+        Collection<MutableAttributeTypeImpl> atds = new HashSet<MutableAttributeTypeImpl>();
         atds.addAll( getMustAttributeTypeDescriptions( entry ) );
         atds.addAll( getMayAttributeTypeDescriptions( entry ) );
         return atds;
      * 
      * @return false if the attribute type is defined as binary
      */
-    public static boolean isString( AttributeType atd, Schema schema )
+    public static boolean isString( MutableAttributeTypeImpl atd, Schema schema )
     {
         return !isBinary( atd, schema );
     }
      * 
      * @return true if the attribute type is defined as binary
      */
-    public static boolean isBinary( AttributeType atd, Schema schema )
+    public static boolean isBinary( MutableAttributeTypeImpl atd, Schema schema )
     {
         // check user-defined binary attribute types
         Set<String> binaryAttributeOidsAndNames = BrowserCorePlugin.getDefault().getCorePreferences()
      * 
      * @return all attribute type description using this syntax description
      */
-    public static Collection<AttributeType> getUsedFromAttributeTypeDescriptions( LdapSyntax lsd, Schema schema )
+    public static Collection<MutableAttributeTypeImpl> getUsedFromAttributeTypeDescriptions( LdapSyntax lsd, Schema schema )
     {
-        Set<AttributeType> usedFroms = new TreeSet<AttributeType>( schemaElementNameComparator );
-        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
+        Set<MutableAttributeTypeImpl> usedFroms = new TreeSet<MutableAttributeTypeImpl>( schemaElementNameComparator );
+        for ( MutableAttributeTypeImpl atd : schema.getAttributeTypeDescriptions() )
         {
             String syntax = getSyntaxNumericOidTransitive( atd, schema );
             if ( syntax != null && lsd.getOid() != null
      * @return all attribute type descriptions using this matching rule for
      * equality, substring or ordering matching
      */
-    public static Collection<AttributeType> getUsedFromAttributeTypeDescriptions( MatchingRule mrd, Schema schema )
+    public static Collection<MutableAttributeTypeImpl> getUsedFromAttributeTypeDescriptions( MatchingRule mrd, Schema schema )
     {
-        Set<AttributeType> usedFromSet = new TreeSet<AttributeType>( schemaElementNameComparator );
-        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
+        Set<MutableAttributeTypeImpl> usedFromSet = new TreeSet<MutableAttributeTypeImpl>( schemaElementNameComparator );
+        for ( MutableAttributeTypeImpl atd : schema.getAttributeTypeDescriptions() )
         {
             Collection<String> lowerCaseIdentifiers = getLowerCaseIdentifiers( mrd );
             String emr = getEqualityMatchingRuleNameOrNumericOidTransitive( atd, schema );
      * @return the equality matching rule description name or OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getEqualityMatchingRuleNameOrNumericOidTransitive( AttributeType atd, Schema schema )
+    public static String getEqualityMatchingRuleNameOrNumericOidTransitive( MutableAttributeTypeImpl atd, Schema schema )
     {
         if ( atd.getEqualityOid() != null )
         {
 
         if ( atd.getSuperiorOid() != null && schema.hasAttributeTypeDescription( atd.getSuperiorOid() ) )
         {
-            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
+            MutableAttributeTypeImpl superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
             return getEqualityMatchingRuleNameOrNumericOidTransitive( superior, schema );
         }
 
      * @return the substring matching rule description name or OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getSubstringMatchingRuleNameOrNumericOidTransitive( AttributeType atd, Schema schema )
+    public static String getSubstringMatchingRuleNameOrNumericOidTransitive( MutableAttributeTypeImpl atd, Schema schema )
     {
         if ( atd.getSubstringOid() != null )
         {
 
         if ( atd.getSuperiorOid() != null && schema.hasAttributeTypeDescription( atd.getSubstringOid() ) )
         {
-            AttributeType superior = schema.getAttributeTypeDescription( atd.getSubstringOid() );
+            MutableAttributeTypeImpl superior = schema.getAttributeTypeDescription( atd.getSubstringOid() );
             return getSubstringMatchingRuleNameOrNumericOidTransitive( superior, schema );
         }
 
      * @return the ordering matching rule description name or OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getOrderingMatchingRuleNameOrNumericOidTransitive( AttributeType atd, Schema schema )
+    public static String getOrderingMatchingRuleNameOrNumericOidTransitive( MutableAttributeTypeImpl atd, Schema schema )
     {
         if ( atd.getOrderingOid() != null )
         {
 
         if ( atd.getSuperiorOid() != null && schema.hasAttributeTypeDescription( atd.getSuperiorOid() ) )
         {
-            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
+            MutableAttributeTypeImpl superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
             return getOrderingMatchingRuleNameOrNumericOidTransitive( superior, schema );
         }
 
      * @return the syntax description OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getSyntaxNumericOidTransitive( AttributeType atd, Schema schema )
+    public static String getSyntaxNumericOidTransitive( MutableAttributeTypeImpl atd, Schema schema )
     {
         if ( atd.getSyntaxOid() != null )
         {
 
         if ( atd.getSuperiorOid() != null && schema.hasAttributeTypeDescription( atd.getSuperiorOid() ) )
         {
-            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
+            MutableAttributeTypeImpl superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
             return getSyntaxNumericOidTransitive( superior, schema );
         }
 
      * @return the syntax length of the given or the
      *         superior attribute type description, may be null
      */
-    public static long getSyntaxLengthTransitive( AttributeType atd, Schema schema )
+    public static long getSyntaxLengthTransitive( MutableAttributeTypeImpl atd, Schema schema )
     {
         if ( atd.getSyntaxLength() != 0 )
         {
 
         if ( atd.getSuperiorOid() != null && schema.hasAttributeTypeDescription( atd.getSuperiorOid() ) )
         {
-            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
+            MutableAttributeTypeImpl superior = schema.getAttributeTypeDescription( atd.getSuperiorOid() );
             return getSyntaxLengthTransitive( superior, schema );
         }
 
      *         description applies to according to the schema's matching 
      *         rule use descriptions
      */
-    public static Collection<String> getOtherMatchingRuleDescriptionNames( AttributeType atd, Schema schema )
+    public static Collection<String> getOtherMatchingRuleDescriptionNames( MutableAttributeTypeImpl atd, Schema schema )
     {
         Set<String> otherMatchingRules = new TreeSet<String>( nameAndOidComparator );
         for ( MatchingRuleUse mrud : schema.getMatchingRuleUseDescriptions() )
      * @return all attribute type descriptions using this attribute type
      *         description as superior
      */
-    public static Collection<AttributeType> getDerivedAttributeTypeDescriptions(
-        AttributeType atd, Schema schema )
+    public static Collection<MutableAttributeTypeImpl> getDerivedAttributeTypeDescriptions(
+        MutableAttributeTypeImpl atd, Schema schema )
     {
-        Set<AttributeType> derivedAtds = new TreeSet<AttributeType>( schemaElementNameComparator );
-        for ( AttributeType derivedAtd : schema.getAttributeTypeDescriptions() )
+        Set<MutableAttributeTypeImpl> derivedAtds = new TreeSet<MutableAttributeTypeImpl>( schemaElementNameComparator );
+        for ( MutableAttributeTypeImpl derivedAtd : schema.getAttributeTypeDescriptions() )
         {
             String superType = derivedAtd.getSuperiorOid();
             if ( superType != null && getLowerCaseIdentifiers( atd ).contains( superType.toLowerCase() ) )
      * @return all object class description using the given attribute type
      *         description as must attribute
      */
-    public static Collection<ObjectClass> getUsedAsMust( AttributeType atd, Schema schema )
+    public static Collection<ObjectClass> getUsedAsMust( MutableAttributeTypeImpl atd, Schema schema )
     {
         Collection<String> lowerCaseIdentifiers = getLowerCaseIdentifiers( atd );
         Set<ObjectClass> ocds = new TreeSet<ObjectClass>( schemaElementNameComparator );
      * @return all object class description using the given attribute type
      *         description as may attribute
      */
-    public static Collection<ObjectClass> getUsedAsMay( AttributeType atd, Schema schema )
+    public static Collection<ObjectClass> getUsedAsMay( MutableAttributeTypeImpl atd, Schema schema )
     {
         Collection<String> lowerCaseIdentifiers = getLowerCaseIdentifiers( atd );
         Set<ObjectClass> ocds = new TreeSet<ObjectClass>( schemaElementNameComparator );
             }
 
             // check must-attributes
-            Collection<AttributeType> mustAtds = getMustAttributeTypeDescriptions( entry );
-            for ( AttributeType mustAtd : mustAtds )
+            Collection<MutableAttributeTypeImpl> mustAtds = getMustAttributeTypeDescriptions( entry );
+            for ( MutableAttributeTypeImpl mustAtd : mustAtds )
             {
                 AttributeHierarchy ah = entry.getAttributeWithSubtypes( mustAtd.getOid() );
                 if ( ah == null )
             }
 
             // check unallowed attributes
-            Collection<AttributeType> allAtds = getAllAttributeTypeDescriptions( entry );
+            Collection<MutableAttributeTypeImpl> allAtds = getAllAttributeTypeDescriptions( entry );
             for ( IAttribute attribute : entry.getAttributes() )
             {
                 if ( !attribute.isOperationalAttribute() )
                 {
-                    AttributeType atd = attribute.getAttributeTypeDescription();
+                    MutableAttributeTypeImpl atd = attribute.getAttributeTypeDescription();
                     if ( !allAtds.contains( atd ) )
                     {
                         messages.add( NLS.bind( Messages.getString( "SchemaUtils.AttributeNotAllowed" ), attribute //$NON-NLS-1$

File plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java

View file
 import org.apache.directory.shared.ldap.model.name.Ava;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
         {
             // get attribute type schema information
             Schema schema = oldEntry.getBrowserConnection().getSchema();
-            AttributeType atd = schema.getAttributeTypeDescription( attributeDescription );
+            MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( attributeDescription );
             boolean hasEMR = SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( atd, schema ) != null;
             boolean isReplaceForced = ( hasEMR && modifyMode == ModifyMode.REPLACE )
                 || ( !hasEMR && modifyModeNoEMR == ModifyMode.REPLACE );

File plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenSchemaBrowserAction.java

View file
 package org.apache.directory.studio.ldapbrowser.ui.actions;
 
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 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;
         if ( getConnection() != null )
         {
             Schema schema = getConnection().getSchema();
-            AttributeType atd = getAtd();
+            MutableAttributeTypeImpl atd = getAtd();
 
             if ( atd != null && SchemaUtils.getSyntaxNumericOidTransitive( atd, schema ) != null
                 && schema.hasLdapSyntaxDescription( SchemaUtils.getSyntaxNumericOidTransitive( atd, schema ) ) )
      * @return
      *      the Attribute Type Description
      */
-    private AttributeType getAtd()
+    private MutableAttributeTypeImpl getAtd()
     {
         if ( ( getSelectedValues().length + getSelectedAttributes().length ) + getSelectedAttributeHierarchies().length == 1 )
         {
-            AttributeType atd = null;
+            MutableAttributeTypeImpl atd = null;
             if ( getSelectedValues().length == 1 )
             {
                 atd = getSelectedValues()[0].getAttribute().getAttributeTypeDescription();
         if ( getConnection() != null )
         {
             Schema schema = getConnection().getSchema();
-            AttributeType atd = getAtd();
+            MutableAttributeTypeImpl atd = getAtd();
             if ( atd != null
                 && SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( atd, schema ) != null
                 && schema.hasLdapSyntaxDescription( SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( atd,
         if ( getConnection() != null )
         {
             Schema schema = getConnection().getSchema();
-            AttributeType atd = getAtd();
+            MutableAttributeTypeImpl atd = getAtd();
             if ( atd != null
                 && SchemaUtils.getSubstringMatchingRuleNameOrNumericOidTransitive( atd, schema ) != null
                 && schema.hasLdapSyntaxDescription( SchemaUtils.getSubstringMatchingRuleNameOrNumericOidTransitive(
         if ( getConnection() != null )
         {
             Schema schema = getConnection().getSchema();
-            AttributeType atd = getAtd();
+            MutableAttributeTypeImpl atd = getAtd();
             if ( atd != null
                 && SchemaUtils.getOrderingMatchingRuleNameOrNumericOidTransitive( atd, schema ) != null
                 && schema.hasLdapSyntaxDescription( SchemaUtils.getOrderingMatchingRuleNameOrNumericOidTransitive( atd,

File plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/AttributePropertyPage.java

View file
 package org.apache.directory.studio.ldapbrowser.ui.dialogs.properties;
 
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 
             if ( schema.hasAttributeTypeDescription( attribute.getDescription() ) )
             {
-                AttributeType atd = schema.getAttributeTypeDescription( attribute.getDescription() );
+                MutableAttributeTypeImpl atd = schema.getAttributeTypeDescription( attribute.getDescription() );
 
                 atdOidText.setText( atd.getOid() );
                 String atdNames = atd.getNames().toString();

File plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java

View file
 
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
+import org.apache.directory.shared.ldap.model.schema.MutableAttributeTypeImpl;
 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;
      */
     public void setInput( Object input )
     {
-        AttributeType atd = null;
-        if ( input instanceof AttributeType )
+        MutableAttributeTypeImpl atd = null;
+        if ( input instanceof MutableAttributeTypeImpl )
         {
-            atd = ( AttributeType ) input;
+            atd = ( MutableAttributeTypeImpl ) input;
         }
 
         // create main content
      *
      * @param atd the attribute type description
      */
-    private void createMainContent( AttributeType atd )
+    private void createMainContent( MutableAttributeTypeImpl atd )
     {
         // dispose old content
         if ( mainSection.getClient() != null )
      *
      * @param atd the attribute type description
      */
-    private void createOtherMatchContent( AttributeType atd )
+    private void createOtherMatchContent( MutableAttributeTypeImpl atd )
     {
         // dispose old content
         if ( otherMatchSection.getClient() != null )
      *
      * @param atd the attribute type description
      */
-    private void createSupertypeContent( AttributeType atd )
+    private void createSupertypeContent( MutableAttributeTypeImpl atd )
     {
         // dispose old content
         if ( supertypeSection.getClient() != null )
                     .getString( "AttributeTypeDescriptionDetailsPage.SupertypeCount" ), new Object[] { 1 } ) ); //$NON-NLS-1$
                 if ( getSchema().hasAttributeTypeDescription( superType ) )
                 {
-                    AttributeType supAtd = getSchema().getAttributeTypeDescription( superType );
+                    MutableAttributeTypeImpl supAtd = getSchema().getAttributeTypeDescription( superType );
                     Hyperlink superLink = toolkit.createHyperlink( superClient, SchemaUtils.toString( supAtd ),
                         SWT.WRAP );
                     superLink.setHref( supAtd );
      *
      * @param atd the attribute type description
      */
-    private void createSubtypesContent( AttributeType atd )
+    private void createSubtypesContent( MutableAttributeTypeImpl atd )
     {
         // dispose old content
         if ( subtypesSection.getClient() != null )
         // create new content, either links to subtypes or a dash if no subtypes exist.
         if ( atd != null )
         {
-            Collection<AttributeType> derivedAtds = SchemaUtils.getDerivedAttributeTypeDescriptions( atd,
+            Collection<MutableAttributeTypeImpl> derivedAtds = SchemaUtils.getDerivedAttributeTypeDescriptions( atd,
                 getSchema() );
             if ( derivedAtds != null && derivedAtds.size() > 0 )
             {
                     .setText( NLS
                         .bind(
                             Messages.getString( "AttributeTypeDescriptionDetailsPage.SubtypesCount" ), new Object[] { derivedAtds.size() } ) ); //$NON-NLS-1$
-                for ( AttributeType derivedAtd : derivedAtds )
+                for ( MutableAttributeTypeImpl derivedAtd : derivedAtds )
                 {
                     Hyperlink subAttributeTypeLink = toolkit.createHyperlink( subClient, SchemaUtils
                         .toString( derivedAtd ), SWT.WRAP );
      *
      * @param atd the attribute type description
      */
-    private void createUsedAsMustContent( AttributeType atd )
+    private void createUsedAsMustContent( MutableAttributeTypeImpl atd )
     {
         // dispose old content
         if ( usedAsMustSection.getClient() != null )
      *
      * @param atd the attribute type description
      */
-    private void createUsedAsMayContent( AttributeType atd )
+    private void createUsedAsMayContent( MutableAttributeTypeImpl atd )
     {
         // dispose old content
         if ( usedAsMaySection.getClient() != null )

File plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java

View file