| java.lang.Object com.ecyrd.jspwiki.PageManager
PageManager | public class PageManager (Code) | | Manages the WikiPages. This class functions as an unified interface towards
the page providers. It handles initialization and management of the providers,
and provides utility methods for accessing the contents.
author: Janne Jalkanen since: 2.0 |
PROP_LOCKEXPIRY | final public static String PROP_LOCKEXPIRY(Code) | | |
PROP_PAGEPROVIDER | final public static String PROP_PAGEPROVIDER(Code) | | |
PageManager | public PageManager(WikiEngine engine, Properties props) throws WikiException(Code) | | Creates a new PageManager.
throws: WikiException - If anything goes wrong, you get this. |
deletePage | public void deletePage(WikiPage page) throws ProviderException(Code) | | Deletes an entire page, all versions, all traces.
|
deleteVersion | public void deleteVersion(WikiPage page) throws ProviderException(Code) | | Deletes only a specific version of a WikiPage.
|
getActiveLocks | public List getActiveLocks()(Code) | | Returns a list of currently applicable locks. Note that by the time you get the list,
the locks may have already expired, so use this only for informational purposes.
List of PageLock objects, detailing the locks. If no locks exist, returnsan empty list. since: 2.0.22. |
getCurrentLock | public PageLock getCurrentLock(WikiPage page)(Code) | | Returns the current lock owner of a page. If the page is not
locked, will return null.
Current lock. |
getPageText | public String getPageText(String pageName, int version) throws ProviderException(Code) | | Fetches the page text from the repository. This method also does some sanity checks,
like checking for the pageName validity, etc. Also, if the page repository has been
modified externally, it is smart enough to handle such occurrences.
|
getProvider | public WikiPageProvider getProvider()(Code) | | Returns the page provider currently in use.
|
getProviderDescription | public String getProviderDescription()(Code) | | |
getTotalPageCount | public int getTotalPageCount()(Code) | | |
getVersionHistory | public List getVersionHistory(String pageName) throws ProviderException(Code) | | Gets a version history of page. Each element in the returned
List is a WikiPage.
If the page does not exist, returns null, otherwise a Listof WikiPages. |
lockPage | public PageLock lockPage(WikiPage page, String user)(Code) | | Locks page for editing. Note, however, that the PageManager
will in no way prevent you from actually editing this page;
the lock is just for information.
null, if page could not be locked. |
pageExists | public boolean pageExists(String pageName) throws ProviderException(Code) | | |
unlockPage | public void unlockPage(PageLock lock)(Code) | | Marks a page free to be written again. If there has not been a lock,
will fail quietly.
Parameters: lock - A lock acquired in lockPage(). Safe to be null. |
|
|