Class EscapeReference

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.slf4j.Logger log  
    • Constructor Summary

      Constructors 
      Constructor Description
      EscapeReference()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.String escape​(java.lang.Object text)
      Escape the given text.
      protected abstract java.lang.String getMatchAttribute()
      Specify the configuration attribute that specifies the regular expression.
      protected RuntimeServices getRuntimeServices()
      Retrieve a reference to RuntimeServices.
      java.lang.Object referenceInsert​(Context context, java.lang.String reference, java.lang.Object value)
      Escape the provided text if it matches the configured regular expression.
      void setRuntimeServices​(RuntimeServices rs)
      Called automatically when event cartridge is initialized.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected org.slf4j.Logger log
    • Constructor Detail

      • EscapeReference

        public EscapeReference()
    • Method Detail

      • escape

        protected abstract java.lang.String escape​(java.lang.Object text)
        Escape the given text. Override this in a subclass to do the actual escaping.
        Parameters:
        text - the text to escape
        Returns:
        the escaped text
      • getMatchAttribute

        protected abstract java.lang.String getMatchAttribute()
        Specify the configuration attribute that specifies the regular expression. Ideally should be in a form
        eventhandler.escape.XYZ.match

        where XYZ is the type of escaping being done.

        Returns:
        configuration attribute
      • referenceInsert

        public java.lang.Object referenceInsert​(Context context,
                                                java.lang.String reference,
                                                java.lang.Object value)
        Escape the provided text if it matches the configured regular expression.
        Specified by:
        referenceInsert in interface ReferenceInsertionEventHandler
        Parameters:
        reference -
        value -
        context - current context
        Returns:
        Escaped text.
      • getRuntimeServices

        protected RuntimeServices getRuntimeServices()
        Retrieve a reference to RuntimeServices. Use this for checking additional configuration properties.
        Returns:
        The current runtime services object.