directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1051130 [4/7] - in /directory: apacheds/branches/alex_refactoring/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/alex_refactoring/core-api/src/main/java/org/apache/directory/server/core/entry/ apacheds/branches/...
Date Mon, 20 Dec 2010 14:31:36 GMT
Modified: directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java (original)
+++ directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java Mon Dec 20 14:31:29 2010
@@ -59,6 +59,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.registries.Schema;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -183,7 +184,7 @@ public class SchemaEntityFactory impleme
      */
     private Schema getSchema( String schemaName, Registries registries )
     {
-        if ( StringTools.isEmpty( schemaName ) )
+        if ( Strings.isEmpty(schemaName) )
         {
             schemaName = MetaSchemaConstants.SCHEMA_OTHER;
         }

Modified: directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/branches/alex_refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java Mon Dec 20 14:31:29 2010
@@ -81,6 +81,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.schema.registries.SyntaxCheckerRegistry;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1626,7 +1627,7 @@ public class DefaultSchemaManager implem
     {
         String schemaName = StringTools.toLowerCase( schemaObject.getSchemaName() );
 
-        if ( StringTools.isEmpty( schemaName ) )
+        if ( Strings.isEmpty(schemaName) )
         {
             return MetaSchemaConstants.SCHEMA_OTHER;
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -191,7 +191,7 @@ public abstract class SchemaElementImpl 
      */
     private String descToLdif() throws LdapException
     {
-        if ( StringTools.isEmpty( description ) )
+        if ( Strings.isEmpty(description) )
         {
             return "";
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Mon Dec 20 14:31:29 2010
@@ -361,7 +361,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -582,7 +582,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -737,7 +737,7 @@ public final class LdapMessageGrammar ex
                     }
                     else
                     {
-                        bindRequestMessage.setSaslMechanism( StringTools.utf8ToString( tlv.getValue().getData() ) );
+                        bindRequestMessage.setSaslMechanism( Strings.utf8ToString(tlv.getValue().getData()) );
                     }
 
                     // We can have an END transition
@@ -1131,7 +1131,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -1446,7 +1446,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -1876,7 +1876,7 @@ public final class LdapMessageGrammar ex
                     {
                         DN entryDn = null;
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -2178,7 +2178,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -2245,7 +2245,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -2373,7 +2373,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -2525,7 +2525,7 @@ public final class LdapMessageGrammar ex
                     else
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -2656,7 +2656,7 @@ public final class LdapMessageGrammar ex
                         }
                         else
                         {
-                            compareRequest.setAssertionValue( StringTools.utf8ToString( tlv.getValue().getData() ) );
+                            compareRequest.setAssertionValue( Strings.utf8ToString(tlv.getValue().getData()) );
 
                             if ( LOG.isDebugEnabled() )
                             {
@@ -2851,13 +2851,13 @@ public final class LdapMessageGrammar ex
 
                         try
                         {
-                            String requestName = StringTools.utf8ToString( requestNameBytes );
+                            String requestName = Strings.utf8ToString(requestNameBytes);
 
                             if ( !OID.isOID( requestName ) )
                             {
 
                                 String msg = "The Request name is not a valid OID : "
-                                    + StringTools.utf8ToString( requestNameBytes ) + " ("
+                                    + Strings.utf8ToString(requestNameBytes) + " ("
                                     + Strings.dumpBytes(requestNameBytes) + ") is invalid";
                                 LOG.error( msg );
 
@@ -2870,7 +2870,7 @@ public final class LdapMessageGrammar ex
                         catch ( DecoderException de )
                         {
                             String msg = "The Request name is not a valid OID : "
-                                + StringTools.utf8ToString( requestNameBytes ) + " ("
+                                + Strings.utf8ToString(requestNameBytes) + " ("
                                 + Strings.dumpBytes(requestNameBytes) + ") is invalid";
                             LOG.error( "{} : {}", msg, de.getMessage() );
 
@@ -3226,7 +3226,7 @@ public final class LdapMessageGrammar ex
                     {
                         byte[] responseNameBytes = tlv.getValue().getData();
 
-                        String oidStr = StringTools.utf8ToString( responseNameBytes );
+                        String oidStr = Strings.utf8ToString(responseNameBytes);
 
                         if ( OID.isOID( oidStr ) )
                         {
@@ -3236,7 +3236,7 @@ public final class LdapMessageGrammar ex
                         else
                         {
                             String msg = "The Intermediate Response name is not a valid OID : "
-                                + StringTools.utf8ToString( responseNameBytes ) + " ("
+                                + Strings.utf8ToString(responseNameBytes) + " ("
                                 + Strings.dumpBytes(responseNameBytes) + ") is invalid";
                             LOG.error( "{} : {}", msg, oidStr );
 
@@ -3626,7 +3626,7 @@ public final class LdapMessageGrammar ex
                     if ( tlv.getLength() != 0 )
                     {
                         byte[] dnBytes = tlv.getValue().getData();
-                        String dnStr = StringTools.utf8ToString( dnBytes );
+                        String dnStr = Strings.utf8ToString(dnBytes);
 
                         try
                         {
@@ -5124,7 +5124,7 @@ public final class LdapMessageGrammar ex
                         throw new DecoderException( msg );
                     }
 
-                    substringFilter.setInitialSubstrings( StringTools.utf8ToString( tlv.getValue().getData() ) );
+                    substringFilter.setInitialSubstrings( Strings.utf8ToString(tlv.getValue().getData()) );
 
                     // We now have to get back to the nearest filter which is
                     // not terminal.
@@ -6049,7 +6049,7 @@ public final class LdapMessageGrammar ex
                     }
                     else
                     {
-                        extensibleMatchFilter.setMatchingRule( StringTools.utf8ToString( tlv.getValue().getData() ) );
+                        extensibleMatchFilter.setMatchingRule( Strings.utf8ToString(tlv.getValue().getData()) );
                     }
                 }
             } );

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/AttributeDescAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/AttributeDescAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/AttributeDescAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/AttributeDescAction.java Mon Dec 20 14:31:29 2010
@@ -26,7 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.message.SearchRequest;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -68,10 +68,10 @@ public class AttributeDescAction extends
 
         if ( tlv.getLength() != 0 )
         {
-            attributeDescription = StringTools.utf8ToString( tlv.getValue().getData() );
+            attributeDescription = Strings.utf8ToString(tlv.getValue().getData());
 
             // If the attributeDescription is empty, we won't add it
-            if ( !StringTools.isEmpty( attributeDescription.trim() ) )
+            if ( !Strings.isEmpty(attributeDescription.trim()) )
             {
                 searchRequest.addAttributes( attributeDescription );
             }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java Mon Dec 20 14:31:29 2010
@@ -27,7 +27,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultResponse;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -74,7 +74,7 @@ public class ErrorMessageAction extends 
         }
         else
         {
-            errorMessage = StringTools.utf8ToString( tlv.getValue().getData() );
+            errorMessage = Strings.utf8ToString(tlv.getValue().getData());
         }
 
         ResultResponse response = ( ResultResponse ) ldapMessageContainer.getMessage();

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAssertionValueFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAssertionValueFilterAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAssertionValueFilterAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAssertionValueFilterAction.java Mon Dec 20 14:31:29 2010
@@ -32,8 +32,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.CharConstants;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -104,7 +104,7 @@ public class InitAssertionValueFilterAct
         {
             if ( tlv.getLength() != 0 )
             {
-                assertionValue = new StringValue( StringTools.utf8ToString( tlv.getValue().getData() ) );
+                assertionValue = new StringValue( Strings.utf8ToString(tlv.getValue().getData()) );
             }
             else
             {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java Mon Dec 20 14:31:29 2010
@@ -30,7 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,7 +78,7 @@ public class InitAttributeDescFilterActi
         }
         else
         {
-            String type = StringTools.utf8ToString( tlv.getValue().getData() );
+            String type = Strings.utf8ToString(tlv.getValue().getData());
             assertion.setAttributeDesc( type );
 
             AttributeValueAssertionFilter terminalFilter = ( AttributeValueAssertionFilter ) ( ( SearchRequestImpl ) searchRequest )

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitPresentFilterAction.java Mon Dec 20 14:31:29 2010
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.PresentFilter;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -73,16 +73,16 @@ public class InitPresentFilterAction ext
         ( ( SearchRequestImpl ) searchRequest ).addCurrentFilter( presentFilter );
         ( ( SearchRequestImpl ) searchRequest ).setTerminalFilter( presentFilter );
 
-        String value = StringTools.utf8ToString( tlv.getValue().getData() );
+        String value = Strings.utf8ToString(tlv.getValue().getData());
 
-        if ( StringTools.isEmpty( value ) )
+        if ( Strings.isEmpty(value) )
         {
             presentFilter.setAttributeDescription( "" );
         }
         else
         {
             // Store the value.
-            String type = StringTools.utf8ToString( tlv.getValue().getData() );
+            String type = Strings.utf8ToString(tlv.getValue().getData());
             presentFilter.setAttributeDescription( type );
         }
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.ResultResponse;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -95,7 +94,7 @@ public class MatchedDNAction extends Gra
                 case INVALID_DN_SYNTAX:
                 case ALIAS_DEREFERENCING_PROBLEM:
                     byte[] dnBytes = tlv.getValue().getData();
-                    String dnStr = StringTools.utf8ToString( dnBytes );
+                    String dnStr = Strings.utf8ToString(dnBytes);
 
                     try
                     {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java Mon Dec 20 14:31:29 2010
@@ -26,8 +26,8 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.message.ModifyRequest;
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.CharConstants;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -83,7 +83,7 @@ public class ModifyAttributeValueAction 
             else
             {
                 ( ( ModifyRequestImpl ) modifyRequest )
-                    .addAttributeValue( StringTools.utf8ToString( ( byte[] ) value ) );
+                    .addAttributeValue( Strings.utf8ToString((byte[]) value) );
             }
         }
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.ResultResponse;
 import org.apache.directory.shared.ldap.util.LdapURL;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -88,7 +88,7 @@ public class ReferralAction extends Gram
                 }
                 catch ( LdapURLEncodingException luee )
                 {
-                    String badUrl = StringTools.utf8ToString( tlv.getValue().getData() );
+                    String badUrl = Strings.utf8ToString(tlv.getValue().getData());
                     LOG.error( I18n.err( I18n.ERR_04015, badUrl, luee.getMessage() ) );
                     throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() ) );
                 }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java Mon Dec 20 14:31:29 2010
@@ -25,7 +25,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -86,7 +85,7 @@ public class SearchResultAttributeValueA
             }
             else
             {
-                value = StringTools.utf8ToString( tlv.getValue().getData() );
+                value = Strings.utf8ToString(tlv.getValue().getData());
 
                 LOG.debug( "Attribute value {}", value );
             }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,7 +78,7 @@ public class StoreAnyAction extends Gram
             throw new DecoderException( msg );
         }
 
-        String any = StringTools.utf8ToString( tlv.getValue().getData() );
+        String any = Strings.utf8ToString(tlv.getValue().getData());
         substringFilter.addAnySubstrings( any );
 
         // We now have to get back to the nearest filter which is

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,7 +78,7 @@ public class StoreFinalAction extends Gr
             throw new DecoderException( msg );
         }
 
-        String finalValue = StringTools.utf8ToString( tlv.getValue().getData() );
+        String finalValue = Strings.utf8ToString(tlv.getValue().getData());
         substringFilter.setFinalSubstrings( finalValue );
 
         // We now have to get back to the nearest filter which is

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.SearchResultReference;
 import org.apache.directory.shared.ldap.util.LdapURL;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -90,7 +90,7 @@ public class StoreReferenceAction extend
         }
         else
         {
-            String urlStr = StringTools.utf8ToString( tlv.getValue().getData() );
+            String urlStr = Strings.utf8ToString(tlv.getValue().getData());
 
             try
             {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,7 +80,7 @@ public class StoreTypeMatchingRuleAction
             ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) ( ( SearchRequestImpl ) searchRequest )
                 .getTerminalFilter();
 
-            String type = StringTools.utf8ToString( tlv.getValue().getData() );
+            String type = Strings.utf8ToString(tlv.getValue().getData());
             extensibleMatchFilter.setType( type );
 
             if ( IS_DEBUG )

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java Mon Dec 20 14:31:29 2010
@@ -25,7 +25,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.message.AddRequest;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -87,7 +86,7 @@ public class ValueAction extends Grammar
             }
             else
             {
-                value = StringTools.utf8ToString( tlv.getValue().getData() );
+                value = Strings.utf8ToString(tlv.getValue().getData());
 
                 if ( IS_DEBUG )
                 {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java Mon Dec 20 14:31:29 2010
@@ -30,7 +30,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -149,7 +148,7 @@ public abstract class AbstractControl ex
     public int computeLength( int valueLength )
     {
         // The OID
-        int oidLengh = StringTools.getBytesUtf8( oid ).length;
+        int oidLengh = Strings.getBytesUtf8(oid).length;
         controlLength = 1 + TLV.getNbBytes( oidLengh ) + oidLengh;
 
         // The criticality, only if true

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.ldap.message.control.replication.SyncModifyDnType;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -116,7 +116,7 @@ public final class SyncModifyDnControlGr
                     Value value = syncModifyDnControlContainer.getCurrentTLV().getValue();
 
                     // Check that the value is into the allowed interval
-                    String entryDn = StringTools.utf8ToString( value.getData() );
+                    String entryDn = Strings.utf8ToString(value.getData());
                     
                     if ( IS_DEBUG )
                     {
@@ -152,7 +152,7 @@ public final class SyncModifyDnControlGr
                     Value value = syncModifyDnControlContainer.getCurrentTLV().getValue();
 
                     // Check that the value is into the allowed interval
-                    String newSuperiorDn = StringTools.utf8ToString( value.getData() );
+                    String newSuperiorDn = Strings.utf8ToString(value.getData());
                     
                     if ( IS_DEBUG )
                     {
@@ -202,7 +202,7 @@ public final class SyncModifyDnControlGr
                     SyncModifyDnControlContainer syncModifyDnControlContainer = ( SyncModifyDnControlContainer ) container;
                     Value value = syncModifyDnControlContainer.getCurrentTLV().getValue();
 
-                    String newRdn = StringTools.utf8ToString( value.getData() );
+                    String newRdn = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {
@@ -291,7 +291,7 @@ public final class SyncModifyDnControlGr
                     SyncModifyDnControlContainer syncModifyDnControlContainer = ( SyncModifyDnControlContainer ) container;
                     Value value = syncModifyDnControlContainer.getCurrentTLV().getValue();
 
-                    String newSuperirorDn = StringTools.utf8ToString( value.getData() );
+                    String newSuperirorDn = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {
@@ -323,7 +323,7 @@ public final class SyncModifyDnControlGr
                     SyncModifyDnControlContainer syncModifyDnControlContainer = ( SyncModifyDnControlContainer ) container;
                     Value value = syncModifyDnControlContainer.getCurrentTLV().getValue();
 
-                    String newRdn = StringTools.utf8ToString( value.getData() );
+                    String newRdn = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java Mon Dec 20 14:31:29 2010
@@ -30,7 +30,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -112,7 +111,7 @@ public class CertGenerationGrammar exten
                     CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
                     Value value = certGenContainer.getCurrentTLV().getValue();
 
-                    String targetDN = StringTools.utf8ToString( value.getData() );
+                    String targetDN = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {
@@ -158,7 +157,7 @@ public class CertGenerationGrammar exten
                     CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
                     Value value = certGenContainer.getCurrentTLV().getValue();
 
-                    String issuerDN = StringTools.utf8ToString( value.getData() );
+                    String issuerDN = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {
@@ -198,7 +197,7 @@ public class CertGenerationGrammar exten
                     CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
                     Value value = certGenContainer.getCurrentTLV().getValue();
 
-                    String subjectDN = StringTools.utf8ToString( value.getData() );
+                    String subjectDN = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {
@@ -243,7 +242,7 @@ public class CertGenerationGrammar exten
                     CertGenerationContainer certGenContainer = ( CertGenerationContainer ) container;
                     Value value = certGenContainer.getCurrentTLV().getValue();
 
-                    String keyAlgorithm = StringTools.utf8ToString( value.getData() );
+                    String keyAlgorithm = Strings.utf8ToString(value.getData());
 
                     if ( IS_DEBUG )
                     {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java Mon Dec 20 14:31:29 2010
@@ -26,7 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.EncoderException;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -66,16 +66,16 @@ public class CertGenerationObject extend
     @Override
     public int computeLength()
     {
-        int len = StringTools.getBytesUtf8( targetDN ).length;
+        int len = Strings.getBytesUtf8(targetDN).length;
         requestLength = 1 + Value.getNbBytes(len) + len;
 
-        len = StringTools.getBytesUtf8( issuerDN ).length;
+        len = Strings.getBytesUtf8(issuerDN).length;
         requestLength += 1 + Value.getNbBytes( len ) + len;
 
-        len = StringTools.getBytesUtf8( subjectDN ).length;
+        len = Strings.getBytesUtf8(subjectDN).length;
         requestLength += 1 + Value.getNbBytes(len) + len;
 
-        len = StringTools.getBytesUtf8( keyAlgorithm ).length;
+        len = Strings.getBytesUtf8(keyAlgorithm).length;
         requestLength += 1 + Value.getNbBytes( len ) + len;
 
         return 1 + Value.getNbBytes( requestLength ) + requestLength;

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -217,7 +216,7 @@ public class StoredProcedure extends Abs
     public int computeLength()
     {
         // The language
-        byte[] languageBytes = StringTools.getBytesUtf8( language );
+        byte[] languageBytes = Strings.getBytesUtf8(language);
         
         int languageLength = 1 + TLV.getNbBytes( languageBytes.length )
             + languageBytes.length;
@@ -328,7 +327,7 @@ public class StoredProcedure extends Abs
 
         sb.append( "    StoredProcedure\n" );
         sb.append( "        Language : '" ).append( language ).append( "'\n" );
-        sb.append( "        Procedure\n" ).append( StringTools.utf8ToString( procedure ) ).append( "'\n" );
+        sb.append( "        Procedure\n" ).append( Strings.utf8ToString(procedure) ).append( "'\n" );
 
         if ( ( parameters == null ) || ( parameters.size() == 0 ) )
         {
@@ -343,7 +342,7 @@ public class StoredProcedure extends Abs
             for ( StoredProcedureParameter spParam:parameters )
             {
                 sb.append( "            type[" ).append( i ) .append( "] : '" ).
-                    append( StringTools.utf8ToString( spParam.type ) ).append( "'\n" );
+                    append( Strings.utf8ToString(spParam.type) ).append( "'\n" );
                 sb.append( "            value[" ).append( i ) .append( "] : '" ).
                     append( Strings.dumpBytes(spParam.value) ).append( "'\n" );
             }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure.StoredProcedureParameter;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -108,7 +107,7 @@ public final class StoredProcedureGramma
                     else
                     {
                         // Only this field's type is String by default
-                        String language = StringTools.utf8ToString( tlv.getValue().getData() );
+                        String language = Strings.utf8ToString(tlv.getValue().getData());
 
                         if ( LOG.isDebugEnabled() )
                         {
@@ -158,7 +157,7 @@ public final class StoredProcedureGramma
 
                     if ( LOG.isDebugEnabled() )
                     {
-                        LOG.debug( "Procedure found : " + StringTools.utf8ToString( storedProcedure.getProcedure() ) );
+                        LOG.debug( "Procedure found : " + Strings.utf8ToString(storedProcedure.getProcedure()) );
                     }
                 }
             } );

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java Mon Dec 20 14:31:29 2010
@@ -28,7 +28,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -213,13 +213,13 @@ public class ExtensibleMatchFilter exten
     {
         if ( matchingRule != null )
         {
-            matchingRuleBytes = StringTools.getBytesUtf8( matchingRule );
+            matchingRuleBytes = Strings.getBytesUtf8(matchingRule);
             extensibleMatchLength = 1 + TLV.getNbBytes( matchingRuleBytes.length ) + matchingRuleBytes.length;
         }
 
         if ( type != null )
         {
-            typeBytes = StringTools.getBytesUtf8( type );
+            typeBytes = Strings.getBytesUtf8(type);
             extensibleMatchLength += 1 + TLV.getNbBytes( typeBytes.length ) + typeBytes.length;
         }
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java Mon Dec 20 14:31:29 2010
@@ -27,7 +27,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -103,7 +103,7 @@ public class PresentFilter extends Filte
      */
     public int computeLength()
     {
-        attributeDescriptionBytes = StringTools.getBytesUtf8( attributeDescription );
+        attributeDescriptionBytes = Strings.getBytesUtf8(attributeDescription);
         return 1 + TLV.getNbBytes( attributeDescriptionBytes.length ) + attributeDescriptionBytes.length;
     }
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -233,14 +233,14 @@ public class SubstringFilter extends Fil
     public int computeLength()
     {
         // The type
-        typeLength = StringTools.getBytesUtf8( type ).length;
+        typeLength = Strings.getBytesUtf8(type).length;
         
         substringsFilterLength = 1 + TLV.getNbBytes( typeLength ) + typeLength;
         substringsFilterSequenceLength = 0;
 
         if ( initialSubstrings != null )
         {
-            int initialLength = StringTools.getBytesUtf8( initialSubstrings ).length; 
+            int initialLength = Strings.getBytesUtf8(initialSubstrings).length;
             substringsFilterSequenceLength += 1 + TLV.getNbBytes( initialLength )
                 + initialLength;
         }
@@ -249,14 +249,14 @@ public class SubstringFilter extends Fil
         {
             for ( String any:anySubstrings )
             {
-                int anyLength = StringTools.getBytesUtf8( any ).length; 
+                int anyLength = Strings.getBytesUtf8(any).length;
                 substringsFilterSequenceLength += 1 + TLV.getNbBytes( anyLength ) + anyLength;
             }
         }
 
         if ( finalSubstrings != null )
         {
-            int finalLength = StringTools.getBytesUtf8( finalSubstrings ).length; 
+            int finalLength = Strings.getBytesUtf8(finalSubstrings).length;
             substringsFilterSequenceLength += 1 + TLV.getNbBytes( finalLength )
                 + finalLength;
         }
@@ -317,7 +317,7 @@ public class SubstringFilter extends Fil
             // The initial substring
             if ( initialSubstrings != null )
             {
-                byte[] initialBytes = StringTools.getBytesUtf8( initialSubstrings );
+                byte[] initialBytes = Strings.getBytesUtf8(initialSubstrings);
                 buffer.put( ( byte ) LdapConstants.SUBSTRINGS_FILTER_INITIAL_TAG );
                 buffer.put( TLV.getBytes( initialBytes.length ) );
                 buffer.put( initialBytes );
@@ -328,7 +328,7 @@ public class SubstringFilter extends Fil
             {
                 for ( String any:anySubstrings )
                 {
-                    byte[] anyBytes = StringTools.getBytesUtf8( any );
+                    byte[] anyBytes = Strings.getBytesUtf8(any);
                     buffer.put( ( byte ) LdapConstants.SUBSTRINGS_FILTER_ANY_TAG );
                     buffer.put( TLV.getBytes( anyBytes.length ) );
                     buffer.put( anyBytes );
@@ -338,7 +338,7 @@ public class SubstringFilter extends Fil
             // The final substring
             if ( finalSubstrings != null )
             {
-                byte[] finalBytes = StringTools.getBytesUtf8( finalSubstrings );
+                byte[] finalBytes = Strings.getBytesUtf8(finalSubstrings);
                 buffer.put( ( byte ) LdapConstants.SUBSTRINGS_FILTER_FINAL_TAG );
                 buffer.put( TLV.getBytes( finalBytes.length ) );
                 buffer.put( finalBytes );

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java Mon Dec 20 14:31:29 2010
@@ -30,7 +30,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -132,7 +132,7 @@ public class EntryChangeControl extends 
 
         if ( previousDn != null )
         {
-            previousDnBytes = StringTools.getBytesUtf8( previousDn.getName() );
+            previousDnBytes = Strings.getBytesUtf8(previousDn.getName());
             previousDnLength = 1 + TLV.getNbBytes( previousDnBytes.length ) + previousDnBytes.length;
         }
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,6 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -172,7 +171,7 @@ public final class EntryChangeControlGra
 
                     try
                     {
-                        previousDn = new DN( StringTools.utf8ToString( value.getData() ) );
+                        previousDn = new DN( Strings.utf8ToString(value.getData()) );
                     }
                     catch ( LdapInvalidDnException ine )
                     {

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/csn/Csn.java Mon Dec 20 14:31:29 2010
@@ -27,6 +27,7 @@ import java.util.Date;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -125,7 +126,7 @@ public class Csn implements Serializable
      */
     public Csn( String value ) throws InvalidCSNException
     {
-        if ( StringTools.isEmpty( value ) )
+        if ( Strings.isEmpty(value) )
         {
             String message = I18n.err( I18n.ERR_04114 );
             LOG.error( message );
@@ -229,7 +230,7 @@ public class Csn implements Serializable
 
         String replicaIdStr = value.substring( sepCC + 1, sepRI).trim();
         
-        if ( StringTools.isEmpty( replicaIdStr ) )
+        if ( Strings.isEmpty(replicaIdStr) )
         {
             String message = I18n.err( I18n.ERR_04123 );
             LOG.error( message );
@@ -269,7 +270,7 @@ public class Csn implements Serializable
         }
         
         csnStr = value;
-        bytes = StringTools.getBytesUtf8( csnStr );
+        bytes = Strings.getBytesUtf8(csnStr);
     }
 
 
@@ -281,7 +282,7 @@ public class Csn implements Serializable
      */
     public static boolean isValid( String value )
     {
-        if ( StringTools.isEmpty( value ) )
+        if ( Strings.isEmpty(value) )
         {
             return false;
         }
@@ -324,7 +325,7 @@ public class Csn implements Serializable
         // And add the milliseconds and microseconds now
         String millisStr = timestampStr.substring( 15, 21 );
 
-        if ( StringTools.isEmpty( millisStr ) )
+        if ( Strings.isEmpty(millisStr) )
         {
             return false;
         }
@@ -356,7 +357,7 @@ public class Csn implements Serializable
     
         String changeCountStr = value.substring( sepTS + 1, sepCC ).trim();
         
-        if ( StringTools.isEmpty( changeCountStr ) )
+        if ( Strings.isEmpty(changeCountStr) )
         {
             return false;
         }
@@ -393,7 +394,7 @@ public class Csn implements Serializable
     
         String replicaIdStr = value.substring( sepCC + 1, sepRI ).trim();
         
-        if ( StringTools.isEmpty( replicaIdStr ) )
+        if ( Strings.isEmpty(replicaIdStr) )
         {
             return false;
         }
@@ -461,13 +462,13 @@ public class Csn implements Serializable
      */
     Csn( byte[] value )
     {
-        csnStr = StringTools.utf8ToString( value );
+        csnStr = Strings.utf8ToString(value);
         Csn csn = new Csn( csnStr );
         timestamp = csn.timestamp;
         changeCount = csn.changeCount;
         replicaId = csn.replicaId;
         operationNumber = csn.operationNumber;
-        bytes = StringTools.getBytesUtf8( csnStr );
+        bytes = Strings.getBytesUtf8(csnStr);
     }
 
 
@@ -483,7 +484,7 @@ public class Csn implements Serializable
     {
         if ( bytes == null )
         {
-            bytes = StringTools.getBytesUtf8( csnStr );
+            bytes = Strings.getBytesUtf8(csnStr);
         }
 
         byte[] copy = new byte[bytes.length];

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/BinaryValue.java Mon Dec 20 14:31:29 2010
@@ -32,7 +32,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.CharConstants;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
@@ -548,7 +547,7 @@ public class BinaryValue extends Abstrac
      */
     public String getString()
     {
-        return StringTools.utf8ToString( wrappedValue );
+        return Strings.utf8ToString(wrappedValue);
     }
 
 

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java Mon Dec 20 14:31:29 2010
@@ -42,6 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.UTFUtils;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -492,18 +493,18 @@ public class DefaultEntry implements Ent
 
         if ( ( attributeType == null ) )
         {
-            if ( StringTools.isEmpty( normUpId ) )
+            if ( Strings.isEmpty(normUpId) )
             {
                 String message = I18n.err( I18n.ERR_04458 );
                 LOG.error( message );
                 throw new IllegalArgumentException( message );
             }
         }
-        else if ( StringTools.isEmpty( normUpId ) )
+        else if ( Strings.isEmpty(normUpId) )
         {
             upId = attributeType.getName();
 
-            if ( StringTools.isEmpty( upId ) )
+            if ( Strings.isEmpty(upId) )
             {
                 upId = attributeType.getOid();
             }
@@ -560,7 +561,7 @@ public class DefaultEntry implements Ent
      */
     protected AttributeType getAttributeType( String upId ) throws LdapException
     {
-        if ( StringTools.isEmpty( StringTools.trim( upId ) ) )
+        if ( Strings.isEmpty(StringTools.trim(upId)) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -836,7 +837,7 @@ public class DefaultEntry implements Ent
      */
     public void add( String upId, byte[]... values ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -878,7 +879,7 @@ public class DefaultEntry implements Ent
      */
     public void add( String upId, String... values ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -920,7 +921,7 @@ public class DefaultEntry implements Ent
      */
     public void add( String upId, Value<?>... values ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -1059,7 +1060,7 @@ public class DefaultEntry implements Ent
      */
     public boolean contains( String upId ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             return false;
         }
@@ -1211,7 +1212,7 @@ public class DefaultEntry implements Ent
      */
     public boolean contains( String upId, byte[]... values )
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             return false;
         }
@@ -1246,7 +1247,7 @@ public class DefaultEntry implements Ent
      */
     public boolean contains( String upId, String... values )
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             return false;
         }
@@ -1281,7 +1282,7 @@ public class DefaultEntry implements Ent
      */
     public boolean contains( String upId, Value<?>... values )
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             return false;
         }
@@ -1388,7 +1389,7 @@ public class DefaultEntry implements Ent
      */
     public EntryAttribute put( String upId, byte[]... values )
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -1427,7 +1428,7 @@ public class DefaultEntry implements Ent
      */
     public EntryAttribute put( String upId, String... values )
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -1466,7 +1467,7 @@ public class DefaultEntry implements Ent
      */
     public EntryAttribute put( String upId, Value<?>... values )
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.error( message );
@@ -1730,7 +1731,7 @@ public class DefaultEntry implements Ent
         }
         else
         {
-            if ( !StringTools.isEmpty( upId ) )
+            if ( !Strings.isEmpty(upId) )
             {
                 AttributeType tempAT = getAttributeType( upId );
 
@@ -1780,7 +1781,7 @@ public class DefaultEntry implements Ent
         }
         else
         {
-            if ( !StringTools.isEmpty( upId ) )
+            if ( !Strings.isEmpty(upId) )
             {
                 AttributeType tempAT = getAttributeType( upId );
 
@@ -1823,7 +1824,7 @@ public class DefaultEntry implements Ent
         }
         else
         {
-            if ( !StringTools.isEmpty( upId ) )
+            if ( !Strings.isEmpty(upId) )
             {
                 AttributeType tempAT = getAttributeType( upId );
 
@@ -2185,7 +2186,7 @@ public class DefaultEntry implements Ent
      */
     public boolean remove( String upId, byte[]... values ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.info( message );
@@ -2274,7 +2275,7 @@ public class DefaultEntry implements Ent
      */
     public boolean remove( String upId, String... values ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.info( message );
@@ -2362,7 +2363,7 @@ public class DefaultEntry implements Ent
      */
     public boolean remove( String upId, Value<?>... values ) throws LdapException
     {
-        if ( StringTools.isEmpty( upId ) )
+        if ( Strings.isEmpty(upId) )
         {
             String message = I18n.err( I18n.ERR_04457_NULL_ATTRIBUTE_ID );
             LOG.info( message );

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java Mon Dec 20 14:31:29 2010
@@ -500,7 +500,7 @@ public class DefaultEntryAttribute imple
                 // Try to convert the value from a byte[] to a String
                 if ( value != null )
                 {
-                    String valueStr = StringTools.utf8ToString( (byte[])value.getReference() );
+                    String valueStr = Strings.utf8ToString((byte[]) value.getReference());
                 
                     return valueStr;
                 }
@@ -701,7 +701,7 @@ public class DefaultEntryAttribute imple
     {
         String trimmed = StringTools.trim( upId );
 
-        if ( StringTools.isEmpty( trimmed ) && ( attributeType == null ) )
+        if ( Strings.isEmpty(trimmed) && ( attributeType == null ) )
         {
             throw new IllegalArgumentException( "Cannot set a null ID with a null AttributeType" );
         }
@@ -739,7 +739,7 @@ public class DefaultEntryAttribute imple
             }
         }
         
-        if ( StringTools.isEmpty( id ) )
+        if ( Strings.isEmpty(id) )
         {
             this.attributeType = attributeType;
             this.upId = attributeType.getName();
@@ -1154,7 +1154,7 @@ public class DefaultEntryAttribute imple
                     
                     if ( val != null )
                     {
-                        valBytes = StringTools.getBytesUtf8( val );
+                        valBytes = Strings.getBytesUtf8(val);
                     }
                     
                     Value<byte[]> value = createBinaryValue( attributeType, valBytes );
@@ -1209,7 +1209,7 @@ public class DefaultEntryAttribute imple
                     
                     if ( val != null )
                     {
-                        valBytes = StringTools.getBytesUtf8( val );
+                        valBytes = Strings.getBytesUtf8(val);
                     }
                     
                     Value<byte[]> value = createBinaryValue( attributeType, valBytes );
@@ -1370,7 +1370,7 @@ public class DefaultEntryAttribute imple
                         byte[] binaryVal = val.getBytes();
                         
                         // We have to convert the binary value to a String
-                        if ( ! values.contains( new StringValue( StringTools.utf8ToString( binaryVal ) ) ) )
+                        if ( ! values.contains( new StringValue( Strings.utf8ToString(binaryVal) ) ) )
                         {
                             return false;
                         }
@@ -1396,7 +1396,7 @@ public class DefaultEntryAttribute imple
                         String stringVal = val.getString();
                         
                         // We have to convert the binary value to a String
-                        if ( ! values.contains( new BinaryValue( StringTools.getBytesUtf8( stringVal ) ) ) )
+                        if ( ! values.contains( new BinaryValue( Strings.getBytesUtf8(stringVal) ) ) )
                         {
                             return false;
                         }
@@ -1498,7 +1498,7 @@ public class DefaultEntryAttribute imple
                 // don't find one in the values
                 for ( String val:vals )
                 {
-                    byte[] binaryVal = StringTools.getBytesUtf8( val );
+                    byte[] binaryVal = Strings.getBytesUtf8(val);
     
                     if ( !contains( new BinaryValue( binaryVal ) ) )
                     {
@@ -1576,7 +1576,7 @@ public class DefaultEntryAttribute imple
                 // don't find one in the values
                 for ( byte[] val:vals )
                 {
-                    String stringVal = StringTools.utf8ToString( val );
+                    String stringVal = Strings.utf8ToString(val);
     
                     if ( !contains( new StringValue( stringVal ) ) )
                     {
@@ -1815,7 +1815,7 @@ public class DefaultEntryAttribute imple
                     {
                         // Convert the binary value to a string value
                         byte[] binaryVal = val.getBytes();
-                        removed &= values.remove( new StringValue( StringTools.utf8ToString( binaryVal ) ) );
+                        removed &= values.remove( new StringValue( Strings.utf8ToString(binaryVal) ) );
                     }
                 }
             }
@@ -1922,7 +1922,7 @@ public class DefaultEntryAttribute imple
                 // to String before removing them
                 for ( byte[] val:vals )
                 {
-                    StringValue value = new StringValue( StringTools.utf8ToString( val ) );
+                    StringValue value = new StringValue( Strings.utf8ToString(val) );
                     removed &= values.remove( value );
                 }
             }
@@ -1987,7 +1987,7 @@ public class DefaultEntryAttribute imple
                 // to byte[] before removing them
                 for ( String val:vals )
                 {
-                    BinaryValue value = new BinaryValue( StringTools.getBytesUtf8( val ) );
+                    BinaryValue value = new BinaryValue( Strings.getBytesUtf8(val) );
                     removed &= values.remove( value );
                 }
             }
@@ -2171,7 +2171,7 @@ public class DefaultEntryAttribute imple
     {
         String trimmedId = StringTools.trim( attributeId );
         
-        if ( StringTools.isEmpty( trimmedId ) )
+        if ( Strings.isEmpty(trimmedId) )
         {
             return false;
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java Mon Dec 20 14:31:29 2010
@@ -29,8 +29,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.Normalizer;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.UTFUtils;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -464,7 +464,7 @@ public class StringValue extends Abstrac
      */
     public byte[] getBytes()
     {
-        return StringTools.getBytesUtf8( wrappedValue );
+        return Strings.getBytesUtf8(wrappedValue);
     }
     
     

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java Mon Dec 20 14:31:29 2010
@@ -825,7 +825,7 @@ public class FilterParser
     public static ExprNode parse( SchemaManager schemaManager, String filter ) throws ParseException
     {
         // The filter must not be null. This is a defensive test
-        if ( StringTools.isEmpty( filter ) )
+        if ( Strings.isEmpty(filter) )
         {
             throw new ParseException( I18n.err( I18n.ERR_04158 ), 0 );
         }
@@ -852,7 +852,7 @@ public class FilterParser
     public static ExprNode parse( SchemaManager schemaManager, String filter, Position pos ) throws ParseException
     {
         // The filter must not be null. This is a defensive test
-        if ( StringTools.isEmpty( filter ) )
+        if ( Strings.isEmpty(filter) )
         {
             throw new ParseException( I18n.err( I18n.ERR_04158 ), 0 );
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java Mon Dec 20 14:31:29 2010
@@ -36,7 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -446,7 +446,7 @@ public class LdifAttributesReader extend
 
         LOG.debug( "Starts parsing ldif buffer" );
 
-        if ( StringTools.isEmpty( ldif ) )
+        if ( Strings.isEmpty(ldif) )
         {
             return new BasicAttributes( true );
         }
@@ -509,7 +509,7 @@ public class LdifAttributesReader extend
 
         LOG.debug( "Starts parsing ldif buffer" );
 
-        if ( StringTools.isEmpty( ldif ) )
+        if ( Strings.isEmpty(ldif) )
         {
             return new DefaultEntry();
         }
@@ -574,7 +574,7 @@ public class LdifAttributesReader extend
 
         LOG.debug( "Starts parsing ldif buffer" );
 
-        if ( StringTools.isEmpty( ldif ) )
+        if ( Strings.isEmpty(ldif) )
         {
             return new DefaultEntry();
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java Mon Dec 20 14:31:29 2010
@@ -55,6 +55,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -921,7 +922,7 @@ public class LdifReader implements Itera
                 }
                 else
                 {
-                    entry.setNewRdn( StringTools.utf8ToString( ( byte[] ) attributeValue ) );
+                    entry.setNewRdn( Strings.utf8ToString((byte[]) attributeValue) );
                 }
             }
             else
@@ -1189,7 +1190,7 @@ public class LdifReader implements Itera
                         }
                         else
                         {
-                            entry.setNewSuperior( StringTools.utf8ToString( ( byte[] ) attributeValue ) );
+                            entry.setNewSuperior( Strings.utf8ToString((byte[]) attributeValue) );
                         }
                     }
                     else
@@ -1576,7 +1577,7 @@ public class LdifReader implements Itera
     @SuppressWarnings("PMD.EmptyCatchBlock")
     public List<LdifEntry> parseLdifFile( String fileName, String encoding ) throws LdapLdifException
     {
-        if ( StringTools.isEmpty( fileName ) )
+        if ( Strings.isEmpty(fileName) )
         {
             LOG.error( I18n.err( I18n.ERR_12064_EMPTY_FILE_NAME ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12064_EMPTY_FILE_NAME ) );
@@ -1640,7 +1641,7 @@ public class LdifReader implements Itera
     {
         LOG.debug( "Starts parsing ldif buffer" );
 
-        if ( StringTools.isEmpty( ldif ) )
+        if ( Strings.isEmpty(ldif) )
         {
             return new ArrayList<LdifEntry>();
         }

Modified: directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java (original)
+++ directory/shared/branches/alex_refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java Mon Dec 20 14:31:29 2010
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -127,7 +127,7 @@ public final class LdifUtils
      */
     public static boolean isLDIFSafe( String str )
     {
-        if ( StringTools.isEmpty( str ) )
+        if ( Strings.isEmpty(str) )
         {
             // A null string is LDIF safe
             return true;
@@ -458,7 +458,7 @@ public final class LdifUtils
                 sb.append( '\n' );
 
                 // Stores the optional newSuperior
-                if ( !StringTools.isEmpty( entry.getNewSuperior() ) )
+                if ( !Strings.isEmpty(entry.getNewSuperior()) )
                 {
                     EntryAttribute newSuperior = new DefaultEntryAttribute( "newsuperior", entry.getNewSuperior() );
                     sb.append( convertToLdif( newSuperior, length ) );



Mime
View raw message