|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.PageManager
public class PageManager
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.
Field Summary | |
---|---|
protected HashMap |
m_pageLocks
|
static String |
PROP_LOCKEXPIRY
|
static String |
PROP_PAGEPROVIDER
|
static String |
PROP_USECACHE
|
Constructor Summary | |
---|---|
PageManager(WikiEngine engine,
Properties props)
Creates a new PageManager. |
Method Summary | |
---|---|
void |
deletePage(WikiPage page)
Deletes an entire page, all versions, all traces. |
void |
deleteVersion(WikiPage page)
Deletes only a specific version of a WikiPage. |
List |
getActiveLocks()
Returns a list of currently applicable locks. |
Collection |
getAllPages()
|
PageLock |
getCurrentLock(WikiPage page)
Returns the current lock owner of a page. |
WikiEngine |
getEngine()
|
WikiPage |
getPageInfo(String pageName,
int version)
|
String |
getPageText(String pageName,
int version)
Fetches the page text from the repository. |
WikiPageProvider |
getProvider()
Returns the page provider currently in use. |
String |
getProviderDescription()
|
int |
getTotalPageCount()
|
List |
getVersionHistory(String pageName)
Gets a version history of page. |
PageLock |
lockPage(WikiPage page,
String user)
Locks page for editing. |
boolean |
pageExists(String pageName)
|
boolean |
pageExists(String pageName,
int version)
|
void |
putPageText(WikiPage page,
String content)
Puts the page text into the repository. |
void |
unlockPage(PageLock lock)
Marks a page free to be written again. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_PAGEPROVIDER
public static final String PROP_USECACHE
public static final String PROP_LOCKEXPIRY
protected HashMap m_pageLocks
Constructor Detail |
---|
public PageManager(WikiEngine engine, Properties props) throws WikiException
WikiException
- If anything goes wrong, you get this.Method Detail |
---|
public WikiPageProvider getProvider()
public Collection getAllPages() throws ProviderException
ProviderException
public String getPageText(String pageName, int version) throws ProviderException
ProviderException
public WikiEngine getEngine()
public void putPageText(WikiPage page, String content) throws ProviderException
page
- Page to savecontent
- Wikimarkup to save
ProviderException
- If something goes wrong in the saving phasepublic PageLock lockPage(WikiPage page, String user)
public void unlockPage(PageLock lock)
lock
- A lock acquired in lockPage(). Safe to be null.public PageLock getCurrentLock(WikiPage page)
public List getActiveLocks()
public WikiPage getPageInfo(String pageName, int version) throws ProviderException
ProviderException
public List getVersionHistory(String pageName) throws ProviderException
ProviderException
public String getProviderDescription()
public int getTotalPageCount()
public boolean pageExists(String pageName) throws ProviderException
ProviderException
public boolean pageExists(String pageName, int version) throws ProviderException
pageName
- version
-
true
if the page exists, false
otherwise
ProviderException
public void deleteVersion(WikiPage page) throws ProviderException
ProviderException
public void deletePage(WikiPage page) throws ProviderException
ProviderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |