Package org.springframework.ldap.test
Class AttributeCheckContextMapper
- java.lang.Object
-
- org.springframework.ldap.test.AttributeCheckContextMapper
-
- All Implemented Interfaces:
ContextMapper<DirContextAdapter>
public class AttributeCheckContextMapper extends java.lang.Object implements ContextMapper<DirContextAdapter>
Dummy ContextMapper for testing purposes to check that the received Attributes are the expected ones.
-
-
Constructor Summary
Constructors Constructor Description AttributeCheckContextMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirContextAdapter
mapFromContext(java.lang.Object ctx)
Map a single LDAP Context to an object.void
setAbsentAttributes(java.lang.String[] absentAttributes)
void
setExpectedAttributes(java.lang.String[] expectedAttributes)
void
setExpectedValues(java.lang.String[] expectedValues)
-
-
-
Method Detail
-
mapFromContext
public DirContextAdapter mapFromContext(java.lang.Object ctx)
Description copied from interface:ContextMapper
Map a single LDAP Context to an object. The supplied Objectctx
is the object from a singleSearchResult
,Binding
, or a lookup operation.- Specified by:
mapFromContext
in interfaceContextMapper<DirContextAdapter>
- Parameters:
ctx
- the context to map to an object. Typically this will be aDirContextAdapter
instance, unless a project specificDirObjectFactory
has been specified on theContextSource
.- Returns:
- an object built from the data in the context.
-
setAbsentAttributes
public void setAbsentAttributes(java.lang.String[] absentAttributes)
-
setExpectedAttributes
public void setExpectedAttributes(java.lang.String[] expectedAttributes)
-
setExpectedValues
public void setExpectedValues(java.lang.String[] expectedValues)
-
-