directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r950993 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/ apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ apacheds/trunk/core-integ/src/ma...
Date Thu, 03 Jun 2010 13:35:01 GMT
Author: seelmann
Date: Thu Jun  3 13:35:00 2010
New Revision: 950993

URL: http://svn.apache.org/viewvc?rev=950993&view=rev
Log:
DIRSHARED-40: RDN.get{Up|Norm}Value() now returns the Value object.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
    directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
Thu Jun  3 13:35:00 2010
@@ -501,7 +501,7 @@ public class SchemaPartitionDaoImpl impl
             throw new NamingException( I18n.err( I18n.ERR_434, dn.getNormName(), CN_OID,
rdn.getNormType() ) );
         }
 
-        return ( String ) rdn.getNormValue();
+        return rdn.getNormValue().getString();
     }
 
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -158,7 +158,7 @@ public abstract class AbstractRegistrySy
         }
         
         RDN rdn = dn.getRdn( 1 );
-        return ( String ) rdn.getNormValue();
+        return rdn.getNormValue().getString();
     }
 
 
@@ -211,7 +211,7 @@ public abstract class AbstractRegistrySy
                 I18n.err( I18n.ERR_338, objectType ) );
         }
         
-        if ( ! ( ( String ) rdn.getNormValue() ).equalsIgnoreCase( OBJECT_TYPE_TO_PATH.get(
objectType ) ) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( OBJECT_TYPE_TO_PATH.get( objectType
) ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, 
                 I18n.err( I18n.ERR_339, objectType,  OBJECT_TYPE_TO_PATH.get( objectType
) ) );
@@ -345,7 +345,7 @@ public abstract class AbstractRegistrySy
         {
             DN dn = result.getDn();
             dn.normalize( schemaManager.getNormalizerMapping() );
-            oids.add( ( String ) dn.getRdn().getNormValue() );
+            oids.add( dn.getRdn().getNormValue().getString() );
         }
         
         return oids;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -201,7 +201,7 @@ public class AttributeTypeSynchronizer e
 
         // Inject the new OID
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         checkOidIsUnique( newOid );
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
@@ -244,7 +244,7 @@ public class AttributeTypeSynchronizer e
         AttributeType oldAt = factory.getAttributeType( schemaManager, entry, schemaManager.getRegistries(),
             oldSchemaName );
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRn.getNormValue();
+        String newOid = newRn.getNormValue().getString();
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         checkOidIsUnique( newOid );
         AttributeType newAt = factory.getAttributeType( schemaManager, targetEntry, schemaManager.getRegistries(),

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -234,7 +234,7 @@ public class ComparatorSynchronizer exte
                 I18n.err( I18n.ERR_353, oldOid ) );
         }
 
-        String oid = ( String ) newRdn.getNormValue();
+        String oid = newRdn.getNormValue().getString();
         checkOidIsUniqueForComparator( oid );
 
         String schemaName = getSchemaName( entry.getDn() );
@@ -243,7 +243,7 @@ public class ComparatorSynchronizer exte
         {
             // Inject the new OID in the entry
             Entry targetEntry = ( Entry ) entry.clone();
-            String newOid = ( String ) newRdn.getNormValue();
+            String newOid = newRdn.getNormValue().getString();
             checkOidIsUnique( newOid );
             targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
@@ -274,7 +274,7 @@ public class ComparatorSynchronizer exte
                 I18n.err( I18n.ERR_353, oldOid ) );
         }
 
-        String oid = ( String ) newRdn.getNormValue();
+        String oid = newRdn.getNormValue().getString();
         checkOidIsUniqueForComparator( oid );
 
         String newSchemaName = getSchemaName( newParentName );
@@ -384,7 +384,7 @@ public class ComparatorSynchronizer exte
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_358 ) );
         }
 
-        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( SchemaConstants.COMPARATORS_AT
) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( SchemaConstants.COMPARATORS_AT
) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_359 ) );
         }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -201,7 +201,7 @@ public class MatchingRuleSynchronizer ex
         String schemaName = getSchemaName( entry.getDn() );
         MatchingRule oldMr = factory.getMatchingRule( schemaManager, entry, schemaManager.getRegistries(),
schemaName );
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         checkOidIsUnique( newOid );
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
@@ -230,7 +230,7 @@ public class MatchingRuleSynchronizer ex
         MatchingRule oldMr = factory.getMatchingRule( schemaManager, entry, schemaManager.getRegistries(),
             oldSchemaName );
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         checkOidIsUnique( newOid );
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
@@ -304,7 +304,7 @@ public class MatchingRuleSynchronizer ex
                 I18n.err( I18n.ERR_362 ) );
         }
 
