com.atlassian.bamboo.util
Class HtmlUtils

java.lang.Object
  extended by com.atlassian.bamboo.util.HtmlUtils

public class HtmlUtils
extends Object


Field Summary
static String WBR
           
 
Constructor Summary
HtmlUtils()
           
 
Method Summary
 String appendUrls(String url1, String url2)
           
 String breakOnWord(String text)
           
 String getAsPreformattedText(Object o)
          Escapes the passed object as a string.
 String getFirstNLines(String s, int lines)
          Returns the first n lines of the passed string
 String getFirstNLinesWithTrailer(String s, int lines)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WBR

public static final String WBR
See Also:
Constant Field Values
Constructor Detail

HtmlUtils

public HtmlUtils()
Method Detail

getAsPreformattedText

public String getAsPreformattedText(Object o)
Escapes the passed object as a string. The method:
  1. Escapes HTML
  2. replaces all double spaces with   chars
  3. Allows \/ characters to have line breaks after them

Parameters:
o - - Any object, can be null
Returns:
escaped string

getFirstNLines

public String getFirstNLines(String s,
                             int lines)
Returns the first n lines of the passed string

Parameters:
s - - can be null
lines - must be > 0
Returns:
first n lines inclusive. So if there are no new line characters, the entire string is returned. Empty string if null was passed

getFirstNLinesWithTrailer

public String getFirstNLinesWithTrailer(String s,
                                        int lines)

breakOnWord

public String breakOnWord(String text)

appendUrls

public String appendUrls(String url1,
                         String url2)


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.