jetbrains.buildServer.web.util
Class RegExpTextTransformer

java.lang.Object
  extended by jetbrains.buildServer.web.util.RegExpTextTransformer
All Implemented Interfaces:
MainConfigProcessor, ServerExtension, TeamCityExtension, XmlExternalizable, XmlStorable

public class RegExpTextTransformer
extends java.lang.Object
implements MainConfigProcessor

This class provides facility to process text with configurable rexexp patterns

Author:
AG, Maxim Podkolzine

Nested Class Summary
static interface RegExpTextTransformer.PatternBuilder
           
static class RegExpTextTransformer.TransformPattern
           
 
Constructor Summary
RegExpTextTransformer(SBuildServer buildServer)
           
 
Method Summary
static void addTransformPattern(RegExpTextTransformer.TransformPattern pattern)
           
static void addTransformPattern(RegExpTextTransformer.TransformPattern pattern, boolean replace, java.lang.Integer index)
           
static void clearPatterns()
           
static java.lang.String format(java.lang.String text, javax.servlet.jsp.JspContext context)
           
 void readFrom(org.jdom.Element rootElement)
          Read this element data from given JDOM node
static void removeTransformPattern(java.lang.String description)
           
 void writeTo(org.jdom.Element parentElement)
          Write data to the JDOM element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExpTextTransformer

public RegExpTextTransformer(@NotNull
                             SBuildServer buildServer)
Method Detail

format

public static java.lang.String format(@NotNull
                                      java.lang.String text,
                                      @NotNull
                                      javax.servlet.jsp.JspContext context)

readFrom

public void readFrom(@NotNull
                     org.jdom.Element rootElement)
Description copied from interface: XmlStorable
Read this element data from given JDOM node

Specified by:
readFrom in interface XmlStorable
Parameters:
rootElement - element which contains information about this storable

writeTo

public void writeTo(@NotNull
                    org.jdom.Element parentElement)
Description copied from interface: XmlExternalizable
Write data to the JDOM element

Specified by:
writeTo in interface XmlExternalizable
Parameters:
parentElement - - parent element to write data to

addTransformPattern

public static void addTransformPattern(@NotNull
                                       RegExpTextTransformer.TransformPattern pattern)

addTransformPattern

public static void addTransformPattern(@NotNull
                                       RegExpTextTransformer.TransformPattern pattern,
                                       boolean replace,
                                       @Nullable
                                       java.lang.Integer index)

removeTransformPattern

public static void removeTransformPattern(@NotNull
                                          java.lang.String description)

clearPatterns

public static void clearPatterns()