directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r754547 - in /directory/studio/trunk: ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/ ldapbrowser-core/sr...
Date Sat, 14 Mar 2009 23:16:49 GMT
Author: seelmann
Date: Sat Mar 14 23:16:47 2009
New Revision: 754547

URL: http://svn.apache.org/viewvc?rev=754547&view=rev
Log:
Use constants from shared-constants

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java
Sat Mar 14 23:16:47 2009
@@ -30,12 +30,12 @@
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilter;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterExtensibleComponent;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterItemComponent;
@@ -350,7 +350,7 @@
                 }
 
                 // case A3: editing objectClass attribute: show matching object classes
-                if ( attributeType != null && IAttribute.OBJECTCLASS_ATTRIBUTE.equalsIgnoreCase(
attributeType ) )
+                if ( attributeType != null && SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase(
attributeType ) )
                 {
                     if ( ( fc.getValueToken() != null && fc.getValueToken().getOffset()
<= offset || fc
                         .getFilterToken() != null )

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java
Sat Mar 14 23:16:47 2009
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldapbrowser.common.filtereditor;
 
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilter;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterExtensibleComponent;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterItemComponent;
@@ -101,7 +101,7 @@
                     return ldifLine;
                 }
                 if ( fc.getAttributeToken() != null
-                    && IAttribute.OBJECTCLASS_ATTRIBUTE.equalsIgnoreCase( fc.getAttributeToken().getValue()
)
+                    && SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( fc.getAttributeToken().getValue()
)
                     && fc.getValueToken() != null && fc.getValueToken().getOffset()
<= hoverRegion.getOffset()
                     && hoverRegion.getOffset() <= fc.getValueToken().getOffset()
+ fc.getValueToken().getLength() )
                 {

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
Sat Mar 14 23:16:47 2009
@@ -26,6 +26,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
@@ -224,7 +225,7 @@
             availableObjectClasses.addAll( wizard.getSelectedConnection().getSchema().getObjectClassDescriptions()
);
 
             DummyEntry newEntry = wizard.getPrototypeEntry();
-            IAttribute ocAttribute = newEntry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE
);
+            IAttribute ocAttribute = newEntry.getAttribute( SchemaConstants.OBJECT_CLASS_AT
);
             if ( ocAttribute != null )
             {
                 for ( IValue ocValue : ocAttribute.getValues() )
@@ -257,10 +258,10 @@
             EventRegistry.suspendEventFireingInCurrentThread();
 
             // set new objectClass values
-            IAttribute ocAttribute = newEntry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE
);
+            IAttribute ocAttribute = newEntry.getAttribute( SchemaConstants.OBJECT_CLASS_AT
);
             if ( ocAttribute == null )
             {
-                ocAttribute = new Attribute( newEntry, IAttribute.OBJECTCLASS_ATTRIBUTE );
+                ocAttribute = new Attribute( newEntry, SchemaConstants.OBJECT_CLASS_AT );
                 newEntry.addAttribute( ocAttribute );
             }
             IValue[] values = ocAttribute.getValues();

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
Sat Mar 14 23:16:47 2009
@@ -38,6 +38,7 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -49,7 +50,6 @@
 import org.apache.directory.studio.ldapbrowser.core.events.ChildrenInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.jobs.EntryExistsCopyStrategyDialog.EntryExistsCopyStrategy;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
@@ -210,7 +210,7 @@
         SearchControls searchControls = new SearchControls();
         searchControls.setCountLimit( 1 );
         searchControls.setReturningAttributes( new String[]
-            { ISearch.ALL_USER_ATTRIBUTES, IAttribute.REFERRAL_ATTRIBUTE } );
+            { ISearch.ALL_USER_ATTRIBUTES, SchemaConstants.REF_AT } );
         searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
         Control[] controls = null;
         NamingEnumeration<SearchResult> result = entryToCopy.getBrowserConnection().getConnection()