-        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT
) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT
) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                 I18n.err( I18n.ERR_363 ) );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -210,7 +210,7 @@ public class NormalizerSynchronizer exte
                 I18n.err( I18n.ERR_367, oldOid ) );
         }
 
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         checkOidIsUniqueForNormalizer( newOid );
 
         if ( isSchemaEnabled( schemaName ) )
@@ -247,7 +247,7 @@ public class NormalizerSynchronizer exte
                 I18n.err( I18n.ERR_367, oldOid ) );
         }
 
-        String oid = ( String ) newRdn.getNormValue();
+        String oid = newRdn.getNormValue().getString();
         checkOidIsUniqueForNormalizer( oid );
         Normalizer normalizer = factory.getNormalizer( schemaManager, entry, schemaManager.getRegistries(),
             newSchemaName );
@@ -329,7 +329,7 @@ public class NormalizerSynchronizer exte
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_371 ) );
         }
 
-        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( SchemaConstants.NORMALIZERS_AT
) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( SchemaConstants.NORMALIZERS_AT
) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_372 ) );
         }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -210,7 +210,7 @@ public class ObjectClassSynchronizer ext
         //        }
 
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
         // Inject the new DN
@@ -262,7 +262,7 @@ public class ObjectClassSynchronizer ext
 
         String newSchemaName = getSchemaName( newParentName );
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         checkOidIsUnique( newOid );
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         ObjectClass oc = factory.getObjectClass( schemaManager, targetEntry, schemaManager.getRegistries(),
@@ -346,7 +346,7 @@ public class ObjectClassSynchronizer ext
                 I18n.err( I18n.ERR_376 ) );
         }
 
-        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT
) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT
) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                 I18n.err( I18n.ERR_377 ) );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
Thu Jun  3 13:35:00 2010
@@ -193,7 +193,7 @@ public class RegistrySynchronizerAdaptor
                 throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, msg );
             }
             
-            String ouValue = ( String ) opContext.getDn().getRdn().getNormValue();
+            String ouValue = opContext.getDn().getRdn().getNormValue().getString();
             ouValue = ouValue.trim().toLowerCase();
             
             if ( ! VALID_OU_VALUES.contains( ouValue ) )
@@ -249,7 +249,7 @@ public class RegistrySynchronizerAdaptor
                 throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
I18n.err( I18n.ERR_378 ) );
             }
             
-            String ouValue = ( String ) opContext.getDn().getRdn().getNormValue();
+            String ouValue = opContext.getDn().getRdn().getNormValue().getString();
             ouValue = ouValue.trim().toLowerCase();
             
             if ( ! VALID_OU_VALUES.contains( ouValue ) )

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -473,7 +473,7 @@ public class SchemaSynchronizer implemen
 
     private String getSchemaName( DN schema )
     {
-        return ( String ) schema.getRdn().getNormValue();
+        return schema.getRdn().getNormValue().getString();
     }
 
     

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -231,7 +231,7 @@ public class SyntaxCheckerSynchronizer e
         }
 
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
 
         if ( schemaManager.getSyntaxCheckerRegistry().contains( newOid ) )
         {
@@ -267,7 +267,7 @@ public class SyntaxCheckerSynchronizer e
 
         Entry targetEntry = ( Entry ) entry.clone();
 
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
 
         if ( schemaManager.getSyntaxCheckerRegistry().contains( newOid ) )
         {
@@ -367,7 +367,7 @@ public class SyntaxCheckerSynchronizer e
                 I18n.err( I18n.ERR_397 ) );
         }
 
-        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( SchemaConstants.SYNTAX_CHECKERS_AT
) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( SchemaConstants.SYNTAX_CHECKERS_AT
) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                 I18n.err( I18n.ERR_372 ) );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
Thu Jun  3 13:35:00 2010
@@ -267,7 +267,7 @@ public class SyntaxSynchronizer extends 
         }
 
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRdn.getNormValue();
+        String newOid = newRdn.getNormValue().getString();
         checkOidIsUnique( newOid );
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
@@ -307,7 +307,7 @@ public class SyntaxSynchronizer extends 
         }
 
         Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = ( String ) newRn.getNormValue();
+        String newOid = newRn.getNormValue().getString();
         checkOidIsUnique( newOid );
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
@@ -393,7 +393,7 @@ public class SyntaxSynchronizer extends 
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_403 ) );
         }
 
