com.atlassian.renderer.v2
Class RenderUtils

java.lang.Object
  extended by com.atlassian.renderer.v2.RenderUtils

public class RenderUtils
extends Object

There is also a RendererUtil class in the util package.


Field Summary
static String WIKI_SRC_CLASS
           
 
Constructor Summary
RenderUtils()
           
 
Method Summary
static String blockError(String message, String contents)
           
static String error(RenderContext context, String message, String wysiwygContents, boolean suppressMessageOnWysiwyg)
           
static String error(String message)
           
static String getParameter(Map parameters, String key, int alternateIndex)
           
static boolean isBlank(String str)
           
static String stripCarriageReturns(String s)
          Remove any carriage returns (\r) from a string.
static void tabTo(StringBuffer buf, int depth)
           
static String trimInitialNewline(String s)
          Remove a single initial \n.
static String trimNewlinesAndEscapedNewlines(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIKI_SRC_CLASS

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

RenderUtils

public RenderUtils()
Method Detail

isBlank

public static boolean isBlank(String str)

blockError

public static String blockError(String message,
                                String contents)

error

public static String error(RenderContext context,
                           String message,
                           String wysiwygContents,
                           boolean suppressMessageOnWysiwyg)

error

public static String error(String message)

tabTo

public static void tabTo(StringBuffer buf,
                         int depth)

getParameter

public static String getParameter(Map parameters,
                                  String key,
                                  int alternateIndex)

trimInitialNewline

public static String trimInitialNewline(String s)
Remove a single initial \n. Alternative newline encodings such as \r\n should be pre-handled by other mechanisms such as stripCarriageReturns(String).

Parameters:
s - string to remove newline from
Returns:
either s, or a slightly modified s

stripCarriageReturns

public static String stripCarriageReturns(String s)
Remove any carriage returns (\r) from a string.


trimNewlinesAndEscapedNewlines

public static String trimNewlinesAndEscapedNewlines(String s)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.