Spring LDAP

org.springframework.ldap.test
Class AttributeCheckContextMapper

java.lang.Object
  extended by org.springframework.ldap.test.AttributeCheckContextMapper
All Implemented Interfaces:
ContextMapper

public class AttributeCheckContextMapper
extends Object
implements ContextMapper

Dummy ContextMapper for testing purposes to check that the received Attributes are the expected ones.

Author:
Mattias Hellborg Arthursson

Constructor Summary
AttributeCheckContextMapper()
           
 
Method Summary
 Object mapFromContext(Object ctx)
          Map a single LDAP Context to an object.
 void setAbsentAttributes(String[] absentAttributes)
           
 void setExpectedAttributes(String[] expectedAttributes)
           
 void setExpectedValues(String[] expectedValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeCheckContextMapper

public AttributeCheckContextMapper()
Method Detail

mapFromContext

public Object mapFromContext(Object ctx)
Description copied from interface: ContextMapper
Map a single LDAP Context to an object. The supplied Object ctx is the object from a single SearchResult, Binding, or a lookup operation.

Specified by:
mapFromContext in interface ContextMapper
Parameters:
ctx - the context to map to an object. Typically this will be a DirContextAdapter instance, unless a project specific DirObjectFactory has been specified on the ContextSource.
Returns:
an object built from the data in the context.

setAbsentAttributes

public void setAbsentAttributes(String[] absentAttributes)

setExpectedAttributes

public void setExpectedAttributes(String[] expectedAttributes)

setExpectedValues

public void setExpectedValues(String[] expectedValues)

Spring LDAP