directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1655643 - in /directory/site/trunk/content/api: user-guide.mdtext user-guide/2-basic-ldap-api-usage.mdtext user-guide/2.10-ldap-connection-template.mdtext user-guide/2.11-filter-builder.mdtext
Date Thu, 29 Jan 2015 13:06:32 GMT
Author: elecharny
Date: Thu Jan 29 13:06:32 2015
New Revision: 1655643

URL: http://svn.apache.org/r1655643
Log:
Added a page for the FilterBuilder

Added:
    directory/site/trunk/content/api/user-guide/2.11-filter-builder.mdtext
Modified:
    directory/site/trunk/content/api/user-guide.mdtext
    directory/site/trunk/content/api/user-guide/2-basic-ldap-api-usage.mdtext
    directory/site/trunk/content/api/user-guide/2.10-ldap-connection-template.mdtext

Modified: directory/site/trunk/content/api/user-guide.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/user-guide.mdtext?rev=1655643&r1=1655642&r2=1655643&view=diff
==============================================================================
--- directory/site/trunk/content/api/user-guide.mdtext (original)
+++ directory/site/trunk/content/api/user-guide.mdtext Thu Jan 29 13:06:32 2015
@@ -62,6 +62,7 @@ We are quite interested to improve the c
     *  [2.8 - Comparing entries (e)](user-guide/2.8-comparing.html)
     *  [2.9 - Exception management (...)](user-guide/2.9-exception-management.html)
     *  [2.10 - The LdapConnectionTemplate](user-guide/2.10-ldap-connection-template.html)
+    *  [2.11 - The FilterBuilder](user-guide/2.11-filter-builder.html)
 
 * [3 - Advanced LDAP API usage (...)](user-guide/3-advanced-ldap-api-usage.html)
 

Modified: directory/site/trunk/content/api/user-guide/2-basic-ldap-api-usage.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/user-guide/2-basic-ldap-api-usage.mdtext?rev=1655643&r1=1655642&r2=1655643&view=diff
==============================================================================
--- directory/site/trunk/content/api/user-guide/2-basic-ldap-api-usage.mdtext (original)
+++ directory/site/trunk/content/api/user-guide/2-basic-ldap-api-usage.mdtext Thu Jan 29 13:06:32
2015
@@ -41,3 +41,4 @@ We provide three different set of method
 * [2.8 - Comparing entries (e)](2.8-comparing.html)
 * [2.9 - Exception management (...)](2.9-exception-management.html)
 * [2.10 - The LdapConnectionTemplate](2.10-ldap-connection-template.html)
+* [2.11 - The FilterBuilder](2.11-filter-builder.html)

Modified: directory/site/trunk/content/api/user-guide/2.10-ldap-connection-template.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/user-guide/2.10-ldap-connection-template.mdtext?rev=1655643&r1=1655642&r2=1655643&view=diff
==============================================================================
--- directory/site/trunk/content/api/user-guide/2.10-ldap-connection-template.mdtext (original)
+++ directory/site/trunk/content/api/user-guide/2.10-ldap-connection-template.mdtext Thu Jan
29 13:06:32 2015
@@ -3,8 +3,8 @@ NavPrev: 2.9-exception-management.html
 NavPrevText: 2.9 - Exception management
 NavUp: 2-basic-ldap-api-usage.html
 NavUpText: 2 - Basic LDAP API usage
-NavNext: 3-advanced-ldap-api-usage.html
-NavNextText: 3 - Advanced LDAP API Usage
+NavNext: 2.11-filter-builder.html
+NavNextText: 2.11 - The FilterBuilder 
 Notice: Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information