@@ -373,7 +373,7 @@
                         SearchControls searchControls = new SearchControls();
                         searchControls.setCountLimit( 0 );
                         searchControls.setReturningAttributes( new String[]
-                            { ISearch.ALL_USER_ATTRIBUTES, IAttribute.REFERRAL_ATTRIBUTE
} );
+                            { ISearch.ALL_USER_ATTRIBUTES, SchemaConstants.REF_AT } );
                         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
                         NamingEnumeration<SearchResult> childEntries = sourceBrowserConnection.getConnection()
                             .getJNDIConnectionWrapper().search( oldLdapDn.getUpName(), ISearch.FILTER_TRUE,

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
Sat Mar 14 23:16:47 2009
@@ -27,6 +27,7 @@
 import java.util.LinkedHashSet;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -186,7 +187,7 @@
         }
         if ( entry.isReferral() )
         {
-            raSet.add( IAttribute.REFERRAL_ATTRIBUTE );
+            raSet.add( SchemaConstants.REF_AT );
         }
         returningAttributes = ( String[] ) raSet.toArray( new String[raSet.size()] );
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java
Sat Mar 14 23:16:47 2009
@@ -25,6 +25,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.SearchResult;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
@@ -32,7 +33,6 @@
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.BrowserConnectionUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
@@ -168,10 +168,10 @@
                 sp.setFilter( Schema.SCHEMA_FILTER );
                 sp.setScope( SearchScope.OBJECT );
                 sp.setReturningAttributes( new String[]
-                    { Schema.SCHEMA_ATTRIBUTE_OBJECTCLASSES, Schema.SCHEMA_ATTRIBUTE_ATTRIBUTETYPES,
-                        Schema.SCHEMA_ATTRIBUTE_LDAPSYNTAXES, Schema.SCHEMA_ATTRIBUTE_MATCHINGRULES,
-                        Schema.SCHEMA_ATTRIBUTE_MATCHINGRULEUSE, IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
-                        IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP, } );
+                    { SchemaConstants.OBJECT_CLASSES_AT, SchemaConstants.ATTRIBUTE_TYPES_AT,
+                        SchemaConstants.LDAP_SYNTAXES_AT, SchemaConstants.MATCHING_RULES_AT,
+                        SchemaConstants.MATCHING_RULE_USE_AT, SchemaConstants.CREATE_TIMESTAMP_AT,
+                        SchemaConstants.MODIFY_TIMESTAMP_AT } );
 
                 LdifEnumeration le = ExportLdifJob.search( browserConnection, sp, monitor
);
                 if ( le.hasNext() )
@@ -212,10 +212,8 @@
             sp.setSearchBase( schemaLocation );
             sp.setFilter( Schema.SCHEMA_FILTER );
             sp.setScope( SearchScope.OBJECT );
-            sp
-                .setReturningAttributes( new String[]
-                    { IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
-                        IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP } );
+            sp.setReturningAttributes( new String[]
+                { SchemaConstants.CREATE_TIMESTAMP_AT, SchemaConstants.MODIFY_TIMESTAMP_AT
} );
             NamingEnumeration<SearchResult> enumeration = SearchRunnable.search( browserConnection,
sp, monitor );
             while ( enumeration != null && enumeration.hasMore() )
             {
@@ -227,11 +225,11 @@
                 while ( attributes.hasMore() )
                 {
                     Attribute attribute = attributes.next();
-                    if ( attribute.getID().equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP
) )
+                    if ( attribute.getID().equalsIgnoreCase( SchemaConstants.MODIFY_TIMESTAMP_AT
) )
                     {
                         modifyTimestamp = ( String ) attribute.get();
                     }
-                    if ( attribute.getID().equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP
) )
+                    if ( attribute.getID().equalsIgnoreCase( SchemaConstants.CREATE_TIMESTAMP_AT
) )
                     {
                         createTimestamp = ( String ) attribute.get();
                     }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
