Package net.shibboleth.idp.authn

# Class AbstractTemplateSearchDnResolver

java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.AbstractOperationFactory<SearchRequest,SearchResponse>
org.ldaptive.AbstractSearchOperationFactory
org.ldaptive.auth.SearchDnResolver
net.shibboleth.idp.authn.AbstractTemplateSearchDnResolver

All Implemented Interfaces:
  `DnResolver`, `ConnectionFactoryManager`, `Freezable`

Direct Known Subclasses:
  `TemplateSearchDnResolver`

public abstract class AbstractTemplateSearchDnResolver extends SearchDnResolver
Base class for `Template` based search dn resolvers.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected static class`
`AbstractTemplateSearchDnResolver.EscapingReferenceInsertionEventHandler`
Escapes LDAP attribute values added to the template context.

## Nested classes/interfaces inherited from class org.ldaptive.auth.SearchDnResolver

`SearchDnResolver.Builder`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.apache.velocity.app.event.ReferenceInsertionEventHandler`
`eventHandler`
Event handler used for escaping.
`private final Template`
`template`
Template.

### Fields inherited from class org.ldaptive.AbstractOperationFactory

`logger`

## Constructor Summary

Constructors
Constructor
Description
`AbstractTemplateSearchDnResolver(org.apache.velocity.app.VelocityEngine engine, String filter)`
Creates a new abstract template search DN resolver.

## Method Summary

Modifier and Type
Method
Description
`protected FilterTemplate`
`createFilterTemplate(User user)`
`Template`
`getTemplate()`
Returns the template.

### Methods inherited from class org.ldaptive.auth.SearchDnResolver

`builder, createSearchRequest, getAllowMultipleDns, getBaseDn, getDerefAliases, getResolveFromAttribute, getSubtreeSearch, getUserFilter, getUserFilterParameters, performLdapSearch, performResolveFromAttribute, resolve, resolveDn, setAllowMultipleDns, setBaseDn, setDerefAliases, setResolveFromAttribute, setSubtreeSearch, setUserFilter, setUserFilterParameters, toString`

### Methods inherited from class org.ldaptive.AbstractSearchOperationFactory

`createSearchOperation, createSearchOperation, freeze, getEntryHandlers, getReferenceHandlers, getSearchResultHandlers, setEntryHandlers, setReferenceHandlers, setSearchResultHandlers`

### Methods inherited from class org.ldaptive.AbstractOperationFactory

`getConnectionFactory, getControlHandlers, getExceptionHandler, getIntermediateResponseHandlers, getReferralHandlers, getRequestHandlers, getResultHandlers, getThrowCondition, getUnsolicitedNotificationHandlers, initializeOperation, setConnectionFactory, setControlHandlers, setExceptionHandler, setIntermediateResponseHandlers, setReferralHandlers, setRequestHandlers, setResultHandlers, setThrowCondition, setUnsolicitedNotificationHandlers`

### Methods inherited from class org.ldaptive.AbstractFreezable

`assertMutable, freeze, freeze, isFrozen`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### template

@Nonnull private final Template template
Template.

### eventHandler

private final org.apache.velocity.app.event.ReferenceInsertionEventHandler eventHandler
Event handler used for escaping.

## Constructor Details

### AbstractTemplateSearchDnResolver

public AbstractTemplateSearchDnResolver(@Nonnull org.apache.velocity.app.VelocityEngine engine, @Nonnull @NotEmpty String filter) throws org.apache.velocity.exception.VelocityException
Creates a new abstract template search DN resolver.

Parameters:
  `engine` - velocity engine
  `filter` - filter template
Throws:
  `org.apache.velocity.exception.VelocityException` - if velocity is not configured properly or the filter template is invalid

## Method Details

### getTemplate

@Nonnull public Template getTemplate()
Returns the template.

Returns:
  template

### createFilterTemplate

@Nonnull protected FilterTemplate createFilterTemplate(User user)

Overrides:
  `createFilterTemplate` in class `SearchDnResolver`