org.apache.wiki.filters
Class CreoleFilter

java.lang.Object
  extended by org.apache.wiki.api.filters.BasicPageFilter
      extended by org.apache.wiki.filters.CreoleFilter
All Implemented Interfaces:
PageFilter

public class CreoleFilter
extends BasicPageFilter

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 insalling 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]]

Field Summary
 
Fields inherited from class org.apache.wiki.api.filters.BasicPageFilter
m_engine
 
Constructor Summary
CreoleFilter()
           
 
Method Summary
 void initialize(WikiEngine engine, Properties props)
          If you override this, you should call super.initialize() first.
 String preSave(WikiContext wikiContext, String content)
          This method is called before the page has been saved to the PageProvider.
 String preTranslate(WikiContext wikiContext, 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 org.apache.wiki.api.filters.BasicPageFilter
destroy, postSave, postTranslate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreoleFilter

public CreoleFilter()
Method Detail

initialize

public void initialize(WikiEngine engine,
                       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 BasicPageFilter
Parameters:
engine - The WikiEngine whic 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 String preSave(WikiContext wikiContext,
                      String content)
               throws FilterException
This method is called before the page has been saved to the PageProvider.

Specified by:
preSave in interface PageFilter
Overrides:
preSave in class BasicPageFilter
Parameters:
wikiContext - The WikiContext
content - The wikimarkup that the user just wanted to save.
Returns:
The modified wikimarkup
Throws:
FilterException - If something goes wrong. Throwing this causes the entire page processing to be abandoned.

preTranslate

public String preTranslate(WikiContext wikiContext,
                           String content)
                    throws FilterException
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.

Specified by:
preTranslate in interface PageFilter
Overrides:
preTranslate in class BasicPageFilter
Parameters:
wikiContext - The current wikicontext.
content - WikiMarkup.
Returns:
The modified wikimarkup content.
Throws:
FilterException - If something goes wrong. Throwing this causes the entire page processing to be abandoned.


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.