Class TemplatedExecutableSearchFilterBuilder.EscapingReferenceInsertionEventHandler

java.lang.Object
net.shibboleth.idp.attribute.resolver.dc.ldap.TemplatedExecutableSearchFilterBuilder.EscapingReferenceInsertionEventHandler
All Implemented Interfaces:
org.apache.velocity.app.event.EventHandler, org.apache.velocity.app.event.ReferenceInsertionEventHandler
Enclosing class:
TemplatedExecutableSearchFilterBuilder

protected static class TemplatedExecutableSearchFilterBuilder.EscapingReferenceInsertionEventHandler
extends Object
implements org.apache.velocity.app.event.ReferenceInsertionEventHandler
Escapes LDAP attribute values added to the template context.
  • Constructor Details

    • EscapingReferenceInsertionEventHandler

      protected EscapingReferenceInsertionEventHandler()
  • Method Details

    • referenceInsert

      public Object referenceInsert​(org.apache.velocity.context.Context context, String reference, Object value)
      Specified by:
      referenceInsert in interface org.apache.velocity.app.event.ReferenceInsertionEventHandler
    • encode

      private Object encode​(Object value)
      Returns SearchFilter.encodeValue(byte[]) if value is a string.
      Parameters:
      value - to encode
      Returns:
      encoded value if value is a string