-        if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( "syntaxes" ) )
+        if ( !rdn.getNormValue().getString().equalsIgnoreCase( "syntaxes" ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_363 ) );
         }

Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
(original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
Thu Jun  3 13:35:00 2010
@@ -280,7 +280,7 @@ public class IntegrationUtils
         attr = new DefaultEntryAttribute( "ou", "Engineering", "People" );
         ldif.addAttribute( attr );
 
-        String uid = ( String ) dn.getRdn().getNormValue();
+        String uid = dn.getRdn().getNormValue().getString();
         ldif.putAttribute( "uid", uid );
 
         ldif.putAttribute( "l", "Bogusville" );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Thu Jun  3 13:35:00 2010
@@ -731,7 +731,7 @@ public abstract class ServerContext impl
         {
             if ( SchemaConstants.CN_AT.equals( rdn.getNormType() ) )
             {
-                serverEntry.put( rdn.getUpType(), ( String ) rdn.getUpValue() );
+                serverEntry.put( rdn.getUpType(), rdn.getUpValue() );
             }
             else
             {
@@ -824,13 +824,13 @@ public abstract class ServerContext impl
 
         if ( rdn.size() == 1 )
         {
-            serverEntry.put( rdn.getUpType(), ( String ) rdn.getNormValue() );
+            serverEntry.put( rdn.getUpType(), rdn.getUpValue() );
         }
         else
         {
             for ( AVA atav : rdn )
             {
-                serverEntry.put( atav.getUpType(), atav.getNormValue().getString() );
+                serverEntry.put( atav.getUpType(), atav.getUpValue() );
             }
         }
     }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
Thu Jun  3 13:35:00 2010
@@ -578,7 +578,7 @@ public abstract class ServerDirContext e
         if ( rdn.size() == 1 )
         {
             String rdnAttribute = rdn.getUpType();
-            String rdnValue = ( String ) rdn.getNormValue();
+            String rdnValue = rdn.getNormValue().getString();
 
             // Add the RDN attribute
             boolean doRdnPut = attributes.get( rdnAttribute ) == null;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
Thu Jun  3 13:35:00 2010
@@ -227,7 +227,7 @@ public class ServerSystemPreferences ext
             while ( list.next() )
             {
                 ClonedServerEntry entry = list.get();
-                children.add( ( String ) entry.getDn().getRdn().getNormValue() );
+                children.add( entry.getDn().getRdn().getNormValue().getString() );
             }
         }
         catch ( Exception e )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Thu Jun  3 13:35:00 2010
@@ -1561,7 +1561,7 @@ public class SchemaInterceptor extends B
         }
 
         RDN rdn = dn.getRdn( 1 );
-        return ( String ) rdn.getNormValue();
+        return rdn.getNormValue().getString();
     }
 
 

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
Thu Jun  3 13:35:00 2010
@@ -129,7 +129,7 @@ public class ClientModifyDnRequestTest e
         assertNotNull( entry );
         
         RDN oldRdn = oldDn.getRdn();
