directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1538546 - in /directory/escimo/trunk: common/src/main/java/org/apache/directory/scim/ common/src/main/java/org/apache/directory/scim/search/ ldap/src/main/java/org/apache/directory/scim/ldap/ ldap/src/main/resources/
Date Mon, 04 Nov 2013 10:44:19 GMT
Author: kayyagari
Date: Mon Nov  4 10:44:18 2013
New Revision: 1538546

URL: http://svn.apache.org/r1538546
Log:
o removed spaces from filter
o use presence filter if only 'attributes' parameter is present

Modified:
    directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/ScimUtil.java
    directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/search/FilterParser.java
    directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
    directory/escimo/trunk/ldap/src/main/resources/escimo-ldap-mapping.xml

Modified: directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/ScimUtil.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/ScimUtil.java?rev=1538546&r1=1538545&r2=1538546&view=diff
==============================================================================
--- directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/ScimUtil.java (original)
+++ directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/ScimUtil.java Mon
Nov  4 10:44:18 2013
@@ -90,6 +90,11 @@ public class ScimUtil
             ec = CONFLICT;
         }
         
+        if ( desc == null )
+        {
+            desc = ec.getDesc();
+        }
+        
         ErrorResponse.Error error = new ErrorResponse.Error( ec.getVal(), desc );
         
         error.setStackTrace( exceptionToStr( e ) );

Modified: directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/search/FilterParser.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/search/FilterParser.java?rev=1538546&r1=1538545&r2=1538546&view=diff
==============================================================================
--- directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/search/FilterParser.java
(original)
+++ directory/escimo/trunk/common/src/main/java/org/apache/directory/scim/search/FilterParser.java
Mon Nov  4 10:44:18 2013
@@ -79,6 +79,11 @@ public class FilterParser
      */
     public static FilterNode parse( String filter )
     {
+        if ( filter == null )
+        {
+            return null;
+        }
+        
         Position pos = new Position( 0 );
 
         int len = filter.length();

Modified: directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java?rev=1538546&r1=1538545&r2=1538546&view=diff
==============================================================================
--- directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
(original)
+++ directory/escimo/trunk/ldap/src/main/java/org/apache/directory/scim/ldap/LdapResourceProvider.java
Mon Nov  4 10:44:18 2013
@@ -45,6 +45,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.filter.ExprNode;
+import org.apache.directory.api.ldap.model.filter.PresenceNode;
 import org.apache.directory.api.ldap.model.message.LdapResult;
 import org.apache.directory.api.ldap.model.message.ModifyRequest;
 import org.apache.directory.api.ldap.model.message.ModifyRequestImpl;
@@ -305,7 +306,17 @@ public class LdapResourceProvider implem
         
         ResourceSchema scimSchema = schemaMapper.getSchemaWithUri( uri );
         
-        ExprNode ldapFilter = LdapUtil._scimToLdapFilter( filter, scimSchema, ldapSchema,
this );
+        ExprNode ldapFilter = null;
+        
+        if ( filter != null )
+        {
+            ldapFilter = LdapUtil._scimToLdapFilter( filter, scimSchema, ldapSchema, this
);
+        }
+        else
+        {
+            ldapFilter = org.apache.directory.api.ldap.model.filter.FilterParser.parse( scimSchema.getFilter()
);
+        }
+        
         LOG.debug( "LDAP filter {}", ldapFilter );
         
         SearchRequest sr = new SearchRequestImpl();

Modified: directory/escimo/trunk/ldap/src/main/resources/escimo-ldap-mapping.xml
URL: http://svn.apache.org/viewvc/directory/escimo/trunk/ldap/src/main/resources/escimo-ldap-mapping.xml?rev=1538546&r1=1538545&r2=1538546&view=diff
==============================================================================
--- directory/escimo/trunk/ldap/src/main/resources/escimo-ldap-mapping.xml (original)
+++ directory/escimo/trunk/ldap/src/main/resources/escimo-ldap-mapping.xml Mon Nov  4 10:44:18
2013
@@ -99,7 +99,7 @@
         <complex-attribute name="meta" handlerRef="metaHandler" />
     </schema>
 
-    <userType baseDn="ou=system" filter="(objectClass = inetOrgPerson)">
+    <userType baseDn="ou=system" filter="(objectClass=inetOrgPerson)">
         <schemaRef id="user-core" />
         <schemaRef id="enterprise-user" />
         <objectClasses>
@@ -107,7 +107,7 @@
         </objectClasses>
     </userType>
 
-    <groupType baseDn="ou=system" filter="(objectClass = groupOfNames)">
+    <groupType baseDn="ou=system" filter="(objectClass=groupOfNames)">
         <schemaRef id="group" />
         <objectClasses>
          <objectClass>groupOfNames</objectClass>



Mime
View raw message