codesimian
Interface Wiki

All Known Implementing Classes:
DefaultWiki

public interface Wiki

see DefaultWiki


Method Summary
 java.lang.String[] allPageNames()
           
 int countPages(java.lang.String name)
           
 java.lang.String newestPage(java.lang.String name)
           
 boolean newPage(java.lang.String name, ImmutBytes bytes, Liquid liquidModifyWiki)
          requires a certain amount of liquid per byte plus an amount depending on the name
 java.lang.String page(java.lang.String name, int versionIndex)
          returns null if file does not exist
 boolean restoreOldPage(java.lang.String name, int versionIndex, Liquid liquidModifyWiki)
          requires a certain amount of liquid depending on the page and version.
 java.lang.String rootPath()
          returns a path of an inner folder (see InnerFiles.java) that ends with "/", like "wiki/".
 java.lang.String[] search(java.lang.String searchForThis, int targetReturnedArraySize, Liquid liquidCpuTime)
          Returns a list of page names whose contents certainly contain the search text.
 

Method Detail

rootPath

java.lang.String rootPath()
returns a path of an inner folder (see InnerFiles.java) that ends with "/", like "wiki/". This is where the pages of this Wiki are stored.


countPages

int countPages(java.lang.String name)

restoreOldPage

boolean restoreOldPage(java.lang.String name,
                       int versionIndex,
                       Liquid liquidModifyWiki)
                       throws NeedLiquid
requires a certain amount of liquid depending on the page and version. Try more and more liquid until this returns true (the only time Liquid will be removed).

Throws:
NeedLiquid

newPage

boolean newPage(java.lang.String name,
                ImmutBytes bytes,
                Liquid liquidModifyWiki)
                throws NeedLiquid
requires a certain amount of liquid per byte plus an amount depending on the name

Throws:
NeedLiquid

allPageNames

java.lang.String[] allPageNames()

page

java.lang.String page(java.lang.String name,
                      int versionIndex)
returns null if file does not exist


newestPage

java.lang.String newestPage(java.lang.String name)

search

java.lang.String[] search(java.lang.String searchForThis,
                          int targetReturnedArraySize,
                          Liquid liquidCpuTime)
Returns a list of page names whose contents certainly contain the search text.

Requires a Liquid (type "liquidCpuTime") to pay for the possibly long time required for search.

Does not throw NeedLiquid because the search uses the parameter Liquid and stops when it runs out. If the search has not found anything, empty array is returned.