private String convertWikimarkupToViewFormat(String value, ConversionContext conversionContext, List<RuntimeException> errors) throws XhtmlException, XMLStreamException { return xhtmlUtils.convertStorageToView(xhtmlUtils.convertWikiToStorage(value, conversionContext, errors), conversionContext); } }
/** * From the old {@link com.atlassian.renderer.v2.macro.Macro} interface. * Converts the old wiki markup body into storage format XHTML, then delegates to the newer interface. */ @Override public String execute(Map macroParameters, String bodyWikiMarkup, RenderContext renderContext) { // TODO SHouldn't we do something with this list? final List<RuntimeException> wikiMarkupToStorageConversionErrors = newArrayList(); final ConversionContext conversionContext = new DefaultConversionContext(renderContext); final String storageFormatBody = xhtmlContent.convertWikiToStorage( bodyWikiMarkup, conversionContext, wikiMarkupToStorageConversionErrors ); return execute(macroParameters, storageFormatBody, conversionContext); }
private String getBookmarkParentPageContent(Space space, Page parentPage) { List<RuntimeException> conversionErrors = new ArrayList<RuntimeException>(); Map<String, Object> velocityContext = velocityHelperService.createDefaultVelocityContext(); velocityContext.put("spaceName", space.getName()); velocityContext.put("spaceKey", space.getKey()); String wikiMarkup = velocityHelperService.getRenderedTemplate("templates/plugins/socialbookmarking/bookmarkparentpage.vm", velocityContext); String storageXhtml = xhtmlContent.convertWikiToStorage(wikiMarkup, new DefaultConversionContext(parentPage.toPageContext()), conversionErrors); if (!conversionErrors.isEmpty()) { LOG.error(String.format("Unable to convert parent page wiki markup below to XHTML storage:\n%s", wikiMarkup)); for (RuntimeException conversionError : conversionErrors) LOG.error("Conversion error", conversionError); } return storageXhtml; }
: xhtmlContent.convertWikiToStorage(bodyText, conversionContext, conversionErrors);
xhtmlContent.convertWikiToStorage(bodyText, conversionContext, conversionErrors), conversionContext );
commentManager.updateCommentContent( pageComment, xhtmlContent.convertWikiToStorage( StringUtils.defaultString((String) commentStruct.get("content")), new DefaultConversionContext(commentPage.toPageContext()), commentPage, parentComment, xhtmlContent.convertWikiToStorage( StringUtils.defaultString((String) commentStruct.get("content")), new DefaultConversionContext(commentPage.toPageContext()),