-        assertTrue( entry.contains( oldRdn.getUpType(), ( String ) oldRdn.getNormValue()
) );
+        assertTrue( entry.contains( oldRdn.getUpType(), oldRdn.getNormValue() ) );
     }
     
     

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
(original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
Thu Jun  3 13:35:00 2010
@@ -346,7 +346,7 @@ public class LdifRevertor
             // in the previous modification
             if ( !entry.contains( ava.getNormType(), ava.getNormValue().getString() ) &&
                  !(ava.getNormType().equals( oldRdn.getNormType() ) &&
-                   ava.getNormValue().getString().equals( oldRdn.getNormValue() ) ) )
+                   ava.getNormValue().getString().equals( oldRdn.getNormValue().getString()
) ) )
             {
                 // Create the modification, which is an Remove
                 Modification modification = new DefaultModification( 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
Thu Jun  3 13:35:00 2010
@@ -913,7 +913,7 @@ public class RDN implements Cloneable, C
      * 
      * @return The first User provided value of this RDN
      */
-    public String getUpValue()
+    public Value<?> getUpValue()
     {
         switch ( nbAtavs )
         {
@@ -921,10 +921,10 @@ public class RDN implements Cloneable, C
                 return null;
 
             case 1:
-                return atav.getUpValue().getString();
+                return atav.getUpValue();
 
             default:
-                return ( ( TreeSet<AVA> ) atavs ).first().getUpValue().getString();
+                return ( ( TreeSet<AVA> ) atavs ).first().getUpValue();
         }
     }
 
@@ -934,7 +934,7 @@ public class RDN implements Cloneable, C
      *
      * @return The first normalized value of this RDN
      */
-    public String getNormValue()
+    public Value<?> getNormValue()
     {
         switch ( nbAtavs )
         {
@@ -942,10 +942,10 @@ public class RDN implements Cloneable, C
                 return null;
 
             case 1:
-                return atav.getNormValue().getString();
+                return atav.getNormValue();
 
             default:
-                return ( ( TreeSet<AVA> ) atavs ).first().getNormValue().getString();
+                return ( ( TreeSet<AVA> ) atavs ).first().getNormValue();
         }
     }
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
Thu Jun  3 13:35:00 2010
@@ -3392,28 +3392,28 @@ public class DNTest
     public void testNormalizeAscii() throws Exception
     {
         DN dn = new DN( "  ou  =  Example ,  ou  =  COM " );
-        
+
         dn.normalize( oidOids );
         assertEquals( "2.5.4.11=example,2.5.4.11=com", dn.getNormName() );
         assertEquals( "  ou  =  Example ,  ou  =  COM ", dn.getName() );
-        
+
         RDN rdn = dn.getRdn();
         assertEquals( "2.5.4.11", rdn.getNormType() );
-        assertEquals( "example",rdn.getNormValue() );
+        assertEquals( "example", rdn.getNormValue().getString() );
         assertEquals( "2.5.4.11=example", rdn.getNormName() );
         assertEquals( "ou", rdn.getUpType() );
-        assertEquals( "Example",rdn.getUpValue() );
+        assertEquals( "Example", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Example ", rdn.getName() );
-        
+
         AVA atav = rdn.getAtav();
-        
+
         assertEquals( "2.5.4.11=example", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
         assertEquals( "example", atav.getNormValue().get() );
-        
+
         assertEquals( "ou", atav.getUpType() );
         assertEquals( "Example", atav.getUpValue().get() );
-        
+
         assertEquals( "  ou  =  Example ", atav.getUpName() );
     }
 
@@ -3429,10 +3429,10 @@ public class DNTest
         
         RDN rdn = dn.getRdn();
         assertEquals( "2.5.4.11", rdn.getNormType() );
-        assertEquals( "example",rdn.getNormValue() );
+        assertEquals( "example", rdn.getNormValue().getString() );
         assertEquals( "2.5.4.11=example+2.5.4.11=test", rdn.getNormName() );
         assertEquals( "ou", rdn.getUpType() );
-        assertEquals( "Example",rdn.getUpValue() );
+        assertEquals( "Example", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Example + ou = TEST ", rdn.getName() );
         
         // The first ATAV
@@ -3480,10 +3480,10 @@ public class DNTest
         
         RDN rdn = dn.getRdn();
         assertEquals( "2.5.4.11", rdn.getNormType() );
-        assertEquals( "ex+mple",rdn.getNormValue() );
+        assertEquals( "ex+mple", rdn.getNormValue().getString() );
         assertEquals( "2.5.4.11=ex\\+mple", rdn.getNormName() );
         assertEquals( "ou", rdn.getUpType() );
-        assertEquals( "Ex+mple",rdn.getUpValue() );
+        assertEquals( "Ex+mple", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Ex\\+mple ", rdn.getName() );
         
         AVA atav = rdn.getAtav();
@@ -3517,9 +3517,9 @@ public class DNTest
         assertEquals( "OU", rdn.getUpType() );
         assertEquals( "ou", rdn.getNormType() );
         
-        assertEquals( "Ex+mple",rdn.getUpValue() );
-        assertEquals( "Ex+mple",rdn.getNormValue() );
-        
+        assertEquals( "Ex+mple", rdn.getUpValue().getString() );
+        assertEquals( "Ex+mple", rdn.getNormValue().getString() );
+       
         // The first ATAV
         AVA atav = rdn.getAtav();
         
@@ -3568,8 +3568,8 @@ public class DNTest
         assertEquals( "OU", rdn.getUpType() );
         assertEquals( "2.5.4.11", rdn.getNormType() );
         
-        assertEquals( "Ex+mple",rdn.getUpValue() );
-        assertEquals( "ex+mple",rdn.getNormValue() );
+        assertEquals( "Ex+mple", rdn.getUpValue().getString() );
+        assertEquals( "ex+mple", rdn.getNormValue().getString() );
         
         // The first ATAV
         atav = rdn.getAtav();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java?rev=950993&r1=950992&r2=950993&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
Thu Jun  3 13:35:00 2010
@@ -622,7 +622,7 @@ public class RdnTest
     {
         RDN rdn = new RDN( " a = b + a = f + g = h + c = d " );
 
-        assertEquals( "b", rdn.getNormValue() );
+        assertEquals( "b", rdn.getNormValue().getString() );
     }
 
 



Mime
View raw message