Added: directory/site/trunk/content/api/user-guide/2.11-filter-builder.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/user-guide/2.11-filter-builder.mdtext?rev=1655643&view=auto
==============================================================================
--- directory/site/trunk/content/api/user-guide/2.11-filter-builder.mdtext (added)
+++ directory/site/trunk/content/api/user-guide/2.11-filter-builder.mdtext Thu Jan 29 13:06:32
2015
@@ -0,0 +1,170 @@
+Title: 2.11 - The FilterBuilder
+NavPrev: 2.10-ldap-connection-template.html
+NavPrevText: 2.10 - The LdapConnectionTemplate
+NavUp: 2-basic-ldap-api-usage.html
+NavUpText: 2 - Basic LDAP API usage
+NavNext: 3-advanced-ldap-api-usage.html
+NavNextText: 3 - Advanced LDAP API Usage
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    .
+    http://www.apache.org/licenses/LICENSE-2.0
+    .
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+2.11 - The FilterBuilder(e)
+===========================
+
+This class is a builder for constructing well formed search filters according to RFC 1960.
This builder is most convenient when you use static imports. For example:
+
+     import static org.apache.directory.ldap.client.api.search.FilterBuilder.and;
+     import static org.apache.directory.ldap.client.api.search.FilterBuilder.equal;
+     import static org.apache.directory.ldap.client.api.search.FilterBuilder.or;
+     
+     ...
+     
+             String filter = 
+                     or(
+                         and( 
+                             equal( "givenName", "kermit" ), 
+                             equal( "sn", "the frog" ) ),
+                         and( 
+                             equal( "givenName", "miss" ), 
+                             equal( "sn", "piggy" ) ) )
+                     .toString()
+     
+
+## And filter 
+
+
+Returns a new FilterBuilder that will & together all of the supplied filters. For example:
+
+ and( equal( "givenName", "kermit" ), equal( "sn", "the frog" ) ).toString()
+ 
+would result in the string: _(&(givenName=kermit)(sn=the frog))_
+ 
+Which would match all entries with a given name of kermit and a surname the frog.
+
+
+## Or filter
+
+Returns a new FilterBuilder that will | together all of the supplied filters. For example:
+
+    or( equal( "givenName", "kermit" ), equal( "givenName", "walter" ) ).toString()
+ 
+would result in the string: _(|(givenName=kermit)(givenName=walter))_
+ 
+Which would match any entry with the givenName of either kermit or walter.
+
+
+## Not filter
+
+Returns a new FilterBuilder for negating another filter. For example:
+
+    not( present( "givenName" ) ).toString();
+ 
+would result in the string: _(!(givenName=*))_
+
+
+## Present Filter
+
+Returns a new FilterBuilder for testing the presence of an attributes. For example:
+
+    present( "givenName" ).toString();
+ 
+would result in the string: _(givenName=*)_
+ 
+Which would match any entry that has a givenName attribute.
+
+
+## Equal Filter
+
+Returns a new FilterBuilder for testing equality of an attribute. For example:
+
+    equal( "cn", "Kermit The Frog" ).toString();
+ 
+would result in the string: _(cn>=Kermit The Frog)_
+ 
+Which would match entries with the common name Kermit The Frog.
+
+## Extended Filter
+To be completed...
+
+## Less Or Equal Filter
+Returns a new FilterBuilder for testing lexicographical less than. For example:
+
+    lessThanOrEqual( "sn", "mzzzzzz" ).toString();
+ 
+would result in the string: _(sn<=mzzzzzz)_
+ 
+which would match results whose surname starts with the first half of the alphabet. Note,
this is not perfect, but if you know anybody with a last name that starts with an _m_ followed
by six _z's__...
+
+## Greater Or Equal Filter
+
+Returns a new FilterBuilder for testing lexicographical greater than. For example:
+
+    greaterThanOrEqual( "sn", "n" ).toString();
+ 
+would result in the string: _(sn>=n)_
+ 
+which would match results whose surname starts with the second half of the alphabet.
+
+## Approximate Filter
+
+## StartsWith Filter
+
+## EndsWith Filter
+
+Returns a new FilterBuilder that will construct a SubString filter, with an initialany parts,
but no final part. For instance:
+
+    startswith( "sn", "Th", "Soft", "Foun" )).toString()
+ 
+would result in the string: _(sn=Th*Soft*Foun*)_
+ 
+Which would match any entry with the sn starting with 'Th', and having a Soft and Foun strings
in the middle, like 'The Apache Software Foundation'.
+
+## Contains Filter
+
+Returns a new FilterBuilder that will construct a SubString filter, with zero to N any parts,
but no initial or final parts. For instance:
+
+    contains( "sn", "Soft", "Foun" )).toString()
+ 
+would result in the string: _(sn=*Soft*Foun*)_
+ 
+Which would match any entry with the sn having a Soft and Foun strings in the middle, like
'The Apache Software Foundation'.
+
+## Substring Filter
+
+Returns a new FilterBuilder that will construct a SubString filter, with a initial part,
zero to N any parts, and a final part. For instance:
+
+    substring( "sn", "The", "Soft", "Foun", "ion" )).toString()
+ 
+would result in the string: _(sn=The*Soft*Foun*ion)_
+ 
+Which would match any entry with the sn having a Soft and Foun strings in the middle, starts
with The and ends with ion like 'The Apache Software Foundation'.
+
+Note that if we have only two strings in the parts, they will be the initial and final ones
:
+
+    substring( "sn", "The", "ion" )).toString()
+ 
+would result in the string: _(sn=The*ion)_
+
+## Approximate Filter
+
+Returns a new FilterBuilder for testing the approximate equality of an attribute. For example:
+
+    approximatelyEqual( "l", "san fransico" ).toString();
+ 
+would result in the string: _(l~=san fransico)_
+ 
+Which MIGHT match results whose locality is San Francisco. The matching rule used to apply
this filter is dependent on the server implementation.



Mime
View raw message