com.atlassian.confluence.pages.wysiwyg
Class ConfluenceWysiwygConverterDWRWrapper

java.lang.Object
  extended by com.atlassian.confluence.pages.wysiwyg.ConfluenceWysiwygConverterDWRWrapper

public class ConfluenceWysiwygConverterDWRWrapper
extends java.lang.Object

This is a wrapper class used by DWR since it does not handle method overloading. DO NOT ADD OVERLOADED METHODS TO THIS CLASS


Constructor Summary
ConfluenceWysiwygConverterDWRWrapper()
           
 
Method Summary
 java.lang.String convertToPreview(java.lang.String inputText, java.lang.String pageIdString, java.lang.String spaceKey, java.lang.String fromMode)
          Converts text into XHTML for Preview
 java.lang.String convertWikiMarkupToXHtml(ContentEntityObject content, java.lang.String wikiMarkup)
          Converts wiki markup text into XHTML, using the page context of the content object.
 java.lang.String convertWikiMarkupToXHtmlWithoutPage(java.lang.String wikiMarkup, java.lang.String pageId)
          Converts wiki markup text into XHTML, using the page context of the content object specified by the id.
 java.lang.String convertWikiMarkupToXHtmlWithoutPageWithSpaceKey(java.lang.String wikiMarkup, java.lang.String pageId, java.lang.String spaceKey)
          Converts wiki markup text into XHTML, using the page context of the content object specified by the id.
 java.lang.String convertWikiMarkupToXHtmlWithSpaceKey(ContentEntityObject content, java.lang.String spaceKey, java.lang.String wikiMarkup)
          Converts wiki markup text into XHTML, using the page context of the content object.
 java.lang.String convertXHtmlToWikiMarkup(ContentEntityObject content, java.lang.String xhtml)
          Converts XHTML into wiki markup, using the page context of the content object
 java.lang.String convertXHtmlToWikiMarkupWithoutPage(java.lang.String xhtml, java.lang.String pageId)
          Converts XHTML into wiki markup, without using page context
 ConfluenceWysiwygConverter getConfluenceWysiwygConverter()
           
 boolean getUserWysiwygPreference()
          Retrieves the user's WYSIWYG editor preference and returns it.
 void setConfluenceWysiwygConverter(ConfluenceWysiwygConverter confluenceWysiwygConverter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceWysiwygConverterDWRWrapper

public ConfluenceWysiwygConverterDWRWrapper()
Method Detail

convertWikiMarkupToXHtml

public java.lang.String convertWikiMarkupToXHtml(ContentEntityObject content,
                                                 java.lang.String wikiMarkup)
Converts wiki markup text into XHTML, using the page context of the content object. If content is null, use convertWikiMarkupToXHtml(ContentEntityObject content, String spaceKey, String wikiMarkup)

Parameters:
content - - the object the markup is written within
wikiMarkup - - the text to be converted
Returns:
converted XHTML

convertWikiMarkupToXHtmlWithSpaceKey

public java.lang.String convertWikiMarkupToXHtmlWithSpaceKey(ContentEntityObject content,
                                                             java.lang.String spaceKey,
                                                             java.lang.String wikiMarkup)
Converts wiki markup text into XHTML, using the page context of the content object. If content is null, the spaceKey is used to define the page context.

Parameters:
content - - the object the markup is written within
spaceKey - - the space in which the content is written, used when content is null
wikiMarkup - - the text to be converted
Returns:
converted XHTML

convertWikiMarkupToXHtmlWithoutPage

public java.lang.String convertWikiMarkupToXHtmlWithoutPage(java.lang.String wikiMarkup,
                                                            java.lang.String pageId)
Converts wiki markup text into XHTML, using the page context of the content object specified by the id. If content is null, use convertWikiMarkupToXHtml(ContentEntityObject content, String spaceKey, String wikiMarkup)

Parameters:
wikiMarkup - - the text to be converted
pageId - - id of the object
Returns:
converted XHTML

convertWikiMarkupToXHtmlWithoutPageWithSpaceKey

public java.lang.String convertWikiMarkupToXHtmlWithoutPageWithSpaceKey(java.lang.String wikiMarkup,
                                                                        java.lang.String pageId,
                                                                        java.lang.String spaceKey)
Converts wiki markup text into XHTML, using the page context of the content object specified by the id. If content is null, the spaceKey is used to define the page context.

Parameters:
wikiMarkup - - the text to be converted
pageId - - id of the object
spaceKey - - the space in which the content is written, used when content is null
Returns:
converted XHTML

convertXHtmlToWikiMarkup

public java.lang.String convertXHtmlToWikiMarkup(ContentEntityObject content,
                                                 java.lang.String xhtml)
Converts XHTML into wiki markup, using the page context of the content object

Parameters:
content - - the content object the markup is writen within
xhtml - - the text to be converted
Returns:
converted wiki markup

convertXHtmlToWikiMarkupWithoutPage

public java.lang.String convertXHtmlToWikiMarkupWithoutPage(java.lang.String xhtml,
                                                            java.lang.String pageId)
Converts XHTML into wiki markup, without using page context

Parameters:
xhtml - - the text to be converted
pageId - - NOT USED
Returns:
converted wiki markup

convertToPreview

public java.lang.String convertToPreview(java.lang.String inputText,
                                         java.lang.String pageIdString,
                                         java.lang.String spaceKey,
                                         java.lang.String fromMode)
Converts text into XHTML for Preview

Parameters:
inputText - - text to be converted (can be either XHTML or Wiki Markup)
pageIdString - - the id of the content that the text is written within
spaceKey - - if the content object doesn't exist the space key is used
fromMode - - the form that the text is in (AbstractPageAction.RICHTEXT or AbstractPageAction.MARKUP)
Returns:
converted XHTML

getUserWysiwygPreference

public boolean getUserWysiwygPreference()
Retrieves the user's WYSIWYG editor preference and returns it. If the preference isn't set, the global settings are checked and returned.

Returns:
True if the use has set the WYSIWYG editor as the default, false otherwise

getConfluenceWysiwygConverter

public ConfluenceWysiwygConverter getConfluenceWysiwygConverter()

setConfluenceWysiwygConverter

public void setConfluenceWysiwygConverter(ConfluenceWysiwygConverter confluenceWysiwygConverter)


Copyright © 2003-2010 Atlassian. All Rights Reserved.