protected String trimText ( String text ) { if ( maxLengthText == - 1 ) return text ; if ( text == null ) return text ; if ( text . length ( ) <= maxLengthText ) return text ; return text . substring ( 0 , maxLengthText ) ; }
Returns a trimmed string or the original one if it is below the threshold set in the configuration .