directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1650727 [1/3] - in /directory/shared/trunk: dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/ ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ ldap/codec/core/src/main/java/org/apache/directory/api/ldap/...
Date Sat, 10 Jan 2015 09:22:13 GMT
Author: elecharny
Date: Sat Jan 10 09:22:12 2015
New Revision: 1650727

URL: http://svn.apache.org/r1650727
Log:
o Renamed the codec LdapConstants to LdapCodecConstants
o Added a LdapConstants class in model
o Used the LdapConstants class in the API

Added:
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapCodecConstants.java
      - copied, changed from r1650712, directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapConstants.java
Removed:
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapConstants.java
Modified:
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
    directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/modifyRequest/StoreOperationType.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestDerefAlias.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/StoreSearchRequestScope.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitApproxMatchFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitEqualityMatchFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitGreaterOrEqualFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/actions/searchRequest/filter/InitLessOrEqualFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/ExtendedRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/ExtendedResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/api/LdapEncoder.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/AbandonRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/AddRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/AddResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/BindRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/BindResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/DeleteRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/DeleteResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/IntermediateResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyDnRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyDnResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/ModifyResponseDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchResultDoneDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchResultEntryDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchResultReferenceDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/UnbindRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AndFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/AttributeValueAssertionFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/ExtensibleMatchFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/NotFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/OrFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/PresentFilter.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/search/SubstringFilter.java

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java?rev=1650727&r1=1650726&r2=1650727&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
(original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AttributeValueAssertion.java
Sat Jan 10 09:22:12 2015
@@ -20,7 +20,7 @@
 package org.apache.directory.api.dsmlv2.request;
 
 
-import org.apache.directory.api.ldap.codec.api.LdapConstants;
+import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
 import org.apache.directory.api.ldap.model.entry.BinaryValue;
 import org.apache.directory.api.ldap.model.entry.StringValue;
 import org.apache.directory.api.ldap.model.entry.Value;
@@ -173,19 +173,19 @@ public class AttributeValueAssertion
 
         switch ( filterType )
         {
-            case LdapConstants.EQUALITY_MATCH_FILTER:
+            case LdapCodecConstants.EQUALITY_MATCH_FILTER:
                 sb.append( '=' );
                 break;
 
-            case LdapConstants.LESS_OR_EQUAL_FILTER:
+            case LdapCodecConstants.LESS_OR_EQUAL_FILTER:
                 sb.append( "<=" );
                 break;
 
-            case LdapConstants.GREATER_OR_EQUAL_FILTER:
+            case LdapCodecConstants.GREATER_OR_EQUAL_FILTER:
                 sb.append( ">=" );
                 break;
 
-            case LdapConstants.APPROX_MATCH_FILTER:
+            case LdapCodecConstants.APPROX_MATCH_FILTER:
                 sb.append( "~=" );
                 break;
         }

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java?rev=1650727&r1=1650726&r2=1650727&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
(original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/Dsmlv2Grammar.java
Sat Jan 10 09:22:12 2015
@@ -43,7 +43,7 @@ import org.apache.directory.api.i18n.I18
 import org.apache.directory.api.ldap.codec.api.CodecControl;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory;
-import org.apache.directory.api.ldap.codec.api.LdapConstants;
+import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
 import org.apache.directory.api.ldap.model.entry.BinaryValue;
 import org.apache.directory.api.ldap.model.entry.StringValue;
 import org.apache.directory.api.ldap.model.entry.Value;
@@ -1958,15 +1958,15 @@ public final class Dsmlv2Grammar extends
             {
                 if ( "add".equals( attributeValue ) )
                 {
-                    modifyRequest.setCurrentOperation( LdapConstants.OPERATION_ADD );
+                    modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_ADD );
                 }
                 else if ( "delete".equals( attributeValue ) )
                 {
-                    modifyRequest.setCurrentOperation( LdapConstants.OPERATION_DELETE );
+                    modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_DELETE
);
                 }
                 else if ( "replace".equals( attributeValue ) )
                 {
-                    modifyRequest.setCurrentOperation( LdapConstants.OPERATION_REPLACE );
+                    modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_REPLACE
);
                 }
                 else
                 {
@@ -2534,7 +2534,7 @@ public final class Dsmlv2Grammar extends
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
-                LdapConstants.EQUALITY_MATCH_FILTER );
+                LdapCodecConstants.EQUALITY_MATCH_FILTER );
 
             filter.setAssertion( assertion );
 
@@ -2579,7 +2579,7 @@ public final class Dsmlv2Grammar extends
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
-                LdapConstants.GREATER_OR_EQUAL_FILTER );
+                LdapCodecConstants.GREATER_OR_EQUAL_FILTER );
 
             filter.setAssertion( assertion );
 
@@ -2626,7 +2626,7 @@ public final class Dsmlv2Grammar extends
             }
 
             AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
