net.sf.ldaptemplate.support.filter
Class WhitespaceWildcardsFilter

java.lang.Object
  extended bynet.sf.ldaptemplate.support.filter.AbstractFilter
      extended bynet.sf.ldaptemplate.support.filter.CompareFilter
          extended bynet.sf.ldaptemplate.support.filter.EqualsFilter
              extended bynet.sf.ldaptemplate.support.filter.WhitespaceWildcardsFilter
All Implemented Interfaces:
Filter

public class WhitespaceWildcardsFilter
extends EqualsFilter

This filter takes a automatically converts all whitespace to * wildcards.

 WhitespaceWildcardsFilter filter = new WhitespaceWildcardsFilter("cn",
         "Some CN");
 System.out.println(filter.ecode());
 
would resut in: (cn=*Some*CN*)

Author:
Adam Skogman, Mattias Arthursson

Constructor Summary
WhitespaceWildcardsFilter(java.lang.String attribute, java.lang.String value)
           
 
Method Summary
protected  java.lang.String encodeValue(java.lang.String value)
          Encodes a value according to the rules for this filter.
 
Methods inherited from class net.sf.ldaptemplate.support.filter.EqualsFilter
getCompareString
 
Methods inherited from class net.sf.ldaptemplate.support.filter.CompareFilter
encode, equals, hashCode
 
Methods inherited from class net.sf.ldaptemplate.support.filter.AbstractFilter
encode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WhitespaceWildcardsFilter

public WhitespaceWildcardsFilter(java.lang.String attribute,
                                 java.lang.String value)
Method Detail

encodeValue

protected java.lang.String encodeValue(java.lang.String value)
Encodes a value according to the rules for this filter.

Overrides:
encodeValue in class CompareFilter
Parameters:
value - Value to encode.
Returns:
Encoded value.


Copyright © 2006 Jayway AB. All Rights Reserved.