Package jenkins.security.plugins.ldap
Class LDAPExtendedTemplate
java.lang.Object
org.springframework.ldap.core.LdapTemplate
jenkins.security.plugins.ldap.LDAPExtendedTemplate
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.ldap.core.LdapOperations
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class LDAPExtendedTemplate
extends org.springframework.ldap.core.LdapTemplate
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.ldap.core.LdapTemplate
org.springframework.ldap.core.LdapTemplate.MappingCollectingNameClassPairCallbackHandler<T extends Object>, org.springframework.ldap.core.LdapTemplate.NullDirContextProcessor
-
Constructor Summary
ConstructorsConstructorDescriptionLDAPExtendedTemplate
(org.springframework.ldap.core.ContextSource dirContextFactory) -
Method Summary
Modifier and TypeMethodDescription<T> List<? extends T>
searchForAllEntries
(String base, String filter, Object[] filterArgs, String[] attributeNames, LdapEntryMapper<T> mapper) Performs a search using the specified filter and returns a List of all matching entries using the givenLdapEntryMapper
to convert each entry into a result.<T> T
searchForFirstEntry
(String base, String filter, Object[] filterArgs, String[] attributeNames, LdapEntryMapper<T> mapper) Performs a search using the specified filter and returns the first matching entry using the givenLdapEntryMapper
to convert the entry into a result.Methods inherited from class org.springframework.ldap.core.LdapTemplate
afterPropertiesSet, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, bind, bind, bind, create, delete, deleteRecursively, executeReadOnly, executeReadWrite, find, find, findAll, findAll, findByDn, findForStream, findOne, getContextSource, getObjectDirectoryMapper, list, list, list, list, list, list, listBindings, listBindings, listBindings, listBindings, listBindings, listBindings, listBindings, listBindings, lookup, lookup, lookup, lookup, lookup, lookup, lookup, lookup, lookup, lookup, lookupContext, lookupContext, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, rebind, rename, rename, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, search, searchForContext, searchForObject, searchForObject, searchForObject, searchForObject, searchForObject, searchForStream, searchForStream, setContextSource, setDefaultCountLimit, setDefaultSearchScope, setDefaultTimeLimit, setIgnoreNameNotFoundException, setIgnorePartialResultException, setIgnoreSizeLimitExceededException, setObjectDirectoryMapper, unbind, unbind, unbind, unbind, update
-
Constructor Details
-
LDAPExtendedTemplate
public LDAPExtendedTemplate(org.springframework.ldap.core.ContextSource dirContextFactory)
-
-
Method Details
-
searchForFirstEntry
@CheckForNull public <T> T searchForFirstEntry(@NonNull String base, @NonNull String filter, Object[] filterArgs, String[] attributeNames, @NonNull LdapEntryMapper<T> mapper) Performs a search using the specified filter and returns the first matching entry using the givenLdapEntryMapper
to convert the entry into a result.- Parameters:
base
- the DN to search in. Must not be null.filter
- the search filter to use. Must not be null.filterArgs
- the arguments to substitute into the search filter. Passing null is equivalent to an empty array.attributeNames
- the attributes whose values will be retrieved. Passing null returns all attributes.mapper
- theLdapEntryMapper
that will convert the search results into returned values. Must not be null.- Returns:
- the first matching entry converted using the specified
LdapEntryMapper
, or null if no matching entry was found.
-
searchForAllEntries
@NonNull public <T> List<? extends T> searchForAllEntries(@NonNull String base, @NonNull String filter, Object[] filterArgs, String[] attributeNames, @NonNull LdapEntryMapper<T> mapper) Performs a search using the specified filter and returns a List of all matching entries using the givenLdapEntryMapper
to convert each entry into a result.- Parameters:
base
- the DN to search in. Must not be null.filter
- the search filter to use. Must not be null.filterArgs
- the arguments to substitute into the search filter. Passing null is equivalent to an empty array.attributeNames
- the attributes whose values will be retrieved. Passing null returns all attributes.mapper
- theLdapEntryMapper
that will convert the search results into returned values. Must not be null.- Returns:
- a List of matching entries converted using the specified
LdapEntryMapper
.
-