Sat Mar 14 23:16:47 2009
@@ -491,36 +491,36 @@
         if ( search.isInitHasChildrenFlag() )
         {
             if ( search.getBrowserConnection().getSchema().hasAttributeTypeDescription(
-                IAttribute.OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES )
+                SchemaConstants.HAS_SUBORDINATES_AT )
                 && !Utils.containsIgnoreCase( Arrays.asList( searchParameter.getReturningAttributes()
),
-                    IAttribute.OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES ) )
+                    SchemaConstants.HAS_SUBORDINATES_AT ) )
             {
                 String[] returningAttributes = new String[searchParameter.getReturningAttributes().length
+ 1];
                 System.arraycopy( searchParameter.getReturningAttributes(), 0, returningAttributes,
0, searchParameter
                     .getReturningAttributes().length );
-                returningAttributes[returningAttributes.length - 1] = IAttribute.OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES;
+                returningAttributes[returningAttributes.length - 1] = SchemaConstants.HAS_SUBORDINATES_AT;
                 searchParameter.setReturningAttributes( returningAttributes );
             }
             else if ( search.getBrowserConnection().getSchema().hasAttributeTypeDescription(
-                IAttribute.OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES )
+                SchemaConstants.NUM_SUBORDINATES_AT )
                 && !Utils.containsIgnoreCase( Arrays.asList( searchParameter.getReturningAttributes()
),
-                    IAttribute.OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES ) )
+                    SchemaConstants.NUM_SUBORDINATES_AT ) )
             {
                 String[] returningAttributes = new String[searchParameter.getReturningAttributes().length
+ 1];
                 System.arraycopy( searchParameter.getReturningAttributes(), 0, returningAttributes,
0, searchParameter
                     .getReturningAttributes().length );
-                returningAttributes[returningAttributes.length - 1] = IAttribute.OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES;
+                returningAttributes[returningAttributes.length - 1] = SchemaConstants.NUM_SUBORDINATES_AT;
                 searchParameter.setReturningAttributes( returningAttributes );
             }
             else if ( search.getBrowserConnection().getSchema().hasAttributeTypeDescription(
-                IAttribute.OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT )
+                SchemaConstants.SUBORDINATE_COUNT_AT )
                 && !Utils.containsIgnoreCase( Arrays.asList( searchParameter.getReturningAttributes()
),
-                    IAttribute.OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT ) )
+                    SchemaConstants.SUBORDINATE_COUNT_AT ) )
             {
                 String[] returningAttributes = new String[searchParameter.getReturningAttributes().length
+ 1];
                 System.arraycopy( searchParameter.getReturningAttributes(), 0, returningAttributes,
0, searchParameter
                     .getReturningAttributes().length );
-                returningAttributes[returningAttributes.length - 1] = IAttribute.OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT;
+                returningAttributes[returningAttributes.length - 1] = SchemaConstants.SUBORDINATE_COUNT_AT;
                 searchParameter.setReturningAttributes( returningAttributes );
             }
         }
@@ -530,14 +530,14 @@
         // - to determine the entry's icon
         // - to determine must and may attributes
         if ( !Utils.containsIgnoreCase( Arrays.asList( searchParameter.getReturningAttributes()
),
-            IAttribute.OBJECTCLASS_ATTRIBUTE )
+            SchemaConstants.OBJECT_CLASS_AT )
             && !Utils.containsIgnoreCase( Arrays.asList( searchParameter.getReturningAttributes()
),
                 ISearch.ALL_USER_ATTRIBUTES ) )
         {
             String[] returningAttributes = new String[searchParameter.getReturningAttributes().length
+ 1];
             System.arraycopy( searchParameter.getReturningAttributes(), 0, returningAttributes,
0, searchParameter
                 .getReturningAttributes().length );
-            returningAttributes[returningAttributes.length - 1] = IAttribute.OBJECTCLASS_ATTRIBUTE;
+            returningAttributes[returningAttributes.length - 1] = SchemaConstants.OBJECT_CLASS_AT;
             searchParameter.setReturningAttributes( returningAttributes );
         }
 
