Class CreoleFilter

  • All Implemented Interfaces:
    PageFilter

    public class CreoleFilter
    extends BasePageFilter

    Provides the Implementation for mixed mode creole: If you activate this filter, it will translate all markup that was saved as creole markup to JSPWiki markup. Therefore the files will be saved with mixed markup.

    WARNING: There's no turning back after installing this filter. Since your wiki pages are saved in Creole markup you can not deactivate it afterwards.

    WARNING: This feature is completely experimental, and is known to be broken. Use at your own risk.

    WARNING: The CreoleFilter feature is deprecated. JSPWiki is likely to implement a non-mixed mode Creole at some point, since turning on Creole will make new pages obsolete.

    See Also:
    [[WikiCreole:MixedMode]]
    • Constructor Summary

      Constructors 
      Constructor Description
      CreoleFilter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(Engine engine, java.util.Properties props)
      If you override this, you should call super.initialize() first.
      java.lang.String preSave​(Context wikiContext, java.lang.String content)
      This method is called before the page has been saved to the PageProvider.
      java.lang.String preTranslate​(Context wikiContext, java.lang.String content)
      This method is called whenever a page has been loaded from the provider, but not yet been sent through the markup-translation process.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • initialize

        public void initialize​(Engine engine,
                               java.util.Properties props)
                        throws FilterException
        If you override this, you should call super.initialize() first. Is called whenever the a new PageFilter is instantiated and reset.
        Specified by:
        initialize in interface PageFilter
        Overrides:
        initialize in class BasePageFilter
        Parameters:
        engine - The Engine which owns this PageFilter
        props - The properties ripped from filters.xml.
        Throws:
        FilterException - If the filter could not be initialized. If this is thrown, the filter is not added to the internal queues.
      • preSave

        public java.lang.String preSave​(Context wikiContext,
                                        java.lang.String content)
        This method is called before the page has been saved to the PageProvider.
        Parameters:
        wikiContext - The WikiContext
        content - The wikimarkup that the user just wanted to save.
        Returns:
        The modified wikimarkup. Default implementation returns the markup as received.
      • preTranslate

        public java.lang.String preTranslate​(Context wikiContext,
                                             java.lang.String content)
        This method is called whenever a page has been loaded from the provider, but not yet been sent through the markup-translation process. Note that you cannot do HTML translation here, because it will be escaped.
        Parameters:
        wikiContext - The current context.
        content - WikiMarkup.
        Returns:
        The modified wikimarkup content. Default implementation returns the markup as received.