com.atlassian.velocity.htmlsafe.event.referenceinsertion
Class EnableHtmlEscapingDirectiveHandler

java.lang.Object
  extended by com.atlassian.velocity.htmlsafe.event.referenceinsertion.EnableHtmlEscapingDirectiveHandler
All Implemented Interfaces:
org.apache.velocity.app.event.EventHandler, org.apache.velocity.app.event.ReferenceInsertionEventHandler, org.apache.velocity.util.ContextAware

public class EnableHtmlEscapingDirectiveHandler
extends Object
implements org.apache.velocity.app.event.ReferenceInsertionEventHandler, org.apache.velocity.util.ContextAware

Enables html escaping of references according to the EnableHtmlEscaping directive.

If the directive is present on the template it will escape the reference using a HtmlAnnotationEscaper handler; Otherwise, it will not escape the reference.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.ReferenceInsertionEventHandler
org.apache.velocity.app.event.ReferenceInsertionEventHandler.referenceInsertExecutor
 
Constructor Summary
EnableHtmlEscapingDirectiveHandler()
           
EnableHtmlEscapingDirectiveHandler(org.apache.velocity.app.event.ReferenceInsertionEventHandler htmlEscapingHandler)
           
 
Method Summary
 Object referenceInsert(String reference, Object value)
           
 void setContext(org.apache.velocity.context.Context context)
           
 void setDirectiveChecker(DirectiveChecker directiveChecker)
          Sets the DirectiveChecker that will be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnableHtmlEscapingDirectiveHandler

public EnableHtmlEscapingDirectiveHandler()

EnableHtmlEscapingDirectiveHandler

public EnableHtmlEscapingDirectiveHandler(org.apache.velocity.app.event.ReferenceInsertionEventHandler htmlEscapingHandler)
Method Detail

setContext

public void setContext(org.apache.velocity.context.Context context)
Specified by:
setContext in interface org.apache.velocity.util.ContextAware

setDirectiveChecker

public void setDirectiveChecker(DirectiveChecker directiveChecker)
Sets the DirectiveChecker that will be used.

Parameters:
directiveChecker - a DirectiveChecker

referenceInsert

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


Copyright © 2014 Atlassian. All Rights Reserved.