public class TemplatedExecutableSearchFilterBuilder extends AbstractExecutableSearchFilterBuilder
ExecutableSearchBuilder that generates the search filter to
be executed by evaluating a Template against the currently resolved attributes within a
AttributeResolutionContext.| Modifier and Type | Class and Description |
|---|---|
protected static class |
TemplatedExecutableSearchFilterBuilder.EscapingReferenceInsertionEventHandler
Escapes LDAP attribute values added to the template context.
|
| Modifier and Type | Field and Description |
|---|---|
private VelocityEngine |
engine
VelocityEngine.
|
private ReferenceInsertionEventHandler |
eventHandler
Event handler used for escaping.
|
private org.slf4j.Logger |
log
Class logger.
|
private Template |
template
Template evaluated to generate a search filter.
|
private String |
templateText
Template (as Text) to be evaluated.
|
private boolean |
v2Compatibility
Do we need to make ourself V2 Compatible?
|
| Constructor and Description |
|---|
TemplatedExecutableSearchFilterBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ExecutableSearchFilter |
build(AttributeResolutionContext resolutionContext,
Map<String,List<IdPAttributeValue<?>>> dependencyAttributes)
Creates an executable search that can be executed against a data source in order to produce results.
|
protected void |
doInitialize() |
ReferenceInsertionEventHandler |
getReferenceInsertionEventHandler()
Gets the
ReferenceInsertionEventHandler to be used. |
Template |
getTemplate()
Gets the template to be evaluated.
|
String |
getTemplateText()
Gets the template text to be evaluated.
|
VelocityEngine |
getVelocityEngine()
Gets the
VelocityEngine to be used. |
boolean |
isV2Compatibility()
Are we in V2 Compatibility mode?
|
protected String |
merge(VelocityContext context)
Invokes
Template.merge(org.apache.velocity.context.Context) on the supplied context. |
void |
setReferenceInsertionEventHandler(ReferenceInsertionEventHandler handler)
Sets the
ReferenceInsertionEventHandler to be used. |
void |
setTemplateText(String velocityTemplate)
Sets the template to be evaluated.
|
void |
setV2Compatibility(boolean compat)
What is out V2 Compatibility mode.
|
void |
setVelocityEngine(VelocityEngine velocityEngine)
Sets the
VelocityEngine to be used. |
builddestroy, doDestroy, initialize, isDestroyed, isInitializedprivate final org.slf4j.Logger log
private Template template
private String templateText
private VelocityEngine engine
private ReferenceInsertionEventHandler eventHandler
private boolean v2Compatibility
public TemplatedExecutableSearchFilterBuilder()
@NonnullAfterInit public Template getTemplate()
@NonnullAfterInit public String getTemplateText()
public void setTemplateText(@Nullable String velocityTemplate)
velocityTemplate - template to be evaluated@Nullable @NonnullAfterInit public VelocityEngine getVelocityEngine()
VelocityEngine to be used.public void setVelocityEngine(VelocityEngine velocityEngine)
VelocityEngine to be used.velocityEngine - engine to be used@Nullable public ReferenceInsertionEventHandler getReferenceInsertionEventHandler()
ReferenceInsertionEventHandler to be used.public void setReferenceInsertionEventHandler(@Nullable ReferenceInsertionEventHandler handler)
ReferenceInsertionEventHandler to be used.handler - reference insertion event handler to be usedpublic boolean isV2Compatibility()
public void setV2Compatibility(boolean compat)
compat - The mode to set.public ExecutableSearchFilter build(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue<?>>> dependencyAttributes) throws ResolutionException
resolutionContext - current request contextdependencyAttributes - made available to the executable searchResolutionException - throw if their is a problem creating the executable searchprotected String merge(@Nonnull VelocityContext context)
Template.merge(org.apache.velocity.context.Context) on the supplied context.context - to mergeprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.