-                LdapConstants.LESS_OR_EQUAL_FILTER );
+                LdapCodecConstants.LESS_OR_EQUAL_FILTER );
 
             filter.setAssertion( assertion );
 
@@ -2670,7 +2670,7 @@ public final class Dsmlv2Grammar extends
                 throw new XmlPullParserException( I18n.err( I18n.ERR_03012 ), xpp, null );
             }
 
-            AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter( LdapConstants.APPROX_MATCH_FILTER
);
+            AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter( LdapCodecConstants.APPROX_MATCH_FILTER
);
 
             filter.setAssertion( assertion );
 

Modified: directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java?rev=1650727&r1=1650726&r2=1650727&view=diff
==============================================================================
--- directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
(original)
+++ directory/shared/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/SearchRequestDsml.java
Sat Jan 10 09:22:12 2015
@@ -26,7 +26,7 @@ import java.util.List;
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.dsmlv2.ParserUtils;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.codec.api.LdapConstants;
+import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
 import org.apache.directory.api.ldap.model.entry.Value;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.filter.AndNode;
@@ -244,22 +244,22 @@ public class SearchRequestDsml
                     // Transform =, >=, <=, ~= filters
                     switch ( ( ( AttributeValueAssertionFilter ) filter ).getFilterType()
)
                     {
-                        case LdapConstants.EQUALITY_MATCH_FILTER:
+                        case LdapCodecConstants.EQUALITY_MATCH_FILTER:
                             branch = new EqualityNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
 
                             break;
 
-                        case LdapConstants.GREATER_OR_EQUAL_FILTER:
+                        case LdapCodecConstants.GREATER_OR_EQUAL_FILTER:
                             branch = new GreaterEqNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
 
                             break;
 
-                        case LdapConstants.LESS_OR_EQUAL_FILTER:
+                        case LdapCodecConstants.LESS_OR_EQUAL_FILTER:
                             branch = new LessEqNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
 
                             break;
 
-                        case LdapConstants.APPROX_MATCH_FILTER:
+                        case LdapCodecConstants.APPROX_MATCH_FILTER:
                             branch = new ApproximateNode( ava.getAttributeDesc(), ava.getAssertionValue()
);
 
                             break;

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1650727&r1=1650726&r2=1650727&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Sat Jan 10 09:22:12 2015
@@ -61,6 +61,7 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.api.MessageEncoderException;
 import org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector;
 import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequestImpl;
+import org.apache.directory.api.ldap.model.constants.LdapConstants;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
@@ -3366,7 +3367,7 @@ public class LdapNetworkConnection exten
             SearchRequest searchRequest = new SearchRequestImpl();
 
             searchRequest.setBase( dn );
-            searchRequest.setFilter( "(objectClass=*)" );
+            searchRequest.setFilter( LdapConstants.OBJECT_CLASS_STAR );
             searchRequest.setScope( SearchScope.OBJECT );
             searchRequest.addAttributes( attributes );
             searchRequest.setDerefAliases( AliasDerefMode.DEREF_ALWAYS );
@@ -3588,7 +3589,9 @@ public class LdapNetworkConnection exten
 
         try
         {
-            cursor = search( "", "(objectClass=*)", SearchScope.OBJECT, "*", "+" );
+            cursor = search( "", LdapConstants.OBJECT_CLASS_STAR, SearchScope.OBJECT,
+                SchemaConstants.ALL_USER_ATTRIBUTES,
+                SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES );
             cursor.next();
             rootDse = cursor.get();
         }

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java?rev=1650727&r1=1650726&r2=1650727&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
(original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/AttributeValueAssertion.java
Sat Jan 10 09:22:12 2015
@@ -20,7 +20,7 @@
 package org.apache.directory.api.ldap.codec;
 
 
-import org.apache.directory.api.ldap.codec.api.LdapConstants;
+import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
 import org.apache.directory.api.ldap.model.entry.BinaryValue;
 import org.apache.directory.api.ldap.model.entry.StringValue;
 import org.apache.directory.api.ldap.model.entry.Value;
@@ -173,19 +173,19 @@ public class AttributeValueAssertion
 
         switch ( filterType )
         {
-            case LdapConstants.EQUALITY_MATCH_FILTER:
+            case LdapCodecConstants.EQUALITY_MATCH_FILTER:
                 sb.append( '=' );
                 break;
 
-            case LdapConstants.LESS_OR_EQUAL_FILTER:
+            case LdapCodecConstants.LESS_OR_EQUAL_FILTER:
                 sb.append( "<=" );
                 break;
 
-            case LdapConstants.GREATER_OR_EQUAL_FILTER:
+            case LdapCodecConstants.GREATER_OR_EQUAL_FILTER:
                 sb.append( ">=" );
                 break;
 
-            case LdapConstants.APPROX_MATCH_FILTER:
+            case LdapCodecConstants.APPROX_MATCH_FILTER:
                 sb.append( "~=" );
                 break;
         }



Mime
View raw message