@@ -685,19 +685,19 @@
                     if ( searchParameter.isInitHasChildrenFlag() )
                     {
                         // hasChildren flag
-                        if ( IAttribute.OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES.equalsIgnoreCase(
attributeDescription ) )
+                        if ( SchemaConstants.HAS_SUBORDINATES_AT.equalsIgnoreCase( attributeDescription
) )
                         {
                             if ( "FALSE".equalsIgnoreCase( value ) ) { //$NON-NLS-1$
                                 entry.setHasChildrenHint( false );
                             }
                         }
-                        if ( IAttribute.OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES.equalsIgnoreCase(
attributeDescription ) )
+                        if ( SchemaConstants.NUM_SUBORDINATES_AT.equalsIgnoreCase( attributeDescription
) )
                         {
                             if ( "0".equalsIgnoreCase( value ) ) { //$NON-NLS-1$
                                 entry.setHasChildrenHint( false );
                             }
                         }
-                        if ( IAttribute.OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT.equalsIgnoreCase(
attributeDescription ) )
+                        if ( SchemaConstants.SUBORDINATE_COUNT_AT.equalsIgnoreCase( attributeDescription
) )
                         {
                             if ( "0".equalsIgnoreCase( value ) ) { //$NON-NLS-1$
                                 entry.setHasChildrenHint( false );
@@ -705,7 +705,7 @@
                         }
                     }
 
-                    if ( IAttribute.OBJECTCLASS_ATTRIBUTE.equalsIgnoreCase( attributeDescription
) )
+                    if ( SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( attributeDescription
) )
                     {
                         if ( SchemaConstants.ALIAS_OC.equalsIgnoreCase( value ) )
                         {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
Sat Mar 14 23:16:47 2009
@@ -37,113 +37,6 @@
     ConnectionPropertyPageProvider
 {
 
-    /**
-     * ( 2.5.18.3 NAME 'creatorsName' EQUALITY distinguishedNameMatch SYNTAX
-     * 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE NO-USER-MODIFICATION USAGE
-     * directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_CREATORS_NAME = "creatorsName"; //$NON-NLS-1$
-
-    /**
-     * ( 2.5.18.1 NAME 'createTimestamp' EQUALITY generalizedTimeMatch
-     * ORDERING generalizedTimeOrderingMatch SYNTAX
-     * 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE NO-USER-MODIFICATION USAGE
-     * directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP = "createTimestamp";
//$NON-NLS-1$
-
-    /**
-     * ( 2.5.18.4 NAME 'modifiersName' EQUALITY distinguishedNameMatch
-     * SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE
-     * NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_MODIFIERS_NAME = "modifiersName"; //$NON-NLS-1$
-
-    /**
-     * ( 2.5.18.2 NAME 'modifyTimestamp' EQUALITY generalizedTimeMatch
-     * ORDERING generalizedTimeOrderingMatch SYNTAX
-     * 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE NO-USER-MODIFICATION USAGE
-     * directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP = "modifyTimestamp";
//$NON-NLS-1$
-
-    /**
-     * ( 2.5.21.9 NAME 'structuralObjectClass' EQUALITY
-     * objectIdentifierMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.38
-     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_STRUCTURAL_OBJECT_CLASS = "structuralObjectClass";
//$NON-NLS-1$
-
-    /**
-     * ( 2.5.21.10 NAME 'governingStructureRule' EQUALITY integerMatch
-     * SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE
-     * NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_GOVERNING_STRUCTURE_RULE = "governingStructureRule";
//$NON-NLS-1$
-
-    /**
-     * ( 1.3.6.1.1.16.4 NAME 'entryUUID' DESC 'UUID of the entry' EQUALITY
-     * uuidMatch ORDERING uuidOrderingMatch SYNTAX 1.3.6.1.1.16.1
-     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_ENTRY_UUID = "entryUUID"; //$NON-NLS-1$
-
-    /**
-     * ( 2.5.18.10 NAME 'subschemaSubentry' EQUALITY distinguishedNameMatch
-     * SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE
-     * NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_SUBSCHEMA_SUBENTRY = "subschemaSubentry";
//$NON-NLS-1$
-
-    /**
-     * ( 2.5.18.9 NAME 'hasSubordinates' DESC 'X.501: entry has children'
-     * EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
-     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES = "hasSubordinates";
//$NON-NLS-1$
-
-    /**
-     * ( 1.3.1.1.4.1.453.16.2.103 NAME 'numSubordinates' DESC 'count of
-     * immediate subordinates' EQUALITY integerMatch ORDERING
-     * integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN
-     * 'numSubordinates Internet Draft' )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES = "numSubordinates";
//$NON-NLS-1$
-
-    /**
-     * ( 2.16.840.1.113719.1.27.4.49 NAME 'subordinateCount' DESC
-     * 'Operational Attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT = "subordinateCount";
//$NON-NLS-1$
-
-    /**
-     * ( 1.3.6.1.1.4 NAME 'vendorName' EQUALITY caseExactIA5Match SYNTAX
-     * 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE
-     * dSAOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_VENDOR_NAME = "vendorName"; //$NON-NLS-1$
-
-    /**
-     * ( 1.3.6.1.1.5 NAME 'vendorVersion' EQUALITY caseExactIA5Match SYNTAX
-     * 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE
-     * dSAOperation )
-     */
-    public static final String OPERATIONAL_ATTRIBUTE_VENDOR_VERSION = "vendorVersion"; //$NON-NLS-1$
-
-    /** The attribute type objectClass */
-    public static final String OBJECTCLASS_ATTRIBUTE = "objectClass"; //$NON-NLS-1$
-
-    /** The OID of the objectClass attribute, 2.5.4.0 */
-    public static final String OBJECTCLASS_ATTRIBUTE_OID = "2.5.4.0"; //$NON-NLS-1$
-
-    /** The attribute type ref */
-    public static final String REFERRAL_ATTRIBUTE = "ref"; //$NON-NLS-1$
-
-    /** The attribute type aliasedObjectName */
-    public static final String ALIAS_ATTRIBUTE = "aliasedObjectName"; //$NON-NLS-1$
-
     /** The options delimiter ';' */
     public static final String OPTION_DELIMITER = ";"; //$NON-NLS-1$
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java
Sat Mar 14 23:16:47 2009
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -166,7 +167,7 @@
      */
     public boolean isObjectClassAttribute()
     {
-        return OBJECTCLASS_ATTRIBUTE.equalsIgnoreCase( getDescription() );
+        return SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( getDescription() );
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
Sat Mar 14 23:16:47 2009
@@ -38,17 +38,16 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescriptionSchemaParser;
+import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
 import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescriptionSchemaParser;
+import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescriptionSchemaParser;
+import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
+import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescriptionSchemaParser;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldifparser.LdifFormatParameters;
 import org.apache.directory.studio.ldifparser.model.LdifEnumeration;
 import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
@@ -68,16 +67,6 @@
 
     public static final String SCHEMA_FILTER = "(objectClass=subschema)";
 
-    public static final String SCHEMA_ATTRIBUTE_OBJECTCLASSES = "objectClasses";
-
-    public static final String SCHEMA_ATTRIBUTE_ATTRIBUTETYPES = "attributeTypes";
-
-    public static final String SCHEMA_ATTRIBUTE_LDAPSYNTAXES = "ldapSyntaxes";
-
-    public static final String SCHEMA_ATTRIBUTE_MATCHINGRULES = "matchingRules";
-
-    public static final String SCHEMA_ATTRIBUTE_MATCHINGRULEUSE = "matchingRuleUse";
-
     public static final String RAW_SCHEMA_DEFINITION_LDIF_VALUE = "RAW_SCHEMA_DEFINITION_LDIF_VALUE";
 
     public static final String DN_SYNTAX_OID = "1.3.6.1.4.1.1466.115.121.1.12";
@@ -257,7 +246,7 @@
 
             try
             {
-                if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_OBJECTCLASSES
) )
+                if ( attributeName.equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT )
)
                 {
                     ObjectClassDescriptionSchemaParser parser = new ObjectClassDescriptionSchemaParser();
                     parser.setQuirksMode( true );
@@ -265,7 +254,7 @@
                     ocd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addObjectClassDescription( ocd );
                 }
-                else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_ATTRIBUTETYPES
) )
+                else if ( attributeName.equalsIgnoreCase( SchemaConstants.ATTRIBUTE_TYPES_AT
) )
                 {
                     AttributeTypeDescriptionSchemaParser parser = new AttributeTypeDescriptionSchemaParser();
                     parser.setQuirksMode( true );
@@ -273,7 +262,7 @@
                     atd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addAttributeTypeDescription( atd );
                 }
-                else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_LDAPSYNTAXES
) )
+                else if ( attributeName.equalsIgnoreCase( SchemaConstants.LDAP_SYNTAXES_AT
) )
                 {
                     LdapSyntaxDescriptionSchemaParser parser = new LdapSyntaxDescriptionSchemaParser();
                     parser.setQuirksMode( true );
@@ -281,7 +270,7 @@
                     lsd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addLdapSyntaxDescription( lsd );
                 }
