Search in sources :

Example 1 with CreoleToJSPWikiTranslator

use of org.apache.wiki.parser.CreoleToJSPWikiTranslator in project jspwiki by apache.

the class CreoleFilter method preSave.

/**
 *  {@inheritDoc}
 */
public String preSave(WikiContext wikiContext, String content) throws FilterException {
    try {
        String username = wikiContext.getCurrentUser().getName();
        Properties prop = wikiContext.getEngine().getWikiProperties();
        return new CreoleToJSPWikiTranslator().translateSignature(prop, content, username);
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        return e.getMessage();
    }
}
Also used : CreoleToJSPWikiTranslator(org.apache.wiki.parser.CreoleToJSPWikiTranslator) Properties(java.util.Properties) FilterException(org.apache.wiki.api.exceptions.FilterException)

Aggregations

Properties (java.util.Properties)1 FilterException (org.apache.wiki.api.exceptions.FilterException)1 CreoleToJSPWikiTranslator (org.apache.wiki.parser.CreoleToJSPWikiTranslator)1