Package org.springframework.ldap.test
Class AttributeCheckContextMapper
java.lang.Object
org.springframework.ldap.test.AttributeCheckContextMapper
- All Implemented Interfaces:
ContextMapper<DirContextAdapter>
Dummy ContextMapper for testing purposes to check that the received
Attributes are the expected ones.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmapFromContext(Object ctx) Map a single LDAP Context to an object.voidsetAbsentAttributes(String[] absentAttributes) voidsetExpectedAttributes(String[] expectedAttributes) voidsetExpectedValues(String[] expectedValues)
-
Constructor Details
-
AttributeCheckContextMapper
public AttributeCheckContextMapper()
-
-
Method Details
-
mapFromContext
Description copied from interface:ContextMapperMap a single LDAP Context to an object. The supplied Objectctxis the object from a singleSearchResult,Binding, or a lookup operation.- Specified by:
mapFromContextin interfaceContextMapper<DirContextAdapter>- Parameters:
ctx- the context to map to an object. Typically this will be aDirContextAdapterinstance, unless a project specificDirObjectFactoryhas been specified on theContextSource.- Returns:
- an object built from the data in the context.
-
setAbsentAttributes
-
setExpectedAttributes
-
setExpectedValues
-