-                else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULES
) )
+                else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT
) )
                 {
                     MatchingRuleDescriptionSchemaParser parser = new MatchingRuleDescriptionSchemaParser();
                     parser.setQuirksMode( true );
@@ -289,7 +278,7 @@
                     mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addMatchingRuleDescription( mrd );
                 }
-                else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULEUSE
) )
+                else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULE_USE_AT
) )
                 {
                     MatchingRuleUseDescriptionSchemaParser parser = new MatchingRuleUseDescriptionSchemaParser();
                     parser.setQuirksMode( true );
@@ -297,11 +286,11 @@
                     mrud.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                     addMatchingRuleUseDescription( mrud );
                 }
-                else if ( attributeName.equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP
) )
+                else if ( attributeName.equalsIgnoreCase(  SchemaConstants.CREATE_TIMESTAMP_AT
) )
                 {
                     setCreateTimestamp( value );
                 }
-                else if ( attributeName.equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP
) )
+                else if ( attributeName.equalsIgnoreCase(  SchemaConstants.MODIFY_TIMESTAMP_AT
) )
                 {
                     setModifyTimestamp( value );
                 }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
Sat Mar 14 23:16:47 2009
@@ -103,8 +103,50 @@
         OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT_OID.toLowerCase()
);
         OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.NUM_SUBORDINATES_AT.toLowerCase()
);
         OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBORDINATE_COUNT_AT.toLowerCase()
);
-    }
 
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT_OID.toLowerCase()
);
+    }
+
+    /** The well-known non-modifiable attributes */
+    public static final Set<String> NON_MODIFIABLE_ATTRIBUTE_OIDS_AND_NAMES = new HashSet<String>();
+    static
+    {
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATE_TIMESTAMP_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATE_TIMESTAMP_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATORS_NAME_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.CREATORS_NAME_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFY_TIMESTAMP_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFY_TIMESTAMP_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFIERS_NAME_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.MODIFIERS_NAME_AT_OID.toLowerCase()
);
+        
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBSCHEMA_SUBENTRY_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBSCHEMA_SUBENTRY_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.STRUCTURAL_OBJECT_CLASS_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.GOVERNING_STRUCTURE_RULE_AT_OID.toLowerCase()
);
+        
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_UUID_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_UUID_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_CSN_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_DN_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.ENTRY_DN_AT_OID.toLowerCase()
);
+        
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.HAS_SUBORDINATES_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.NUM_SUBORDINATES_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.SUBORDINATE_COUNT_AT.toLowerCase()
);
+        
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_NAME_AT_OID.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT.toLowerCase()
);
+        OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES.add( SchemaConstants.VENDOR_VERSION_AT_OID.toLowerCase()
);
+    }
+    
     private static final Comparator<String> nameAndOidComparator = new Comparator<String>()
     {
         public int compare( String s1, String s2 )
@@ -286,33 +328,9 @@
         // Check some default no-user-modification attributes
         // e.g. Siemens DirX doesn't provide a good schema.
         // TODO: make default no-user-modification attributes configurable
-        String[] nonModifiableAttributes = new String[]
-            { IAttribute.OPERATIONAL_ATTRIBUTE_CREATORS_NAME, IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
-                IAttribute.OPERATIONAL_ATTRIBUTE_MODIFIERS_NAME, IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP,
-                IAttribute.OPERATIONAL_ATTRIBUTE_STRUCTURAL_OBJECT_CLASS,
-                IAttribute.OPERATIONAL_ATTRIBUTE_GOVERNING_STRUCTURE_RULE,
-
-                IAttribute.OPERATIONAL_ATTRIBUTE_SUBSCHEMA_SUBENTRY, IAttribute.OPERATIONAL_ATTRIBUTE_VENDOR_NAME,
-                IAttribute.OPERATIONAL_ATTRIBUTE_VENDOR_VERSION,
-
-                IAttribute.OPERATIONAL_ATTRIBUTE_ENTRY_UUID, IAttribute.OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES,
-                IAttribute.OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT, IAttribute.OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES
-
-            };
-        for ( int i = 0; i < nonModifiableAttributes.length; i++ )
+        if ( CollectionUtils.containsAny( NON_MODIFIABLE_ATTRIBUTE_OIDS_AND_NAMES, getLowerCaseIdentifiers(
atd ) ) )
         {
-            String att = nonModifiableAttributes[i];
-            if ( att.equalsIgnoreCase( atd.getNumericOid() ) )
-            {
-                return false;
-            }
-            for ( String name : atd.getNames() )
-            {
-                if ( att.equalsIgnoreCase( name ) )
-                {
-                    return false;
-                }
-            }
+            return false;
         }
 
         return true;
@@ -897,7 +915,7 @@
         if ( entry != null )
         {
             // check objectClass attribute
-            IAttribute ocAttribute = entry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE
);
+            IAttribute ocAttribute = entry.getAttribute( SchemaConstants.OBJECT_CLASS_AT
);
             if ( ocAttribute == null )
             {
                 messages.add( Messages.getString( "SchemaUtils.NoObjectClass" ) ); //$NON-NLS-1$

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
Sat Mar 14 23:16:47 2009
@@ -27,9 +27,9 @@
 import java.util.Set;
 import java.util.TreeSet;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 
@@ -64,9 +64,9 @@
      */
     public Subschema( IEntry entry )
     {
-        if ( entry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE ) != null )
+        if ( entry.getAttribute( SchemaConstants.OBJECT_CLASS_AT ) != null )
         {
-            this.objectClassNames = entry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE
).getStringValues();
+            this.objectClassNames = entry.getAttribute( SchemaConstants.OBJECT_CLASS_AT ).getStringValues();
         }
         else
         {

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java?rev=754547&r1=754546&r2=754547&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
Sat Mar 14 23:16:47 2009
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.ui.dialogs.properties;
 
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.studio.connection.ui.RunnableContextRunner;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable;
@@ -327,14 +328,10 @@
 
             dnText.setText( entry.getDn().getUpName() );
             urlText.setText( entry.getUrl().toString() );
-            ctText.setText( getNonNullStringValue( entry
-                .getAttribute( IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP ) ) );
-            cnText
-                .setText( getNonNullStringValue( entry.getAttribute( IAttribute.OPERATIONAL_ATTRIBUTE_CREATORS_NAME
) ) );
-            mtText.setText( getNonNullStringValue( entry
-                .getAttribute( IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP ) ) );
-            mnText
-                .setText( getNonNullStringValue( entry.getAttribute( IAttribute.OPERATIONAL_ATTRIBUTE_MODIFIERS_NAME
) ) );
+            ctText.setText( getNonNullStringValue( entry.getAttribute( SchemaConstants.CREATE_TIMESTAMP_AT
) ) );
+            cnText.setText( getNonNullStringValue( entry.getAttribute( SchemaConstants.CREATORS_NAME_AT
) ) );
+            mtText.setText( getNonNullStringValue( entry.getAttribute( SchemaConstants.MODIFIERS_NAME_AT
) ) );
+            mnText.setText( getNonNullStringValue( entry.getAttribute( SchemaConstants.MODIFIERS_NAME_AT
) ) );
             reloadCmiButton.setText( Messages.getString( "EntryPropertyPage.Refresh" ) );
//$NON-NLS-1$
 
             int attCount = 0;



Mime
View raw message